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

TL;DR

Researchers have developed a new framework called DTDA (Dual Teacher Knowledge Distillation with Domain Alignment) that significantly improves how face anti-spoofing models handle new, unseen environments. By using adversarial attacks to "neutralize" domain differences and distilling knowledge from two specialized "teacher" models (face recognition and attribute editing), the system achieves state-of-the-art accuracy and maintains real-time performance.

What Problem Does This Paper Address?

Face Anti-spoofing (FAS) is the "gatekeeper" for facial recognition systems, distinguishing between a live human and a "spoof" (like a photo, a video replay, or a 3D mask). While current models work well on the specific data they were trained on, they often fail in the real world due to domain shift—differences in lighting, camera quality, or background between the training lab and the actual deployment site.

Existing solutions often use Domain Adversarial Training (DAT) to force the model to ignore domain-specific features. However, DAT is notoriously difficult to train because it creates a "rivalry" between the feature encoder and a domain discriminator that often fails to converge. Furthermore, FAS datasets are relatively small, making it hard for models to learn the complex "priors" of what a human face actually looks like across diverse conditions.

Methods

The authors propose a two-pronged approach to solve these stability and generalization issues:

  1. Domain Adversarial Attack (DAA): Instead of the standard approach of using a Gradient Reversal Layer (GRL) to fight the encoder, the authors use an adversarial attack (specifically PGD) to add tiny, calculated perturbations to the input images. These perturbations make images from different domains look identical to a domain classifier. This "cloaks" the domain information, forcing the model to focus only on features that are invariant across all environments.
  2. Dual Teacher Knowledge Distillation: To compensate for limited FAS data, the framework "borrows" intelligence from two pre-trained teacher models:
  3. Teacher 1 (Perceptual): A face recognition model (ArcFace) that understands the structural identity of faces.
  4. Teacher 2 (Generative): A face attribute editing model (StarGAN) that understands the fine-grained textures and features of faces.

The "student" model is trained to mimic these teachers through a Multi-Task Learning setup, effectively gaining a "face prior"—a deep understanding of facial geometry and texture—which helps it better spot the subtle irregularities of a spoof.

Datasets

The authors evaluated their method using several industry-standard benchmarks:

  • Oulu-NPU (O), CASIA-FASD (C), Idiap Replay-Attack (I), and MSU-MFSD (M): These were used for "cross-dataset" testing, where the model is trained on three and tested on the fourth to measure generalization.
  • CelebA-Spoof: A massive dataset with over 600,000 images used for intra-dataset testing and to demonstrate the model's robustness across different sensors (Low, Middle, and High quality).

Key Insights and Ideas

  • Stability via Attack: The shift from "adversarial training" to "adversarial attack" for domain alignment is a clever pivot. By perturbing the input rather than reversing gradients mid-network, the training process becomes much more stable and easier to converge.
  • Implicit Data Augmentation: By using teachers trained on millions of general face images (not just FAS images), the student model gains the benefits of a massive dataset without the authors having to actually collect and label more spoofing data.
  • Feature Focus: Grad-CAM visualizations revealed an "aha" moment: while standard models often get distracted by background elements, the DTDA model consistently focuses on the mouth and eyes—the areas most critical for detecting "liveness" cues.

Key Results

  • State-of-the-Art Generalization: In the rigorous "Leave-One-Out" cross-dataset protocol, the DTDA method achieved a Mean Half Total Error Rate (HTER) of 9.66%, outperforming previous leaders like SSDG (11.29%) and SSAN (15.10%).
  • Specific Wins: On the CASIA-FASD test (trained on O, M, and I), the model reached an HTER of 6.67%, a significant improvement over the baseline's 16.00%.
  • Efficiency: Despite the complex training phase, the resulting student model is lightweight. It runs at 95 FPS on a standard GPU, making it nearly 1.8x faster than competing architectures like FRT-PAD while using significantly fewer parameters (11.7M vs 75.5M).

Limitations and Future Work

While the paper demonstrates excellent results, a few areas remain for exploration:

  • Teacher Dependency: The performance of the student is heavily tied to the quality of the pre-trained teachers. If the teachers have their own biases (e.g., toward certain ethnicities), those might be distilled into the FAS student.
  • Computational Overhead during Training: While inference is fast, the training process involves running two teacher models and generating adversarial perturbations, which increases the initial computational cost.
  • Unseen Attack Types: While the model generalizes well to new domains, the authors note that generalizing to entirely new attack types (e.g., a brand new type of high-fidelity silicone mask) remains an ongoing challenge for the entire field.

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. Differently, in this paper, we propose a domain adversarial attack (DAA) method 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},
}

Loading related content...

Figure