MLEP: Multi-granularity Local Entropy Patterns for Universal AI-generated Image Detection

Lin Yuan, Xiaowan Li, Yan Zhang, Jiawei Zhang, Hongbo Li, Xinbo GaoarXiv 2025 · DOI

Introduction

As AI image generators (AIGIs) like Stable Diffusion and Midjourney reach new heights of hyper-realism, the boundary between synthetic and authentic imagery is blurring. Existing detection methods often struggle with two primary issues: semantic bias, where models learn to recognize specific objects rather than generative artifacts, and poor generalization, where detectors trained on one architecture (e.g., GANs) fail to identify images from another (e.g., Diffusion models).

To address these challenges, we introduce Multi-granularity Local Entropy Patterns (MLEP). This method shifts the focus from visual content to the underlying technical "glossy and smooth" texture characteristic of AI-generated images, providing a content-agnostic approach to universal detection.

Methodology: The MLEP Pipeline

The MLEP framework is designed to strip away semantic meaning and highlight structural flaws through a three-step process.

The MLEP pipeline: from patch shuffling to multi-scale resampling and local entropy pattern extraction.
  1. Semantic Suppression (Patch Shuffling): To prevent the model from relying on recognizable objects, the input image is divided into tiny $l \times l$ patches (as small as $2 \times 2$) and randomly shuffled. This "scrambles" the image, forcing the classifier to focus on pixel-level relationships.
  2. Multi-Scale Resampling: The shuffled image undergoes downsampling and subsequent upsampling back to its original size across various scales. This process amplifies the mathematical "footprints" left by the upsampling operations inherent in most AI generative architectures.
  3. Local Entropy Patterns (LEP): Shannon entropy is calculated within a $2 \times 2$ sliding window. Due to the small window size, entropy values are restricted to five discrete levels $\{0, 0.8, 1.0, 1.5, 2.0\}$. These maps capture the local "randomness" of pixels, serving as a robust discriminator.
  4. Classification: The resulting multi-scale entropy maps are processed by a standard CNN (e.g., ResNet-50) for final "Real vs. Fake" determination.

Experimental Setup

The robustness of MLEP was tested using a rigorous cross-dataset evaluation. The model was trained exclusively on four categories (cars, cats, chairs, horses) from the ForenSynths dataset, generated by ProGAN. It was then evaluated against a massive suite of 32 distinct models, including 16 GAN-based models (e.g., StyleGAN, BigGAN) and 16 Diffusion-based models (e.g., Stable Diffusion v1/v2, Midjourney, DALL-E 2).

Results and Analysis

MLEP achieves a remarkable 97.1% mean accuracy across all 32 test sets, outperforming previous state-of-the-art methods. Notably, despite being trained only on GAN images, it achieved 97.8% accuracy on Diffusion-based datasets, demonstrating its ability to learn a universal signature of AI generation.

Comparison of entropy value distributions between real and AI-reconstructed images across different generative models.

A key insight from our analysis is the distribution of entropy values. As shown in Figure 1, real photographs consistently exhibit a higher probability of reaching maximum entropy ($2.0$) in local patches compared to AI-generated images. This confirms that AI images are "too smooth" at a mathematical level, a feature that MLEP successfully exploits for detection.

Conclusion

MLEP provides a powerful, source-invariant solution for AI image detection by focusing on local entropy patterns rather than semantic content. By leveraging fine-grained patch shuffling and multi-scale analysis, the method achieves high accuracy and exceptional generalization across diverse generative architectures. Future work will explore the computational efficiency of larger window sizes and the system's robustness against adversarial post-processing like heavy compression or blurring.

Summary updated

Abstract

Advancements in image generation technologies have raised significant concerns about their potential misuse, such as producing misinformation and deepfakes. Therefore, there is an urgent need for effective methods to detect AI-generated images (AIGI). Despite progress in AIGI detection, achieving reliable performance across diverse generation models and scenes remains challenging due to the lack of source-invariant features and limited generalization capabilities in existing methods. In this work, we explore the potential of using image entropy as a cue for AIGI detection and propose Multi-granularity Local Entropy Patterns (MLEP), a set of entropy feature maps computed across shuffled small patches over multiple image scaled. MLEP comprehensively captures pixel relationships across dimensions and scales while significantly disrupting image semantics, reducing potential content bias. Leveraging MLEP, a robust CNN-based classifier for AIGI detection can be trained. Extensive experiments conducted in an open-world scenario, evaluating images synthesized by 32 distinct generative models, demonstrate significant improvements over state-of-the-art methods in both accuracy and generalization.
BibTeX
@misc{yuan2025mlep,
  author = {Lin Yuan and Xiaowan Li and Yan Zhang and Jiawei Zhang and Hongbo Li and Xinbo Gao},
  title = {{MLEP: Multi-granularity Local Entropy Patterns for Universal AI-generated Image Detection}},
  year = {2025},
  eprint = {2504.13726},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.13726},
}
Figure