La-SoftMoE CLIP for Unified Physical-Digital Face Attack Detection

Hang Zou, Chenxi Du, Hui Zhang, Yuan Zhang, Ajian Liu, Jun Wan, Zhen Lei

Abstract

Face recognition systems are increasingly vulnerable to both physical attacks (PAs), such as high-fidelity masks, and digital attacks (DAs), such as deepfakes. Unified Attack Detection (UAD) seeks to defend against both simultaneously; however, the mathematical disparity between these attack types in feature space often leads to poor generalization. We introduce La-SoftMoE CLIP, a framework that integrates a modified Soft Mixture of Experts (SoftMoE) layer with Linear Attention into the CLIP architecture. By leveraging specialized experts to navigate sparse and irregular feature distributions, our model achieves state-of-the-art performance, reaching an Average Classification Error Rate (ACER) of 0.32% on the UniAttackData benchmark.

Introduction: The Challenge of Unified Detection

Face recognition security faces two distinct threats: physical spoofing (e.g., 3D masks, print attacks) and digital manipulation (e.g., generative deepfakes). Historically, these have been treated as separate research problems. A truly robust system, however, requires Unified Attack Detection (UAD).

The core challenge of UAD lies in the "feature space" distribution. As shown in Figure 1, PAs and DAs occupy distinct, sparse regions that look nothing alike mathematically. When combined into a single "fake" category, standard neural networks struggle to find a clean decision boundary between "live" faces and this diverse group of attacks, often leading to overfitting or failure to generalize across different spoofing modalities.

The distribution of physical and digital attacks in feature space shows the sparsity and irregular boundaries that make unified detection difficult.

Methods: La-SoftMoE CLIP

To address this sparsity, we build upon CLIP (Contrastive Language-Image Pre-training), utilizing its ability to link visual concepts with textual descriptions. Our primary innovation is the La-SoftMoE module, integrated into the Transformer blocks of CLIP’s image encoder.

Soft Mixture of Experts (SoftMoE)

Traditional MoE models often suffer from "token dropping," where some data is ignored due to hard gating. SoftMoE avoids this by using weighted averages to map input tokens to "slots" processed by multiple experts. This makes the model fully differentiable and more stable during training.

Linear Attention (The "La" Component)

Standard SoftMoE querying mechanisms can struggle with the irregular boundaries inherent in UAD. We replaced the standard softmax-based weighting with Linear Attention. This allows for more flexible, self-adapting weights that better fit the sparse distribution of physical and digital attacks without a massive spike in computational cost. This module is added in parallel to the Multi-Layer Perceptron (MLP) within each of the 12 Transformer blocks.

The architecture of the proposed Transformer block and the detailed MoE module featuring Linear Attention.

Experimental Results

The model was evaluated on two major benchmarks:

  1. UniAttackData: A high-quality dataset of 1,800 subjects with "ID consistency" across live, physical, and digital scenarios.
  2. JFSFDB: A large-scale aggregate of nine different subsets (including SiW and FaceForensics++) to test cross-environment robustness.

La-SoftMoE CLIP achieved state-of-the-art (SOTA) results across the board. On UniAttackData, it reached an ACER of 0.32%, a significant improvement over the previous best of 0.52%. On the more challenging JFSFDB, it achieved an ACER of 4.21%, outperforming traditional backbones like ResNet50 and standard ViT. Ablation studies confirmed the necessity of the Linear Attention component; removing it increased the error rate from 0.32% to 0.53%.

Conclusion and Future Work

La-SoftMoE CLIP demonstrates that specialized "experts" are uniquely suited for the sparse feature spaces of unified face attack detection. By using Linear Attention to refine how these experts are queried, the model creates a sharper decision boundary between real and fake faces. Future research will focus on reducing the model's sensitivity to specific text prompts and improving generalization across even more diverse, "scattered" datasets.

Summary updated

BibTeX
@inproceedings{zou2024la,
  author = {Hang Zou and Chenxi Du and Hui Zhang and Yuan Zhang and Ajian Liu and Jun Wan and Zhen Lei},
  title = {{La-SoftMoE CLIP for Unified Physical-Digital Face Attack Detection}},
  booktitle = {IJCB},
  year = {2024},
  url = {https://openreview.net/forum?id=EzWL0JHwRE},
}
Figure