PatchHead: Learning Spatial Patch Evidence for Generalizable AI-Generated Image Detection

📅 2026-08-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limited generalization of existing AI-generated image detection methods, which rely on global CLS tokens and neglect spatial artifacts, leading to poor performance across generators or datasets. The authors propose PatchHead, a lightweight spatial aggregation head that preserves the 2D structure of patch tokens from a DINO backbone and integrates local neighborhood evidence to enhance cross-domain robustness. This approach is the first to demonstrate that aggregating spatial patch information significantly improves detection reliability, breaking away from the conventional CLS token paradigm. Built upon a pretrained DINO model and augmented with a LoRA adapter and an auxiliary projection head, PatchHead achieves state-of-the-art results on seven out of nine cross-domain benchmarks with minimal parameter tuning, attaining an average balanced accuracy of 94.6% (+3.0%) and improving worst-case performance to 89.4% (+6.9%).
📝 Abstract
AI-generated image detectors generalize poorly when their training and test images originate from different generators or datasets. Despite the rich spatial representations produced by vision foundation models like DINO, existing detectors typically classify images using only the globally aggregated CLS token. We hypothesize that globally aggregating DINO features into a single CLS token obscures spatially distributed generation traces. To test this hypothesis, we introduce PatchHead, a lightweight spatial aggregation head that preserves the two-dimensional organization of DINO patch tokens and integrates evidence across neighboring regions. During training, we freeze the pretrained DINO backbone and optimize only the inserted LoRA adapters, PatchHead, and auxiliary projection head. Across nine cross-dataset benchmarks spanning manually curated and in-the-wild settings, PatchHead ranks first on seven datasets and second on the remaining two. It improves the strongest prior method from 91.6% to 94.6% in average balanced accuracy (+3.0 points) and raises the worst-case accuracy from 82.4% to 89.4% (+6.9 points), while introducing only 8.6% more trainable parameters and 0.08% additional FLOPs. Further qualitative analysis suggests that PatchHead (i) reduces class-conditional domain discrepancy, and (ii) redirects the representation from content-dominated saliency toward spatially distributed authenticity evidence. Together, these observations provide a representation-level account of why spatial patch aggregation transfers more reliably across generators and datasets than a single CLS-based global representation. Our code and models will be made available upon acceptance.
Problem

Research questions and friction points this paper is trying to address.

AI-generated image detection
generalization
cross-dataset
spatial representation
domain discrepancy
Innovation

Methods, ideas, or system contributions that make the work stand out.

PatchHead
spatial patch aggregation
AI-generated image detection
generalization
vision foundation models
S
Shengbo Qi
Beijing Institute of Technology, Zhuhai
H
Hongyi Fang
Beijing Institute of Technology, Zhuhai
B
Benjia Zhou
Beijing Institute of Technology, Zhuhai
Rui Mao
Rui Mao
Nanyang Technological University
Computational LinguisticsCognitive ComputingMetaphorQuantitative FinanceNeurosymbolic AI