NPR
A CNN that flags synthetic images from neighboring-pixel-relationship maps of up-sampling artifacts.
Image classification · 86 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 1.4M
- Operations
- 86
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2024
- Cited by
- 220 (as of 28 October 2026)
- Authors
- Chuangchuang Tan, Huan Liu, Yao Zhao and others
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18692
- Graph hash
- 2d797389a29b29c8a03bc2b6d78c11c5a914f9b036c139b95ed61e4eb7fc34d6
- Skeleton hash
- b25f3385c2bde8f0a94edaba26c7e68a702844d9109a7939c92ea8d77cc6268c
- Architecture hash
- 29e66530119cee467579f27149107fbc0065401359b47162ef9abe82cef8b4ee
- Diagram SHA-256
- 6158ca861eb6d9614348bcfce938e90b1db7dfc20f1e7be4b926967d4033da10
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
NPR is a deepfake detector: it classifies an image as real or synthetic. The paper's angle is to look at the generator architecture rather than the detector, and it argues that the up-sampling operator common to GANs and diffusion models leaves generalized forgery artifacts, beyond the frequency-based artifacts studied before.
To capture those artifacts it introduces Neighboring Pixel Relationships (NPR), which measure the local relative correlation between pixels in small patches. This correlation arises from the up-sampling layer together with the translation invariance of convolutional layers, and the paper argues its relative and local nature lets it generalize to unseen sources. The NPR map is computed from the image and used as the representation on which a classifier is trained.
The classifier is a lightweight CNN built from convolutional and ResNet blocks, which the paper reports has 1.44 million parameters. This model is a checkpoint trained on ProGAN images in the four-class setting. The paper evaluates on an open-world set of images from 28 generative models and reports an 11.6% improvement over existing methods.
Key idea. NPR characterizes synthetic images through neighboring pixel relationships, local pixel correlations left by up-sampling, and trains a CNN on them for deepfake detection that generalizes across generators.
- NPR
- neighboring pixel relationships
- deepfake detection
- synthetic image detection
- forgery detection
- up-sampling artifacts
- GAN detection
- diffusion detection
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{tan2023rethinkingupsamplingoperationscnnbased,
title={Rethinking the Up-Sampling Operations in CNN-based Generative Network for Generalizable Deepfake Detection},
author={Chuangchuang Tan and Huan Liu and Yao Zhao and Shikui Wei and Guanghua Gu and Ping Liu and Yunchao Wei},
year={2023},
eprint={2312.10461},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2312.10461},
}