Detecting Generated Images by Fitting Natural Image Distributions

Yonggang Zhang, Jun Nie, Xinmei Tian, Mingming Gong, Kun Zhang, Bo Han

Introduction

The rapid advancement of generative AI models, such as Sora and Flux, has created a significant challenge for digital forensics. Traditional deepfake detectors typically operate as binary classifiers, trained to distinguish between real images and fakes from specific generative models. However, these detectors often fail to generalize to unseen models because they overfit to the unique "fingerprints" of their training data. As generative outputs increasingly mimic the statistical properties of natural images, a more robust approach is required.

In their NeurIPS 2025 paper, "Detecting Generated Images by Fitting Natural Image Distributions," Zhang et al. propose a paradigm shift: instead of learning the characteristics of "fake" images, detection should focus on modeling the distribution of "natural" images.

The Manifold Hypothesis and Consistency Verification

The proposed method, Consistency Verification (ConV), is built upon the manifold hypothesis. This hypothesis posits that natural images reside on a low-dimensional, smooth manifold within a high-dimensional space. While state-of-the-art generative models produce images that appear natural, these images often sit slightly off this natural manifold.

t-SNE visualization showing that natural features (red/orange) remain consistent under transformation, while generated features (purple/green) exhibit significant shifts.

ConV identifies these deviations by measuring the consistency of an image's representation under specific transformations. The framework utilizes a self-supervised model (e.g., DINOv2) pre-trained on natural images. For a truly natural image, the model's output remains invariant to small, manifold-preserving transformations. Conversely, for a generated image, the same transformation induces a detectable shift in the feature space because the starting point was off-manifold.

Enhancing Detection with F-ConV

To address cases where the gap between generated and natural images is extremely small, the authors introduce F-ConV. This extension employs Normalizing Flows to map the complex natural manifold into a simple Gaussian distribution. During a lightweight training phase, the model is taught to "extrude" generated images away from the Gaussian center, effectively amplifying the distance between real and fake representations in the latent space.

Experimental Results and Generalization

The effectiveness of ConV and F-ConV was evaluated across diverse datasets, including ImageNet, LSUN-BEDROOM, and frontier models like OpenAI’s Sora and Flux.1 [dev].

Feature distribution analysis for Midjourney-generated images, demonstrating the detectable shift in latent space compared to natural images.

A key finding was the method's superior generalization. While traditional binary classifiers achieved near-random performance (approx. 52% AUROC) on Sora-generated content, the training-free ConV achieved 87.74% AUROC. Furthermore, F-ConV reached an average AUROC of 93.77% across various ImageNet-based generators. The method also demonstrated high robustness against common perturbations such as JPEG compression and Gaussian noise.

Conclusion

By shifting the detection objective from "spotting the lie" to "verifying the truth," the manifold-based approach offers a promising path forward for AI image detection. This "one-class" strategy provides a more generalizable defense against the evolving landscape of generative AI, ensuring that even unknown models can be identified by their failure to adhere to the fundamental properties of natural images.

Summary updated

BibTeX
@inproceedings{zhang2025detecting,
  author = {Yonggang Zhang and Jun Nie and Xinmei Tian and Mingming Gong and Kun Zhang and Bo Han},
  title = {{Detecting Generated Images by Fitting Natural Image Distributions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=27xTIAFbc6},
}
Figure