Abstract
Deepfake detection models often struggle with generalization across diverse object categories and generative techniques. This failure is primarily attributed to semantic overfitting—where models learn category-specific features rather than general forgery artifacts—and the use of Global Average Pooling (GAP), which tends to obscure sparse, localized cues. We propose the Local Focus Mechanism (LFM), a streamlined architecture that prioritizes local forgery patterns over global semantics. LFM employs a shallow 5-layer Salience Network (SNet) and a task-specific Top-K Pooling (TKP) strategy. Our approach achieves state-of-the-art performance across 38 sub-datasets, including GAN and Diffusion-generated images, while maintaining an exceptional inference speed of 1789 FPS.
Introduction
The rapid advancement of generative models has made deepfake detection increasingly critical. However, existing detectors often exhibit a "generalization gap," performing poorly on object categories or generation methods not seen during training. This is largely due to two factors:
- Semantic Overfitting: Standard deep CNNs are optimized for semantic understanding. When trained on specific categories (e.g., faces), they tie forgery detection to these semantic distributions, hindering transferability to other categories (e.g., cars).
- The GAP Trap: Global Average Pooling (GAP) is ubiquitous in classification backbones. While effective for object recognition, it averages out the subtle, sparse pixel-level inconsistencies characteristic of deepfakes, effectively "washing out" the most discriminative local cues.
Methodology
The Local Focus Mechanism (LFM) addresses these challenges by shifting the model's attention toward localized artifacts.
Architectural Design
Unlike traditional deep backbones, LFM utilizes a shallow Salience Network (SNet). This 5-layer architecture is deep enough to capture complex forgery patterns but sufficiently constrained to prevent the learning of high-level semantic distributions.
Top-K Pooling (TKP)
The core of LFM is the Top-K Pooling module. Instead of averaging spatial features, TKP identifies and selects the $K$ most informative local patterns. This ensures that the model explicitly focuses on the most suspicious regions of an image, preserving the sparse cues that GAP typically destroys. To prevent the model from becoming too reliant on a few obvious artifacts, we introduce Rank-Based Linear Dropout (RBLD) and Random-K Sampling (RKS) to force the model to learn from a wider variety of forgery cues.
Experimental Results
We evaluated LFM on an extensive benchmark comprising 38 sub-datasets and 28 generative models, including various GANs and state-of-the-art Diffusion models.
Performance and Efficiency
LFM demonstrates superior generalization compared to existing methods. As shown in the table below, LFM consistently outperforms previous state-of-the-art models like NPR and SAFE across multiple test sets.
Key findings include:
- Accuracy Gains: LFM achieved a 3.7% improvement in mean accuracy and a 2.8% increase in average precision (AP) over the NPR baseline.
- Computational Efficiency: With only 0.72M parameters and 1.61B FLOPs, LFM is highly efficient, reaching an inference speed of 1789 FPS on an NVIDIA A6000.
- Cross-Domain Robustness: The model maintains high performance when transitioning from GAN-trained data to Diffusion-generated test sets, confirming its category-agnostic nature.
Discussion and Conclusion
The success of LFM underscores a critical insight: in deepfake detection, "less is more." By reducing architectural depth and replacing global pooling with a local focusing mechanism, we can mitigate semantic overfitting and improve the capture of sparse forgery cues. While LFM sets a new benchmark for generalization and speed, future work should address its resilience against adversarial attacks and its application to temporal data in video deepfakes.
Summary updated