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

Unveiling the Impact of Image Transformations on Deepfake Detection: An Experimental Analysis

Federico Cocchi, Lorenzo Baraldi 0002, Samuele Poppi, Marcella Cornia, Lorenzo Baraldi 0001, Rita Cucchiara

Abstract

Deepfake detection is often treated as a binary classification task on pristine images. However, real-world media frequently undergoes transformations like JPEG compression, resizing, and color filtering, which can mask the synthetic "fingerprints" left by generative models. This study evaluates the robustness of visual backbones—specifically CLIP, DINO, and DINOv2—against 12 common image transformations. Our findings reveal that while CLIP-based detectors achieve near-perfect accuracy on clean data, they are exceptionally fragile in noisy environments. In contrast, self-supervised models like DINO exhibit inherent robustness, maintaining high performance even under aggressive post-processing.

Introduction

As deepfake technology advances, the need for reliable detection becomes critical. Most existing detectors are evaluated on the same data distributions they were trained on, failing to account for the practical reality of image distribution on social media platforms. These platforms apply non-linear pipelines of transformations that can inadvertently or intentionally evade detection. This research investigates how robust standard detection pipelines are when faced with unseen image transformations during evaluation.

Experimental Setup

The researchers evaluated a two-stage detection pipeline consisting of a visual backbone (feature extractor) followed by a classifier (Linear Probe or k-Nearest Neighbor).

  • Visual Backbones: The study compared CLIP (language-supervised) against DINO and DINOv2 (self-supervised). All models utilized the Vision Transformer (ViT-B) architecture to ensure parity.
  • Datasets: The COCOFake dataset was used, comprising real images from MS-COCO and fake images generated via Stable Diffusion (v1.4 and v2.0) based on original captions.
  • Transformations: Twelve transformations were applied at varying intensities, including pixel-level changes (brightness, hue, saturation, blur, compression) and structural changes (cropping, resizing).
Baseline image from the COCOFake dataset used for evaluation

Robustness Analysis: CLIP vs. DINO

The study highlights a significant performance gap between supervised and self-supervised backbones. CLIP's high accuracy on clean data (99.6%) is attributed to its ability to recognize high-frequency signatures from the diffusion model's decoder. However, because CLIP is not trained with heavy data augmentation, it overfits to these specific signatures. When transformations alter these artifacts, CLIP's performance collapses.

Conversely, DINO and DINOv2 are trained using self-supervised techniques that include multi-cropping and color jittering. This training regime forces the models to learn semantic features that are invariant to noise and post-processing, leading to superior resilience.

Example of a hue transformation applied to simulate real-world image variation

Quantitative Results

  • Clean Data: CLIP (99.6%) slightly outperformed DINO (96.9%) and DINOv2 (96.6%) using a linear probe.
  • Transformed Data: Across all 12 transformations, the CLIP linear probe's accuracy plummeted to an average of 41.6%. In contrast, DINO and DINOv2 maintained robust averages of 91.8% and 92.3%, respectively.
  • JPEG Compression Impact: At 10% JPEG quality, CLIP's accuracy dropped to a staggering 0.4%, effectively failing to detect any synthetic images. DINO remained steady at 95%.
  • The "SD Compression" Attack: A novel attack—passing real images through the Stable Diffusion autoencoder—fooled the CLIP linear probe into misclassifying real images as fake 55.8% of the time, suggesting it relies on compression artifacts rather than content.

Conclusion

The fragility of CLIP-based detectors makes them unreliable for general-purpose deepfake detection in the wild. The inherent robustness of self-supervised backbones like DINO suggests that training objectives involving heavy data augmentation are essential for building detectors capable of resisting both natural noise and adversarial evasion. Future work will explore whether augmenting CLIP during the detector training phase can bridge this robustness gap and how these models perform against a wider variety of generative architectures.

Summary updated

BibTeX
@inproceedings{cocchi2023unveiling,
  author = {Federico Cocchi and Lorenzo Baraldi and Samuele Poppi and Marcella Cornia and Lorenzo Baraldi and Rita Cucchiara},
  title = {{Unveiling the Impact of Image Transformations on Deepfake Detection: An Experimental Analysis}},
  booktitle = {ICIAP},
  year = {2023},
  doi = {10.1007/978-3-031-43153-1\_29},
}
Figure