[Paper Review] Your AI-Generated Image Detector Can Secretly Achieve SOTA Accuracy, If Calibrated
The paper shows detectors biased under test-time distribution shift and proposes a light, post-hoc logit calibration (with or without labels) to restore Bayes-optimal decision boundaries without retraining.
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.
Motivation & Objective
- Identify systematic test-time bias in AI-generated image detectors under distribution shift.
- Provide a theoretically grounded post-hoc calibration framework to correct biased logit outputs.
- Enable robust detection across unseen generative models with minimal data and computational overhead.
- Show that a simple scalar logit correction can approach Bayes-optimal performance under shift.
Proposed method
- Model the detection problem under training and test distributions with class-conditional input shift and label prior shift.
- Derive that the default zero threshold is non-Bayes-optimal under shift and that a global scalar logit correction can realign the decision boundary.
- Propose two calibration strategies: supervised logit calibration using KDE with small labeled target data; and unsupervised calibration based on logit distribution symmetry (bimodal assumption).
- Provide a practical procedure to estimate the scalar alpha (or calibrated f(x) = f(x) - alpha) without retraining the backbone.

Experimental results
Research questions
- RQ1Can test-time distribution shift cause a systematic bias in AI-generated image detectors leading to fake images being misclassified as real?
- RQ2Can a lightweight post-hoc, scalar correction to logits recover Bayes-optimal decisions under shift without retraining?
- RQ3How effective are supervised versus unsupervised calibration methods across diverse generators and benchmarks?
Key findings
- Calibration significantly improves detection accuracy across unseen generators without retraining the backbone.
- A constant logit shift can compensate for both label priors and input shift under realistic test-time conditions.
- Supervised KDE-based calibration with a few labeled target samples yields substantial gains over the baseline.
- Unsupervised, symmetry-based calibration on unlabeled target logits can recover robust thresholds when logits exhibit bimodal structure.
- The proposed calibration enhances robustness on AIGCDetectBenchmark and GenImage across multiple detectors and generators.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.