The 98.9% Match Rate: How Perceptual Hashing Databases Identify and Remove Known Illegal Content
Perceptual hashing algorithms scan billions of uploads daily to detect known illegal imagery by matching visual features rather than exact file data. While highly effective at catching unmodified files, researchers warn that adversaries can increasingly bypass these filters using minor visual perturbations.
By Lila Morgan
Share this story
In short
- Perceptual hashing algorithms like PhotoDNA identify illegal images by analyzing visual features rather than exact file data.
- These systems achieve a 98.9% match rate against standard modifications like resizing or compression.
- Researchers have proven that adding less than 1% of invisible mathematical noise can completely bypass these filters.
On April 25, 2016, engineers at the child safety organization Thorn published a technical breakdown of Microsoft's PhotoDNA, demonstrating how a single illicit image could be mathematically reduced to a greyscale grid. Instead of analyzing the picture as a human would, the algorithm stripped away color, resized the file, and mapped the intensity of adjacent pixels to generate a unique digital signature.[4]
That signature is a perceptual hash. For years, digital platforms relied on cryptographic hashes—like MD5 or SHA-256—to identify files. Cryptographic hashes are highly sensitive; changing a single pixel in a high-resolution photograph alters the resulting alphanumeric string entirely. If a user downloaded a banned image, cropped out one row of pixels, and re-uploaded it, the cryptographic filter would register it as a completely new, benign file.
Perceptual hashing was engineered specifically to solve this fragility. As the Journal of Online Trust and Safety details, algorithms like PhotoDNA and pHash evaluate the visual features of an image rather than its underlying binary code. By focusing on low-frequency data—the broad shapes and contrasts that define a picture—the hash remains stable even if the image is compressed, resized, or slightly recolored.
The mechanics rely on a mathematical operation called the Discrete Cosine Transform (DCT). When an image enters the moderation queue, the system converts it to a 32-by-32 pixel greyscale square. The DCT separates the image into a collection of frequencies and amplitudes, discarding the high-frequency details that represent sharp edges or noise. The system then computes the median value of the remaining frequencies, assigning a 1 or a 0 to each block based on whether it sits above or below that average.[1]
The output is a string of bits—often 64 or 256 characters long. To determine if a newly uploaded image matches a known piece of illegal content, the database compares the two strings using a metric called Hamming distance. This distance simply counts the number of positions where the bits differ. If the Hamming distance falls below a predetermined threshold, the system flags the upload as a match.[1]
In practice, this mechanism achieves remarkable accuracy against casual evasion. The UK communications regulator Ofcom notes in its overview of perceptual hashing technology that these systems routinely achieve a 98.9% match rate when dealing with standard user modifications, such as adding a watermark or saving a JPEG at a lower quality setting.[1]
This high efficacy rate forms the backbone of modern online safety. The National Center for Missing & Exploited Children (NCMEC) maintains a centralized clearinghouse of hashes representing known child sexual abuse material (CSAM). Social media networks, cloud storage providers, and messaging apps query this database billions of times a day, automatically intercepting and reporting files before they populate public feeds.[4]
However, the capability marketed by tech companies as an impenetrable shield is showing severe structural cracks. Researchers at Imperial College London recently published findings demonstrating that these detection mechanisms can be systematically bypassed. "Proposed mechanisms to detect illegal content can be easily evaded," the researchers concluded, highlighting a fundamental vulnerability in how the algorithms process visual data.[2]
The vulnerability stems from adversarial perturbations. A June 2024 preprint published on arXiv, titled "Assessing the Adversarial Security of Practical Perceptual Hashing Algorithms," mapped exactly how brittle the threshold systems are. By applying a layer of mathematical noise to an image—altering pixel values by less than 1%—attackers can force the DCT to calculate a wildly different hash.[3]
To a human moderator, the altered image looks identical to the original. But to the hashing algorithm, the invisible noise pushes the Hamming distance far beyond the matching threshold. The arXiv researchers found that these targeted perturbations drop the detection rate of standard perceptual hashes to near zero, allowing known illegal content to bypass automated filters entirely.[3]
Platforms cannot simply tighten the net by increasing the allowable Hamming distance. If a database accepts a 30% variance between hashes as a match, the false positive rate spikes. A system configured too loosely will begin flagging pictures of desert landscapes as illegal material simply because they share a similar horizon line and contrast profile with a banned image.
The influx of generative artificial intelligence has further strained the architecture. In a January 1, 2026 letter to NCMEC, the Stanford Center for Internet and Society analyzed the statistical impact of AI-generated CSAM on the reporting ecosystem. Because perceptual hashing relies on a database of known, human-verified seed images, it cannot proactively detect entirely novel, synthetically generated scenes.
The Stanford researchers pointed out that the sheer volume of AI-generated material threatens to overwhelm the human analysts required to verify and hash new images. A perceptual hash database is inherently reactive; it only knows what it has already been taught to look for. When generation outpaces manual verification, the system's true coverage rate drops significantly.
To counter these evasion tactics, the industry is slowly pivoting toward neural hashing—using deep learning models to extract semantic features rather than relying on rigid frequency transforms. Neural hashes are more resilient to adversarial noise, but they require vastly more computational power to run at the scale of billions of daily uploads.[2][5]
The transition to AI-driven hashing also introduces new opacity into the moderation pipeline. While the mathematics of a Discrete Cosine Transform are transparent and predictable, neural networks operate as black boxes, making it difficult for platforms to explain exactly why a specific image was flagged. As adversaries continue to refine their perturbations, the automated filters guarding the internet will have to trade predictability for resilience.[5]
Jargon, explained
- Perceptual Hashing
- An algorithm that generates a digital signature based on the visual features of an image, allowing it to recognize the picture even if it has been modified.
- Cryptographic Hash
- A mathematical function that converts a file into a unique string of characters, which changes completely if even a single byte of the original file is altered.
- Discrete Cosine Transform (DCT)
- A mathematical operation that separates an image into parts of differing frequencies, discarding high-frequency noise to focus on the core visual structure.
- Adversarial Perturbation
- Tiny, mathematically calculated changes made to an image's pixels that are invisible to the human eye but force an algorithm to misclassify the file.
- Hamming Distance
- A measurement of the difference between two strings of equal length, calculated by counting the number of positions where the corresponding symbols are different.
Common questions
What is the difference between a cryptographic hash and a perceptual hash?
A cryptographic hash changes entirely if a single pixel is altered, making it fragile for image moderation. A perceptual hash evaluates broad visual features, remaining stable even if the image is resized, compressed, or slightly cropped.
Can perceptual hashing detect AI-generated images?
Not proactively. Perceptual hashing relies on a database of known, human-verified seed images. It can only detect an AI-generated image if that specific image has already been reviewed and added to the database.
What is a Hamming distance?
It is a mathematical metric used to compare two binary strings. In perceptual hashing, it counts the number of bits that differ between an uploaded image's hash and a known illegal image's hash to determine if they are a match.
Competing readings
Platform Trust and Safety Teams
Argue that perceptual hashing is the only scalable way to process billions of uploads daily without reading user messages.
For the engineers maintaining the world's largest social networks, perceptual hashing is a necessary compromise between privacy and safety. Platforms process billions of images every day, making human review impossible. By relying on automated hashes, companies can intercept known illegal material without having to actively scan the semantic content of every private message or photo album. They view the 98.9% success rate against casual modifications as a massive victory that removes the vast majority of harmful content before it spreads.
Security and Privacy Researchers
Argue that the brittleness of current hashing algorithms makes them a false promise that is easily bypassed by bad actors.
Academic researchers and security professionals point out that perceptual hashing only works against unsophisticated users. Because the underlying mathematics of the Discrete Cosine Transform are public, adversaries can easily calculate the exact pixel perturbations needed to push an image's Hamming distance past the detection threshold. These researchers argue that marketing these tools as a comprehensive safety solution creates a false sense of security, as organized distributors of illegal content already use automated tools to apply adversarial noise and bypass the filters entirely.
Child Safety Advocates
Focus on the necessity of maintaining centralized databases to catch unmodified files, despite the technical limitations.
Organizations dedicated to child protection acknowledge the technical vulnerabilities of perceptual hashing but emphasize its foundational role in the current reporting ecosystem. Without centralized databases like the one maintained by NCMEC, platforms would have no automated way to stop the viral spread of known abuse imagery. These advocates are pushing for the rapid adoption of more resilient neural hashing models and increased funding for the human analysts needed to verify the incoming wave of AI-generated material.
- Platform Trust and Safety Teams
- Argue that perceptual hashing is the only scalable way to process billions of uploads daily without reading user messages.
- Security and Privacy Researchers
- Argue that the brittleness of current hashing algorithms makes them a false promise that is easily bypassed by bad actors.
- Child Safety Advocates
- Focus on the necessity of maintaining centralized databases to catch unmodified files, despite the technical limitations.
Perspectives this story doesn't cover
- Independent content creators flagged by false positives
- Open-source protocol developers
Sources
[1]OfcomPlatform Trust and Safety TeamsOverview of Perceptual Hashing Technology
Read on Ofcom →
[2]Imperial College LondonSecurity and Privacy ResearchersProposed mechanisms to detect illegal content can be easily evaded, study finds
Read on Imperial College London →
[3]arXivSecurity and Privacy ResearchersAssessing the Adversarial Security of Practical Perceptual Hashing Algorithms
Read on arXiv →
[4]Thorn.orgPlatform Trust and Safety TeamsMicrosoft's PhotoDNA: Leading the Fight Against Child Sexual Abuse Imagery
Read on Thorn.org →
[5]Factlen Editorial TeamSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Technology
See all →Digital Services Act
US Justice Department Intervenes in X's Appeal Against EU Digital Services Act Fine
7 sources
Platform Regulation
YouTube Rejects Meta's $18 Billion Teen Safety Settlement Framework
4 sources
Digital Regulation
EU 'Kids Act' Proposes Bloc-Wide Ban on Social Media for Under-13s and Limits Teen Access
6 sources
Network Science
Why Social Media Algorithms That Prioritize Close Friends Strangle Information Diffusion
8 sources
Comments
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns, free every day.




