通过保留图像局部特征提升生成图像检测的跨模型泛化能力
PatchHead: Learning Spatial Patch Evidence for Generalizable AI-Generated Image Detection

- 用空间聚合头保留DINO的局部块特征,不只依赖全局特征
- 在9个数据集上平均准确率提升至94.6%,最差情况提高6.9个百分点
- 轻量级设计,参数和计算量仅增加8.6%和0.08%
当训练与测试图像来自不同生成器或数据集时,当前AI生成图像检测器泛化性能较差。尽管视觉基础模型(如DINO)能生成丰富的空间表征,但现有方法通常仅使用全局聚合的CLS token进行分类。我们假设:将DINO特征全局聚合为单一CLS token会掩盖空间分布的生成痕迹。为此,提出PatchHead——一种轻量级空间聚合头,保留DINO块令牌的二维结构,并整合邻近区域的证据。训练时冻结预训练DINO主干,仅优化插入的LoRA适配器、PatchHead和辅助投影头。在涵盖人工标注与真实场景的九个跨数据集基准上,PatchHead在七项中排名第一,两项第二。其平均平衡准确率从91.6%提升至94.6%(+3.0),最差情况准确率从82.4%提升至89.4%(+6.9),同时仅增加8.6%可训练参数和0.08%额外浮点运算。定性分析表明,PatchHead(i)降低类别条件域差异,(ii)将表示从内容主导的显著性转向空间分布的真实性证据。这些发现从表征层面解释了为何空间块聚合比单个CLS全局表示更具跨生成器与数据集的迁移性。代码与模型将在论文录用后公开。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。