Learning Universal Features for Generalizable Image Forgery Localization

Hengrun Zhao, Yunzhi Zhuge, Yifan Wang, Lijun Wang, Huchuan Lu, Yu Zeng · DOI

Introduction

Image forgery detection has become a high-stakes game of cat-and-mouse. Traditional methods typically hunt for specific "artifacts"—microscopic traces left by editing tools like Photoshop or early GANs. However, as generative AI (such as Stable Diffusion) continues to evolve, these traces change, leading to a significant problem with generalization. A detector trained to find "Splicing" artifacts often fails completely when faced with a "Diffusion-based inpainting" forgery. Most current models overfit to the specific "fingerprints" of the editing tools used in their training data, rendering them obsolete when new AI models emerge.

To address this, researchers have developed GIFL (Generalizable Image Forgery Localization), a framework that shifts the focus from hunting for specific "fake" traces to learning what "authentic" content looks like.

Methodology: The GIFL Framework

GIFL moves away from the standard binary classification approach (Real vs. Fake) toward a feature reconstruction paradigm. The core idea is that while there are infinite ways to forge an image, the statistical properties of pristine images are relatively consistent. By modeling the "authentic" rather than the "fake," the detector becomes much harder to fool with new generative techniques.

Comparison between traditional classification-based forgery detection and the proposed GIFL reconstruction-based paradigm.

The architecture rests on three pillars:

  1. Feature Reconstruction: The model learns to reconstruct the features of authentic areas. During inference, if a region's features don't align with the "authentic" profile the model has built, it is flagged as forged.
  2. Universal Forgery Localization Transformer (UFLT): This component uses a dual-domain attention mechanism that processes information in both the Spatial domain (pixels) and the Spectral domain (frequency patterns via Fourier Transforms). This is crucial because many AI-generated forgeries look perfect to the eye but contain anomalies in their frequency distribution.
  3. Decoupled Encoding: The system uses a frozen, pre-trained backbone (DINOv2) as an encoder. By keeping the encoder fixed, the model avoids "forgetting" general image features while the rest of the network learns the specific task of forgery localization.

Datasets and Benchmarking

The researchers identified a major gap in existing benchmarks, which often lack modern generative AI forgeries. To bridge this, they introduced Forgery ADE, a massive dataset containing 177,680 images. It utilizes eight state-of-the-art manipulation methods, including four GAN-based (Deepfill v2, CTSDG, CR-Fill, LaMa) and four Diffusion-based (LDM, SSDE, DDNM, RePaint) techniques. Evaluation was also conducted on classic datasets like CASIA, COVERAGE, and IMD2020 to ensure versatility across different eras of forgery.

Key Results

GIFL significantly outperforms state-of-the-art (SOTA) models, particularly on unseen forgeries. On the "Unseen AVG" metric, GIFL achieved an F1 score of 0.6703, vastly outperforming competitors like TruFor (0.4983) and ManTra-Net (0.4977).

Qualitative comparison of GIFL against various state-of-the-art forgery localization methods across different datasets and forgery types.

As shown in the qualitative results, GIFL demonstrates a massive lead in detecting diffusion-based forgeries (like LDM and RePaint), which are notoriously difficult for older models. Furthermore, the model maintained high accuracy even when images were degraded by JPEG compression, blurring, or noise—common tactics used to hide forgeries on social media.

Conclusion and Future Work

By focusing on universal pristine features rather than specific forgery artifacts, GIFL provides a more robust and generalizable solution for image forensics. While the model currently struggles with very small-scale forgeries or those embedded in highly complex textures, it represents a significant step forward in the fight against AI-generated misinformation. Future work will focus on improving the resolution of localization masks and detecting even more subtle, small-scale manipulations.

Summary updated

BibTeX
@misc{zhao2025learning,
  author = {Hengrun Zhao and Yunzhi Zhuge and Yifan Wang and Lijun Wang and Huchuan Lu and Yu Zeng},
  title = {{Learning Universal Features for Generalizable Image Forgery Localization}},
  year = {2025},
  eprint = {2504.07462},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.07462},
}
Figure