Domain generalization for face anti-spoofing with CBAM and adaptive gradient alignment
摘要
With the increasing complexity and rapid evolution of presentation attacks, face anti-spoofing (FAS) plays a pivotal role in safeguarding face recognition systems. Existing generalizable FAS approaches primarily focus on learning domain-invariant representations via domain alignment. However, they often struggle to capture fine-grained spoofing cues and fail to optimize classification decision boundaries adaptively. To address these limitations, this paper proposes a novel EAA-FAS framework that integrates an Enhanced Attention Contrastive Network (EACN) module with an Adaptive Gradient Alignment (AGA) module. In the feature representation stage, the EACN module incorporates the Convolutional Block Attention Module (CBAM) into the backbone to jointly model channel and spatial features, thereby effectively learning critical discriminative cues associated with spoofing attacks and empowering the model to capture subtle spoofing patterns. Meanwhile, supervised contrastive learning (SupCon) is introduced to improve the feature space by compacting intra-class distributions while expanding inter-class margins, contributing to more discriminative and robust representations. During the classification stage, the AGA module dynamically adjusts the influence of source-domain gradients on the model update direction, guiding the decision boundary to align across domains progressively. This process effectively mitigates the instability caused by domain shifts and enhances the generalization. Extensive experiments are conducted on four benchmark datasets: OULU-NPU, CASIA-MFSD, Idiap Replay Attack, and MSU-MFSD. Experimental outcomes indicate that our approach surpasses current state-of-the-art techniques, exhibiting both superior performance and greater stability in cross-domain generalization tasks.