Skip to main content
QUICK REVIEW

[Paper Review] Rethinking Image Forgery Detection via Soft Contrastive Learning and Unsupervised Clustering

Haiwei Wu, Yiming Chen|arXiv (Cornell University)|Aug 18, 2023
Digital Media Forensic DetectionComputer Science8 citations
TL;DR

FOCAL reframes image forgery detection as pixel-level contrastive learning with image-by-image supervision and unsupervised clustering, achieving strong cross-dataset IoU/F1 gains without retraining. It also supports simple feature fusion to boost performance.

ABSTRACT

Image forgery detection aims to detect and locate forged regions in an image. Most existing forgery detection algorithms formulate classification problems to classify pixels into forged or pristine. However, the definition of forged and pristine pixels is only relative within one single image, e.g., a forged region in image A is actually a pristine one in its source image B (splicing forgery). Such a relative definition has been severely overlooked by existing methods, which unnecessarily mix forged (pristine) regions across different images into the same category. To resolve this dilemma, we propose the FOrensic ContrAstive cLustering (FOCAL) method, a novel, simple yet very effective paradigm based on soft contrastive learning and unsupervised clustering for the image forgery detection. Specifically, FOCAL 1) designs a soft contrastive learning (SCL) to supervise the high-level forensic feature extraction in an image-by-image manner, explicitly reflecting the above relative definition; 2) employs an on-the-fly unsupervised clustering algorithm (instead of a trained one) to cluster the learned features into forged/pristine categories, further suppressing the cross-image influence from training data; and 3) allows to further boost the detection performance via simple feature-level concatenation without the need of retraining. Extensive experimental results over six public testing datasets demonstrate that our proposed FOCAL significantly outperforms the state-of-the-art competitors by big margins: +24.8% on Coverage, +18.9% on Columbia, +17.3% on FF++, +15.3% on MISD, +15.0% on CASIA and +10.5% on NIST in terms of IoU (see also Fig. 1). The paradigm of FOCAL could bring fresh insights and serve as a novel benchmark for the image forgery detection task. The code is available at https://github.com/HighwayWu/FOCAL.

Motivation & Objective

  • Rethink the relative definition of forged vs. pristine pixels within a single image and address cross-image inconsistencies in forgery detection.
  • Develop a pixel-level contrastive learning framework tailored to image forgery tasks.
  • Introduce an on-the-fly, unsupervised clustering step at testing to map features to forged/pristine without cross-dataset training influence.
  • Enable performance boosts through simple feature-level fusion without retraining.
  • Demonstrate robustness and cross-domain generalization across six public testing datasets.

Proposed method

  • Use pixel-level contrastive learning to supervise high-level forensic features in an image-by-image manner, leveraging the ground-truth forgery mask as positive/negative labels.
  • Adopt an improved InfoNCE loss (InfoNCE++) that averages over all positive keys within each image for stable optimization.
  • Apply an on-the-fly clustering algorithm (HDBSCAN) during testing to map features to forged/pristine without training parameters.
  • Optionally fuse features from multiple backbones (e.g., HRNet and ViT) at the feature level to boost detection performance without retraining.

Experimental results

Research questions

  • RQ1How does viewing forged/pristine pixels as relative definitions within an image affect detection performance compared to traditional batch-level supervision?
  • RQ2Can pixel-level contrastive learning with image-by-image loss and unsupervised clustering improve cross-dataset forgery detection?
  • RQ3Does feature-level fusion of multiple backbones enhance forgery localization without retraining?

Key findings

  • FOCAL with image-by-image contrastive learning and on-the-fly clustering substantially outperforms state-of-the-art methods on six testing datasets in IoU and F1.
  • Fusion of features from HRNet and ViT (FOCAL Fusion) yields the best cross-dataset performance, outperforming competing methods by large margins on IoU metrics (e.g., Coverage +18.6%, Columbia +17.5%, FF++ +10.3%).
  • Unsupervised clustering (HDBSCAN) effectively handles varying forgery types per image and reduces false alarms, especially on pristine images.
  • An improved InfoNCE loss (InfoNCE++) that aggregates multiple positive keys per query accelerates convergence and improves stability over batch-based or vanilla InfoNCE losses.
  • Feature-level fusion provides significant gains without retraining, demonstrating robustness to backbone choice and mitigating biases from a single extractor.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.