Abstract
Deepfake detection models frequently struggle with generalization across different datasets and manipulation techniques due to overfitting on domain-specific artifacts. This paper introduces RoGA (Robustness Gradient Alignment), an optimization framework designed to improve cross-domain performance by seeking "flat" regions in the model's parameter space. By aligning perturbed gradients across multiple data domains, RoGA ensures the learning of generalizable features rather than specific dataset noise. Experimental results demonstrate that RoGA achieves state-of-the-art performance on industry-standard benchmarks, including Celeb-DF and FaceForensics++, without requiring auxiliary network modules.
The Generalization Problem in Deepfake Detection
Deepfake detection has a significant "generalization" problem: a model trained to detect one type of AI-generated face often fails when encountered with a new generation method or a different dataset (domain shift). Most existing solutions attempt to mitigate this by adding extra modules to the neural network or employing heavy data augmentation. However, these regularization techniques can sometimes conflict with the primary goal of minimizing detection error, leading to sub-optimal performance.
The authors argue that the root cause of poor generalization is overfitting to sharp minima. In these regions of the loss landscape, the model finds a solution that works perfectly for the training data but is so specific that even a tiny change in the data distribution causes the model to fail.
The RoGA Framework: Optimizing for Flatness and Alignment
Instead of altering the network architecture, RoGA modifies the learning objective to encourage the model to find a shared position in the parameter space that effectively interprets data from multiple domains. The framework combines two key innovations:
- Robustness Gradient Optimization: Inspired by Sharpness-Aware Minimization (SAM), RoGA seeks a "flat" neighborhood where the loss remains low even if the model's parameters ($\theta$) are slightly perturbed by $\epsilon$. Flat minima are empirically linked to better generalization because they represent solutions that are less sensitive to small variations in input data.
- Domain-Aware Gradient Alignment: In multi-domain settings, gradients from different datasets can point in conflicting directions, causing "gradient interference." RoGA introduces a conservative term that forces the perturbed gradient of each domain to align with the overall empirical risk gradient. This is achieved by maximizing the cosine similarity between the general gradient $\nabla \mathcal{L}(\theta)$ and the robust gradients $\nabla \mathcal{L}(\theta + \epsilon_i)$.
Experimental Evaluation
The authors evaluated RoGA using several industry-standard benchmarks, primarily training on FaceForensics++ (FF++) and testing on unseen datasets like Celeb-DF (v1 & v2), Deepfake Detection Challenge (DFDC), and UADFV.
Key Results
- Cross-Dataset Performance: On the challenging Celeb-DF dataset, RoGA achieved an AUC of 0.877, outperforming previous state-of-the-art (SOTA) methods like AdaForensics (0.869) and ConfR (0.873).
- Cross-Manipulation Robustness: In "leave-one-out" testing within FF++, RoGA reached a remarkable 98.08% AUC when testing on FaceSwap (GID-FS), which is 11.78% higher than the next best detector.
- Visual Interpretability: Grad-CAM visualizations revealed that RoGA-trained models focus more accurately on actual manipulated regions (such as the mouth or eyes), whereas baseline models often get distracted by background elements or unedited skin textures.
Conclusion and Future Work
RoGA demonstrates that the geometry of the loss landscape is critical for deepfake detection. By forcing the model into flatter regions and aligning gradients across domains, it achieves superior generalization without the need for auxiliary branches or complex data-centric regularization.
However, the method does come with a higher computational cost, as it requires a two-step gradient calculation that roughly doubles training time. Additionally, hyperparameters such as the alignment coefficient ($\alpha$) and perturbation radius ($\rho$) require careful tuning. Future work may explore extending this gradient alignment strategy to other computer vision tasks struggling with domain shift.
Summary updated