NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

A Transferable Anti-Forensic Attack on Forensic CNNs Using A Generative Adversarial Network

Xinwei Zhao, Chen Chen, Matthew C. StammarXiv 2021

TL;DR

This paper introduces a novel "anti-forensic GAN" that can effectively remove digital manipulation traces from images, making them appear unaltered to forensic CNNs. Crucially, this attack is transferable, meaning it can fool forensic CNNs the attacker hasn't seen before, a significant advancement in the field of adversarial attacks.

What Problem Does This Paper Address?

Digital images are increasingly used as evidence in legal proceedings and for news reporting. To ensure the integrity of this evidence, researchers have developed sophisticated Convolutional Neural Networks (CNNs) to detect image manipulations like resizing, JPEG compression, or median filtering. However, as with many machine learning models, these forensic CNNs are vulnerable to "anti-forensic attacks." These attacks aim to remove the tell-tale signs of manipulation, making forged images look authentic.

Previous anti-forensic attacks often focused on removing traces of a single type of manipulation and, more importantly, suffered from poor "transferability." This means an attack designed to fool one specific forensic CNN would likely fail against another, even if it had a similar architecture. This limitation makes it difficult for attackers to target forensic systems when they don't have complete knowledge of the victim's specific CNN. This paper addresses this gap by proposing an anti-forensic attack that is both versatile (handling various manipulations) and transferable across different forensic CNNs, even those unknown to the attacker.

Methods

The core of the proposed solution is a Generative Adversarial Network (GAN), which the authors call the "anti-forensic GAN." This GAN consists of three main components:

  • Generator: This network's job is to take a manipulated image and output an "anti-forensically attacked" image. The goal is to remove the manipulation traces while preserving the image's visual quality. The generator's architecture is built using convolutional blocks and a feature map reduction module.
  • Discriminator: This network is trained to distinguish between real, unaltered images and the anti-forensically attacked images produced by the generator. This adversarial training helps the generator produce more convincing outputs.
  • Ensemble of Surrogate CNNs: This is a key innovation for achieving transferability. Instead of training against a single victim CNN, the generator is trained to fool an ensemble of diverse, pre-trained forensic CNNs. These surrogate CNNs have different architectures and are trained on different class definitions (e.g., manipulation detection, identification, or parameterization). By learning to fool this diverse set, the generator is forced to produce outputs that mimic the general forensic characteristics of unaltered images, making the attack transferable to unseen CNNs.

To further enhance transferability, the authors emphasize the importance of creating training data with pixel-to-pixel correspondence between unaltered and manipulated images. This strategy helps the generator focus on learning manipulation traces rather than image content.

The loss functions for training include:

  • Perceptual Loss: Ensures visual quality by minimizing pixel differences between the original and attacked images.
  • Classification Loss: Drives the generator to fool the ensemble of surrogate CNNs.
  • Adversarial Loss: Encourages the generator to fool the discriminator.

Datasets

The paper utilizes the Dresden image database for preparing training and evaluation data. The dataset consists of 169,620 full-size JPEG images from 70 unique devices.

The data was split into three sets:

  • "I-set": Used by the "investigator" (hypothetical victim) to train forensic CNNs.
  • "A-set": Used by the "attacker" to train surrogate CNNs and the anti-forensic GAN.
  • "eval-set": Used for evaluating the performance of forensic CNNs before and after the attack.

The authors ensured that these sets contained distinct images to simulate realistic scenarios where attackers and investigators do not share training data.

Key Insights and Ideas

  • Transferability is Key: The paper strongly argues that for anti-forensic attacks to be truly effective in real-world scenarios, they must be transferable to unknown forensic CNNs. This is a significant challenge that traditional attacks struggle with.
  • Ensemble of Surrogates for Generalization: Training the generator against an ensemble of diverse forensic CNNs is crucial for achieving transferability. This forces the generator to learn more generalizable forensic traces of unaltered images, rather than overfitting to a specific victim CNN.
  • Pixel-to-Pixel Correspondence Matters: The method of creating training data significantly impacts attack transferability. Using pairs of unaltered and manipulated images with pixel-level correspondence helps the attack focus on learning manipulation traces.
  • Discriminator is Essential: Removing the discriminator from the GAN architecture significantly degrades the attack's effectiveness, particularly for manipulation detection tasks, highlighting its role in refining the generator's output.
  • Visual Quality is Preserved: The proposed attack successfully removes forensic traces without introducing perceptible visual distortions, making it difficult for human inspection to detect the forgery.

Key Results

The proposed anti-forensic GAN achieved high attack success rates (ASRs) across various knowledge scenarios:

  • Perfect Knowledge Scenario: Average ASR of 0.98, meaning the attack could fool forensic CNNs with near-perfect success.
  • Training Data Mismatch Scenario: Average ASR of 0.90, demonstrating transferability even when the attacker and investigator use different training data.
  • Training Data and Manipulation Parameter Mismatch Scenario: Average ASR of 0.76, showing effectiveness even with partial knowledge of manipulation parameters.
  • Training Data and CNN Architecture Mismatch Scenario: Average ASR of 0.76, indicating the attack can fool forensic CNNs with unknown architectures.

Qualitatively, the attacked images maintained high visual quality, with mean PSNR values around 45-54 and mean SSIM values above 0.99, indicating imperceptible distortions.

Limitations and Future Work

  • Computational Cost: The paper notes that training the GAN and surrogate CNNs is computationally intensive, requiring significant GPU resources.
  • Manipulation Scope: While the attack is designed to be general, the experiments focused on three common manipulations (noise, blurring, median filtering). Extending to a wider range of manipulations would be beneficial.
  • Specific Architectures: The paper mentions that some CNN architectures (e.g., TransferNet, PHNet) were less affected by parameter mismatches, suggesting they might be more robust. Further investigation into why certain architectures are more resilient could inform future defense strategies.

The authors suggest that the framework can be extended to handle multiple manipulation operations simultaneously. Future work could also explore more sophisticated ensemble strategies and investigate the attack's effectiveness against real-world forensic systems.

Summary updated

Abstract

With the development of deep learning, convolutional neural networks (CNNs) have become widely used in multimedia forensics for tasks such as detecting and identifying image forgeries. Meanwhile, anti-forensic attacks have been developed to fool these CNN-based forensic algorithms. Previous anti-forensic attacks often were designed to remove forgery traces left by a single manipulation operation as opposed to a set of manipulations. Additionally, recent research has shown that existing anti-forensic attacks against forensic CNNs have poor transferability, i.e. they are unable to fool other forensic CNNs that were not explicitly used during training. In this paper, we propose a new anti-forensic attack framework designed to remove forensic traces left by a variety of manipulation operations. This attack is transferable, i.e. it can be used to attack forensic CNNs are unknown to the attacker, and it introduces only minimal distortions that are imperceptible to human eyes. Our proposed attack utilizes a generative adversarial network (GAN) to build a generator that can attack color images of any size. We achieve attack transferability through the use of a new training strategy and loss function. We conduct extensive experiment to demonstrate that our attack can fool many state-of-art forensic CNNs with varying levels of knowledge available to the attacker.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
eval-set · 45,000 manipulated image patchesProposed anti-forensic GAN attackmean attack success rate across class definitions0.90Image Forensics · training-data-mismatch=attacker uses A-set surrogates; victim CNNs trained on I-set
Source quote
L383: We evaluated the performance of our proposed anti-forensic attack on 45,000 manipulated image patches from ``eval-set''. The attack success rates for fooling each victim CNNs are shown in Table~\ref{tab: data_mismatch}. Except for manipulation paramerization of DenseNet\textunderscore BC architecture, our attack achieved high attack success rates on the victim CNNs. On average, our proposed anti-forensic GAN attack achieved the attack success rate of 0.98 for manipulation detection, 0.85 for manipulation classifcation, and 0.87 for manipulation parameterization. The mean of attack success rates regardless of the class definition was 0.90. The results show that the proposed anti-forensic GAN attack can strongly fool forensic CNNs trained on different training data.
eval-set · 45,000 manipulated image patchesProposed anti-forensic GAN attackmean attack success rate across class definitions0.76Image Forensics · split: test · training-data-mismatch=yes · manipulation-parameter-mismatch=attacker trains with four parameters per manipulation
Source quote
L503: The attack success rates of fooling each victim CNN are shown in Table~\ref{tab: para_mismatch}. For the testing image patches containing all manipulation and parameters, on average, we achieved attack success rate of 0.89 for manipulation detection, 0.75 for manipulation classification, and 0.63 for manipulation parameterization. It means that 89% anti-forensically attacked images produces by our attack can fool manipulation detection classifiers, 75% can fool manipulation classification classifiers, and 63% can fool manipulation parameterization classifiers. The mean of attack success rates regardless of class definition was 0.76. It means that 0.76 anti-forensically attacked images can fool any forensic CNN.
eval-set · 9,000 manipulated image patches with parameters unseen bProposed anti-forensic GAN attackmean attack success rate across class definitions0.74Image Forensics · split: test · training-data-mismatch=yes · manipulation-parameter-mismatch=test uses parameters unseen by attacker
Source quote
L505: For the testing image patches containing only attacker's unseen manipulation parameters, on average, we achieved the attack success rate of 0.87 for manipulation detection, 0.72 for manipulation classification, and 0.62 for manipulation parameterization. The mean of attack success rates regardless of class definition was 0.74. The results indicate once the attack is trained, the performances on attacking manipulated image patches created with seen and unseen parameters are comparable. Therefore, if the attacker knows about the attack success rates of the attack for attacking manipulated images created with known parameters, the attacker can also use the attack on unknown parameters without performance decrease.
eval-set · 45,000 manipulated image patchesProposed anti-forensic GAN attackmean attack success rate across class definitions0.76Image Forensics · architecture-mismatch=surrogate ensemble excludes victim architecture · training-data-mismatch=yes
Source quote
L530: We evaluated the performance of our proposed anti-forensic attack on 45,000 manipulated image patches from the ``eval-set''. The attack success rates for fooling each victim CNN are shown in Table~\ref{tab: arch_mismatch}. On average, our proposed anti-forensic GAN attack achieved the attack success rate of 0.89 for manipulation detection, 0.71 for manipulation classifcation, and 0.68 for manipulation parameterization. The mean of attack success rates regardless of the class definition was 0.76.
eval-set · manipulated image patches (training-data mismatch scenarProposed anti-forensic GAN attackmean PSNR between manipulated patches and anti-forensically attacked patches47.12Image Forensics · setting=training-data-mismatch
Source quote
L443: \subhead{Visual Quality} We evaluated the image quality of the anti-forensically attacked images produces by our proposed attack by calculating the mean PSNR and the mean SSIM between manipulated image patches and generated anti-forensically attacked image patches. The mean PSNR is 47.12 and the mean SSIM is 0.9944. The results show that in the training data mismatch scenario, our proposed attack will not introduce perceptible distortion to the anti-forensically attacked images.
eval-set · manipulated image patches (training-data mismatch scenarProposed anti-forensic GAN attackmean SSIM between manipulated patches and anti-forensically attacked patches0.9944Image Forensics · setting=training-data-mismatch
Source quote
L443: \subhead{Visual Quality} We evaluated the image quality of the anti-forensically attacked images produces by our proposed attack by calculating the mean PSNR and the mean SSIM between manipulated image patches and generated anti-forensically attacked image patches. The mean PSNR is 47.12 and the mean SSIM is 0.9944. The results show that in the training data mismatch scenario, our proposed attack will not introduce perceptible distortion to the anti-forensically attacked images.
BibTeX
@misc{zhao2021transferable,
  author = {Xinwei Zhao and Chen Chen and Matthew C. Stamm},
  title = {{A Transferable Anti-Forensic Attack on Forensic CNNs Using A Generative Adversarial Network}},
  year = {2021},
  eprint = {2101.09568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.09568},
}
Figure