Abstract
The rise of Latent Diffusion Models (LDMs) has significantly increased the potential for visual disinformation. Traditional detection methods often rely on training deep classifiers, which struggle to generalize to unseen generative models. We present AEROBLADE (Autoencoder REconstruction-Based Latent Diffusion DEtection), a training-free method that identifies LDM-generated images by measuring their reconstruction error through an autoencoder. By exploiting the fact that synthetic images are inherently tied to a specific decoder's manifold, AEROBLADE achieves a mean Average Precision of 0.992 across multiple state-of-the-art models, including Stable Diffusion and Midjourney, without requiring any training examples.
Introduction
Text-to-image models like Stable Diffusion and Midjourney have democratized high-quality image generation but also introduced new forensic challenges. Most existing detectors are "black-box" classifiers trained on specific datasets of real and fake images. These models often fail when faced with a new generator because they haven't learned its unique artifacts. AEROBLADE addresses this by focusing on the underlying architecture of LDMs, which use a pre-trained Autoencoder (AE) to map between a compressed latent space and high-resolution pixels.
Methodology
The core of AEROBLADE is the observation that images generated by an LDM are "born" from its decoder. Consequently, these images reside on the decoder's learned manifold and can be reconstructed with minimal error. In contrast, real-world images contain complex textures and sensor noise that the AE cannot perfectly capture.
The Reconstruction Loop
The detection process involves three steps:
- Reconstruction: A suspicious image $x$ is passed through an LDM’s encoder $\mathcal{E}$ to obtain a latent representation, which is then passed through the decoder $\mathcal{D}$ to produce a reconstructed image $\hat{x} = \mathcal{D}(\mathcal{E}(x))$.
- Error Measurement: The distance between $x$ and $\hat{x}$ is calculated using Learned Perceptual Image Patch Similarity (LPIPS), specifically utilizing the second layer of a VGG16 backbone.
- Detection: A low reconstruction error indicates a synthetic origin, while a high error suggests a real image.
To handle cases where the source model is unknown, AEROBLADE employs a Multi-AE approach, testing the image against a suite of common AEs (e.g., Stable Diffusion 1.x, 2.x, Kandinsky) and selecting the minimum reconstruction error found.
Results and Performance
AEROBLADE was evaluated against 1,000 real images from LAION-Aesthetics and 7,000 generated images from models including Stable Diffusion (v1.1, v1.5, v2.1), Kandinsky 2.1, and Midjourney (v4, v5, v5.1).
- Near-Perfect Accuracy: The method achieved a mean Average Precision (AP) of 0.992 across all tested models.
- Zero-Shot Capability: Despite being training-free, AEROBLADE matched or exceeded the performance of state-of-the-art supervised classifiers explicitly trained on hundreds of thousands of images.
- Robustness: The authors identified a significant bias in the previous DIRE method related to file format inconsistencies (JPEG vs. PNG). AEROBLADE remained robust even when these biases were removed.
- Generalization to Closed Models: Interestingly, AEROBLADE successfully detected Midjourney images using the Stable Diffusion 2.1 AE, suggesting architectural similarities between these models.
Forensic Insights
Beyond simple detection, AEROBLADE offers advanced forensic capabilities:
- Model Attribution: The reconstruction error is typically lowest when the AE used for detection matches the one used for generation, allowing for precise model identification.
- Inpainting Localization: Because the method operates on local patches, it can generate heat maps to identify specific regions of an image that have been edited or inpainted by an AI, where the edited region shows significantly lower error than authentic parts.
Conclusion
AEROBLADE provides a powerful, training-free alternative to traditional deep-learning-based detectors. By leveraging the inherent architectural constraints of Latent Diffusion Models, it offers a robust and interpretable forensic tool. The method's success suggests that model developers can facilitate responsible disclosure by sharing their autoencoders, enabling detection without compromising proprietary diffusion weights.
Summary updated