Detecting Discrepancies Between AI-Generated and Natural Images Using Uncertainty

Jun Nie,Yonggang Zhang,Tongliang Liu,Yiu-ming Cheung,Bo Han,Xinmei Tian
2024-12-08
Abstract:In this work, we propose a novel approach for detecting AI-generated images by leveraging predictive uncertainty to mitigate misuse and associated risks. The motivation arises from the fundamental assumption regarding the distributional discrepancy between natural and AI-generated images. The feasibility of distinguishing natural images from AI-generated ones is grounded in the distribution discrepancy between them. Predictive uncertainty offers an effective approach for capturing distribution shifts, thereby providing insights into detecting AI-generated images. Namely, as the distribution shift between training and testing data increases, model performance typically degrades, often accompanied by increased predictive uncertainty. Therefore, we propose to employ predictive uncertainty to reflect the discrepancies between AI-generated and natural images. In this context, the challenge lies in ensuring that the model has been trained over sufficient natural images to avoid the risk of determining the distribution of natural images as that of generated images. We propose to leverage large-scale pre-trained models to calculate the uncertainty as the score for detecting AI-generated images. This leads to a simple yet effective method for detecting AI-generated images using large-scale vision models: images that induce high uncertainty are identified as AI-generated. Comprehensive experiments across multiple benchmarks demonstrate the effectiveness of our method.
Computer Vision and Pattern Recognition,Artificial Intelligence
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of how to detect images generated by AI, such as deepfakes and manipulated content. With the development of generative models, AI - generated images are becoming more and more realistic, which has led to potential abuse risks in sensitive areas such as politics and economy. Therefore, there is an urgent need for an effective method to distinguish between natural images and AI - generated images. ### Main contributions of the paper 1. **Propose a new perspective**: Detect AI - generated images by calculating prediction uncertainty. Based on the distribution differences between natural images and generated images, uncertainty can be used to represent this distribution difference. 2. **Utilize large - scale vision models**: These models are only trained on natural images, so they show different uncertainties for natural images and generated images. Through weight perturbation, this uncertainty is effectively captured. 3. **Propose a simple and effective method (WePe)**: Detect AI - generated images through weight perturbation. Although the method is simple, it has shown state - of - the - art performance in multiple benchmark tests. ### Core ideas of the method - **Assumption**: There are differences in distribution between natural images and generated images. For large - scale models trained only on natural images, natural images are in - distribution data, while generated images are out - of - distribution data. - **Uncertainty estimation**: Neural networks usually show higher uncertainty for out - of - distribution samples. Therefore, it can be determined whether an image is generated by AI by calculating the uncertainty on a pre - trained large - scale vision model. - **Weight Perturbation (WePe)**: By adding noise to model parameters, observe the similarity of feature vectors before and after perturbation. If the feature change of an image is small after perturbation, it is more likely to be a natural image; otherwise, it is a generated image. ### Experimental results - Experiments were carried out on multiple benchmark datasets such as ImageNet, LSUN - BEDROOM and GenImage. The results show that WePe achieved the best detection performance without training. - Especially on the GenImage dataset, compared with training - based methods, WePe performed better on unseen generators, with an average performance improvement of 3.36%. ### Summary This paper proposes a novel and effective method for detecting AI - generated images by using the prediction uncertainty of large - scale vision models and through weight perturbation. This method is not only simple and efficient, but also has shown excellent performance in multiple benchmark tests, providing new ideas for solving the problem of detecting AI - generated images.