arXiv:2610.29442cs.CVOct 2026

Manuscript Offprint

arXiv:2610.29442

Beyond Shortcut Learning: Hierarchical Spatial Prototype Regularization for Face Forgery Detection

Chao Shuai, Shaojing Fan, Kun Pan, Jinwu Hu, Weichen Lian, Ziqi Yang, Zhongjie Ba, Zhenguang Liu

Abstract

Recent advances in generative models have enabled highly realistic face forgeries, yet generalizing deepfake detectors to unseen manipulation pipelines remains a major challenge. One critical yet underexplored issue is that the learned forensic representation itself may fail to remain stable across different manipulation sources. In this paper, we provide new evidence that naively fine-tuned vision models suffer from severe forensic representation collapse: their extracted cues are often entangled with unstable, dataset-specific artifacts, resulting in structurally fragile representations and poor cross-domain generalization. Leveraging this insight, we propose Hierarchical Spatial Prototype (HSP) regularization, which explicitly models the forgery manifold by learning a structured prototype subspace over spatial features. We further introduce prototype orthogonality and second-order assignment balance, which jointly preserve the geometric independence of latent forgery factors and promote high-effective-rank utilization of the forensic representation, thereby reducing reliance on dataset-specific shortcuts. Empirical results demonstrate that our method substantially improves generalizability, yielding average frame-level AUC gains of 5.6% and 5.3% in the cross-dataset and cross-manipulation settings, respectively. Moreover, when used as a plug-in module, HSP boosts the average video-level AUC of existing state-of-the-art detectors to 95.3% (+1.8%). These results demonstrate the practical value of HSP as an easy-to-adopt regularization module for enhancing deepfake detectors.

1 Introduction

Deepfake faces are becoming increasingly photorealistic, posing growing risks to digital media security. By 2025, the number of deepfake files shared online had skyrocketed to 8 million, a 16-fold increase from 2023 (The Conversation 2025). Against this backdrop, deepfake detection has evolved from handcrafted cues and statistical artifact analysis to deep-learning-based detectors. Recent studies (Li et al. 2025; Han et al. 2025; Cai et al. 2025; Yan et al. 2025) increasingly adopt large-scale pretrained Vision Transformers (Dosovitskiy 2020), e.g., CLIP (Radford et al. 2021), achieving strong in-domain performance. However, these gains often transfer poorly to unseen manipulation pipelines, where performance degrades substantially. From a representation learning perspective, this limitation arises from shortcut learning: detectors tend to overfit volatile, dataset-specific cues rather than capturing stable forensic patterns.

Motivated by this, we shift the focus from detector design to probing the foundation model itself, and use CLIP, a widely used backbone in deepfake detection, to investigate how forgery evidence is represented. Our preliminary analysis reveals a simple yet overlooked phenomenon: replacing the global [CLS] representation with average pooling over spatial patch tokens improves cross-dataset detection accuracy on Celeb-DF-v2 (Li et al. 2020b) and DFDCP (Dolhansky et al. 2019), from 75.4% and 77.8% to 76.9% and 78.6%, respectively. This improvement motivates the hypothesis that forgery representations should be modeled as a structured feature space rather than compressed into a compact global representation. This hypothesis is consistent with prior work (Yan et al. 2024b), which shows that existing detectors often suffer from low-rank feature collapse, where forgery cues are concentrated along only a few dominant directions.

We further quantitatively analyze the representation structure of a CLIP-initialized ViT-L/14 (Dosovitskiy 2020; Radford et al. 2021) fine-tuned on FaceForensics++ (Rossler et al. 2019). The analysis reveals a clear generalization bottleneck: although fine-tuning enables the model to form discriminative forgery-related patterns in the feature space, the learned representation tends to concentrate on a few dominant source-specific artifacts, as detailed in Section 3. We term this phenomenon forensic representation collapse, where detectors capture a few high-confidence but narrow forgery directions that achieve strong source-domain discrimination but fail to remain stable under unseen manipulations. These observations motivate us to model forgery traces as a structured manifold composed of multiple latent forensic factors, as illustrated in Figure 1(b). In contrast, conventional detectors mainly enforce real-fake separability without explicitly constraining the internal organization of forgery representations, potentially causing heterogeneous forensic cues to remain entangled, as illustrated in Figure 1(a). We argue that real-world forgeries are intrinsically multi-factorial, where different manipulation processes introduce diverse yet complementary forensic traces. This view is supported by prior forensic studies that capture various manipulation cues,

∗^{*}Corresponding author.

including synthesis artifacts, blending boundaries, geometric inconsistencies, and post-processing traces (Shiohara and Yamasaki 2022; Qian et al. 2020; Dong et al. 2022).

Based on this intuition, we propose Hierarchical Spatial Prototype (HSP) regularization, a plug-in module that can be seamlessly integrated into both standard baselines and advanced ViT-based deepfake detectors. HSP models learnable prototypes as a structured basis for decomposing token-level features into latent forgery factors. Each spatial token is softly assigned to the prototypes and reconstructed from their weighted combination. Considering that real-world forgeries exhibit diverse and complementary forensic factors, we introduce two theoretically motivated regularization objectives. The prototype orthogonality constraint preserves the geometric decoupling of learned forgery factors, preventing multiple prototypes from collapsing into the same dataset-specific dominant directions. The second-order assignment-balance objective promotes diverse utilization of the prototype subspace, increasing the effective rank of the forensic representation and preventing token assignments from collapsing onto a limited set of dominant forgery factors. As visualized in Figure 1(c), the features learned by HSP not only form a clear decision boundary but also exhibit a pronounced multifactor organization within the forgery representation space. Our contributions can be summarized as follows:

• We systematically analyze a critical failure mode in deep-fake detection, termed forensic representation collapse. Our empirical findings show that naively fine-tuned models are overly dependent on limited and dataset-specific forgery factors and fragile under cross-domain shifts.

• We propose Hierarchical Spatial Prototype (HSP) regularization, a structured manifold learning framework for forgery detection. HSP introduces learnable spatial prototypes with soft token-to-prototype assignment to decompose forgery evidence into diverse latent forensic factors.

• We further introduce two theoretically motivated regularization objectives: prototype orthogonality prevents prototypes from collapsing toward the same source-specific directions, while assignment balance encourages diverse utilization of the prototype subspace and promotes a high-effective-rank forensic representation.