Unified Physical-Digital Face Attack Detection

Hao Fang, Ajian Liu, Haocheng Yuan, Junze Zheng, Dingheng Zeng, Yanhong Liu, Jiankang Deng, Sergio Escalera, Xiaoming Liu, Jun Wan, Zhen Lei

Abstract

Face Recognition (FR) systems can suffer from physical (i.e., print photo) and digital (i.e., DeepFake) attacks. However, previous related work rarely considers both situations at the same time. This implies the deployment of multiple models and thus more computational burden. The main reasons for this lack of an integrated model are caused by two factors: (1) The lack of a dataset including both physical and digital attacks which the same ID covers the real face and all attack types; (2) Given the large intra-class variance between these two attacks, it is difficult to learn a compact feature space to detect both attacks simultaneously. To address these issues, we collect a Unified physical-digital Attack dataset, called UniAttackData. The dataset consists of 1,800 participations of 2 and 12 physical and digital attacks, respectively, resulting in a total of 28,706 videos. Then, we propose a Unified Attack Detection framework based on Vision-Language Models (VLMs), namely UniAttackDetection, which includes three main modules: the Teacher-Student Prompts (TSP) module, focused on acquiring unified and specific knowledge respectively; the Unified Knowledge Mining (UKM) module, designed to capture a comprehensive feature space; and the Sample-Level Prompt Interaction (SLPI) module, aimed at grasping sample-level semantics. These three modules seamlessly form a robust unified attack detection framework. Extensive experiments on UniAttackData and three other datasets demonstrate the superiority of our approach for unified face attack detection. Dataset link: https://sites.google.com/view/face-anti-spoofing-challenge/dataset-download/uniattackdatacvpr2024

Introduction

Face Recognition (FR) systems are increasingly vulnerable to two distinct categories of threats: Physical Attacks (Presentation Attack Detection - PAD), such as high-resolution prints or masks, and Digital Attacks (Digital Attack Detection - DAD), including DeepFakes and adversarial noise. Traditionally, these threats have been addressed as separate problems, necessitating the deployment of multiple specialized models. This dual-model approach is computationally expensive and inefficient for real-world deployment.

The primary obstacles to a unified detection model are the lack of datasets with "ID consistency"—where the same individual is represented across all attack types—and the significant visual variance between physical and digital spoofs. Without ID consistency, models often learn to recognize identity or background noise rather than the spoofing signal itself.

Comparison of previous detection flows vs. the proposed unified approach with ID consistency.

The UniAttackData Dataset

To overcome the data gap, the researchers introduced UniAttackData, a comprehensive dataset designed for unified attack detection. It features:

  • Scale: 1,800 subjects across 3 ethnicities, totaling 28,706 videos. It is approximately 3.2x larger in image count than previous benchmarks like GrandFake.
  • ID Consistency: Every subject has a corresponding "live" video, 2 types of physical attacks, and 12 types of digital attacks (6 DeepFakes and 6 adversarial attacks).
  • Modernity: Includes state-of-the-art forgery methods up to 2023, providing a more relevant challenge for modern security systems.

Proposed Method: UniAttackDetection

The proposed UniAttackDetection framework is built upon the CLIP Vision-Language Model. By leveraging the semantic power of language, the model can group disparate visual attacks under a shared conceptual umbrella of "spoofing."

The UniAttackDetection framework architecture featuring TSP, SLPI, and UKM modules.

The framework consists of three core modules:

  1. Teacher-Student Prompts (TSP): A "Teacher" provides stable anchors via fixed text templates (e.g., "This photo contains a spoof face"), while a "Student" uses learnable vectors to capture specific attack nuances.
  2. Unified Knowledge Mining (UKM): A novel loss function that constrains student features to remain near the teacher's unified anchors, preventing overfitting to specific attack types and promoting a compact feature space.
  3. Sample-Level Prompt Interaction (SLPI): This module projects text prompts into the visual embedding space, enabling the image encoder to identify specific semantic cues described in the prompts.

Experimental Results

Extensive testing on UniAttackData and other benchmarks demonstrates the framework's superiority:

  • Superior Accuracy: The model achieved an Average Classification Error Rate (ACER) of 0.52% on UniAttackData, significantly outperforming standard backbones like ResNet50 (1.35%) and ViT (5.92%).
  • Generalization: UniAttackDetection shows improved robustness against "unseen" attacks compared to traditional models, which often fail when encountering novel forgery methods.
  • Cross-Dataset Performance: The model established new state-of-the-art benchmarks on the JFSFDB (1.66% ACER) and OULU-FF (1.63% ACER) protocols.

Conclusion

UniAttackDetection represents a significant step toward efficient, unified security for face recognition systems. By utilizing ID-consistent data and vision-language semantic alignment, the framework eliminates the need for redundant models. While "zero-day" attacks remain a challenge, the use of compact, semantic feature spaces provides a stronger foundation for future defenses. Future research will explore multi-modal integration to further enhance detection capabilities.

Summary updated

BibTeX
@inproceedings{fang2024unified,
  author = {Hao Fang and Ajian Liu and Haocheng Yuan and Junze Zheng and Dingheng Zeng and Yanhong Liu and Jiankang Deng and Sergio Escalera and Xiaoming Liu and Jun Wan and Zhen Lei},
  title = {{Unified Physical-Digital Face Attack Detection}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=sz3Ryua5Kw},
}
Figure