Rethinking the Up-Sampling Operations in CNN-Based Generative Network for Generalizable Deepfake Detection

Chuangchuang Tan, Huan Liu, Yao Zhao, Shikui Wei, Guanghua Gu, Ping Liu, Yunchao Wei

Abstract

Recent advancements in generative AI have made deepfake detection increasingly challenging, particularly regarding cross-model generalization. This paper identifies up-sampling operations as a universal architectural component that leaves a persistent structural trace in generated images. By introducing Neighboring Pixel Relationships (NPR), a method that captures local pixel dependencies through simple subtraction, the authors develop a lightweight detector that significantly outperforms existing state-of-the-art methods. The NPR approach achieves a 95.3% mean accuracy on diffusion-based datasets, representing an 11.6% improvement in generalization across diverse generative models.

Introduction

The primary challenge in deepfake detection is the "generalization gap": detectors trained on specific models often fail when encountering images from unseen architectures. Traditional methods frequently rely on frequency-domain analysis to detect checkerboard artifacts. However, as generative models evolve, these artifacts become less distinct or disappear entirely. This research re-evaluates the image generation pipeline to find a more fundamental "fingerprint." The authors pinpoint the up-sampling stage—essential for transforming low-resolution latent vectors into high-resolution images—as a consistent source of detectable artifacts that persist across various architectures, including GANs and Diffusion models.

Methodology

The core of the proposed detection method is the extraction of Neighboring Pixel Relationships (NPR). Unlike standard RGB-based analysis, NPR focuses on the structural arrangement of pixels within local patches.

NPR Feature Extraction

The process involves dividing the image into small $l \times l$ grids (typically $2 \times 2$). Within each grid, a reference pixel is selected, and its value is subtracted from its neighbors. This operation, defined as $\tilde{w}_i = w_i - w_j$, effectively removes the semantic image content while isolating the underlying structural artifacts created during up-sampling.

Overview of the NPR extraction process, demonstrating how local subtraction isolates structural artifacts.

Classification

The resulting NPR maps are processed by a lightweight CNN classifier based on ResNet blocks. With only 1.44 million parameters, the model is significantly more efficient than many existing detectors while remaining robust to the specific content of the image.

Experimental Results

The NPR method was evaluated against a comprehensive suite of 28 generative models, including various GAN architectures (e.g., StyleGAN, BigGAN) and modern Diffusion models (e.g., Stable Diffusion, DALL-E, Midjourney).

Cross-Model Generalization

A key finding is the method's exceptional ability to generalize. When trained solely on GAN-generated data (ProGAN), the NPR detector maintained high accuracy when tested on images from entirely different architectures, such as Latent Diffusion Models. This suggests that the up-sampling trace is a universal characteristic of modern CNN-based generators.

Performance comparison (Accuracy and Average Precision) across various diffusion models, highlighting the generalization capabilities of NPR.

As shown in the table above, the NPR method achieves a mean accuracy of 95.3% across various diffusion models, substantially outperforming previous leading methods like LGrad (88.2%) and CNNDetection (51.0%).

Conclusion

By shifting the focus from global image features to local Neighboring Pixel Relationships, this research provides a more robust and generalizable framework for deepfake detection. The persistence of up-sampling artifacts across diverse generative architectures allows for the creation of detectors that remain effective even as new AI models emerge. Future work will explore the robustness of NPR against heavy post-processing and the potential for more complex relationship functions to further enhance detection capabilities.

Summary updated

BibTeX
@inproceedings{tan2023rethinking,
  author = {Chuangchuang Tan and Huan Liu and Yao Zhao and Shikui Wei and Guanghua Gu and Ping Liu and Yunchao Wei},
  title = {{Rethinking the Up-Sampling Operations in CNN-Based Generative Network for Generalizable Deepfake Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure