InstructFLIP: Exploring Unified Vision-Language Model for Face Anti-spoofing

Kun-Hsiang Lin, Yu-Wen Tseng, Kang-Yang Huang, Jhih-Ciang Wu, Wen-Huang ChengarXiv 2025 · DOI

TL;DR

InstructFLIP is a unified, instruction-tuned vision-language framework for face anti-spoofing (FAS) that eliminates the need for redundant cross-domain retraining. By explicitly decoupling visual and textual features into orthogonal "content" (spoof type) and "style" (environment/camera) components, it achieves state-of-the-art cross-domain generalization using only a single training dataset.

What Problem Does This Paper Address?

Face recognition systems are everywhere, but they remain highly vulnerable to presentation attacks—such as printed photos, replayed videos, or 3D masks. While Face Anti-Spoofing (FAS) models perform well when trained and tested on the same dataset, their performance plummets when deployed in new, unseen environments due to domain distribution shifts.

To counter this, traditional Domain Generalization (DG) methods rely on "leave-one-out" cross-validation protocols. If you have four datasets, you train on three and test on the fourth, repeating this cycle for every combination. This creates massive training redundancy and fails to produce a single, unified model ready for large-scale deployment. Furthermore, existing vision-language models (VLMs) applied to FAS often struggle to separate actual spoofing cues from environmental noise like lighting or camera quality.

Figure 1: Comparison between DG-based and unified model. (a) Conventional DG-based approaches using leave-one-out protocols from multiple domains (D1, D2, D3) to the target one (DĐ ) result in significant training redundancy by treat- ing each domain independently during cross-validation. (b) We propose InstructFLIP, a unified model that leverages the meta domain Dģ and instruction-based training to jointly learn domain-invariant content and style features, allowing efficient generalizations without redundant retraining.

Methods

The authors introduce InstructFLIP, a novel framework that leverages instruction tuning to build a single, highly generalizable FAS model. Its architecture relies on three core pillars:

  1. Meta-Domain Learning Strategy: Instead of training on multiple datasets iteratively, InstructFLIP trains exclusively on a single, richly annotated "meta-domain" ($\mathcal{D}_m$), learning domain-invariant features that generalize out-of-the-box to unseen target domains.
  2. Content-Style Decoupling: The framework splits linguistic instructions and visual features into two independent branches. The Content branch focuses on spoof-specific semantics (e.g., identifying a print vs. a replay attack). The Style branch captures nuisance factors like illumination, environment (indoor/outdoor), and camera quality. Both branches utilize a Q-Former to map these features into a shared embedding space.
  3. LLM-Free Inference & Query Fusion: During training, a frozen Large Language Model (LLM) guides the learning process via text generation. However, running an LLM at inference is too slow for real-world face unlock systems. InstructFLIP solves this by using a Fusion Module that merges the content and style queries with visual features, passing them directly to a lightweight classifier and an auxiliary Cue Generator (which outputs a binary map highlighting spoofing regions). This allows the LLM to be completely discarded at test time.
Overview of the proposed InstructFLIP framework, highlighting the dual-branch architecture and the LLM-free fusion module.

Datasets

  • Training (Meta-Domain): CelebA-Spoof (CA), selected for its extensive metadata and rich attribute-level annotations (11 fine-grained spoof labels and various environmental tags).
  • Evaluation (Unseen Target Domains): Seven diverse public FAS benchmarks: MSU-MFSD (M), CASIA-FASD (C), Replay-Attack (I), OULU-NPU (O), WMCA (W), CASIA-CeFA (C), and CASIA-SURF (S).

Key Insights and Ideas

  • Language as a Feature Disentangler: Using structured text prompts (e.g., "What is the camera quality in this image?") forces the vision model to explicitly isolate environmental style from the actual facial structure. This prevents the model from overfitting to specific camera types or lighting conditions.
  • The Power of Granularity: The authors found that increasing category diversity in text prompts (e.g., breaking "print attack" down into "photo", "poster", or "A4-paper") significantly boosts visual generalization. Richer semantic supervision helps the model map subtle intra-class variations.
  • Bypassing the LLM Bottleneck: Instruction tuning usually implies heavy computational overhead. Demonstrating that the learned semantic queries can be fused and classified without the LLM during inference proves that language-guided training can yield highly efficient, real-time edge models.

Key Results

InstructFLIP significantly outperformed existing state-of-the-art (SOTA) methods across all evaluation metrics under a unified protocol:

  • Error Reduction: Compared to the previous leading method (CFPL), InstructFLIP achieved relative reductions in Half Total Error Rate (HTER) across multiple datasets, including a 37% reduction on MSU-MFSD and a 47% reduction on CASIA-FASD.
  • Security Reliability: The average True Positive Rate at a strict 1% False Positive Rate (TPR@FPR=1%) jumped from 53.98% (CFPL) to 65.23%, which is critical for minimizing false unlocks in practical applications.
  • Efficiency: The lightweight inference variant (InstructFLIP$^-$) maintains an average inference time of 0.030 seconds per sample on a single NVIDIA RTX 4090, matching the speed of standard ViT baselines while delivering vastly superior accuracy.

Limitations and Future Work

Despite strong overall performance, the model's accuracy on the CASIA-CeFA dataset was relatively modest. The authors note that this dataset contains subtle cultural and environmental variations that the current meta-domain training setup doesn't fully capture.

Future work will focus on developing more expressive and adaptive instruction-tuning strategies to enhance the model's sensitivity to these highly granular, localized domain shifts.

Summary updated

BibTeX
@misc{lin2025instructflip,
  author = {Kun-Hsiang Lin and Yu-Wen Tseng and Kang-Yang Huang and Jhih-Ciang Wu and Wen-Huang Cheng},
  title = {{InstructFLIP: Exploring Unified Vision-Language Model for Face Anti-spoofing}},
  year = {2025},
  eprint = {2507.12060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.12060},
}
Figure