Abstract: Generalization ability of face anti-spoofing has been widely concerned in recent years. Existing domain generalization methods use adversarial learning or metric learning to extract invariant features across domains but are proved to be flawed from causal views. The learned domain-invariant features cannot generalize well to unseen real scenarios in both theoretical and practical senses. In this paper, we propose a novel method that learns Causal Representations for Face Anti-Spoofing (CRFAS). We first model the data generation process of face anti-spoofing via Structural Casual Model (SCM) and reveal that only the causal feature is capable of generalizing to unseen domains. On such basis, we extract causal features via back- door adjustment without prior assumptions rather than learn domain-invariant features as existing methods. Furthermore, we employ the supervised contrastive loss to generate more realistic counterfactual features for backdoor adjustment and improve the generalization ability of learned causal features. Extensive experiments on six cross-dataset testing scenarios demonstrate that CRFAS outperforms the state-of-the-art face anti-spoofing methods in terms of HTER and AUC in generalizing to unseen domains.
Loading