Deepfake detectors trained on one benchmark often fall to near-chance accuracy on another. The detectors that generalize best do so because they learned generic cues, such as the seam left when a synthesized face is blended into a real frame. The best example is training on self-blended images: fake examples made by blending a slightly altered copy of a real face back into itself. When a new generator appears, practitioners fine-tune on a few dozen of its videos. That fine-tuning is exactly when the generic cues get overwritten by shortcuts specific to the new generator. The detector gets better on the new fake source and worse on everything nobody has seen yet.
We propose to restrict every fine-tuning update to directions the generic detector does not use. Concretely, we compute, at each layer, the subspace spanned by the network's internal activations on real faces and their self-blended counterparts. We then allow weight updates only in the orthogonal complement of that subspace, the "null space" in the language of machine unlearning. Because self-blended fakes can be regenerated from any real face, this protected subspace can be rebuilt from the current task's own real faces. No old images ever need to be stored. The claim to test is specific: protecting this regenerable "generic forgery core" preserves accuracy on datasets the detector has never seen, better than distillation, replay, or soft gradient-conflict losses, while still letting the detector learn the new generator.
Core Claim and What Is New
The geometric tool comes from unlearning and continual learning. Machine Unlearning via Null Space Calibration (UNSC) takes a singular value decomposition (SVD) of activations on retained samples. It then confines unlearning updates to the resulting null space, which leaves retained CIFAR-10 accuracy intact (92.10% rising to 92.77%). Gradient Projection Memory for Continual Learning stores orthonormal bases of past-task activation subspaces instead of raw data, which avoids forgetting. Both protect what the model already does on data it has seen.
Our change is in what gets protected. In deepfake forensics, the quantity that matters is accuracy on unseen manipulations, not retention of old tasks. We therefore protect a subspace defined by a synthetic, regenerable proxy for generalization: real faces plus self-blended fakes, following Detecting Deepfakes with Self-Blended Images (SBI). For a linear or convolutional layer $l$ with weight update $\Delta W_l$, let $U_l$ hold the top singular vectors of the layer's input activations on those images, keeping enough to capture a fraction $\epsilon$ of activation energy. The update is then
$$\Delta W_l \leftarrow \Delta W_l \,(I - U_l U_l^{\top}),$$
so that the layer's output on any input lying in the protected subspace is unchanged to first order. Past-task bases in the style of gradient projection memory can be stacked into $U_l$ as tasks accumulate. That is a secondary ingredient, and we ablate it separately.
The closest deepfake-specific work is Suppressing Gradient Conflict for Generalizable Deepfake Detection (CS-DFD). It shows that jointly training on benchmark fakes and SBI fakes produces conflicting gradients, which the authors call the "1+1 < 2" effect. It reconciles the two sources with a local search for a compromise update vector and with a feature-space loss that penalizes conflict. CS-DFD is a joint-training method with soft penalties. It has not been studied for few-shot sequential adaptation, and it imposes no hard constraint. We impose an exact, analytically computed constraint during adaptation. The two continual deepfake methods, DFIL and CoReD, rely on distillation, and DFIL also relies on a replay buffer of stored face frames. Neither uses projection. Both report on old tasks and new tasks, not on datasets still unseen at each stage. DFIL's authors name data-free incremental learning as unsolved. Our method stores only basis matrices, never images.
Research Program
We start from an SBI-trained EfficientNet detector on FaceForensics++ (FaceForensics++), matching the SBI setup.
The first piece of work is diagnostic. We fine-tune this detector on 25 videos of a new dataset and track two quantities during training. One is AUC on the new dataset. The other is AUC on held-out datasets not yet introduced, which we call forward AUC. We also measure how much of each fine-tuning gradient lies inside the SBI activation subspace. If naive fine-tuning does not degrade forward AUC, the premise fails and we stop.
The second piece builds the projected adapter. Bases are computed from the current task's real faces and freshly generated SBI versions of them. We sweep the energy threshold $\epsilon$ and report the fraction of each layer's dimension left free. This directly monitors the gradient-starvation failure that OrthoEraser warns about, where too many constraints leave no room to learn.
The third piece confronts the linearity concern. Safety Subspaces are Not Linearly Distinct shows that linear subspaces can fail to separate behaviours that are entangled nonlinearly. Decoupling Forgery Semantics argues that content and forgery cues are entangled in the same way. We test this head-on by measuring how much SBI-probe AUC actually moves under projected updates. If the first-order guarantee leaks badly through later nonlinear layers, that is a reportable negative result about the transfer of unlearning-style projections to forensics.
Baselines
The naive reference is full fine-tuning on each new task with cross-entropy. CoReD reports that this kind of transfer learning collapses to 62.25% average F1 over four tasks, against 86.16% for CoReD. We expect the same pattern in old-task scores and expect forward AUC to degrade too.
The strongest continual competitor is DFIL. It combines contrastive learning, distillation, and a replay buffer of hard and central samples, and reports AUC 0.9173 on DFDC-P with 25 videos, average forgetting of 7.01, and average accuracy of 85.49%. We run DFIL in its own protocol (FF++ followed by DFDC-P, DFD, and Celeb-DF, 25 videos per task) with its replay buffer intact. This gives DFIL an advantage, since our method stores no data. We also run a replay-free DFIL variant.
The strongest generalization competitor is CS-DFD. It reports 95.32% AUC on Celeb-DF when trained on FF++ plus SBI, and an 88.02% average over four unseen datasets. The SBI baseline it compares against is about 93%. We adapt CS-DFD to the sequential setting by applying its update-vector search and conflict loss to the mix of new-task fakes and on-the-fly SBI fakes.
Every method shares the same backbone, initialization, 25-video budget, number of steps, and a matched hyperparameter search of equal size. The last condition is the decisive one.
Beating these baselines means two things. First, final average accuracy must be at least DFIL's while using no replay. Second, forward AUC on not-yet-seen datasets must be higher than that of every baseline at every stage, while new-task AUC stays within one point of the best method.
The key ablations isolate the protected subspace. We compare plain gradient projection memory, which protects only past-task bases, against the SBI core alone and against both together. We also include a random subspace of matched dimension. If the SBI core does not beat the random and past-task-only subspaces on forward AUC, the central claim fails.
Why not just…?
Why not just rehearse SBI fakes during fine-tuning, since they are free to generate? This is the most serious threat. It is data-free for the same reason our method is. CS-DFD's evidence is that naively mixing SBI with real benchmark fakes creates conflicting gradients that hurt generalization, so plain rehearsal should underperform. With only 25 videos, however, that conflict may be weak. We therefore run SBI rehearsal as a baseline both with and without CS-DFD's conflict suppression. If rehearsal matches projection on forward AUC, the honest conclusion is that the soft constraint suffices, and our contribution shrinks to a cheaper and more stable alternative.
Why not just freeze the backbone, or fine-tune only a low-rank adapter? Freezing protects generic features trivially, but it also blocks learning cues that seams cannot capture. SBI reaches only 69.11% AUC on StyleGAN, so a frozen SBI backbone should fail on whole-image generators. We include a final task built from StarGAN and Glow attribute edits on CelebA, where the network has to learn new cues. Low-rank adaptation restricts the rank of the update but not its direction, so it can still overwrite the protected subspace. We run both a head-only variant and a LoRA variant matched in trainable parameters.
Why not just use distillation, as CoReD and DFIL do? Distillation keeps old outputs close in aggregate rather than keeping specific directions untouched. It also needs either stored data or a proxy for the old data. DFIL's low forgetting depends on its replay buffer. The replay-free DFIL run shows how much of DFIL's advantage comes from stored biometric data.
Why not just rectify conflicting gradients on the fly, as GRU does? GRU projects an update only when its cosine with a retention gradient turns negative. That requires a batch retention gradient every step and protects only one averaged direction. Go Beyond Your Means argues that averaged directions lose information. We run GRU-style rectification against an SBI retention loss under the same budget. This shows whether a full activation subspace is needed or a single gradient direction is enough.
Proposed Experiments
The main experiment follows DFIL's sequential protocol. Before each task, we evaluate on all not-yet-introduced datasets, which yields a forward-AUC curve. After the full sequence we report average accuracy and average forgetting. A fifth task, CelebA attribute edits, stresses the starvation regime. Throughout we report the free-dimension fraction per layer against $\epsilon$, alongside SBI-probe AUC, as the direct measure of whether the protected core stayed intact. We also test the FF++ low-quality setting, where accuracy drops from 99.26% to 81.00% for Xception. That setting checks whether protecting seam cues helps or hurts when compression erases them.
Two results decide the outcome. First, the SBI-core ablation must beat a random subspace of equal dimension and plain gradient projection memory on forward AUC. Second, projection must beat CS-DFD-style SBI rehearsal on forward AUC under matched tuning. If both hold, regenerable null-space protection is a real advance. If the second fails, we report that the cheaper soft method is enough.
References
- Machine Unlearning via Null Space Calibration
- Gradient Projection Memory for Continual Learning
- Detecting Deepfakes with Self-Blended Images
- Suppressing Gradient Conflict for Generalizable Deepfake Detection
- DFIL: Deepfake Incremental Learning by Exploiting Domain-invariant Forgery Clues
- CoReD: Generalizing Fake Media Detection with Continual Representation using Distillation
- FaceForensics++: Learning to Detect Manipulated Facial Images
- OrthoEraser: Coupled-Neuron Orthogonal Projection for Concept Erasure
- Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study
- Decoupling Forgery Semantics for Generalizable Deepfake Detection
- GRU: Mitigating the Trade-off between Unlearning and Retention for LLMs
- Go Beyond Your Means: Unlearning with Per-Sample Gradient Orthogonalization