One-Class Knowledge Distillation for Face Presentation Attack Detection

Zhi Li, Rizhao Cai, Haoliang Li, Kwok-Yan Lam, Yongjian Hu, Alex C. Kot

Abstract

Face Presentation Attack Detection (PAD) systems are critical for securing biometric authentication, yet they frequently fail when deployed in new environments due to domain shift. Traditional domain adaptation requires collecting both genuine and attack samples from the target domain, a process that is often costly or impossible. This paper proposes a novel One-Class Knowledge Distillation (OCKD) framework designed for One-Class Domain Adaptation (OCDA). By training a "stubborn" student network to mimic a pre-trained teacher's representations using only a few genuine samples from the target domain, the system can effectively identify spoofing attempts as anomalies. Our approach significantly outperforms existing baselines and state-of-the-art unsupervised methods while maintaining high efficiency through sparse learning.

Introduction

Face PAD technology is the primary defense against spoofing attempts using photos, videos, or high-fidelity masks. While deep learning models have achieved high accuracy on closed benchmarks, their performance degrades significantly when faced with changes in lighting, camera hardware, or novel attack types—a phenomenon known as domain shift.

To address this, researchers typically turn to Domain Adaptation. However, standard adaptation techniques require a balanced set of genuine and attack samples from the new environment. In real-world scenarios, obtaining diverse attack samples for every new deployment site or user device is impractical. This paper addresses the more challenging and realistic problem of One-Class Domain Adaptation (OCDA), where the model must adapt using only a small number of genuine face samples and zero attack samples.

Methodology

The proposed framework utilizes a teacher-student architecture inspired by the principles of anomaly detection and knowledge distillation.

1. The Discriminative Teacher (DT)

The process begins with a Discriminative Teacher network pre-trained on a large, diverse source dataset containing both genuine faces and various known attacks. The teacher's role is to provide a robust feature representation that distinguishes between "realness" and "fakeness" in a general sense.

2. The Stubborn Student (SS)

The core innovation lies in the training of the student network. When the system is moved to a new target domain (e.g., a specific smartphone model or a new office lobby), the student is trained to mimic the teacher’s feature representations. Crucially, this distillation occurs only on the few genuine faces available in the target domain.

The student is designed to be "stubborn" or inflexible. Because it is only optimized to match the teacher on the distribution of genuine faces, it fails to generalize that mimicry to attack samples.

3. Inference and Anomaly Detection

During the testing phase, an input image is processed by both the teacher and the student networks.

  • If the image is a genuine face, the student’s output will be highly similar to the teacher’s (high cosine similarity).
  • If the image is an attack, the student’s output will diverge from the teacher’s.

By measuring this discrepancy, the system treats any significant divergence as an anomaly, effectively flagging it as a spoofing attempt.

4. Sparse Learning for Scalability

To make the system viable for "client-specific" deployment—where a unique student model might be trained for every individual user—the authors implement a sparse training strategy with a "regrowth" mechanism. This allows the student models to be compressed by up to 99%, resulting in tiny model sizes (approx. 0.25 MB) without sacrificing detection accuracy.

Experimental Results

The researchers evaluated the OCKD framework across five industry-standard datasets, including CASIA-FASD, MSU-MFSD, IDIAP REPLAY-ATTACK, NTU ROSE-YOUTU, and OULU-NPU. They introduced two new protocols, CIMN-OCDA and CIM-N-CS-OCDA, to simulate general and client-specific adaptation.

Performance Metrics

  • Error Reduction: On the CIMN-OCDA protocol, the method achieved an average Half Total Error Rate (HTER) of 18.4%, a substantial improvement over the baseline teacher model's 31.6%.
  • High-Resolution Benchmarks: On the OULU-OCA-SA benchmark, the framework reached an Average Classification Error Rate (ACER) of 0.46% and an Area Under the Curve (AUC) of 99.63%, outperforming previous specialized methods like OCA-FAS.
  • Efficiency: The sparse student models maintained competitive performance even at 1% density, making them ideal for deployment on mobile edge devices with limited storage and computational power.

Discussion and Conclusion

The OCKD framework represents a shift in how we approach face anti-spoofing. Instead of attempting to learn the infinite variety of potential attacks, the model focuses on learning the specific characteristics of "realness" in a given context. This anomaly-detection-based approach is more robust to the unpredictable nature of spoofing attacks in the wild.

While the method is highly effective, its performance is inherently tied to the quality of the teacher's initial feature representations. Future work will focus on improving the teacher's foundational feature learning and developing more sophisticated feature selection methods to further increase the margin between genuine and spoof scores. By enabling effective adaptation with only genuine data, this research paves the way for more secure and easily deployable biometric systems.

Summary updated

Abstract

Face presentation attack detection (PAD) has been extensively studied by research communities to enhance the security of face recognition systems. Although existing methods have achieved good performance on testing data with similar distribution as the training data, their performance degrades severely in application scenarios with data of unseen distributions. In situations where the training and testing data are drawn from different domains, a typical approach is to apply domain adaptation techniques to improve face PAD performance with the help of target domain data. However, it has always been a non-trivial challenge to collect sufficient data samples in the target domain, especially for attack samples. This paper introduces a teacher-student framework to improve the cross-domain performance of face PAD with one-class domain adaptation. In addition to the source domain data, the framework utilizes only a few genuine face samples of the target domain. Under this framework, a teacher network is trained with source domain samples to provide discriminative feature representations for face PAD. Student networks are trained to mimic the teacher network and learn similar representations for genuine face samples of the target domain. In the test phase, the similarity score between the representations of the teacher and student networks is used to distinguish attacks from genuine ones. To evaluate the proposed framework under one-class domain adaptation settings, we devised two new protocols and conducted extensive experiments. The experimental results show that our method outperforms baselines under one-class domain adaptation settings and even state-of-the-art methods with unsupervised domain adaptation.
BibTeX
@article{li2022one,
  author = {Zhi Li and Rizhao Cai and Haoliang Li and Kwok-Yan Lam and Yongjian Hu and Alex C. Kot},
  title = {{One-Class Knowledge Distillation for Face Presentation Attack Detection}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2022},
  url = {https://openreview.net/forum?id=t-3oPJhLinG},
}
Figure