🤖 AI Summary
Existing AI-generated image detectors achieve strong performance on supervised benchmarks but suffer from poor generalization, primarily due to spurious correlations—such as content and formatting biases—in training data, which hinder learning of generator-specific artifacts. To address this, we propose B-Free, a bias-free training paradigm that conditions on real images and employs Stable Diffusion’s reverse sampling to synthesize semantically aligned fake counterparts, thereby establishing the first paired real-fake training framework that decouples artifact learning from content bias. Our method integrates conditional inversion, content-preserving augmentation, and bias-free contrastive learning. Evaluated across 27 diverse generative models—including FLUX and SD3.5—B-Free achieves state-of-the-art generalization, out-of-distribution robustness, and prediction calibration. Code and dataset are publicly released.
📝 Abstract
Successful forensic detectors can produce excellent results in supervised learning benchmarks but struggle to transfer to real-world applications. We believe this limitation is largely due to inadequate training data quality. While most research focuses on developing new algorithms, less attention is given to training data selection, despite evidence that performance can be strongly impacted by spurious correlations such as content, format, or resolution. A well-designed forensic detector should detect generator specific artifacts rather than reflect data biases. To this end, we propose B-Free, a bias-free training paradigm, where fake images are generated from real ones using the conditioning procedure of stable diffusion models. This ensures semantic alignment between real and fake images, allowing any differences to stem solely from the subtle artifacts introduced by AI generation. Through content-based augmentation, we show significant improvements in both generalization and robustness over state-of-the-art detectors and more calibrated results across 27 different generative models, including recent releases, like FLUX and Stable Diffusion 3.5. Our findings emphasize the importance of a careful dataset design, highlighting the need for further research on this topic. Code and data are publicly available at https://grip-unina.github.io/B-Free/.