Introduction
The rapid advancement of generative models, such as Stable Diffusion, Midjourney, and DALL-E, has made it increasingly difficult to distinguish between real and synthetic images. While various detection methods have been proposed, they often suffer from a "generalization bottleneck." These models tend to overfit to the specific artifacts of their training data (e.g., GAN-specific spectral patterns) and fail when encountering images from unseen generators. The core challenge lies in developing a detector that understands the intrinsic properties of "naturalness" rather than just memorizing generator-specific noise.
Proposed Method: Mixture of Low-rank Experts (MoLE)
To address the generalization issue, we introduce a parameter-efficient fine-tuning (PEFT) strategy called Mixture of Low-rank Experts (MoLE), built upon a frozen CLIP-ViT backbone. CLIP-ViT provides a robust foundation of "visual-world knowledge" from its extensive pre-training on 400 million image-text pairs.
The MoLE architecture consists of several key innovations:
- Frozen Backbone: By keeping the majority of the CLIP-ViT weights frozen, we preserve its generalized feature representations and prevent catastrophic forgetting.
- MoLE Adapters: Instead of full fine-tuning, we insert small, trainable Low-Rank Adaptation (LoRA) modules into the MLP layers of the deeper Transformer blocks.
- Shared and Separate Experts: The system utilizes a "shared" LoRA to capture common features across datasets, alongside several "separate" LoRAs of varying ranks that act as specialized experts.
- Token Routing: A learnable "router" dynamically decides which expert should process each image token, allowing the model to adapt to different generative patterns without over-relying on any single adapter.
- Selective Adaptation: Empirical results show that adapting only the last three blocks of the ViT yields the best performance, as shallow blocks are more prone to overfitting on low-level, generator-specific noise.
Experimental Setup
The model was initially trained on the ProGAN/LSUN dataset, comprising 720,000 images. To evaluate its "universal" detection capabilities, it was tested against two comprehensive benchmarks:
- UnivFD Benchmark: Includes 19 different generators, spanning GANs (e.g., StyleGAN, StarGAN), Diffusion models (e.g., ADM, LDM, GLIDE), and Autoregressive models (e.g., DALL-E).
- GenImage Benchmark: Features high-quality, modern generators like Midjourney, Stable Diffusion v1.4/v1.5, and Wukong.
Results and Discussion
The MoLE approach demonstrates significant improvements over existing state-of-the-art (SOTA) methods. On the UnivFD benchmark, our method achieved a +12.72% increase in average accuracy across unseen diffusion and autoregressive models compared to the leading baseline. Furthermore, it showed a +3.64% mAP improvement over the previous best method (UnivFD) when using the same backbone.
A critical aspect of a practical detector is its resilience to post-processing. As shown in the robustness analysis, the MoLE-based detector maintains high performance even under significant Gaussian blurring and JPEG compression. It exhibits a much flatter performance degradation curve compared to competitors like CNNSpot and UnivFD, particularly on diffusion and autoregressive models.
Key Insights
- Efficiency: The best-performing variant (ViT-L/14) requires training only 0.08% of its total parameters, making it highly resource-efficient.
- Data Resilience: The detector remains effective even with extremely limited training data (as little as 0.28% of the original set), highlighting the strength of the pre-trained CLIP features.
- MoE as Regularization: The Mixture of Experts structure acts as a form of dropout, preventing the model from becoming overly dependent on specific artifacts and fostering a more robust decision boundary.
Conclusion
The Mixture of Low-rank Experts (MoLE) provides a powerful and efficient framework for universal AI-generated image detection. By leveraging the semantic depth of CLIP-ViT and the flexibility of MoE adapters, it achieves superior generalization across diverse generative architectures. Future work will focus on improving the interpretability of these forensic decisions, moving toward a system that can explain why an image is identified as synthetic.
Summary updated