Environment-Invariant Subspace Learning for Generalizable Deepfake Detection

Authors: Shenghao Chen, Hao Jia, Chen Li, Chunjie Ma, Zan Gao, Shengyong Chen

Published: 2026-08-18 12:22:21+00:00

Comment: 12 pages, 4 figures, 11 tables

AI Summary

This paper introduces the Environment-Invariant Subspace Learning (EISL) framework to address the challenge of cross-distribution generalization in deepfake detection, particularly the susceptibility of visual foundation models (VFMs) to environmental interference. EISL disentangles features into forgery-relevant invariant factors and environment-related residual factors using a learnable low-rank projection. An Environmental Intervention module is designed to simulate out-of-distribution environmental shifts, guiding the model to discover truly invariant forgery representations.

Abstract

Cross-distribution generalization remains a critical bottleneck in deepfake detection. While recent efforts leverage the semantic priors of large-scale visual foundation models (VFMs), a noteworthy yet underexplored challenge remains: the susceptibility of these semantic priors to environmental interference from factors such as lighting and style. Crucially, this interference establishes spurious correlations between forgery cues and environmental patterns that severely limit generalization. To address this fundamental challenge, we propose an innovative Environment-Invariant Subspace Learning (EISL) framework. The core contribution of EISL is that it aims to disentangle features into orthogonal forgery-relevant invariant factors and environment-related residual factors via a learnable low-rank projection. To facilitate robust feature disentanglement, we also design an Environmental Intervention module that generates diverse and challenging intervention pairs, simulating out-of-distribution environmental shifts to guide the model toward discovering truly invariant forgery representations. Experiments across cross-dataset, cross-generator, whole-face synthesis, and corruption settings show consistent gains and competitive or leading performance against strong detectors, demonstrating improved robustness to unseen forgery types and environmental variations. This work provides a new perspective and a valuable exploration for understanding and tackling the generalization barriers of VFMs in deepfake detection.


Key findings
EISL achieves consistent gains and competitive or leading performance across cross-dataset, cross-generator, whole-face synthesis, and corruption settings, demonstrating improved robustness to unseen forgery types and environmental variations. The framework effectively disentangles environmental factors from forgery cues, as evidenced by reduced environmental sensitivity in the projected subspace and increased sensitivity in the residual component. The learned subspace also generalizes to corruption families outside the intervention pool, suggesting suppression of broader appearance-driven directions.
Approach
EISL leverages a learnable low-rank projection to disentangle features from a LoRA-tuned CLIP encoder into environment-invariant forgery representations and environment-related residuals. An Environmental Intervention Module (EIM) creates label-preserving perturbed image pairs by applying strong appearance augmentations and stochastic region-wise blending. The model is optimized using a combination of binary classification loss, RefCLIP constraint loss for semantic alignment and environmental separation, invariant consistency loss, and low-rank orthogonality regularization.
Datasets
FaceForensics++ (FF++), Deepfake Detection Challenge (DFDC), DFDC preview set (DFDCP), CelebDF (CDF-v1, CDF-v2), DeepFakeDetection dataset (DFD), DF40, Diffusion Facial Forgery (DiFF).
Model(s)
CLIP-Large-Patch14 (ViT-L/14) vision encoder with LoRA-based adaptation (r_lora = 16), ViT-B/16, ViT-B/32.
Author countries
China