Enhancing Generalization in Unified Face Attack Detection for Robust Identification of Unseen Forgeries
Abstract
Face attack detection models often fail to generalize beyond the attack types they were trained on. An unseen forgery is simply an attack family the training distribution never included, a detector exposed only to physical attacks such as printed photos or replays has no experience with digital manipulations like deepfakes or face swaps, and the reverse holds equally. Because new attack techniques appear faster than datasets can be collected, real-world systems inevitably encounter forgeries outside their training experience. We study this cross-attack-type generalization problem within the protocol-based unified setting of UniAttackDetection and introduce two architecture-free modifications: an ordinal similarity (ReCos) that replaces the cosine-based alignment loss and requires only matching rank order rather than exact directional alignment between embeddings, and a cropping step that removes domain-specific background before encoding. On UniAttackData Protocol 2, the two changes together lower cross-domain ACER by 6.8 points and raise AUC by 5.4 points relative to the baseline, while nearly halving the standard deviation across generalization directions. The resulting model relies on attack-agnostic cues rather than attack-specific artefacts.