# Face Anti-Spoofing Based on Deep Learning: A Comprehensive Survey
## 3 Face Anti-Spoofing
### Domain generalization
They also built a large-scale FAS benchmark to further evaluate algorithm performance. [PERSON] et al. [140] proposed an instance-aware domain generalization framework that reduced sensitivity to instance-specific styles, aligning features without domain labels. Their method also included a dynamic kernel generator and categorical style assembly to improve style insensitivity. [PERSON] et al. [141] presented the TTDG framework, which enhanced model generalization by using test data. The test-time style projection (TTSP) module mapped unseen data styles into the training domain, and the diverse style shifts simulation (DSSS) module simulated various style changes, all without requiring the model to update at test time. This method worked with both CNN and ViT backbones. **Gradient alignment:** [PERSON] et al. [142] proposed SA-FAS, which encourages domain separability while aligning the live-to-spoof transition across all domains. This method learned domain-variant features but used a domain-invariant classifier, proving its effectiveness. [PERSON] and [PERSON] [143] introduced GAC-FAS, using gradient alignment to encourage the model to converge to an optimal flat minimum for improving the model generalization without additional learning modules. GAC-FAS aligned gradient updates with empirical risk minimization (ERM) at key points in each domain. In addition, [PERSON] et al. [144] developed a hierarchical fusion module that combined RGB images and meta-pattern (MP) features across multiple levels to enhance performance and generalization for unknown domains. [PERSON] et al. [145] proposed FAMIM, a framework using frequency domain features and self-supervised learning to boost cross-domain generalization in FAS. [PERSON] et al. [146] introduced UDGFAS, an unsupervised domain generalization framework that utilized identity-agnostic representations and nearest neighbor search to learn generalized domain-invariant features. Overall, these studies improved the generalization performance of FAS by employing innovative techniques such as GANs, style-guided DA, and meta-learning. Table 10 compares and summarizes FAS based on domain generalization, outlining the main idea, backbone, advantages, and disadvantages. At present, the four widely used datasets are OULU-NPU (O), CASIA-MFSD (C), Idiap Replay Attack (I), and MSU-MFSD (M). Generally, each dataset is regarded as one domain, and the leave-one-out test protocol is applied to evaluate their cross-domain generalization. Specifically, O&C&I\(\rightarrow\)M refers to the protocol that trains on OULU-NPU, CASIA-MFSD, and Idiap Replay Attack, and tests on MSU-MFSD. O&M&I\(\rightarrow\)C,O&C&M\(\rightarrow\)J, and I&C&M\(\rightarrow\)O are defined in a similar fashion. Table 11 compares state-of-the-art DG methods on four testing domains. In Table 11, We adopt the Half Total Error Rate (HTER), Area Under Curve (AUC) as evaluation matrix. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Ref. ** & **Main Idea** & **Backbone** & **Advantages** & **Disadvantages** \\ \hline \multirow{3}{*}{[129]} & Using adversarial training, deep & \multirow{3}{*}{DepthNet} & Extract domain-independent discriminative features & Difficulty in fitting multiple discriminators \\  & supervision and dual-force & & & \\  & triple-mining constraints & & & \\  & Leveraging single-side adversarial & & & \\  & learning and asymmetric triplet loss & & & \\  & for enhancing the & & & \\  & generalization ability & & & \\  & & & & \\  & & & & \\  & & & & \\  & & & & \\