Epistemic Uncertainty for Generated Image Detection
Jun Nie, Yonggang Zhang, Tongliang Liu, Yiu-ming Cheung, Bo Han, Xinmei Tian
TL;DR
This work tackles AI-generated image detection by exploiting epistemic uncertainty from a foundation model trained on natural images. It introduces WePe, a training-free method that uses weight perturbations to elicit predictive uncertainty differences between natural and generated images, with a WePe$^*$ calibration variant that further sharpens discrimination. The approach leverages a large model like DINOv2 and demonstrates robust detection across ImageNet, LSUN, GenImage, and DRCT-2M, including resilience to common perturbations and attacks. The findings highlight the practicality of using uncertainty as a signal for distribution mismatch between real and generated content, enabled by pre-trained vision models and lightweight perturbation-based estimation. Overall, WePe offers a scalable, robust, and largely training-free pathway for detecting AI-generated imagery in real-world settings.
Abstract
We introduce a novel framework for AI-generated image detection through epistemic uncertainty, aiming to address critical security concerns in the era of generative models. Our key insight stems from the observation that distributional discrepancies between training and testing data manifest distinctively in the epistemic uncertainty space of machine learning models. In this context, the distribution shift between natural and generated images leads to elevated epistemic uncertainty in models trained on natural images when evaluating generated ones. Hence, we exploit this phenomenon by using epistemic uncertainty as a proxy for detecting generated images. This converts the challenge of generated image detection into the problem of uncertainty estimation, underscoring the generalization performance of the model used for uncertainty estimation. Fortunately, advanced large-scale vision models pre-trained on extensive natural images have shown excellent generalization performance for various scenarios. Thus, we utilize these pre-trained models to estimate the epistemic uncertainty of images and flag those with high uncertainty as generated. Extensive experiments demonstrate the efficacy of our method. Code is available at https://github.com/tmlr-group/WePe.
