Search papers, labs, and topics across Lattice.
This paper introduces PatchHead, a novel spatial aggregation head that enhances AI-generated image detection by preserving the two-dimensional organization of DINO patch tokens rather than relying solely on a globally aggregated CLS token. The authors demonstrate that PatchHead significantly improves detection performance across nine cross-dataset benchmarks, achieving a 3.0-point increase in average balanced accuracy and a 6.9-point increase in worst-case accuracy compared to the strongest prior method. By effectively reducing class-conditional domain discrepancies and focusing on spatial authenticity evidence, PatchHead offers a compelling representation-level explanation for its superior generalization across different image generators and datasets.
Spatial aggregation with PatchHead boosts AI-generated image detection accuracy by over 3% while only adding minimal computational overhead.
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.