Dual Teacher Knowledge Distillation with Domain Alignment for Face Anti-spoofing

Zhe Kong, Wentian Zhang, Tao Wang, Kaihao Zhang, Yuexiang Li, Xiaoying Tang, Wenhan Luo

Abstract

Face recognition systems have raised concerns due to their vulnerability to different presentation attacks, and system security has become an increasingly critical concern. Although many face anti-spoofing (FAS) methods perform well in intra-dataset scenarios, their generalization remains a challenge. To address this issue, some methods adopt domain adversarial training (DAT) to extract domain-invariant features. However, the competition between the encoder and the domain discriminator can cause the network to be difficult to train and converge. In this paper, we propose a domain adversarial attack (DAA) method to mitigate the training instability problem by adding perturbations to the input images, which makes them indistinguishable across domains and enables domain alignment. Moreover, since models trained on limited data and types of attacks cannot generalize well to unknown attacks, we propose a dual perceptual and generative knowledge distillation framework for face anti-spoofing that utilizes pre-trained face-related models containing rich face priors. Specifically, we adopt two different face-related models as teachers to transfer knowledge to the target student model. The pre-trained teacher models are not from the task of face anti-spoofing but from perceptual and generative tasks, respectively, which implicitly augment the data. By combining both DAA and dual-teacher knowledge distillation, we develop a dual teacher knowledge distillation with domain alignment framework (DTDA) for face anti-spoofing. The advantage of our proposed method has been verified through extensive ablation studies and comparison with state-of-the-art methods on public datasets across multiple protocols.

Introduction

Face Anti-spoofing (FAS) serves as the critical gatekeeper for facial recognition systems, distinguishing between live human presence and spoofing attempts such as photos, video replays, or 3D masks. While current models achieve high accuracy on specific training datasets, they often struggle with domain shift—the performance degradation caused by variations in lighting, camera sensors, and backgrounds encountered in real-world deployments.

Existing approaches typically utilize Domain Adversarial Training (DAT) to force models to learn domain-invariant features. However, DAT often suffers from training instability due to the adversarial rivalry between the feature encoder and the domain discriminator. Furthermore, the relatively small size of FAS datasets makes it difficult for models to learn the complex facial priors necessary for robust generalization.

Methodology

The proposed DTDA (Dual Teacher Knowledge Distillation with Domain Alignment) framework addresses these challenges through two primary mechanisms:

1. Domain Adversarial Attack (DAA)

To stabilize domain alignment, the researchers shifted from standard adversarial training to a Domain Adversarial Attack strategy. Instead of using a Gradient Reversal Layer (GRL), the method employs Projected Gradient Descent (PGD) to add subtle, calculated perturbations to input images. These perturbations make images from different domains appear identical to a domain classifier, effectively "cloaking" domain-specific information and forcing the model to focus on invariant FAS features.

2. Dual Teacher Knowledge Distillation

To compensate for limited FAS training data, the framework distills knowledge from two pre-trained "teacher" models that possess rich face priors:

  • Perceptual Teacher: A face recognition model (ArcFace) that captures structural identity features.
  • Generative Teacher: A face attribute editing model (StarGAN) that understands fine-grained textures.
The DTDA framework integrates Domain Adversarial Attack for domain alignment and Dual Teacher Knowledge Distillation to leverage rich face priors.

Experiments and Results

The DTDA framework was evaluated on several benchmark datasets, including Oulu-NPU (O), CASIA-FASD (C), Idiap Replay-Attack (I), and MSU-MFSD (M). In rigorous cross-dataset "Leave-One-Out" testing, DTDA achieved a Mean Half Total Error Rate (HTER) of 9.66%, outperforming previous state-of-the-art methods like SSDG (11.29%) and SSAN (15.10%).

ROC curves for the O&M&I to C protocol, showing the incremental performance gains from the Face Recognition (FR) teacher, Face Editing (FE) teacher, and Domain Adversarial Attack (DAA).

Beyond accuracy, the resulting student model is highly efficient. It contains only 11.7M parameters and achieves an inference speed of 95 FPS on a standard GPU, significantly faster than competing architectures like FRT-PAD (75.5M parameters).

Conclusion

The DTDA framework provides a stable and effective solution for generalized face anti-spoofing. By combining adversarial attacks for domain alignment with dual-teacher distillation for rich face priors, the system achieves state-of-the-art generalization while maintaining real-time performance. Future work will focus on reducing teacher dependency and improving generalization to entirely novel attack types.

Summary updated

Abstract

Face recognition systems have raised concerns due to their vulnerability to different presentation attacks, and system security has become an increasingly critical concern. Although many face anti-spoofing (FAS) methods perform well in intra-dataset scenarios, their generalization remains a challenge. To address this issue, some methods adopt domain adversarial training (DAT) to extract domain-invariant features. However, the competition between the encoder and the domain discriminator can cause the network to be difficult to train and converge. In this paper, we propose a domain adversarial attack (DAA) method to mitigate the training instability problem by adding perturbations to the input images, which makes them indistinguishable across domains and enables domain alignment. Moreover, since models trained on limited data and types of attacks cannot generalize well to unknown attacks, we propose a dual perceptual and generative knowledge distillation framework for face anti-spoofing that utilizes pre-trained face-related models containing rich face priors. Specifically, we adopt two different face-related models as teachers to transfer knowledge to the target student model. The pre-trained teacher models are not from the task of face anti-spoofing but from perceptual and generative tasks, respectively, which implicitly augment the data. By combining both DAA and dual-teacher knowledge distillation, we develop a dual teacher knowledge distillation with domain alignment framework (DTDA) for face anti-spoofing. The advantage of our proposed method has been verified through extensive ablation studies and comparison with state-of-the-art methods on public datasets across multiple protocols.
BibTeX
@article{kong2024dual,
  author = {Zhe Kong and Wentian Zhang and Tao Wang and Kaihao Zhang and Yuexiang Li and Xiaoying Tang and Wenhan Luo},
  title = {{Dual Teacher Knowledge Distillation with Domain Alignment for Face Anti-spoofing}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2024},
  url = {https://openreview.net/forum?id=6uubyRjO4K},
}
Figure