The Science of Deception: How AI Detection Works

Netanel Ossi
Founder, FauxLens

How AI detection works: the checks behind it
Seeing stopped being believing somewhere around 2023. While a human eye might be fooled by a hyper-realistic Midjourney v6 portrait or a Sora video, the digital file tells a different story. Every image file holds clues about where it came from, a bit like a fingerprint. Experts don't just look at a picture; they study the file itself, down to the smallest detail. This guide walks through the main techniques the field uses, and which of them a FauxLens scan actually runs.
1. Error Level Analysis (ELA): The Compression Map
Start with how photos are saved. A camera usually saves a photo as a JPEG, which shrinks the file by storing the picture in small 8x8 pixel squares (a method called the discrete cosine transform, DCT).
Sponsored
How ELA Works:
- The Real: A raw photograph has a uniform compression rate across the entire image. The sky, the ground, and the subject all share the same 'quality' history.
- The Fake: AI models don't compress; they 'paint.' When a user splices an AI face onto a real body, or when a diffusion model generates a scene, the compression artifacts often clash. ELA resaves the image at a known quality (e.g., 95%) and subtracts the result from the original.
- The Verdict: If the face glows white while the background stays black in the ELA map, it means the face has a different compression history. It is a mathematical anomaly.
2. The Noise Floor Paradox (PRNU)
Every camera sensor has tiny flaws from the factory: some pixels react to light a little more than others. Those flaws leave a faint, unique pattern in every photo, like a fingerprint for that camera (photo response non-uniformity, PRNU).
The AI Flaw:
Generative AI models are deterministic software, not hardware. They struggle to replicate true, chaotic ISO noise.
- Real Photos: Have fine, random grain that follows the light in the scene, the way real camera grain does (Gaussian noise).
- AI Images: Often have 'smooth' noise or repetitive noise patterns that look like a tiled texture. Noise analysis tools scan for this 'synthetic smoothness.' If an image is too perfect, that is a reason for suspicion.
3. Lighting Consistency (Shadow Logic)
Generative models like DALL-E 3 are excellent at textures (skin, fabric) but notoriously bad at global physics. They often place shadows in contradictory directions.
The Vector Check:
Shadow analysis, sometimes called 'Shadow Logic', draws virtual vectors from light sources to objects. If the shadow on a nose suggests a light source from the top-right (45°), but the shadow on the collar suggests a light source from the top-left (330°), the image violates the laws of physics. AI models often hallucinate light sources to make the subject look dramatic, ignoring the rest of the scene.
4. Frequency Domain Analysis
Sometimes a fake looks normal but shows up when the picture is turned into a map of its repeating patterns. Analysts do this with a bit of math (a Fourier transform, which shows the image in the frequency domain).
In that map, AI images often show sharp, unnatural spikes, left behind when the AI enlarges its picture (common in older generators called GANs, generative adversarial networks). A real camera lens acts as a natural low-pass filter, creating a smooth rolloff that AI struggles to mimic.
5. GAN Fingerprinting: The Manufacturer's Serial Number
Every AI image generator has a structural identity baked into its outputs. Just as a firearm leaves unique tooling marks on a bullet casing, each generative architecture, whether a GAN or a latent diffusion model, leaves a characteristic mathematical residue in the frequency spectrum of its images. These traces are called GAN fingerprints. They come from how each model is built and trained, and from how it enlarges its pictures.
In practice, this means that Midjourney v6, DALL-E 3, Stable Diffusion XL, and Flux each produce a subtly different spectral signature. Midjourney's proprietary upscaling pipeline introduces a repeating grid artifact at specific spatial frequencies. Stable Diffusion's VAE decoder leaves a characteristic low-amplitude ringing pattern around high-contrast edges. Flux, with its rectified flow architecture, creates a distinctive phase coherence pattern that differs measurably from classifier-free guidance models.
Research attribution systems build fingerprint libraries from large sets of verified outputs from each generator, compute a submitted image's spectral residual, and match it against that library. FauxLens does not run spectral fingerprint matching or attribute an image to a specific model. The one attribution it makes is by vendor: it reads the invisible SynthID watermark that Google and OpenAI embed in images their AI tools make, and names the vendor, not the model. In research settings, spectral fingerprints can survive a single JPEG re-compression cycle, though they fade with repeated re-saving and resizing. To see this on a file of your own, you can verify a photo or video in a few seconds.
6. Neural Classification: Learning What Rules Cannot Describe
The first five signals are all explicit: they can be written as equations, visualized as maps, and described in plain language. But some of the most convincing AI-generated images pass every explicit check. The lighting is consistent. The noise looks Gaussian. The compression history is uniform. And yet something is wrong; something that a trained forensic examiner would recognize immediately but struggle to articulate.
This is where neural classification operates, and it is the pixel check a FauxLens scan relies on. FauxLens sends the image to a specialist third-party detection model trained on large sets of real photographs and AI outputs, which rates how likely the image is to be AI-made. When that model cannot be used, a multimodal vision model reviews the image as a fallback. Rather than following written rules, a model like this learns from examples, picking up patterns such as the subtle correlations between eye reflections and ambient light that only real physics produces; the micro-texture gradients in human skin that differ between photographic grain and diffusion model approximations; the spatial coherence between foreground subjects and background depth of field that optically captured images exhibit and generative compositing often violates.
7. Metadata Forensics
Before any pixel-level analysis begins, FauxLens reads the file's embedded metadata. A genuine photograph captured by a smartphone or DSLR carries EXIF data that records the camera make and model, GPS coordinates, shutter speed, aperture, ISO value, and a precise timestamp. AI-generated images almost never carry coherent EXIF data, and when they do, the values are frequently inconsistent with the image content.
Beyond EXIF, forensic examiners also look at ICC color profiles embedded in the file. Professional cameras embed manufacturer-specific ICC profiles that match documented sensor color matrices. Common generation pipelines embed generic sRGB profiles or no profile at all. FauxLens itself reads EXIF and XMP metadata and C2PA (Coalition for Content Provenance and Authenticity) provenance manifests, an emerging standard that cryptographically signs an image's creation history. An AI tool's credential or generator signature can settle a scan on its own, and a genuine camera record can help clear a photo, but missing metadata is never counted as evidence of AI, because platforms strip it routinely.
Frequently Asked Questions
Can AI beat these detectors?
It is an arms race. As GANs get better at mimicking noise, detectors get better at analyzing semantic inconsistencies. No detector is foolproof, which is why FauxLens combines provenance checks (Content Credentials, metadata and invisible watermarks) with a pixel-level detection model rather than relying on a single check.
Does resizing an image hide the evidence?
Resizing or re-compressing an image (e.g., sending it through WhatsApp) can destroy some ELA evidence, while shadow and geometric inconsistencies survive in the image content. Pixel-level detectors, including the model FauxLens uses, are noticeably weaker on heavily compressed, forwarded or small images, so the original file gives the most reliable result.
Which of these checks does FauxLens run?
Not all of them. A FauxLens scan reads C2PA Content Credentials and EXIF/XMP metadata, checks for the invisible SynthID watermark that Google and OpenAI embed in images their AI tools make (naming the vendor, not the specific model), and has a specialist third-party detection model score the pixels, with a multimodal vision model as the fallback. It does not run ELA, PRNU profiling, shadow vector mapping, Fourier analysis or GAN fingerprint matching. The result is a verdict, a confidence score and the evidence lines behind it. The confidence score reflects how strongly the evidence supports the verdict; it is not a calibrated probability.
What format works best for detection?
The highest-fidelity analysis comes from the original, unmodified file, ideally a PNG or a JPEG that has not been re-compressed more than once. Every JPEG re-save cycle degrades ELA evidence, partially obscures GAN fingerprints, and weakens the pixel-level signals any detector relies on. The original file also keeps its Content Credentials and metadata, which platforms often strip. For images you control, submitting the original export from the generation tool or the original camera file to our AI image detector gives the most reliable result.