Table of Contents
Fetching ...

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.

Epistemic Uncertainty for Generated Image Detection

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.

Paper Structure

This paper contains 32 sections, 1 theorem, 32 equations, 10 figures, 13 tables.

Key Result

Theorem 3.2

Let a neural network $f(x; \theta)$ be trained on a large amount of natural images sampled from natural image distribution $\mathcal{D}^1$: $T = \{(x^1, y^1), (x^2, y^2), ...,(x^n, y^n)\}\sim \mathcal{D}^1$. The expected sensitivity of the feature representations to parameter perturbations is lower

Figures (10)

  • Figure 1: Models trained on a large number of natural images are capable of distinguishing between natural and generated images.
  • Figure 2: WePe reflects the distribution discrepancy between AI-generated and natural images.
  • Figure 3: Natural and generated images exhibit distinct sensitivities to perturbations in model weights. A moderate perturbation ($0.1$) results in minimal changes to the features of the natural image, while the generated image shows significant differences.
  • Figure 4: Comparison of cosine similarity between features on original and perturbed models. The generated images are from: (a) ADM, (b) BigGAN, and (c) DDPM.
  • Figure 5: Performance varies with perturbation intensity under different degradation mechanisms, including (a) JPEG compression, (b) Gaussian blur, and (c) Gaussian noise.
  • ...and 5 more figures

Theorems & Definitions (3)

  • Definition 3.1: Perturbation Sensitivity
  • Theorem 3.2: Differential Sensitivity
  • proof