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

📄 arXiv: 2608.09223v1 📥 PDF

作者: Shengbo Qi, Hongyi Fang, Benjia Zhou, Rui Mao

分类: cs.CV

发布日期: 2026-08-10


💡 一句话要点

提出PatchHead以解决AI生成图像检测的泛化问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: AI生成图像 图像检测 空间聚合 DINO模型 跨数据集泛化 深度学习 计算机视觉

📋 核心要点

  1. 现有AI生成图像检测器在不同生成器或数据集上泛化能力不足,导致检测效果不理想。
  2. PatchHead通过保留DINO补丁标记的空间结构,整合邻近区域的证据,改善了图像分类性能。
  3. 在九个跨数据集基准测试中,PatchHead显著提高了检测准确率,尤其是在最差情况下的表现。

📝 摘要(中文)

AI生成图像检测器在训练和测试图像来自不同生成器或数据集时泛化能力较差。尽管像DINO这样的视觉基础模型生成了丰富的空间表示,现有检测器通常仅使用全局聚合的CLS标记进行分类。我们提出PatchHead,一个轻量级的空间聚合头,保留DINO补丁标记的二维组织,并整合邻近区域的证据。在九个跨数据集基准测试中,PatchHead在七个数据集上排名第一,在其余两个数据集上排名第二。它将最强的先前方法的平均平衡准确率从91.6%提高到94.6%,并将最差情况下的准确率从82.4%提高到89.4%。

🔬 方法详解

问题定义:本论文旨在解决AI生成图像检测器在不同生成器或数据集上泛化能力差的问题。现有方法通常依赖全局聚合的CLS标记,忽视了图像中空间分布的生成痕迹,导致检测效果不佳。

核心思路:我们提出PatchHead,一个轻量级的空间聚合头,旨在保留DINO模型生成的补丁标记的二维结构,通过整合邻近区域的证据来提升检测性能。这种设计能够更好地捕捉空间分布的真实性证据,从而改善泛化能力。

技术框架:PatchHead的整体架构包括一个冻结的DINO主干网络、插入的LoRA适配器、PatchHead本身以及辅助投影头。在训练过程中,仅优化这些新插入的组件。

关键创新:PatchHead的主要创新在于其空间聚合机制,通过保留补丁标记的空间组织,能够更可靠地转移学习到不同生成器和数据集上。这与传统的CLS标记全局表示方法形成了鲜明对比。

关键设计:在设计中,我们设置了适当的参数以确保PatchHead的轻量性,同时引入了特定的损失函数以优化空间聚合效果。网络结构上,PatchHead与DINO的补丁标记紧密结合,确保了信息的有效整合。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

PatchHead在九个跨数据集基准测试中表现优异,在七个数据集上排名第一,平均平衡准确率从91.6%提升至94.6%,最差情况下的准确率从82.4%提升至89.4%。这些结果表明,PatchHead在提高检测性能方面具有显著优势。

🎯 应用场景

该研究的潜在应用领域包括图像生成内容的检测、社交媒体平台的内容审核以及虚假信息的识别。通过提高AI生成图像的检测准确性,PatchHead能够在多个行业中增强信任度和安全性,未来可能对内容监管和数字媒体的真实性验证产生深远影响。

📄 摘要(原文)

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.