The exponential growth of AI-generated images (AIGIs) underscores the urgent need for robust and generalizable detection methods. In this paper, we establish two key principles for AIGI detection through systematic analysis: (1) All Patches Matter: Unlike conventional image classification where discriminative features concentrate on object-centric regions, each patch in AIGIs inherently contains synthetic artifacts due to the uniform generation process, suggesting that every patch serves as an important artifact source for detection. (2) More Patches Better: Leveraging distributed artifacts across more patches improves detection robustness by capturing complementary forensic evidence and reducing over-reliance on specific patches, thereby enhancing robustness and generalization. However, our counterfactual analysis reveals an undesirable phenomenon: naively trained detectors often exhibit a Few-Patch Bias, discriminating between real and synthetic images based on minority patches. We identify Lazy Learner as the root cause: detectors preferentially learn conspicuous artifacts in limited patches while neglecting broader artifact distributions. To address this bias, we propose the Panoptic Patch Learning (PPL) framework, involving: (1) Random Patch Replacement that randomly substitutes synthetic patches with real counterparts to compel models to identify artifacts in underutilized regions, encouraging the broader use of more patches; (2) Patch-wise Contrastive Learning that enforces consistent discriminative capability across all patches, ensuring uniform utilization of all patches. Extensive experiments across two different settings on several benchmarks verify the effectiveness of our approach.
翻译:AI生成图像(AIGIs)的指数级增长凸显了对鲁棒且可泛化检测方法的迫切需求。本文通过系统分析确立了AIGI检测的两项核心原则:(1)所有斑块皆关键:与传统图像分类中判别性特征集中于物体中心区域不同,由于生成过程的均匀性,AIGI中每个斑块均天然含有合成伪影,表明每个斑块均可作为重要的伪影检测源。(2)更多斑块更优:利用跨越多斑块的分布式伪影,可通过捕获互补性取证证据并减少对特定斑块的过度依赖,提升检测鲁棒性与泛化能力。然而,我们的反事实分析揭示了一个不良现象:朴素训练的检测器常表现出"少数斑块偏差",即仅基于少数斑块区分真实与合成图像。我们将其归因于"懒惰学习者":检测器优先学习有限斑块中的显著伪影,而忽视更广泛的伪影分布。为解决此偏差,我们提出全视斑块学习(PPL)框架,包含:(1)随机斑块替换:通过随机将合成斑块替换为真实斑块,迫使模型识别未被充分利用区域的伪影,鼓励更广泛使用更多斑块;(2)斑块级对比学习:强制所有斑块具有一致的判别能力,确保各斑块的均匀利用。在多个基准测试的两种不同设置下进行的广泛实验验证了本方法的有效性。