Deepfake detectors score near-perfectly on the dataset they were trained on and then fail on new datasets. One documented reason is that they quietly learn who is in the video instead of whether the face was manipulated. In a training set, certain people appear mostly as fakes, so recognizing those faces becomes a cheap shortcut. That shortcut is useless on a new dataset with different people. We propose to block it directly. A frozen face-recognition network supplies a description of each face's identity, and during training we penalize any statistical dependence between the detector's features and that identity description, measured separately within the real class and within the fake class. The detector is still free to separate real from fake, but it can no longer vary its features with who the person is.
This matters because the method that currently performs best at removing identity shortcuts does so by assuming forgeries are local blending seams. That assumption breaks on whole-face synthesis from diffusion models (generators that build an image by gradually denoising random noise). A constraint stated in feature space makes no spatial assumption. It also needs no hand-made "domain" labels, because the identity embedding is a continuous nuisance variable that comes for free.
Core Claim
Making forgery features class-conditionally independent of a frozen identity embedding, with independence measured by a kernel dependence statistic rather than a plain inner product, closes more of the cross-dataset gap than either of two alternatives: removing identity through spatial supervision, or learning a generic "private" subspace that is merely orthogonal to the forgery features. The advantage should be largest on whole-image synthetic forgeries.
Let $z = f_\theta(x)$ be the detector's feature for image $x$, $u = g(x)$ the frozen identity embedding, and $y \in \{\text{real}, \text{fake}\}$ the label. The training objective is
$$ \mathcal{L} = \mathcal{L}_{\text{cls}}(z, y) + \lambda \sum_{c \in \{\text{real},\text{fake}\}} \mathrm{HSIC}\big(z, u \mid y=c\big), $$
where $\mathcal{L}_{\text{cls}}$ is binary cross-entropy, $\lambda$ is a weight, and HSIC is the Hilbert-Schmidt independence criterion. HSIC is a batch estimate of dependence between two variables; it is zero when they are independent under a characteristic kernel. With linear kernels it reduces to the squared Frobenius norm of the class-conditional cross-covariance between $z$ and $u$. That is exactly the matrix orthogonality penalty of Feature Decomposition for Reducing Negative Transfer, applied here against a fixed identity anchor instead of a learned private branch. Moving to Gaussian or random-feature kernels extends this to non-linear dependence.
Conditioning on the label is the important design choice. An unconditional penalty would also strip out real differences between real and fake identity statistics, which are genuine cues, since a swapped face carries a blended identity. The conditional form removes only identity variation within each class, and that within-class variation is what the memorization shortcut exploits.
Relation to Prior Work
Two papers motivate the proposal by documenting the gap.
Implicit Identity Leakage shows that linear probes on frozen deepfake backbones recover identity across FF++, Celeb-DF and LFW. Its fix combines bounding-box artifact regression with multi-scale face-swap augmentation, and the authors note it assumes localized seams. We keep their diagnosis and their probe protocol but replace the spatial fix with a feature-space constraint.
Environment-Invariant Subspace Learning splits CLIP features with a single linear low-rank projection into invariant factors and environmental residuals. It intervenes on backgrounds and photometrics but assumes identity is preserved, and it names its linear projector as a limitation. Our proposal targets identity rather than environment, and it tests non-linear independence.
Several papers supply the methods we reuse or contrast against. Domain Separation Networks and Adversarial Multi-task Learning for Text Classification establish the shared/private orthogonality penalty and its benefit over adversarial-only invariance: DSN reaches 83.2% versus DANN's 77.4% on MNIST→MNIST-M. We depart from them by making the "home for the noise" a frozen, semantically meaningful identity network instead of a learned private encoder. A learned private encoder can absorb arbitrary signal; a frozen identity network specifies exactly what must be excluded.
Selective Domain-Invariant Feature removes dataset and manipulation markers with a gradient-reversal domain discriminator. It needs discrete domain labels and reaches 81.79% AUC on Celeb-DF. Our nuisance variable is continuous and needs no domain labels. Decoupling Forgery Semantics separates content from forgery with dual encoders and reconstruction, but without explicit orthogonality, and reaches 76.94% on Celeb-DF; we test whether a single-backbone constraint can beat that multi-encoder pipeline.
One paper constrains the design. SICA argues that stripping semantics collapses forensic features and that artifacts should live in directions nearly orthogonal to a frozen CLIP semantic manifold. Our method does not strip semantics wholesale; it removes only the identity component. SICA's warning still implies a risk that identity and useful facial structure are entangled, so we explicitly measure in-distribution accuracy loss as $\lambda$ grows. Finally, the bias-term misalignment identified by GD-FAS in face anti-spoofing motivates reporting calibration error alongside AUC.
Research Program
We will build the detector on two backbones so that comparisons are like-for-like with the two strongest prior methods. The first is CLIP ViT-L with low-rank adapters (small trainable weight updates added to frozen layers), matching EISL's setting. The second is Xception, matching the Implicit Identity Leakage setting. The identity encoder $g$ is a frozen, publicly available face-recognition network applied to the same aligned crop. HSIC is computed per mini-batch with class-balanced sampling.
We compare linear, Gaussian, and random-Fourier-feature kernels, with the kernel bandwidth set by the median heuristic so the method does not add a tuned hyperparameter. The weight $\lambda$ is chosen on a held-out FF++ manipulation type, never on a test dataset.
Analysis has three parts. First, we rerun the identity-probe protocol of Implicit Identity Leakage, adding non-linear probes, to check whether the penalty actually removes identity or merely hides it from linear readout. Second, we track how cross-dataset AUC changes as residual identity decodability changes across $\lambda$. Third, we construct a controlled shortcut split of FF++ in which a chosen subset of identities appears only as fake. This lets us measure how much each method resists a planted identity shortcut, separately from natural dataset shift.
Baselines
The naive reference is a plain binary classifier on each backbone, trained on FF++ c23 with standard augmentation. The Celeb-DF authors report that such baselines average 56.9% AUC on Celeb-DF, and the reinforcement-learning augmentation policy of On Improving Cross-dataset Generalization reaches only 0.669. Matching these would mean the constraint does nothing.
The strongest identity-specific competitor is the ID-unaware model from Implicit Identity Leakage. It reports 93.88% AUC on Celeb-DF and 73.85% on DFDC-V2 when trained on FF++. We will rerun it from its described components on the identical Xception backbone, frame sampling and face crops. Our method beats it if it matches its Celeb-DF AUC within noise and exceeds it on whole-face synthesis (DiFF) and DFDC, where its locality assumption should hurt.
The strongest foundation-model competitor is EISL. On CelebDF-v2 it reports 0.911 frame-level and 0.969 video-level AUC, 0.940 video-level AUC on DFDCP, and 89.86 AUC on DiFF text-to-image forgeries. We will run it on the same CLIP backbone, adapter rank and training budget. Because the two methods target different nuisances, we also test their combination: if identity-orthogonality adds a gain on top of EISL's environmental decomposition, that shows the two are complementary rather than redundant.
Selective Domain-Invariant Feature, at 81.79% on Celeb-DF and 64.01% on WildDeepfake, is the representative adversarial-invariance baseline.
Three ablations isolate the key ingredient. The first swaps the frozen identity anchor for a learned private branch with a DSN-style difference loss. The second replaces the conditional penalty with an unconditional one. The third restricts the kernel to linear. All methods receive the same tuning grid size and GPU-hour budget, and all model selection uses FF++ validation data only.
Why not just…?
Why not just remove identity with a gradient-reversal identity classifier? This is the most direct adversarial alternative, and it is a fair threat. The file documents that minimax training is unstable and can over-purify features. It also needs an identity label space, which is closed-set and breaks across datasets with disjoint people. HSIC against a continuous embedding needs neither a classifier nor labels. We run this alternative on the same backbone. If it matches our method on both cross-dataset AUC and residual identity probes, the contribution reduces to "identity is the right nuisance," and we will report it that way.
Why not just project identity directions out of frozen features after training? A post-hoc projection — fitting linear probes for identity and removing their directions — is cheap and may be a real threat for CLIP features, where identity may be close to linearly encoded. Its weakness is that it acts after the detector has already allocated capacity to identity, and it removes only linear structure. We include it as a baseline with an identical probe budget. If it matches our method, the training-time constraint is unnecessary, and the non-linear kernel results become the remaining question.
Why not just truncate the receptive field so the network never sees a whole face? What Makes Fake Images Detectable? shows that patch-level classifiers catch local upsampling artifacts. However, local patches lack the context needed for whole-image synthesis, and patches can still carry identity cues such as skin texture. We include a truncated Xception and test it on DiFF and on the planted-shortcut split.
Why not just augment harder? The evidence already argues against this. Adaptive augmentation reaches 0.669 on Celeb-DF, and EISL reports that background intervention alone drops a CLIP detector from 0.98 to 0.73 AUC. Augmentation cannot change who appears in the fake class, so it cannot break the identity–label correlation.
Proposed Experiments
Training uses FF++ c23. Testing covers Celeb-DF v2, DFD, DFDC and DFDCP, WildDeepfake, DF40, and DiFF, plus FF++ c40 for robustness to compression. We report frame- and video-level AUC, plus expected calibration error at a threshold fixed on FF++, following the bias-misalignment concern from GD-FAS.
Three checks decide the outcome. First, on the planted-shortcut FF++ split, our method should keep AUC on held-out identities close to its AUC on seen identities, while the plain baseline and the unconditional-penalty ablation should not. Second, on DiFF, our method should beat the ID-unaware model by a clear margin. If it does not, the claimed advantage over spatial supervision is false. Third, across $\lambda$, cross-dataset AUC should rise as kernel-probe identity accuracy falls, until in-distribution AUC begins to drop. That turning point measures how entangled identity is with genuine forgery evidence, which tests SICA's warning directly. If residual identity decodability does not predict cross-dataset AUC, identity leakage is not the bottleneck on these benchmarks, and the proposal's premise fails.
References
- Feature Decomposition for Reducing Negative Transfer: A Novel Multi-Task Learning Method for Recommender System (Student Abstract)
- Towards A Robust Deepfake Detector: Common Artifact Deepfake Detection Model
- Environment-Invariant Subspace Learning for Generalizable Deepfake Detection
- Domain Separation Networks
- Adversarial Multi-task Learning for Text Classification
- Selective Domain-Invariant Feature for Generalizable Deepfake Detection
- Decoupling Forgery Semantics for Generalizable Deepfake Detection
- Can We Build a Monolithic Model for Fake Image Detection? SICA: Semantic-Induced Constrained Adaptation for Unified-Yet-Discriminative Artifact Feature Space Reconstruction
- Group-wise Scaling and Orthogonal Decomposition for Domain-Invariant Feature Extraction in Face Anti-Spoofing
- Celeb-DF: A Large-Scale Challenging Dataset for DeepFake Forensics
- On Improving Cross-dataset Generalization of Deepfake Detectors
- What Makes Fake Images Detectable? Understanding Properties that Generalize