Rethinking Generalizable Face Anti-Spoofing via Hierarchical Prototype-Guided Distribution Refinement in Hyperbolic Space

Chengyang Hu, Ke-Yue Zhang, Taiping Yao, Shouhong Ding, Lizhuang MaCVPR 2024 · DOI

Abstract

Face Anti-Spoofing (FAS) models often struggle with generalization to unseen domains and attack types. Traditional Domain Generalization (DG) methods typically rely on "flat" feature alignment in Euclidean space, which fails to capture the inherent hierarchical structure of spoofing attacks. This paper proposes the Hierarchical Prototype-guided Distribution Refinement (HPDR) framework, which leverages Hyperbolic Space to better represent these complex relationships. By utilizing a Poincaré ball model and hierarchical prototype learning, HPDR achieves state-of-the-art performance across multiple benchmarks.

Introduction

Face Anti-Spoofing (FAS) is a critical component in securing biometric systems against presentation attacks, such as high-resolution photos, video replays, or sophisticated 3D masks. While deep learning has significantly advanced FAS performance, models often fail when encountering "unseen" domains characterized by different lighting conditions, camera sensors, or novel attack types.

Existing Domain Generalization (DG) methods attempt to mitigate this by aligning features from different source domains into a compact, unified distribution in Euclidean space. However, this "flat" alignment ignores the intrinsic hierarchical nature of FAS data. Attacks naturally form a tree-like structure—for instance, branching from 2D vs. 3D categories into specific sub-types like print, replay, or various mask materials. Forcing these complex relationships into a flat Euclidean space leads to information loss and poor generalization to new branches of the "attack tree."

Comparison of previous DG methods and the proposed HPDR framework.

Methodology

The proposed Hierarchical Prototype-guided Distribution Refinement (HPDR) framework addresses these limitations by shifting the feature representation from Euclidean to Hyperbolic Space.

Hyperbolic Embedding and the Poincaré Ball

Unlike Euclidean space, where volume grows polynomially with radius, Hyperbolic space exhibits exponential volume growth. This property makes it mathematically ideal for embedding hierarchical or tree-like structures. The authors map features into a Poincaré ball, allowing the model to represent the "attack tree" without the structural constraints of flat geometry.

Hierarchical Prototype Learning (HPL)

The framework introduces learnable "prototypes" to act as anchors in the feature space:

  • Leaf Prototypes: Represent specific clusters of live or spoof samples.
  • Non-leaf Prototypes: Serve as internal nodes that model the relationships between different leaf clusters, effectively building a taxonomy of attacks during training.

Multi-level Supervision

To organize the hyperbolic space, three distinct loss functions are employed:

  • Prototype-Instance Loss ($L_{PI}$): Pulls individual samples toward their corresponding prototypes.
  • Instance-Instance Loss ($L_{II}$): Maintains consistency between an image and its augmented versions.
  • Prototype-Prototype Loss ($L_{PP}$): A triplet-based loss that enforces the logical hierarchical arrangement of the prototypes themselves.
Overview of the HPDR framework, illustrating the transition from Euclidean to Hyperbolic space and the hierarchical learning modules.

Experiments and Results

The HPDR framework was evaluated using a rigorous "Leave-One-Out" (LOO) protocol across four major benchmarks: OULU-NPU (O), CASIA-FASD (C), MSU-MFSD (M), and Idiap Replay-Attack (I).

In the challenging "O&C&I to M" task, HPDR achieved a Half Total Error Rate (HTER) of 4.58%, a significant improvement over the previous state-of-the-art EBDG (9.56%). Furthermore, on the HQ-WMCA dataset, which includes complex 3D masks and makeup attacks, HPDR demonstrated superior robustness to unseen attack types. For example, it achieved a 9.7% ACER on "FlexibleMask" attacks, outperforming competing methods by a notable margin.

Discussion and Conclusion

By rethinking the geometry of the feature space, the HPDR framework provides a more natural and effective way to model the complexities of Face Anti-Spoofing. The shift to Hyperbolic space, combined with hierarchical prototype learning, allows the model to generalize better to new domains and novel attack vectors.

Despite its success, the model's performance is sensitive to the curvature parameter ($c$) of the hyperbolic space, and the computational complexity of hyperbolic operations (like Möbius addition) is higher than standard Euclidean operations. Future work may explore automated curvature selection and the application of this hierarchical approach to other taxonomically structured computer vision tasks, such as fine-grained species classification.

Summary updated

BibTeX
@inproceedings{hu2024rethinking,
  author = {Chengyang Hu and Ke-Yue Zhang and Taiping Yao and Shouhong Ding and Lizhuang Ma},
  title = {{Rethinking Generalizable Face Anti-Spoofing via Hierarchical Prototype-Guided Distribution Refinement in Hyperbolic Space}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.00104},
}
Figure