Robust Face Anti-Spoofing Framework with Convolutional Vision Transformer

Yunseung Lee, Youngjun Kwak, Jinho Shin

TL;DR

This paper introduces a novel face anti-spoofing (FAS) framework that combines the strengths of Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) to achieve robust performance against unseen "domain shifts." By leveraging a hybrid approach that captures both local image details and global context, their model significantly outperforms existing methods in domain generalization scenarios.

What Problem Does This Paper Address?

Facial authentication systems are increasingly common, but they are vulnerable to "presentation attacks" – attempts to fool the system with fake images or videos. Ensuring the robustness of Face Anti-Spoofing (FAS) systems is crucial for security. A major challenge is "domain shift," where the data distribution in real-world deployment differs from the training data. This can happen due to variations in cameras, lighting, environments, or even the types of spoofing attacks. Existing FAS methods often struggle when faced with these unseen domains. While some approaches use CNNs for local features and others use ViTs for global context, few have effectively combined both to achieve robust domain generalization.

Methods

The proposed framework, built upon a Convolutional Vision Transformer (ConViT), tackles domain generalization through a three-stage process:

  1. Label Discretization: Instead of traditional binary classification (real/fake), the paper reframes FAS as a regression problem. They use a technique called CutMix to create "pseudo-labels" that represent a probability distribution of liveness, providing richer information than a simple binary label. This is intended to improve generalization.
  2. Hybrid Feature Extraction: This is the core innovation. The framework employs ConViT, a hybrid architecture that integrates convolutional layers into the Vision Transformer. Specifically, it uses a "gated positional self-attention" (GPSA) mechanism. In early layers, GPSA acts more like a convolution, focusing on local features. As it progresses, it shifts to capture broader, global context. This allows the model to extract both fine-grained local details and long-range dependencies within an image.
  3. Liveness Prediction: The extracted features are fed into a score regressor to predict the liveness score. Crucially, an adversarial learning component with a domain discriminator is also used. This encourages the feature extractor to produce representations that are invariant to domain-specific attributes, further enhancing generalization.

Datasets

The experiments were conducted using several standard FAS benchmark datasets:

  • OULU-NPU (O)
  • MSFD-MSU (M)
  • REPLAY-ATTACK (I)
  • CASIA-FASD (C)

The evaluation used a "cross-dataset protocol," which involves training on a combination of source datasets and testing on an unseen target dataset. This setup is designed to specifically evaluate domain generalization capabilities.

Key Insights and Ideas

  • Hybrid Architectures are Key for Domain Generalization: The paper strongly suggests that combining local feature extraction (CNN-like) with global context modeling (ViT-like) is essential for robust FAS, especially when dealing with unseen domains.
  • Regression for Robustness: Reframing FAS as a regression problem with discretized labels, rather than simple binary classification, appears to yield more generalizable representations.
  • ConViT's Advantage: The ConViT architecture, with its ability to adaptively focus on local or global information through its gated self-attention, proves highly effective in capturing the necessary cues for robust anti-spoofing.
  • Attention Mechanisms Matter: While standard ViT and window-based attention methods showed limitations in domain generalization, the hybrid approach within ConViT, particularly its early-stage convolutional inductive biases, significantly improved performance.

Key Results

  • The proposed ConViT-based framework achieved a significant improvement in FAS performance, with AUC scores 7.3%p and 12.9%p higher than models using only CNNs or ViTs, respectively.
  • In cross-dataset testing, the framework demonstrated the highest average rank among nine benchmark models for domain generalization.
  • Specifically, the ConViT-based model exhibited an AUC of 93.9%, outperforming models like EfficientNet (86.6%) and ViT Base (81.0%).
  • The paper also notes that their ConViT-based model achieved a 2.8%p lower HTER compared to a previous ViT-based model (Ming et al., 2022).

Limitations and Future Work

  • Dataset Limitations: While multiple datasets were used, the paper acknowledges that the performance is evaluated on specific cross-dataset splits. Real-world deployment might involve even more diverse and challenging domain shifts.
  • Computational Cost: Vision Transformers, even hybrid ones, can be computationally intensive. While improvements are shown, further optimization for real-time applications might be necessary.
  • Future Directions: The authors suggest that further exploration into how locality and global dependencies within patches contribute to robustness is warranted. They also imply that refining the hybrid architecture and adversarial training could lead to even greater generalization capabilities.

Summary updated

BibTeX
@inproceedings{lee2023robust,
  author = {Yunseung Lee and Youngjun Kwak and Jinho Shin},
  title = {{Robust Face Anti-Spoofing Framework with Convolutional Vision Transformer}},
  booktitle = {ICIP},
  year = {2023},
  url = {https://openreview.net/forum?id=8_j4Hb-pxF},
}
Figure