MIRROR: Manifold Ideal Reference ReconstructOR for AI-Generated Image Detection

Ruiqi Liu, Manni Cui, Ziheng Qin, Zhiyuan Yan, Ruoxin Chen, Yi Han, Zhiheng Li, Junkai Chen, ZhiJin Chen, Kaiqing Lin, Jialiang Shen, Lubin Weng, Yan Wang, Shu WuNeurIPS 2026

TL;DR

Most AI-image detectors hunt for generator-specific glitches—a strategy that breaks the moment a shiny new diffusion model drops. MIRROR flips the game: instead of memorizing a fleeting catalog of fake artifacts, it learns a rock-solid "memory bank" of what real images look like, catching forgeries by measuring how awkwardly they reconstruct from reality's building blocks. Tested against 50 humans and 27 modern generators, it outperforms both laypeople and computer-vision experts, even on fakes curated specifically to fool the human eye.

What Problem Does This Paper Address?

Hunting for AI-generated images (AIGI) usually feels like forensic whack-a-mole. Standard detectors treat the task as binary classification: feed a neural network piles of real and synthetic images, and let it find discriminative artifacts (weird frequency spectra, upsampling traces, subtle texture quirks). That works great—right until a new generator arrives or an image gets compressed on Reddit, wiping those fragile fingerprints away.

Even stranger, throwing bigger pretrained vision models at the problem hits a wall. As backbones scale up, traditional detectors plateau in accuracy on unseen generators. Why? Because without an explicit anchor for what natural images look like, larger models just get better at overfitting to the specific quirks of whatever fake images were in their training set. Meanwhile, synthetic distributions are an ever-shifting target, whereas natural photography is relatively stable.

Comparison of traditional artifact detection, human reference comparison, and MIRROR

Methods

Inspired by how humans spot fakes more easily when looking at real reference photos, MIRROR (Manifold Ideal Reference ReconstructOR) reframes detection as a Reference-Comparison problem across two phases:

  • Phase 1: Encoding Reality Priors (Unsupervised, Real-Only). Using a frozen DINO vision backbone, MIRROR extracts patch-level feature tokens strictly from real photographs. It trains a discrete memory bank of $K=4096$ learnable "prototypes" (think of them as Lego bricks of natural image features), using a diversity penalty so prototypes don't clump together. Given an input image, a multi-head cross-attention module selects only the Top-$k$ ($k=128$) best-matching prototypes to piece together an "Ideal Reference" of what that image should look like in the real-image feature space.
  • Phase 2: Reference-Comparison Detection (Supervised). Here is the crucial trick: the memory bank and reconstruction projector are completely frozen so synthetic data can never warp the definition of "real." Lightweight LoRA adapters on the backbone and a classifier head are then trained on real and fake labels using two complementary clues:
  • Comparison Residual: The raw reconstruction error between the input's actual features and its reconstructed Ideal Reference.
  • Reconstruction Perplexity: A measure of retrieval uncertainty (derived from attention entropy and max logits)—essentially asking, "Did the memory bank panic and guess while trying to build this?"

Datasets

  • Training: Phase 1 learns reality priors from 200k real MSCOCO images. Phase 2 fine-tunes using real images alongside Stable Diffusion v1.4 fakes (from GenImage), JPEG-aligned to prevent format-shortcut cheating.
  • Existing Benchmarks: Evaluated across 6 standard academic benchmarks (AIGCDetect, GenImage, DRCT-2M, UnivFakeDetect, Synthbuster, EvalGEN) and 7 messy "in-the-wild" social-media/degraded benchmarks (Chameleon, SynthWildx, WildRF, AIGIBench, CO-SPY-Bench, BFree-Online, RRDataset).
  • New Benchmark — Human-AIGI: Existing datasets test generator variety, not human perceptibility. The authors recruited 50 participants (lay users, CV researchers, and dedicated AIGI forensics experts) to judge over 30,000 images across 27 modern generators (including FLUX, Midjourney-style models, GPT-Image, and Imagen 4). By tracking accuracy, perceived realism, and response latency (hesitation!), they curated a Human-Imperceptible (Hard) subset of fakes that actively deceive people or cause prolonged second-guessing.

Key Insights and Ideas

  • Scaling laws finally wake up: While baseline detectors flatline as backbone parameters grow from tens of millions to a billion, anchoring decisions to a fixed real-domain reference unlocks steady scaling gains from DINOv3-Base all the way to Huge+.
Figure 2: Scalability on Human-AIGI. The eval- uated detectors show limited gains as their back- bones scale (NPR [44], UnivFD [34], DDA [9]); MIRROR improves from Base to Huge.
  • Don't pollute the anchor: In ablations, building the memory bank from mixed real and fake prototypes actually performed worse than having no memory bank at all! Mixing distributions lets synthetic anomalies sneak through reconstruction; keeping the bank strictly real—and sparse—is what forces fakes to stand out.
  • Expertise is an internal prior: Psychophysics experiments showed laypeople jump in accuracy (from 63.8% to 88.4% in controlled subsets) simply by having real reference images next to them, mimicking what CV experts do naturally via years of staring at natural image statistics.

Key Results

  • Standard & Wild Generalization: Across 6 standard benchmarks, MIRROR (DINOv3-L) hits 94.0% balanced accuracy (+2.1 percentage points over the best baseline, B-Free). On 7 degraded in-the-wild benchmarks, it scores 91.2%, leaping +8.1 points ahead of the strongest competitor (DDA).
  • Human-Level & Beyond: On the 27-generator Human-AIGI set, MIRROR with DINOv3-L achieves 89.6% fake-image accuracy—beating lay users (76.9%) and CV experts (88.3%), while holding steady at 89.5% on the Hard human-imperceptible subset. Scaling to DINOv3-H+ pushes accuracy to 93.6%, nearly matching dedicated AIGI forensics experts (94.5%).
  • Fast & Robust: Because it compares features rather than running a heavy diffusion autoencoder at test time, MIRROR runs at ~20 FPS on a single V100 GPU and holds up remarkably well under Gaussian blur and JPEG compression.

Limitations and Future Work

  • Downsampling hurts: While resilient to blur and compression, strong resolution downsampling ($0.5\times$ scale) drops balanced accuracy to ~75%, showing that losing spatial resolution still dulls fine-grained feature comparisons.
  • Coverage boundaries: MIRROR's effectiveness hinges on how well its 200k-image MSCOCO memory bank covers the real world—and how much real and synthetic features overlap. Expanding real-domain coverage beyond natural photography (e.g., medical, satellite, or heavily stylized art) and exploring better fixed-reference adaptation strategies remain open frontiers.

Summary updated

Abstract

High-fidelity generative models have narrowed the perceptual gap between synthetic and real images, putting media security under increasing pressure. Many AI-generated image (AIGI) detectors rely on artifact cues and struggle to generalise to new generators. We investigate whether a real-image reference, learned only from real images, provides a more transferable anchor than generator-specific forgery cues. We therefore cast AIGI detection as a Reference-Comparison problem that checks consistency against a learned real-domain feature representation. We propose **MIRROR** (**M**anifold **I**deal **R**eference **R**econstruct**OR**), which encodes real-image priors in a diversity-regularized discrete memory bank and uses Top-$k$ attention to reconstruct an Ideal Reference. A supervised second phase combines reconstruction residuals and retrieval uncertainty while keeping the reference bank and projector fixed. To measure detector performance relative to human inspection, we build the Human-AIGI benchmark, which contains a psychophysically curated human-imperceptible subset. Across 14 benchmarks, MIRROR improves average benchmark scores over prior methods by 2.1 percentage points on six standard benchmarks and 8.1 points on seven in-the-wild benchmarks. On the original Human-AIGI set, DINOv3-L reaches 89.6% fake-image accuracy over 27 generators, exceeding the reported means of lay users and computer-vision experts. Scaling to DINOv3-H+ raises this score to 93.6%. Code: [https://github.com/handsome-rich/MIRROR](https://github.com/handsome-rich/MIRROR).
BibTeX
@inproceedings{liu2026mirror,
  author = {Ruiqi Liu and Manni Cui and Ziheng Qin and Zhiyuan Yan and Ruoxin Chen and Yi Han and Zhiheng Li and Junkai Chen and ZhiJin Chen and Kaiqing Lin and Jialiang Shen and Lubin Weng and Yan Wang and Shu Wu},
  title = {{MIRROR: Manifold Ideal Reference ReconstructOR for AI-Generated Image Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=rNJxI4kA0N},
}
Figure