Semantic Discrepancy-aware Detector for Image Forgery Identification

Ziye Wang, Minghang Yu, Chunyan Xu, Zhen Cui

TL;DR

This paper introduces a novel Semantic Discrepancy-aware Detector (SDD) to improve the identification of AI-generated images. SDD aligns the semantic concept space of pre-trained vision-language models with the forgery space by leveraging reconstruction learning and semantic token sampling, leading to more robust forgery detection.

What Problem Does This Paper Address?

The rapid advancement of generative AI technologies, such as GANs and diffusion models, has made it increasingly difficult to distinguish between real and AI-generated images. While pre-trained vision-language models (VLMs) like CLIP have shown promise in identifying fake images by capturing semantic concepts, a key challenge remains: the misalignment between the semantic concept space learned by VLMs and the actual forgery traces present in manipulated images. This misalignment can lead to misclassifications, especially when dealing with unseen generative models or subtle forgeries. Existing methods often either over-rely on frozen VLM features, neglecting fine-grained forgery details, or struggle with the semantic bias introduced by text prompts. This paper aims to bridge this gap by explicitly aligning these two spaces.

Methods

The proposed Semantic Discrepancy-aware Detector (SDD) is a vision-based paradigm that tackles the alignment problem through several key components:

  • Semantic Token Sampling (STS): To mitigate interference from irrelevant features and avoid semantic bias from text prompts, this module samples "semantic patch tokens" from real images. These tokens, derived using Jensen-Shannon (JS) divergence, act as a bridge to accurately associate real and forgery image features within the VLM's semantic space.
  • Concept-level Forgery Discrepancy Learning (CFDL): This module leverages reconstruction learning to explore discrepancies within the aligned semantic concept and forgery spaces. It uses a fine-tuned CLIP model (with LoRA layers) to capture discriminative forgery features. Crucially, it focuses on reconstructing real images to reinforce the detection of discrepancies in synthetic images, thereby defining a more optimal boundary and preventing overfitting.
  • Low-level Forgery Feature Enhancement: This component refines the forgery features by incorporating the reconstruction difference map. It uses a convolutional network to extract multi-scale features and an adaptive weight coefficient to highlight forgery features that are strongly related to semantic concepts, as well as those with high forgery relevance but weaker semantic ties.

The overall system is trained by jointly minimizing binary cross-entropy loss, reconstruction loss, and a triplet loss.

Datasets

The paper evaluates its method on two datasets:

  • UnivFD: This dataset is used for training and evaluation and includes a diverse range of real and fake images generated by various GAN and diffusion models.
  • SynRIS: This dataset consists of high-fidelity images generated by cutting-edge text-to-image models, designed to challenge detectors with more sophisticated forgeries.

Key Insights and Ideas

  • Semantic-Forgery Space Alignment is Crucial: The core insight is that simply using pre-trained VLM semantic features isn't enough; explicit alignment with the forgery space is necessary for robust detection.
  • Semantic Tokens as Bridges: Using sampled semantic tokens from real images provides a more nuanced and less biased way to connect semantic concepts with forgery traces compared to text prompts.
  • Reconstruction for Discrepancy Amplification: Reconstructing real images within the VLM's space helps to amplify the subtle differences that indicate forgery, acting as a form of unsupervised learning for forgery detection.
  • Low-Level Features Matter for Robustness: Even with semantic guidance, refining low-level forgery features is essential for capturing fine-grained artifacts and improving generalization.

Key Results

  • The proposed SDD achieves superior performance on both the UnivFD and SynRIS datasets compared to existing state-of-the-art methods.
  • On the UnivFD benchmark, SDD achieved a mean AP (apm) of 98.51% and a mean accuracy (accm) of 93.61%.
  • On the SynRIS benchmark, SDD achieved an average AUROC of 95.1%, outperforming previous methods by a significant margin.
  • Ablation studies confirm the effectiveness of each component (STS, CFDL, and feature enhancement), highlighting their synergistic contribution to the overall performance.

Limitations and Future Work

  • Generalization to Evolving Models: While SDD performs well across various generative models, the authors acknowledge that generative technologies are constantly advancing, and there is always room for improvement.
  • Future Research Directions: The paper suggests that future work could explore further improvements to tackle the challenges posed by continuously evolving generative models. The authors also emphasize that their approach is the first in the pre-trained VLM paradigm to rely solely on visual information without text prompts, opening avenues for further research in this direction.

Summary updated

BibTeX
@inproceedings{wang2025semantic,
  author = {Ziye Wang and Minghang Yu and Chunyan Xu and Zhen Cui},
  title = {{Semantic Discrepancy-aware Detector for Image Forgery Identification}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure