Penny-Wise and Pound-Foolish in Deepfake Detection

Yabin Wang, Zhiwu Huang, Zhou Su, Adam Prügel-Bennett, Xiaopeng HongarXiv 2024

Abstract

The diffusion of deepfake technologies has sparked serious concerns about its potential misuse across various domains, prompting the urgent need for robust detection methods. Despite advancement, many current approaches prioritize short-term gains at the expense of long-term effectiveness. This paper critiques the overly specialized approach of fine-tuning pre-trained models solely with a "penny-wise" objective on a single deepfake dataset, while disregarding the "pound-wise" balance for generalization and knowledge retention. To address this issue, we propose a novel learning framework, PoundNet, for generalized deepfake detection using a pre-trained vision-language model. PoundNet incorporates a learnable prompt design and a balanced objective to preserve broad knowledge from upstream tasks (object classification) while enhancing generalization for downstream tasks (deepfake detection). Evaluated across 10 public large-scale deepfake datasets, PoundNet achieves a remarkable 19% improvement in detection performance over state-of-the-art methods while maintaining a strong 63% performance on object classification tasks.

Introduction: The "Penny-Wise and Pound-Foolish" Problem

The rapid evolution of generative AI has created a cat-and-mouse game between deepfake creators and detectors. A significant challenge in the field is "catastrophic forgetting": models trained on specific deepfake generators (e.g., ProGAN) often fail to generalize to new generators (e.g., Stable Diffusion) because they lose the general visual knowledge acquired during pre-training.

We characterize this phenomenon as being "Penny-Wise and Pound-Foolish." Current research often focuses on "penny-wise" gains—achieving high accuracy on a specific training set through narrow binary classification objectives. However, this comes at a "pound-wise" cost: the destruction of the model's rich, pre-trained understanding of the world. As illustrated in Figure 1, while previous works collapse the feature space into a simple real/fake binary, PoundNet preserves the underlying semantic structure (e.g., distinguishing cats from dogs) while simultaneously learning to detect fakes within those categories.

Conceptual overview of the Penny-Wise and Pound-Foolish problem, comparing standard fine-tuning with the PoundNet approach.

Methodology: The PoundNet Framework

PoundNet leverages the Contrastive Language-Image Pre-training (CLIP) architecture to maintain a balance between specialized detection and general semantic knowledge. The framework introduces two primary innovations:

1. Learnable Prompt Pairs

Instead of using static text prompts like "a photo of a deepfake," PoundNet employs learnable context vectors. It learns a pair of continuous vectors—one for "real" and one for "fake"—which are concatenated with class tokens (e.g., [real/fake] [CLASS]). This allows the model to adapt its linguistic understanding of authenticity to the visual domain dynamically.

2. Balanced Objective Function

To prevent the model from overfitting to low-level artifacts that may not exist in unseen datasets, we utilize a three-part loss function as shown in Figure 2:

  • Class-Agnostic Binary Term ($L_{bce}$): The standard objective for distinguishing real from fake images.
  • Semantic-Preserving Term ($L_{spm}$): A regularization term that ensures the model retains its ability to perform general object classification (e.g., identifying a "dog" vs. a "car").
  • Class-Aware Binary Term ($L_{cab}$): This term forces the model to learn the distinction between real and fake within specific semantic categories, making the features more robust and less dependent on generator-specific noise.
The PoundNet architecture, illustrating the learnable context and the three-part balanced objective function.

Experimental Evaluation

To rigorously test generalization, we trained PoundNet on the ForenSynths dataset (ProGAN-based) and evaluated it on a massive benchmark of 10 public datasets, including GenImage, DiffusionForensics, and Celeb-DF. This benchmark covers over 50 different deepfake types. Additionally, we evaluated "upstream" task performance on ImageNet and its variants to measure knowledge retention.

Results and Discussion

PoundNet demonstrates a significant leap in cross-dataset generalization. Key findings include:

  • Superior Generalization: PoundNet achieved a 19% average improvement in detection performance across the 10-dataset benchmark compared to state-of-the-art methods.
  • Robust F1 Scores: While many detectors show high Average Precision (AP) but fail in practical utility (low F1 scores) on unseen data, PoundNet reached an F1 score of 70.58%, nearly doubling the performance of the next best method, UnivFD (42.56%).
  • Knowledge Retention: Unlike traditional detectors that lose almost all ability to perform object classification after training, PoundNet maintained a 63% accuracy on ImageNet, proving it avoids catastrophic forgetting.
  • Zero-Shot Success: Remarkably, PoundNet performed well on human-face deepfakes (Celeb-DF) even though it was only trained on general objects (cars, cats, etc.), highlighting the power of its preserved semantic space.

Conclusion

PoundNet addresses the "Penny-Wise and Pound-Foolish" trap in deepfake detection by balancing specialized fine-tuning with general knowledge preservation. By leveraging vision-language models and a class-aware objective, it achieves state-of-the-art generalization while remaining a capable general-purpose visual model. This approach paves the way for more resilient AI safety tools in an era of rapidly evolving generative content.

Code and data are available at https://github.com/iamwangyabin/PoundNet.

Summary updated

BibTeX
@misc{wang2024penny,
  author = {Yabin Wang and Zhiwu Huang and Zhou Su and Adam Prügel-Bennett and Xiaopeng Hong},
  title = {{Penny-Wise and Pound-Foolish in Deepfake Detection}},
  year = {2024},
  eprint = {2408.08412},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.08412},
}
Figure