Auto-Focus Contrastive Learning for Image Manipulation Detection

Wenyan Pan, Zhili Zhou, Guangcan Liu, Teng Huang, Hongyang Yan, Q. M. Jonathan WuarXiv 2022

Abstract

Current image manipulation detection models often struggle to distinguish subtle manipulation traces from background noise and typically ignore the relational context between manipulated pixels and their surroundings. To address these challenges, we present the Auto-Focus Contrastive Learning (AF-CL) network. AF-CL utilizes two core mechanisms: Multi-Scale View Generation (MSVG) and Trace Relation Modeling (TRM). MSVG creates pairs of views at different scales to force the model to focus on manipulated regions, while TRM uses Graph Convolutional Networks (GCNs) to model the intricate trace relations between pixels. Our approach achieves state-of-the-art performance on CASIA, NIST16, and Coverage datasets, improving F1 scores by up to 7.5% over existing methods.

Introduction

Detecting image forgeries—such as splicing, copy-move, or object removal—is a critical task in digital forensics. However, modern deep learning models face two primary hurdles. First, the Signal-to-Noise Ratio problem: manipulation artifacts are often extremely subtle and easily obscured by natural image textures or compression noise. Second, the Lack of Contextual Modeling: many models fail to capture the "trace relations"—the specific boundary and consistency differences between a manipulated patch and its authentic environment.

AF-CL addresses these by introducing an "auto-focus" mechanism that prioritizes suspicious regions during the learning process, ensuring the model doesn't just scan the image uniformly but learns to zoom in on potential forgeries.

Methodology

The AF-CL framework is built on a contrastive learning pipeline designed to enhance feature discriminability through two novel components:

Multi-Scale View Generation (MSVG)

Unlike standard contrastive learning that relies on random augmentations, MSVG generates specific views based on the ground truth during training. View #1 is a localized crop centered on the manipulated region, while View #2 encompasses the broader image context. By minimizing the distance between the latent representations of these two views, the network learns to ignore irrelevant background noise and automatically focus its attention on the manipulated area during inference.

Trace Relation Modeling (TRM)

To capture the relational dependencies between pixels, the authors implement a Graph Convolutional Network (GCN). The latent representation is treated as a graph where grid cells are nodes. The TRM module models the similarity within regions and the sharp dissimilarity at manipulation boundaries. This allows the model to detect the "boundary break" where a forged element meets an authentic background.

The AF-CL architecture: MSVG generates multi-scale views for contrastive learning, while the TRM module utilizes a GCN to model pixel-level trace relations.

Experiments and Results

AF-CL was evaluated on three benchmark datasets: CASIA, NIST16, and Coverage. A key advantage of this method is its efficiency; it achieves high performance without requiring the massive synthetic pre-training datasets often used by competitors.

Performance Highlights

  • NIST16: AF-CL achieved an 89.9% F1 score, a significant 7.5% improvement over the previous state-of-the-art (SOTA).
  • CASIA: The model reached a 60.4% F1 score, outperforming existing methods by 2.5%.
  • Robustness: The model is remarkably resilient to post-processing attacks. In tests involving heavy Gaussian noise, AF-CL's performance dropped by a negligible 0.20%, whereas transformer-based models like ObjectFormer saw drops exceeding 9%.
Qualitative comparison showing manipulated images, Grad-CAM visualizations of the AF-CL focus, and the final predicted masks compared to ground truth.

Conclusion

The Auto-Focus Contrastive Learning network represents a significant step forward in image forensics by shifting the focus from global image scanning to localized, relational trace analysis. While the current iteration is optimized for single-region manipulations and operates primarily in the RGB domain, its superior robustness and accuracy on standard benchmarks demonstrate the power of combining multi-scale contrastive learning with graph-based relational modeling. Future work will explore extending this "auto-focus" capability to multi-region forgeries and incorporating frequency-domain analysis to capture even more complex manipulation traces.

Summary updated

BibTeX
@misc{pan2022auto,
  author = {Wenyan Pan and Zhili Zhou and Guangcan Liu and Teng Huang and Hongyang Yan and Q. M. Jonathan Wu},
  title = {{Auto-Focus Contrastive Learning for Image Manipulation Detection}},
  year = {2022},
  eprint = {2211.10922},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.10922},
}
Figure