Think Twice Before Adaptation: Improving Adaptability of DeepFake Detection via Online Test-Time Adaptation
Hong-Hanh Nguyen-Le, Van-Tuan Tran, Thuc D. Nguyen, Nhien-An Le-Khac
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence · 2025
Deepfake detectors face significant challenges when deployed in real-world environments, particularly when encountering test samples that deviate from training data through either post-processing manipulations or distribution shifts. Post-processing can obscure generation artifacts in deepfake samples, causing detector performance to degrade. We propose T²A (Think Twice before Adaptation), an online test-time adaptation method that improves detector adaptability during inference — without requiring access to original training data or labels.
Our approach employs an Uncertainty-aware Negative Learning objective rather than solely relying on the detector’s initial predictions, as seen in conventional entropy minimization approaches. We further introduce an Uncertain Sample Prioritization strategy to focus adaptation on the most informative samples, alongside a Gradients Masking technique to refine model parameter updates. We provide theoretical analysis showing complementary behavior between negative learning and entropy minimization.