Introduction
While current AI-generated image detectors perform exceptionally well on images from models they were trained on, they often fail in "open-world" scenarios. This "generalization gap" is primarily driven by two factors: the rapid emergence of diverse model architectures (such as Diffusion models and Transformers) and common real-world post-processing operations like JPEG compression, blurring, or face blending. These operations often "launder" the digital fingerprints that traditional detectors rely on.
To address these challenges, we present GLFF (Global and Local Feature Fusion), a framework designed to detect AI-synthesized images more reliably by combining multi-scale global semantic features with automatically selected local patches that harbor subtle artifacts.
Proposed Method
The GLFF framework utilizes a dual-branch architecture to capture both high-level semantic inconsistencies and low-level structural artifacts.
Global Branch and AMSFF
The Global Branch uses a ResNet-50 backbone to extract features across multiple scales. A key innovation is the Attention-based Multi-scale Feature Fusion (AMSFF) module. Recognizing that forgery artifacts are often high-frequency "noise" that washes out in deeper layers, AMSFF intentionally fuses low-level features from early stages (where forgery signatures reside) with high-level semantic features from deeper layers.
Local Branch and PSM
Rather than inspecting random patches, the Local Branch employs a Patch Selection Module (PSM). This module analyzes the global feature map to identify "informative" regions—areas with high energy, such as hair-to-background transitions or skin textures—that likely contain discriminative artifacts. These regions are cropped and processed independently to capture fine-grained details.
Feature Fusion
Embeddings from both branches are fused using a multi-head attention mechanism. This allows the model to learn complex correlations between global structure and local details before passing the combined representation to a final binary classifier (Real vs. Fake).
Experimental Evaluation
To rigorously test GLFF, we introduced the DeepFakeFaceForensics ($DF^3$) benchmark, containing approximately 46,400 fake images from six state-of-the-art generators (StyleGAN2/3, 3DGAN, Taming Transformers, LSGM, and Latent Diffusion). We evaluated the model across five protocols: Common (JPEG/Blur), Face Blending, Anti-forensics, Multi-image Compression, and a Mixed subset.
Key Results
- Superior Generalization: On the $DF^3$ dataset, GLFF achieved an Average AUC of 0.813, significantly outperforming previous state-of-the-art methods like Nodown (0.691) and PSM (0.775).
- Robustness to Manipulation: In "Face Blending" scenarios—where a fake face is merged into a real background—GLFF maintained a high AUC of 0.905, demonstrating the value of its local patch analysis.
- Cross-Dataset Performance: When tested on completely unseen models like DALL-E and Guided-diffusion, GLFF achieved the highest AUC (0.665), proving its resilience to architectural shifts.
Conclusion and Future Work
GLFF demonstrates that fusing global semantics with targeted local analysis is essential for robust forgery detection. While highly effective in the spatial domain, future work will explore incorporating frequency-domain analysis (such as DCT coefficients) to further improve robustness against heavy compression. Additionally, we aim to develop a differentiable patch selection module to optimize the size and quantity of inspected regions during training.
Summary updated