Abstract
As deepfake generation techniques evolve from GANs to sophisticated diffusion models, detection systems face a critical challenge: adapting to new forgery types without losing the ability to detect older ones. This phenomenon, known as catastrophic forgetting, is particularly acute in the "continual learning" setting. We present Prompt2Guard, a novel framework for exemplar-free continual deepfake detection. By utilizing "read-only" multi-modal prompts and conditioning text descriptions on specific image content, Prompt2Guard achieves state-of-the-art performance on the CDDB-Hard benchmark, effectively balancing adaptation to new generators with the preservation of prior knowledge.
Introduction
Deepfake detection is an ongoing arms race. While modern detectors can achieve high accuracy on specific datasets, their performance often collapses when they encounter images from a previously unseen generator. In a real-world scenario, a detector must learn sequentially, incorporating knowledge of new generative architectures as they emerge.
Existing approaches leveraging Vision-Language Models (VLMs) like CLIP face two primary hurdles in this continual setting: the Task Selection Problem and Efficiency Bottlenecks. If a model must select a specific prompt for a specific generator at inference time, any error in task identification leads to a failure in detection. Conversely, running multiple forward passes for every known generator is computationally prohibitive. Prompt2Guard addresses these issues by decoupling task-specific learning from the core VLM weights and employing a robust ensembling strategy.
The Prompt2Guard Framework
Prompt2Guard introduces three architectural innovations designed to streamline continual learning without the need for storing previous training examples (exemplar-free).
1. Read-Only Multi-Modal Prompts
Traditional prompt tuning often modifies the internal representations of the VLM, which can lead to interference between tasks. Prompt2Guard utilizes "read-only" prompts that interact with the model via a masked attention mechanism. This ensures that the prompts can extract features from the pre-trained model without altering its foundational weights. This isolation allows the model to learn distinct task-specific knowledge for each new generator independently.
2. Text-Prompt Conditioning
A common pitfall in deepfake detection is that models often focus on the semantic content of an image (e.g., "a dog") rather than the underlying structural artifacts of the forgery. Prompt2Guard mitigates this by first using zero-shot CLIP to identify the primary object in the image. It then generates a conditioned prompt, such as "a fake photo of a dog." By explicitly naming the object, the model is forced to look past the "dog-ness" of the image and concentrate on the subtle inconsistencies that indicate a synthetic origin.
3. Prediction Ensembling
Rather than attempting to perfectly identify which generator produced a suspect image—a process prone to error—Prompt2Guard treats the problem as a "mixture of experts." The model computes a weighted ensemble of predictions across all previously learned tasks. Using a k-means classifier on the image's CLS token to estimate domain likelihood, the system combines "max" and "mean" confidence scores to reach a final binary decision (real vs. fake). This approach is significantly more robust than hard task selection.
Experimental Evaluation
Datasets and Benchmarks
The framework was evaluated on the CDDB-Hard benchmark, which simulates a rigorous continual learning environment. The benchmark consists of five sequential tasks representing diverse domains and generation methods:
- GauGAN: Landscape synthesis.
- BigGAN: Diverse object generation.
- WildDeepfake: Real-world, "in-the-wild" forgeries.
- WhichFaceReal: High-fidelity human face synthesis.
- SAN: Synthesis-based augmentation.
Performance Results
Prompt2Guard demonstrated superior performance across all key metrics:
- State-of-the-Art Accuracy: The model achieved a 90.28% Task-wise Average Accuracy (AA), surpassing the previous leading method (S-liPrompts) by 1.63%.
- Robust Adaptation: On the final and most complex task (SAN), Prompt2Guard reached 81.11% accuracy, representing a +12.22% improvement over standard S-Prompts baselines.
- Mitigating Forgetting: The model maintained an Average Forgetting (AF) rate of only -0.71%, indicating that the read-only prompt architecture successfully preserved knowledge of early tasks (like GauGAN) even after learning the final task.
- Computational Efficiency: Because the read-only prompts do not interfere with the VLM's internal logic, they can be processed in parallel, avoiding the linear scaling costs associated with multiple sequential forward passes.
Discussion and Insights
The success of Prompt2Guard highlights a critical insight in forensic computer vision: content is a distractor. By conditioning prompts on the specific object in the frame, the model is "freed" to focus on the high-frequency artifacts and structural anomalies characteristic of generative models. Furthermore, the shift from task selection to task ensembling proves that a collaborative decision-making process is more resilient in open-world scenarios where the exact source of a deepfake may be unknown.
Limitations and Future Directions
While Prompt2Guard sets a new standard for continual detection, several areas for improvement remain:
- Label Dependency: The current conditioning mechanism relies on a pre-defined set of categories (ImageNet-1k). Future iterations may explore "vocabulary-free" conditioning to handle arbitrary or novel objects.
- Context Window Limits: As the number of tasks grows, the concatenated prompts may eventually challenge the token limits of standard VLMs.
- Diffusion Forgeries: Future work will focus on expanding the benchmark to include more recent, high-fidelity diffusion-based deepfakes to ensure the model's continued relevance against the latest generative threats.
Summary updated