Detectors of AI-generated images are typically trained using samples from specific Generative AI architectures and degrade as soon as a new architecture emerges. Recent approaches have explored self-supervised pre-training as an alternative solution, yet standard frameworks work against the forensic task, since their augmentations overwrite the micro-statistics of image formation. This paper introduces Forensic Twins, a Self-Supervised Residual Learning (SSRL) framework whose pretext task removes shared image content between views. Each image is mapped through a forensic residual extractor, from which two spatially disjoint crops are drawn. Sharing no pixel, the two views leave the redundancy-reduction objective with a predominantly content-independent common signal, the stationary fingerprint of the image acquisition pipeline. The encoder is exclusively trained on real images; no AI-generated image is used to learn the representation. Experiments show competitive results in zero-shot, few-shot, and linear probing scenarios, reaching 97.21% AUC across 26 unseen AI generators, including GANs, diffusion models, and commercial systems. We also provide insightful analysis on the learned representation regarding unsupervised clustering on different AI generators and its forensic properties. Code, weights and exact splits are publicly available.
翻译:暂无翻译