FSFM: A Generalizable Face Security Foundation Model via Self-Supervised Facial Representation Learning

Gaojian Wang, Feng Lin, Tong Wu, Zhenguang Liu, Zhongjie Ba +1 more
2/9/2026

No official code found. Best implementation: wolo-wolo/FSFM-CVPR25 (137 stars, last commit 2026-04-22).

Abstract

This work asks: with abundant, unlabeled real faces, how to learn a robust and transferable facial representation that boosts various face security tasks with respect to generalization performance? We make the first attempt and propose a self-supervised pretraining framework to learn fundamental representations of real face images, FSFM, that leverages the synergy between masked image modeling (MIM) and instance discrimination (ID). We explore various facial masking strategies for MIM and present a simple yet powerful CRFR-P masking, which explicitly forces the model to capture meaningful intra-region Consistency and challenging inter-region Coherency. Furthermore, we devise an ID network that naturally couples with MIM to establish underlying local-to-global Correspondence through tailored self-distillation. These three learning objectives, namely 3C, empower encoding both local features and global semantics of real faces. After pretraining, a vanilla ViT serves as a universal vision Foundation Model for downstream Face Security tasks: cross-dataset deepfake detection, cross-domain face anti-spoofing, and unseen diffusion facial forgery detection. Extensive experiments on 10 public datasets demonstrate that our model transfers better than supervised pretraining, visual and facial self-supervised learning arts, and even outperforms task-specialized SOTA methods.

View on arXivView PDF

Code Implementations(1)

[--branch main] FSFM: A Generalizable Face Security Foundation Model via Self-Supervised Facial Representation Learning (CVPR25)            [--branch FSVFM-extension] Scalable Face Security Vision Foundation Model for Deepfake, Diffusion, and Spoofing Detection (Extented Version)

13716PythonDec 28, 20246 months agoNOASSERTION
ai-diffusion-generated-face-detectiondeepfake-detectionface-antispoofingself-supervised-learningvision-foundation-model

Similar Papers

Cite this paper

@article{wang2026fsfm,
  title  = {FSFM: A Generalizable Face Security Foundation Model via Self-Supervised Facial Representation Learning},
  author = {Gaojian Wang and Feng Lin and Tong Wu and Zhenguang Liu and Zhongjie Ba and Kui Ren},
  year   = {2026},
  eprint = {2412.12032},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2412.12032},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.12032.svg)](https://codeofpaper.com/paper/2412.12032)

Discussion