Learning Facial Liveness Representation for Domain Generalized Face Anti-Spoofing

Zih-Ching Chen, Lin-Hsi Tsao, Chin-Lun Fu, Shang-Fu Chen, Yu-Chiang Frank Wang

Introduction

Face recognition systems have become ubiquitous in security and authentication. However, these systems remain vulnerable to presentation attacks (PAs), such as high-resolution photographs, video replays, and sophisticated 3D masks. While existing Face Anti-Spoofing (FAS) models perform well in controlled environments, they often struggle with domain shift—the performance degradation that occurs when a model encounters new lighting conditions, backgrounds, or camera sensors not present in the training data.

Furthermore, many models fail to generalize to unseen attack types. A model trained exclusively on print attacks may fail to recognize a 3D mask as a spoof. This paper addresses these challenges by proposing a deep learning framework that explicitly disentangles facial liveness from irrelevant factors like facial identity and image domain, thereby learning a highly generalized representation of "liveness."

Methodology

The proposed framework utilizes a representation disentanglement approach. Instead of extracting a single feature vector, the architecture employs three specialized encoders to decompose an input image into distinct components:

  1. Liveness Encoder ($E_L$): This encoder is designed to extract features essential for distinguishing between live faces and spoof attacks.
  2. Content Encoder ($E_C$): This component captures facial geometry and identity. To ensure that $E_C$ focuses strictly on content, the authors use a pre-trained PRNet (a 3D face reconstruction tool) as a teacher model. This guides the encoder to reconstruct facial landmarks, effectively isolating identity-related information.
  3. Domain Encoder ($E_D$): This encoder identifies the specific characteristics of the dataset or environment, such as lighting conditions and camera quality.

Disentanglement via Confusion Losses

To prevent information leakage between these encoders, the authors implement confusion losses. For instance, the Liveness Classifier is trained to be unable to identify the source domain of a liveness feature, forcing the encoder to discard domain-specific noise. Similarly, content features are regularized to ensure they contain no information regarding the liveness of the subject.

For final classification, the model employs Large Margin Cosine Loss (LMCL). This loss function encourages the model to cluster "real" and "fake" features into distinct, widely separated regions in the feature space, enhancing robustness against subtle variations in attack patterns.

Experimental Setup

The model was evaluated using five major FAS benchmarks: OULU-NPU (O), CASIA-FASD (C), Idiap Replay-Attack (I), MSU-MFSD (M), and CelebA-Spoof (Cb). The authors adopted a rigorous "Leave-One-Out" (LOO) testing protocol. In this setup, the model is trained on three datasets and tested on a fourth, completely unseen dataset to measure its generalization capabilities. The CelebA-Spoof dataset was specifically used to test the model's ability to detect 3D masks, an attack type not present in the other training sets.

Results and Discussion

The proposed method consistently outperformed state-of-the-art (SOTA) models, including MADDG and SSDG, across various metrics.

Cross-Dataset Performance

In the O&C&I to M benchmark (training on Oulu, Casia, and Idiap; testing on MSU), the model achieved an AUC of 97.45%, surpassing the previous best performance of 97.17%. This indicates that the disentangled liveness features are more robust to domain shifts than traditional holistic features.

Generalization to Unseen Attacks

When tested on 3D masks from the CelebA-Spoof dataset after being trained only on print and replay attacks, the model achieved a Half Total Error Rate (HTER) of 16.22%. This is a significant improvement over the 19.86% HTER reported for SSDG-R. These results suggest that by stripping away identity and domain information, the model learns a more fundamental concept of "fakeness."

Explainability

Using Grad-CAM visualizations, the authors demonstrated that the model focuses on critical areas such as the "sunken" regions of 3D masks or specific texture irregularities. In contrast, baseline models often focused on irrelevant features like background elements or the outer contours of the face, which are less reliable indicators of liveness.

Conclusion

This research demonstrates that facial identity and domain-specific information act as distractors in the task of face anti-spoofing. By explicitly disentangling these elements through a multi-encoder framework and adversarial confusion losses, the model achieves superior generalization to both new environments and unseen attack types.

A current limitation of the work is its reliance on static images. Future research will focus on extending this disentanglement framework to video inputs, incorporating visual-temporal cues such as eye blinking and pulse detection (rPPG) to further enhance security against sophisticated spoofing attempts.

Summary updated

BibTeX
@inproceedings{chen2022learning,
  author = {Zih-Ching Chen and Lin-Hsi Tsao and Chin-Lun Fu and Shang-Fu Chen and Yu-Chiang Frank Wang},
  title = {{Learning Facial Liveness Representation for Domain Generalized Face Anti-Spoofing}},
  booktitle = {ICME},
  year = {2022},
  doi = {10.1109/icme52920.2022.9859916},
}
Figure