TL;DR
ReGFLoW is the first weakly supervised framework designed to localize AI-edited regions in diffusion-generated images using only image-level "real/fake" labels. By repurposing diffusion reconstruction errors as spatial priors and employing an artifact-centric Multiple Instance Learning (MIL) strategy, it achieves significantly better generalization across unseen image generators than traditional models trained with pixel-level masks.
What Problem Does This Paper Address?
As generative models like Stable Diffusion and Flux.1 become mainstream, the ability to localize manipulated regions—not just flag an entire image as "fake"—is crucial for digital forensics and explainability.
Current state-of-the-art methods rely on fully supervised learning, which requires precise pixel-level masks for training. The authors argue this approach has two fatal flaws:
- Scalability: In the real world, many edits are performed via text prompts or conversational interfaces that don't produce a ground-truth mask.
- Misleading Supervision: Diffusion-based editing involves latent encoding and blending processes that often cause artifacts to "bleed" beyond the intended edit area. Fully supervised models learn to overfit to sharp mask boundaries rather than the actual, subtle artifact traces. This leads to poor out-of-domain (OOD) generalization; a model trained on Stable Diffusion 1.5 masks often fails to detect edits from a newer model like Flux.1.
Methods
The authors propose ReGFLoW (Reconstruction-Guided Fake Localization under Weak supervision). The core innovation is moving away from pixel-perfect masks and instead using image-level labels combined with a "dense prior."
1. Reconstruction-Guided Prior
The model leverages a frozen Variational Autoencoder (VAE) from Stable Diffusion. Because AI-generated content is already "projected" through a learned latent manifold, it typically reconstructs with a smaller or more regular residual compared to natural, real-world images. ReGFLoW uses this reconstruction error map as a spatial guide, injecting it into both the feature space (to adjust local artifact features) and the score space (as a logit bias).
2. Dual-Encoder Backbone
To capture both high-level context and low-level traces, the system uses a dual-encoder: a frozen CLIP ViT-L for global semantic cues and a trainable MAE ViT-B for local artifact sensitivity.
3. Artifact-Centric Multiple Instance Learning (MIL)
Since the model only knows if an image is "fake" or "real" (weak supervision), it treats the image as a "bag of patches." * For a fake image, the model assumes at least some patches contain artifact evidence. * For a real image, no patches should show such evidence. The authors use a specialized soft top-k aggregation (normalized softmax) to identify the most suspicious patches without relying on object-aligned or boundary-based priors.
Datasets
The researchers evaluated ReGFLoW on OpenSDID, a benchmark for diffusion-generated and edited images.
- Training: Performed exclusively on the SD1.5 split using only image-level labels.
- Evaluation: Conducted on both in-domain (SD1.5) and cross-domain generators, including SD2.1, SDXL, SD3, and Flux.1.
- Settings: They tested on "P" (partial edits only) and "P+F" (a mix of partial edits and fully synthetic images).
Key Insights and Ideas
- The Generalization Paradox: The paper reveals that less supervision (image-level labels) can lead to better performance on new generators. By not forcing the model to match a specific (and often inaccurate) mask boundary, the model is forced to learn transferable artifact cues that exist across different diffusion models.
- Reconstruction as a Spatial Map: While reconstruction error has been used for image-level detection before, ReGFLoW successfully repurposes it as a dense spatial prior to guide localization.
- Non-Semantic Localization: Unlike traditional segmentation (which looks for "cats" or "cars"), AI artifacts are often non-semantic (e.g., a slight texture change in the background). The MIL approach is uniquely suited for this because it doesn't assume the "fake" region follows object boundaries.
Key Results
ReGFLoW demonstrates remarkable stability across different generators compared to fully supervised baselines:
- Cross-Generator Superiority: In the partial-edit (P) setting, ReGFLoW achieved an OOD Average F1-score of 38.6, outperforming most fully supervised baselines.
- The Flux.1 Test: On Flux.1 (the generator most different from the training set), ReGFLoW achieved a 29.2 F1, whereas the fully supervised MaskCLIP plummeted to 18.4.
- Image-Level Detection: Despite being designed for localization, ReGFLoW also achieved the highest OOD Average F1 (76.22) for image-level detection, proving that localized evidence helps global classification.
Limitations and Future Work
- Computational Overhead: The method requires computing a reconstruction residual map using a VAE, which adds an extra preprocessing step and inference cost compared to RGB-only methods.
- Precision on Tiny Edits: Because the model learns via patch-level MIL scoring, it can be less precise for extremely small edits (smaller than the patch resolution), sometimes activating nearby regions instead of the exact pixels.
- Future Directions: The authors suggest exploring ways to reduce the inference cost and improving the resolution of the localization for micro-manipulations.
Summary updated