PhotoDNA

On this page 7

PhotoDNA is a robust perceptual hashing technology that computes a compact signature of an image and compares it with signatures of known child sexual abuse material (CSAM), so that platforms can find copies of previously identified illegal images even after resizing, recompression or minor edits. Developed by Microsoft with Dartmouth College in 2009 and later donated for free licensing to qualified organizations, it became the de facto industry baseline for hash matching in online safety.

In tech regulation, PhotoDNA matters because laws and codes that impose detection, reporting and removal duties on platforms often assume hash matching as the proportionate first layer. It identifies only previously verified content, which keeps false positives low but means it cannot discover new abuse material on its own.

How PhotoDNA computes and matches image signatures

PhotoDNA converts an image into a numeric signature that survives common transformations, then measures the distance between that signature and those in a reference list. Unlike a cryptographic hash such as SHA-256, where changing one pixel produces a completely different value, a perceptual hash changes only slightly when the picture changes slightly.

The published outline of the method is straightforward. The image is converted to grayscale, scaled to a fixed size, divided into a grid of cells, and gradient or intensity statistics are calculated for each cell. These values form a vector of several hundred numbers. Matching uses a distance threshold: if the distance to a reference signature falls below the threshold, the platform treats the upload as a probable match and routes it to human review or automatic blocking, depending on policy.

The following table shows the main stages of the process and what each stage contributes.

StageWhat happensWhy it matters
NormalizationGrayscale conversion and resizing to a fixed sizeRemoves the effect of color shifts and resolution changes
Grid segmentationThe image is split into a regular grid of cellsCaptures local structure rather than single pixels
Feature extractionGradient statistics are computed per cellProduces values that stay stable under recompression
Signature comparisonDistance to reference hashes is calculatedTolerates small edits while rejecting unrelated images
EscalationMatches go to blocking, review and reportingConnects detection to legal reporting duties
Stages of the PhotoDNA matching pipeline

Reference signatures come from verified hash lists maintained by bodies such as the National Center for Missing and Exploited Children (NCMEC) in the United States and the Internet Watch Foundation in the United Kingdom. Platforms receive the hashes, never the images themselves, which allows matching without distributing illegal content.

Strengths and limits of robust hashing

PhotoDNA is resilient to routine transformations but not to every manipulation. Its design favors precision: a match against a verified list is strong evidence, while an absence of a match says nothing about whether an image is lawful.

The table summarizes how typical changes affect matching, based on the general behavior of grid-based perceptual hashes.

Change to the imageTypical effect on matchingComment
JPEG recompressionUsually still matchesCore design goal of the method
Resizing or scalingUsually still matchesNormalization removes resolution differences
Color or brightness shiftsUsually still matchesGrayscale conversion absorbs most shifts
Heavy croppingOften failsGrid alignment changes substantially
Mirroring or rotationOften fails without extra handlingPlatforms may hash several orientations
Newly produced materialNever matchesNo reference signature exists yet
Effect of image changes on matching

Researchers have also shown that perceptual hashes can be subject to adversarial collisions and partial hash inversion, meaning that an attacker with access to the algorithm might craft images that collide or recover coarse visual features from a signature. For this reason the exact algorithm is distributed under license rather than published as open source, and hash lists are handled as sensitive data.

PhotoDNA compared with other CSAM detection methods

PhotoDNA is one layer in a broader CSAM detection stack, and regulators increasingly distinguish between matching known material and classifying unknown material. The comparison below places it next to the methods most often discussed in policy debates.

MethodDetectsMain riskTypical role
PhotoDNAKnown images, including edited copiesEvasion by heavy editsBaseline matching on upload
Cryptographic hashingExact duplicate files onlyDefeated by any re-encodingFile-level deduplication
PDQ and TMK+PDQFKnown images and videosSimilar evasion limitsOpen-source alternative from Meta
Machine learning classifiersNew, previously unseen materialHigher false positive ratesPrioritizing content for review
Grooming text detectionSuspicious conversation patternsContext errors and privacy intrusionEarly warning in messaging
Detection approaches used against child sexual abuse material

Video is handled through PhotoDNA for Video, which extracts keyframes and hashes them individually, so that a single matching frame can flag a longer file. Cloud deployments let smaller services call a matching service through an API instead of running the algorithm locally.

Where PhotoDNA sits in online safety law

Most legal frameworks do not name PhotoDNA explicitly, yet they describe duties that hash matching is designed to meet. Regulators tend to treat matching against verified lists as a proportionate and accurate measure, while scanning for unknown content raises sharper questions about privacy and error rates.

FrameworkJurisdictionRelevance to hash matching
18 U.S.C. 2258A reporting dutyUnited StatesProviders must report apparent CSAM they become aware of to NCMEC
Online Safety Act 2023United KingdomOfcom codes recommend hash matching for many user-to-user services
Interim ePrivacy derogationEuropean UnionTemporarily permits voluntary scanning of communications for CSAM
Proposed CSA RegulationEuropean UnionWould create detection orders and an EU Centre to supply indicators
Online Safety Act 2021AustraliaeSafety Commissioner codes and standards expect proactive detection
Regulatory frameworks that shape hash matching

A recurring point of conflict is end-to-end encryption. Server-side PhotoDNA cannot inspect content the provider cannot decrypt, so proposals for client-side scanning on the device have drawn strong criticism from security researchers and privacy advocates. Transparency reports published under these laws often disclose how many items were detected through hash matching versus other methods.

Operating PhotoDNA responsibly

Effective deployment depends as much on process and governance as on the algorithm. A match should trigger a documented workflow that preserves evidence, limits staff exposure and meets reporting deadlines.

  • Tune the distance threshold on test sets so that the false positive rate remains very low.
  • Keep hash lists current, because new verified signatures are added continuously.
  • Protect reviewer wellbeing with blurred previews, grayscale display and rotation limits.
  • Preserve evidence in line with legal retention rules before removing the content.
  • Record outcomes so that transparency reporting and audits are accurate.

A common misconception is that PhotoDNA performs facial recognition or identifies people. It does not: it compares image structure only and has no knowledge of who appears in a picture.

Explained without jargon

PhotoDNA works like a fingerprint for pictures. Child protection organizations keep fingerprints of abuse images that experts have already confirmed. When someone uploads a photo to a service, the service takes the fingerprint of that photo and checks whether it looks like one on the list.

The fingerprint still matches if the picture is shrunk, saved again or slightly recolored, so simple tricks do not hide it. The service never needs to store or view the original illegal images to do this. The key limit is that it only recognizes pictures that are already on the list, so brand-new material needs other tools and human judgment.

A typical use case

A mid-sized photo-sharing community with about two million monthly users integrates a cloud matching service when the United Kingdom codes of practice take effect. Every new upload is hashed before it becomes visible, and the signature is compared with lists supplied by recognized child protection bodies.

Over one quarter, the system flags a small number of uploads, all of which a trained reviewer confirms. The service blocks the files before publication, preserves the required evidence, files reports with the competent authority and suspends the accounts. Its next transparency report states the number of items detected through hash matching, giving the regulator a clear, auditable record of compliance.