Imagine an image having a sense of déjà vu.
Most of today’s AI-generated images—from Stable Diffusion to Midjourney—are born in a compressed "latent" space and then translated into pixels by a component called an autoencoder (specifically, a VAE). Because the image was literally constructed by this specific decoder, it exists as a "near fixed point." If you pass that AI image through the same autoencoder a second time, it barely changes. A real photograph, however, has never "met" that decoder before; it moves much further during the round trip.
This paper, Déjà VAE, is a deep dive into this "reconstruction trace." It asks: when does this signal actually work for detection, where in a neural network is it visible, and what common operations destroy it?
TL;DR
AI-generated images are "near fixed points" of the autoencoders that created them, changing much less than real photos when re-processed. This paper shows that this "déjà vu" trace is hidden in the intermediate layers of vision models and is incredibly specific to the exact decoder used, but it is easily erased by simple resizing or JPEG compression.
What Problem Does This Paper Address?
The "arms race" between AI generators and detectors is exhausting. Most detectors are supervised: they are trained on thousands of "real" vs. "fake" examples. The problem? They often fail when a new generator (like a new version of Midjourney) hits the scene.
Researchers have long hoped for "zero-fake" detection—training a model to recognize "realness" so it can flag anything that doesn't fit. One promising signal is the reconstruction error: how much an image changes when you run it through an autoencoder. However, previous attempts were fragile and often mistook a blurry real photo for an AI fake. This paper seeks to understand the fundamental physics of this trace: where it lives, how specific it is, and why it fails in the wild.
Methods
The authors built a measuring instrument called Déjà VAE. Instead of looking at pixel-level differences (which are noisy), they use a frozen vision foundation model (DINOv3).
The process works like this:
- The Round Trip: Take an image $v$, pass it through a VAE to get a copy $R(v)$.
- The Feature Map: Feed both into DINOv3 and look at the internal representations (the "class tokens") at different layers.
- The Signal: Measure the cosine distance between the original and the copy. If the distance is tiny, the image has "déjà vu"—it likely came from that VAE.
They tested three versions:
- Déjà VAE-TF: Training-free. Just a raw score of how little the image moved.
- Déjà VAE-I / -P: Small "heads" trained only on real photos and their VAE-processed copies. No actual AI-generated images are used during training.
Datasets
The study evaluates across several major benchmarks:
- GenImage: A large-scale dataset featuring eight different generators (like ADM, BigGAN, and Stable Diffusion).
- Synthbuster: A benchmark designed to test if detectors can tell which specific model (e.g., SDXL vs. DALL-E 3) created an image.
- Chameleon: An "in-the-wild" benchmark consisting of images collected from the web.
- RAISE: A dataset of high-resolution real-world RAW images used as the "real" baseline.
Key Insights and Ideas
- The "Goldilocks" Layers: Most detectors look at the final layer of a vision model. The authors found the déjà vu trace is actually strongest in the intermediate layers (layers 8–18 of a 24-layer DINOv3). By the final layer, the model has discarded the "low-level" VAE trace to focus on high-level semantics.
- Extreme Specificity: The trace is a "lock and key" mechanism. A detector tuned to the Stable Diffusion 1.4 decoder will catch 99% of its images but might catch only 7% of images from a "near-identical" fine-tuned version.
- Blur is Not Fake: Unlike simple pixel-distance methods, the DINO-based Déjà VAE correctly identifies that blurring a real photo makes it less like an AI image, not more. This solves a major "false alarm" problem in previous reconstruction detectors.
- The Benchmark Trap: The authors discovered a hilarious (and sobering) shortcut in the Chameleon benchmark: every single real image is exactly 500 pixels wide, while almost no AI images are. A detector could "solve" the benchmark just by looking at the image metadata without ever seeing a pixel.
Key Results
- Zero-Fake Power: A Déjà VAE detector trained on zero generated images matched the performance of a state-of-the-art detector trained on 162,000 fakes on the GenImage benchmark.
- Decoder Attribution: On Synthbuster, using the "exact" decoder allowed the training-free model to catch 94–100% of generated images at a very low (5%) false-alarm rate.
- Fragility: The signal is delicate. A single resize followed by a JPEG save (common for web uploads) or a mild blur can drop detection accuracy by 19–27 points.
Limitations and Future Work
The biggest limitation is the "Exact Decoder" requirement. To use the training-free version effectively, you need to know which VAE the generator used. If a new, secret VAE is released, this method struggles until that VAE is added to the "bank."
Furthermore, the trace's fragility means it is currently more of a forensic tool for high-quality, original files rather than a robust filter for social media, where images are aggressively compressed and resized. Future work may involve finding ways to make these VAE traces more robust to "web-washing" or identifying traces that survive the final layers of foundation models.
Summary updated