Abstract
Generalization remains the primary hurdle in face forgery detection, as models often fail when encountering unseen manipulation techniques. This paper introduces SOLA (Second Order Local Anomaly), a novel framework designed to detect "deepfakes" by identifying subtle mathematical inconsistencies created when forged faces are blended into natural backgrounds. By analyzing how local image features change relative to their neighbors (first-order) and how those changes themselves fluctuate (second-order), the proposed method captures universal forgery traces. Using a lightweight ResNet18 backbone, SOLA achieves state-of-the-art generalization on benchmark datasets, demonstrating that mining high-order local anomalies is a powerful signal for cross-domain forgery detection.
Introduction
The rapid advancement of face manipulation techniques has necessitated robust detection methods. However, most existing detectors suffer from poor cross-domain generalization; they perform well on training data but fail on new forgery algorithms. The authors observe that while visual artifacts vary, almost all forgery pipelines involve a blending step. Blending a forged face into a natural background inevitably creates local anomalies, particularly in high-frequency noise and edge regions. SOLA aims to mine these universal "forgery traces" without requiring expensive pixel-level annotations or massive synthetic datasets.
Methodology
The SOLA architecture consists of three integrated components designed to extract and amplify subtle forgery signals:
Adaptive Spatial Rich Model (ASRM)
Standard CNNs tend to suppress high-frequency noise patterns. ASRM serves as a dedicated "noise branch" utilizing learnable high-pass filters. Unlike static filters, ASRM employs constraints to ensure the filters remain focused on noise while adapting to the specific characteristics of the dataset, preserving critical forensic evidence often lost in deeper networks.
Local Enhancement Module (LEM)
To better discriminate between real and forged regions, the LEM applies a self-attention mechanism to local feature patches. By assigning varying weights to features within a patch, the module ensures that subsequent anomaly calculations are based on refined, "clean" local attributes.
Second Order Local Anomaly (SOLA) Module
The core innovation lies in the two-stage anomaly calculation:
- First Order: Calculates the difference between a local feature and its neighbors across multiple directions and distances.
- Second Order: Inspired by the Laplace operator, this stage calculates differences between the first-order anomaly maps. This "change in change" approach magnifies faint forgery traces that are otherwise imperceptible.
Training Strategy: The model supports both full supervision (using masks) and weakly supervised learning via a "single side loss." This loss only penalizes the model for finding anomalies in real faces, allowing it to autonomously discover diverse anomaly patterns in forged faces.
Experimental Results
The model was evaluated on benchmark datasets including FaceForensics++ (FF++), Celeb-DF v2 (CD2), and DeepfakeDetection (DFD).
- In-Domain Performance: On FF++, SOLA achieved nearly 100% AUC across all forgery types (DeepFakes, Face2Face, FaceSwap, NeuralTextures), outperforming established models like Face X-ray.
- Cross-Domain Generalization: When trained on FF++ and tested on the unseen FaceShifter dataset, SOLA achieved 98.72% AUC, significantly surpassing LipForensics (97.10%) and Face X-ray (92.80%).
- Ablation Studies: The inclusion of the ASRM noise branch improved performance on the DFD dataset by over 16%, confirming the importance of high-frequency signals.
Conclusion
SOLA demonstrates that the raw depth of a network is less critical than the specific features it extracts. By focusing on second-order local anomalies, the framework provides a robust and efficient solution for general face forgery detection. Future work will explore mechanisms to prevent predictor degeneration and the integration of temporal anomalies for video-based detection.
Summary updated