给生成图像检测器加个校准层,能悄悄提升准确率。
Your AI-Generated Image Detector Can Secretly Achieve SOTA Accuracy, If Calibrated
- 用贝叶斯决策理论设计可学习的后处理校准模块
- 在小规模验证集上优化,无需重新训练即显著提升鲁棒性
- 适合部署在真实世界中需自适应的生成图像检测场景
现有生成图像检测器虽在平衡数据集上训练,测试时仍常将伪造图像误判为真实,表现出系统性偏差。我们假设该现象源于伪造样本的分布偏移及训练中隐含先验。模型往往过拟合于不具泛化性的表面伪影,导致面对测试分布变化时决策阈值错位。为此,我们提出基于贝叶斯决策理论的后处理校准框架,引入可学习标量对模型logits进行修正,在目标分布的小规模验证集上优化,保持主干冻结。该参数化调整有效补偿输出分布偏移,重置决策边界,且无需真实标签。在多个挑战性基准上实验表明,该方法无需重训练即可显著提升鲁棒性,提供轻量、原理清晰的开放世界检测解决方案。代码见:https://github.com/muliyangm/AIGI-Det-Calib。
原文摘要 · Abstract (English)
Despite being trained on balanced datasets, existing AI-generated image detectors often exhibit systematic bias at test time, frequently misclassifying fake images as real. We hypothesize that this behavior stems from distributional shift in fake samples and implicit priors learned during training. Specifically, models tend to overfit to superficial artifacts that do not generalize well across different generation methods, leading to a misaligned decision threshold when faced with test-time distribution shift. To address this, we propose a theoretically grounded post-hoc calibration framework based on Bayesian decision theory. In particular, we introduce a learnable scalar correction to the model's logits, optimized on a small validation set from the target distribution while keeping the backbone frozen. This parametric adjustment compensates for distributional shift in model output, realigning the decision boundary even without requiring ground-truth labels. Experiments on challenging benchmarks show that our approach significantly improves robustness without retraining, offering a lightweight and principled solution for reliable and adaptive AI-generated image detection in the open world. Code is available at https://github.com/muliyangm/AIGI-Det-Calib.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。