Anchoring on the Real Class: Diagnosing and Removing Recency Bias in Continual Deepfake Detectors

Deepfake detectors are trained on the generators that exist today and then have to keep up as new ones appear. The natural fix is continual learning: update the detector on each new generator's fakes without retraining from scratch. Current continual deepfake methods measure success by how well the updated detector still recognizes generators it has already seen. That measures the wrong thing for security. The real test is whether the detector still catches fakes from the next generator, the one nobody has trained on yet. We argue that continual updates introduce a specific, measurable failure here. Classifiers trained on a stream of tasks drift toward whatever they saw last, a problem called task-recency bias. In a real-vs-fake detector, this means the model's notion of "fake" narrows to the fingerprint of the most recent generator, and its decision threshold shifts along with it. Unseen generators that look unlike the latest one then get waved through as real.

Our proposal has two parts. The first is a diagnostic protocol. We hold out whole generators from continual deepfake streams and split the resulting loss on those generators into a threshold part, which shows up as accuracy lost while the ranking of real versus fake scores (AUC, the area under the ROC curve) stays intact, and a ranking part, which shows up as lost AUC. The second is a method that exploits one asymmetry of this problem: real images appear in every task, while each kind of fake appears in only one. We keep a continually updated statistical model of real features, prevent the backbone's features from collapsing into a few directions, and set the decision threshold using real images alone. The threshold therefore cannot follow the newest fake source.

Core Claim

In continual deepfake detection, standard metrics (Average Accuracy and Average Forgetting over seen tasks) hide a recency bias whose cost appears only on held-out generators. We expect the held-out miss rate to track how similar each unseen generator is to the most recently learned one, more than its similarity to the union of all learned ones. We also expect much of this loss to be recoverable, because it comes from a drifting decision rule and collapsing features rather than a lost ability to rank. A detector that treats the real class as a fixed anchor should keep the gains that continual updates bring on seen generators without paying this price on unseen ones. The claim can fail in a clean way. A frozen, never-updated backbone scored against a model of real features might do as well on held-out generators. If so, the right conclusion is that one should not adapt the backbone at all, and we will report it that way.

What Prior Work Establishes and Leaves Open

The recency-bias literature supplies both the mechanism and some of the tools. Three papers show that sequential training skews the output layer toward new classes. SpaceNet documents weight magnitudes for new classes growing past those for old ones. Rethinking Experience Replay traces the resulting logit inflation. SS-IL proves that a shared softmax pushes old-class scores down whenever the model trains on new classes, and fixes this by giving old and new classes separate softmaxes. Task-recency bias strikes back (AdaGauss) locates the bias one level deeper in the exemplar-free setting. Features collapse into a low-rank subspace, stored class covariances go stale, and predictions tilt toward new classes. AdaGauss counters this with an adapter that updates stored Gaussians and an anti-collapse penalty on Cholesky factors. OpenCIL adds that incrementally trained models assign unknown inputs to the latest task with high confidence. That is exactly how an unseen generator would be handled. We reuse SS-IL's separated heads and AdaGauss's covariance adapter and anti-collapse loss as components. Neither was designed for a binary problem where one class, real images, is shared across every task.

The generalization literature supplies the anchoring idea. DeepfakeBench confirms the gap: detectors score near 99% AUC in-domain, while the best cross-domain average it reports is 78.75% AUC, from the frequency-based SPSL. Real Distribution Bias Correction (RDBC) closes much of this gap offline. It models the population distribution of real features and applies whitening sampled from that distribution, reaching 91.82% average cross-domain AUC when trained on FF++. Its Gaussian model of real features is estimated once, on one dataset. In a stream where camera, compression and source shift with every task, that static estimate is exactly what goes stale. Two other papers push detectors away from shortcuts, which matters because recency bias amounts to a shortcut toward the last task. What Makes Fake Images Detectable? restricts the receptive field to small patches, and the Locality-aware AutoEncoder guides attention with manipulation masks.

Four papers already join continual learning and forgery detection. None measures what we measure. CDDB defines the EASY, HARD and LONG generator streams and recommends multi-task heads that predict both real/fake and the source generator. It relies on exemplar replay and never examines head bias. Prompt2Guard keeps CLIP frozen and learns read-only prompts per task. At test time it combines predictions across tasks using k-means clusters of CLS-token features. It reports only seen-task accuracy, and its selection between tasks has no way to express "none of the above." HDP replays pseudo-fakes built by adding one stored universal adversarial perturbation per task to real images. CoReD uses teacher-student distillation, which SS-IL's analysis suggests carries the teacher's bias forward. All four evaluate retention of seen tasks. None holds out generators, splits the resulting error into threshold and ranking parts, or treats the shared real class as the stable reference.

Research Program

The first component is the protocol. On CDDB's HARD and LONG streams, we remove one generator at a time from the training stream. After each stage, we evaluate the removed generator together with any generators still to come. On the CFFD protocols from HDP, we hold out one face dataset entirely. For example, we train FF++ → Celeb-DF → WildDeepfake and test on DFDC, rotating which dataset is held out.

For every method and stage we report three quantities. The first is held-out AUC, which measures ranking. The second is held-out accuracy at a threshold fixed by a target false-positive rate on real images; the drop from AUC to this accuracy captures the threshold part of the loss. The third is a recency index: the rank correlation, across held-out generators, between miss rate and feature similarity to the most recent task's fakes, compared against the same correlation computed with similarity to all previous tasks' fakes. We also track the effective rank of backbone features stage by stage, to test whether the collapse AdaGauss found in class-incremental image classification also occurs across forgery domains. Finally, following OpenCIL, we measure how often a held-out generator is assigned to the most recent source head with high confidence.

The second component is the detector. The backbone is updated at each stage with an anti-collapse penalty that keeps the covariance of real features full-rank. The real class is represented by a mixture of Gaussians over features, one component per stage's real images. Earlier components are carried into the current feature space by a small adapter trained on the current stage's real images, in the manner of AdaGauss; no old images are stored. The real-feature whitening used during training is sampled from this evolving mixture, in the manner of RDBC, rather than from a single static estimate. On the fake side, each stage adds a source head that sits behind its own softmax, as in SS-IL, so that learning a new generator cannot push down the scores of old sources.

The detection score is the Mahalanobis distance of an image's features from the real mixture, a distance that accounts for the spread and correlation of real features, fused with the largest source-head score. The fusion weights and the decision threshold are set using real images only, at a fixed false-positive rate. Because real images exist at every stage, calibration never needs stored fakes, and nothing in the calibration refers to the latest generator. We build the method on two backbones: Xception, for comparability with the face-forgery literature, and CLIP ViT-B/16 with a lightweight adapter, for comparability with Prompt2Guard.

Baselines

The naive reference points are sequential fine-tuning and a frozen backbone. Sequential fine-tuning simply updates the detector on each new task; HDP reports it losing about 27% in previous-task performance relative to HDP on CFFD Protocol 1. The frozen backbone, pretrained Xception or CLIP, is never updated; we score images against a Gaussian model of real features accumulated over the stream and threshold on reals. The frozen backbone is the most important comparison because it cannot suffer recency bias in its features. Beating it on held-out AUC is what justifies adapting the backbone at all.

The strongest existing continual competitor is Prompt2Guard. It reports 90.28% Average Accuracy and −0.71% Average Forgetting on CDDB-HARD, and 81.11% on the final SAN task. We run its released configuration on the same held-out splits with the same CLIP backbone. We also give our method the same number of trainable parameters and the same epochs per stage. Beating it means higher held-out AUC and held-out accuracy at a matched real false-positive rate, while staying within one point of its seen-task Average Accuracy.

DyTox from CDDB is reported at roughly 88% Average Accuracy on HARD and 96% on EASY. We run it with CDDB's exemplar budget. HDP and CoReD serve as face-domain continual baselines on the CFFD protocols with an Xception backbone. For HDP, no absolute AUC on Protocols 2 and 3 appears on Lacuna, so we reproduce it ourselves. CoReD reports an F1-score of 86.16% at Task 4 on its own sequence.

RDBC trained offline on all stream data at once serves as an upper-reference oracle. It reports 91.82% average cross-domain AUC from FF++. The same method re-fit only on the first stage serves as a static-anchor baseline.

Three ablations isolate the ingredients. The first removes the anti-collapse penalty. The second replaces the adapted real-feature mixture with a single Gaussian from the first stage. The third replaces real-only threshold calibration with the model's default threshold. Each ablation is run with identical data and a tuning budget identical to the full method's, 20 configurations each, selected on seen-task validation only.

Why not just…?

Why not just recalibrate the threshold after each stage? If the held-out loss is mostly a threshold problem, a post-hoc bias correction might be all that is needed. Our protocol checks this directly. We include a baseline that trains by sequential fine-tuning and then re-fits the threshold on reals only. If that baseline recovers most of the held-out accuracy, the decomposition shows that the loss was threshold, not ranking. We would then report recalibration as the answer and drop the heavier machinery. The feature-level parts of our method are justified only if held-out AUC itself falls across stages.

Why not just replay a buffer of old real and fake images? The online continual learning survey finds that small replay buffers leave the output layer skewed, because new data greatly outnumbers the stored examples. CDDB reports steep drops when the buffer shrinks. Replay also stores face videos, which HDP notes is costly and raises privacy problems. We still run experience replay with a balanced buffer sized to match our method's storage in bytes. If it matches our method on held-out AUC, the case for going exemplar-free rests only on storage and privacy, and we will say so.

Why not just freeze CLIP and never adapt? This is the most serious threat, since a frozen model has no recency bias to fix. Prompt2Guard's own ablation shows that plain S-Prompts reach only 68.89% on SAN, so a frozen backbone with weak task conditioning does leave accuracy unclaimed. That evidence concerns seen tasks, though. The frozen-backbone baseline described above settles the question on held-out generators.

Proposed Experiments and Decisive Checks

The first check is whether the phenomenon exists. For sequential fine-tuning, CoReD and Prompt2Guard, is the recency index significantly positive across rotations of the held-out generator? Does feature effective rank fall stage by stage? If neither holds, the diagnostic contribution is a negative result, and the method is unnecessary.

The second check is the decomposition. For each baseline, we measure what share of the held-out loss is threshold versus ranking. This share determines which of the alternatives above is sufficient.

The third check is the method itself. On CDDB-HARD and LONG, and on CFFD Protocol 2 with each dataset held out in turn, the full detector should beat Prompt2Guard and the frozen backbone on held-out AUC averaged over rotations, while keeping seen-task Average Accuracy within a point of Prompt2Guard's. Each of the three ablations should lower held-out AUC, and the static-anchor ablation should do so specifically on the CFFD streams, where real-image domains shift. We report means over three seeds with rotation-level confidence intervals. A win counts only if it holds across rotations, not in aggregate alone.