CPG-PAD: Concept-Informed Prompts Guided Presentation Attack Detection

Haoyuan Zhang, Xiangyu Zhu, Li Gao, Ajian Liu, Siran Peng, Zhen Lei

TL;DR

CPG-PAD introduces a novel face anti-spoofing framework that uses Explainable AI (XAI) to automatically discover fine-grained visual concepts (like paper creases or cut holes) from pretrained Vision-Language Models. By injecting these machine-discovered concepts directly into learnable text prompts, the model achieves superior domain generalization and avoids overfitting to dataset-specific artifacts.

What Problem Does This Paper Address?

Face Presentation Attack Detection (PAD) is the frontline defense for facial recognition systems, protecting them from spoofs like printed photos, video replays, and 3D masks. While deep learning models perform well when trained and tested on the same dataset, they often fail in real-world deployments due to "domain shift"—variations in lighting, camera sensors, and spoof materials.

Recently, researchers have turned to Vision-Language Models (VLMs) like CLIP to improve generalization. However, standard VLM tuning relies on coarse, class-level labels (e.g., matching an image to the text "a photo of a fake face"). This coarse supervision often causes the model to overfit to domain-specific shortcuts, like background details or sensor noise, rather than learning generalizable attack cues. Furthermore, critical visual discrepancies—such as subtle geometric distortions or complex illumination reflections—are incredibly difficult for humans to manually describe in text prompts.

Methods

To bridge the gap between human language and subtle visual spoofing cues, the authors propose Concept-Informed Prompts Guided Presentation Attack Detection (CPG-PAD). The framework consists of two main components:

  1. Visual Concept-driven Enhancement (VCE): Instead of relying on human prompt engineering, VCE automatically uncovers PAD-relevant visual concepts directly from the feature space of a pretrained CLIP visual encoder. It uses Semi-Nonnegative Matrix Factorization (Semi-NMF) to decompose visual activations into $K$ distinct latent concepts (e.g., identifying "cut holes" or "paper creases") and generates corresponding localized ground-truth heatmaps ($\mathcal{H}^{gt}$).
  2. Prompt-based Concept Injection (PCI): This module forces multiple learnable text prompts to internalize these discovered visual concepts. It features a Visual-Prompt Decoder (VPD) powered by a novel Multi-head Dual-Attention (MDA) mechanism, which allows bidirectional interaction to simultaneously update both prompt features and image tokens.

The decoded heatmaps ($\mathcal{H}^{dec}$) are then aligned with the ground-truth concept heatmaps ($\mathcal{H}^{gt}$) using a Concept Mapping Loss ($\mathcal{L}_M$) optimized via Hungarian Matching. This ensures that the text prompts are explicitly trained to look for generalizable, machine-discovered visual cues.

Detailed architecture of the CPG-PAD framework

Datasets

The authors evaluated CPG-PAD across nine diverse benchmark datasets to test cross-domain robustness:

  • ICMO Group: CASIA-FASD (C), MSU-MFSD (M), OULU-NPU (O), and Idiap Replay-Attack (I), evaluated using a leave-one-dataset-out protocol.
  • CSW Group: CASIA-SURF (S), CASIA-CeFA (C), and WMCA (W), which focus on multimodal sensors and diverse environments.
  • CelebA-Spoof: A large-scale dataset used for concept visualization analysis and as supplementary training data.
  • SiW-Mv2: Used specifically to evaluate performance against entirely unknown spoof types (Presentation Attack Instruments).

Key Insights and Ideas

  • Bypassing Human Language Limitations: Human descriptions are often too coarse for the subtle artifacts of a presentation attack. By using XAI (Semi-NMF), the model uncovers "machine-level" concepts that are statistically meaningful within the VLM's feature space but difficult to put into words.
  • Concept Alignment as a Regularizer: Forcing text prompts to explicitly map to localized visual regions acts as a powerful regularizer. It prevents the text embeddings from drifting and ensures the model focuses on the face and the attack medium rather than background artifacts.
  • Bidirectional Multi-Modal Interaction: Traditional cross-attention mechanisms in VLMs are often unidirectional. The proposed Multi-head Dual-Attention (MDA) updates both text and visual tokens concurrently, leading to tighter, more effective multi-modal alignment.
Fig. 5. Visualization of discovered visual concepts in CelebA-Spoof dataset.

Key Results

  • Multi-Source Generalization: On the cross-domain ICMO benchmark, CPG-PAD achieved a state-of-the-art average Half Total Error Rate (HTER) of 2.08% without any extra training data, outperforming competitive CLIP-based methods like S-CPTL (3.33%). When utilizing CelebA-Spoof as supplementary data, the average HTER dropped further to 1.19%.
  • Unknown Attack Generalization: On the SiW-Mv2 dataset, CPG-PAD reduced the average HTER from 3.03% (standard CLIP baseline) to 1.02%. It showed massive improvements on localized attacks; for instance, HTER on "obfuscation makeup" dropped from 14.79% to just 0.77%.
  • Low Computational Overhead: Despite introducing the VPD module, CPG-PAD adds negligible overhead during deployment, increasing inference time per batch by only 0.01 seconds compared to a standard CLIP baseline (0.08s vs 0.07s).

Limitations and Future Work

The authors noted a distinct sensitivity to the depth of the Visual-Prompt Decoder. Increasing the VPD depth to 8 layers actually caused performance to degrade compared to the optimal 4-layer setup. This suggests that an overly complex decoder network can make backpropagation less effective or lead to overfitting on the training concepts.

Additionally, the number of discovered concepts ($K$) and learnable prompts ($J$) are currently fixed hyperparameters ($K=J=15$). Future work could explore methods to dynamically scale or automatically determine the optimal number of visual concepts based on the complexity of the source domains.

Summary updated

BibTeX
@article{zhang2026cpg,
  author = {Haoyuan Zhang and Xiangyu Zhu and Li Gao and Ajian Liu and Siran Peng and Zhen Lei},
  title = {{CPG-PAD: Concept-Informed Prompts Guided Presentation Attack Detection}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2026},
  doi = {10.1109/tifs.2026.3711854},
}
Figure