Proceedings

Think Twice Before Adaptation: Improving Adaptability of DeepFake Detection via Online Test-Time Adaptation

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7679-7687.

https://doi.org/10.24963/ijcai.2025/854

Abstract

Deepfake (DF) detectors face significant challenges when deployed in real-world environments, particularly when encountering test samples deviated from training data through either postprocessing manipulations or distribution shifts. We demonstrate postprocessing techniques can completely obscure generation artifacts presented in DF samples, leading to performance degradation of DF detectors. To address these challenges, we propose Think Twice before Adaptation (T2A), a novel online test-time adaptation method that enhances the adaptability of detectors during inference without requiring access to source training data or labels. Our key idea is to enable the model to explore alternative options through an Uncertainty-aware Negative Learning objective rather than solely relying on its initial predictions as commonly seen in entropy minimization (EM)-based approaches. We also introduce an Uncertain Sample Prioritization strategy and Gradients Masking technique to improve the adaptation by focusing on important samples and model parameters. Our theoretical analysis demonstrates that the proposed negative learning objective exhibits complementary behavior to EM, facilitating better adaptation capability. Empirically, our method achieves state-of-the-art results compared to existing test-time adaptation (TTA) approaches and significantly enhances the resilience and generalization of DF detectors during inference.

  1. [Boudiaf et al., 2022] Malik Boudiaf, Romain Mueller, Is- mail Ben Ayed, and Luca Bertinetto. Parameter-free on- line test-time adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8344-8353, 2022.
  2. [Cao et al., 2022] Junyi Cao, Chao Ma, Taiping Yao, Shen Chen, Shouhong Ding, and Xiaokang Yang. End-to-end reconstruction-classification learning for face forgery de- tection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4113- 4122, 2022.
  3. [Chen et al., 2022] Liang Chen, Yong Zhang, Yibing Song, Jue Wang, and Lingqiao Liu. Ost: Improving general- ization of deepfake detection via one-shot test-time train- ing. Advances in Neural Information Processing Systems, 35:24597-24610, 2022.
  4. [Chollet, 2017] Franc ¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251-1258, 2017.
  5. [Corvi et al., 2023] Riccardo Corvi, Davide Cozzolino, Gio- vanni Poggi, Koki Nagano, and Luisa Verdoliva. Intrigu- ing properties of synthetic images: from generative adver- sarial networks to diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 973-982, 2023.
  6. [Dolhansky, 2019] B Dolhansky. The deepfake detec- tion challenge (dfdc) preview dataset. arXiv preprint arXiv:1910.08854, 2019.
  7. [Fang et al., 2024] Hao Fang, Ajian Liu, Haocheng Yuan, Junze Zheng, Dingheng Zeng, Yanhong Liu, Jiankang Deng, Sergio Escalera, Xiaoming Liu, Jun Wan, et al. Uni- fied physical-digital face attack detection. In Proceedings of the Thirty-Third International Joint Conference on Ar- tificial Intelligence, pages 749-757, 2024. IJCAI
  8. [Frank et al., 2020] Joel Frank, Thorsten Eisenhofer, Lea Schönherr, Asja Fischer, Dorothea Kolossa, and Thorsten Holz. Leveraging frequency analysis for deepfake im- age recognition. In International conference on machine learning, pages 3247-3258. PMLR, 2020.
  9. [Ghosh et al., 2017] Aritra Ghosh, Himanshu Kumar, and P Shanti Sastry. Robust loss functions under label noise for deep neural networks. In Proceedings of the AAAI con- ference on artificial intelligence, volume 31, 2017.
  10. [Google, 2019] Google. Contributing data to deepfake de- tection research, 2019. Accessed on 11 December 2024.
  11. [He et al., 2024] Xianhua He, Dashuang Liang, Song Yang, Zhanlong Hao, Hui Ma, Binjie Mao, Xi Li, Yao Wang, Pengfei Yan, and Ajian Liu. Joint physical-digital facial attack detection via simulating spoofing clues. In Proceed- ings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 995-1004, 2024.
  12. [Kim et al., 2019] Youngdong Kim, Junho Yim, Juseung Yun, and Junmo Kim. Nlnl: Negative learning for noisy labels. In Proceedings of the IEEE/CVF international con- ference on computer vision, pages 101-110, 2019.
  13. [Kim et al., 2021] Youngdong Kim, Juseung Yun, Hyoun- guk Shon, and Junmo Kim. Joint negative and positive learning for noisy labels. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9442-9451, 2021.
  14. [Layton et al., 2024] Seth Layton, Tyler Tucker, Daniel Ol- szewski, Kevin Warren, Kevin Butler, and Patrick Traynor. {SoK}: The good, the bad, and the unbalanced: Measur- ing structural limitations of deepfake media datasets. In 33rd USENIX Security Symposium (USENIX Security 24), pages 1027-1044, 2024.
  15. [Li et al., 2018] Yuezun Li, Ming-Ching Chang, and Siwei Lyu. In ictu oculi: Exposing ai created fake videos by detecting eye blinking. In 2018 IEEE International work- shop on information forensics and security (WIFS), pages 1-7. Ieee, 2018.
  16. [Li et al., 2020a] Lingzhi Li, Jianmin Bao, Hao Yang, Dong Chen, and Fang Wen. Advancing high fidelity identity swapping for forgery detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5074-5083, 2020.
  17. [Li et al., 2020b] Yuezun Li, Xin Yang, Pu Sun, Honggang Qi, and Siwei Lyu. Celeb-df: A large-scale challeng- ing dataset for deepfake forensics. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 3207-3216, 2020.
  18. [Li et al., 2024] Jingjing Li, Zhiqi Yu, Zhekai Du, Lei Zhu, and Heng Tao Shen. A comprehensive survey on source- free domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.
  19. [Liang et al., 2024] Jian Liang, Ran He, and Tieniu Tan. A comprehensive survey on test-time adaptation under dis- tribution shifts. International Journal of Computer Vision, pages 1-34, 2024.
  20. [Liu et al., 2021] Honggu Liu, Xiaodan Li, Wenbo Zhou, Yuefeng Chen, Yuan He, Hui Xue, Weiming Zhang, and Nenghai Yu. Spatial-phase shallow learning: rethinking face forgery detection in frequency domain. In Proceed- ings of the IEEE/CVF conference on computer vision and pattern recognition, pages 772-781, 2021.
  21. [Liu et al., 2023a] Jiaming Liu, Senqiao Yang, Peidong Jia, Renrui Zhang, Ming Lu, Yandong Guo, Wei Xue, and Shanghang Zhang. Vida: Homeostatic visual domain adapter for continual test time adaptation. In International Conference on Learning Representations, 2023.
  22. [Liu et al., 2023b] Jiawei Liu, Jingyi Xie, Yang Wang, and Zheng-Jun Zha. Adaptive texture and spectrum clue min- ing for generalizable face forgery detection. IEEE Trans- actions on Information Forensics and Security, 2023.
  23. [Liu et al., 2024] Ajian Liu, Shuai Xue, Jianwen Gan, Jun Wan, Yanyan Liang, Jiankang Deng, Sergio Escalera, and Zhen Lei. Cfpl-fas: Class free prompt learning for general- izable face anti-spoofing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 222-232, 2024.
  24. [Ma et al., 2020] Xingjun Ma, Hanxun Huang, Yisen Wang, Simone Romano, Sarah Erfani, and James Bailey. Nor- malized loss functions for deep learning with noisy labels. In International conference on machine learning, pages 6543-6553. PMLR, 2020.
  25. [Nguyen-Le et al., 2024a] Hong-Hanh Nguyen-Le, Van- Tuan Tran, Dinh-Thuc Nguyen, and Nhien-An Le-Khac. Deepfake generation and proactive deepfake defense: A comprehensive survey. Authorea Preprints, 2024.
  26. [Nguyen-Le et al., 2024b] Hong-Hanh Nguyen-Le, Van- Tuan Tran, Dinh-Thuc Nguyen, and Nhien-An Le-Khac. Passive deepfake detection across multi-modalities: A comprehensive survey. arXiv preprint arXiv:2411.17911, 2024.
  27. [Ni et al., 2022] Yunsheng Ni, Depu Meng, Changqian Yu, Chengbin Quan, Dongchun Ren, and Youjian Zhao. Core: Consistent representation learning for face forgery detec- tion. In Proceedings of the IEEE/CVF conference on com- puter vision and pattern recognition, pages 12-21, 2022.
  28. [Niu et al., 2022] Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In International conference on machine learn- ing, pages 16888-16905. PMLR, 2022.
  29. [Niu et al., 2023] Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Zhiquan Wen, Yaofo Chen, Peilin Zhao, and Mingkui Tan. Towards stable test-time adaptation in dy- namic wild world. The Eleventh International Conference on Learning Representations, 2023.
  30. [Ojha et al., 2023] Utkarsh Ojha, Yuheng Li, and Yong Jae Lee. Towards universal fake image detectors that gen- eralize across generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24480-24489, 2023.
  31. [Pan et al., 2023] Kun Pan, Yifang Yin, Yao Wei, Feng Lin, Zhongjie Ba, Zhenguang Liu, Zhibo Wang, Lorenzo Cav- allaro, and Kui Ren. Dfil: Deepfake incremental learning by exploiting domain-invariant forgery clues. In Proceed- ings of the 31st ACM International Conference on Multi- media, pages 8035-8046, 2023.
  32. [Qian et al., 2020] Yuyang Qian, Guojun Yin, Lu Sheng, Zixuan Chen, and Jing Shao. Thinking in frequency: Face forgery detection by mining frequency-aware clues. In European conference on computer vision, pages 86-103. Springer, 2020.
  33. [Ross and Dollár, 2017] T-YLPG Ross and GKHP Dollár. Focal loss for dense object detection. In proceedings of the IEEE conference on computer vision and pattern recogni- tion, pages 2980-2988, 2017.
  34. [Rossler et al., 2019] Andreas Rossler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. Faceforensics++: Learning to de- tect manipulated facial images. In Proceedings of the IEEE/CVF international conference on computer vision, pages 1-11, 2019.
  35. [Schneider et al., 2020] Steffen Schneider, Evgenia Rusak, Luisa Eck, Oliver Bringmann, Wieland Brendel, and Matthias Bethge. Improving robustness against common corruptions by covariate shift adaptation. Advances in neural information processing systems, 33:11539-11551, 2020.
  36. [Shiohara and Yamasaki, 2022] Kaede Shiohara and Toshi- hiko Yamasaki. Detecting deepfakes with self-blended images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18720- 18729, 2022.
  37. [Tan and Le, 2019] Mingxing Tan and Quoc Le. Efficient- net: Rethinking model scaling for convolutional neural networks. In International conference on machine learn- ing, pages 6105-6114. PMLR, 2019.
  38. [Wang et al., 2020] Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. arXiv preprint arXiv:2006.10726, 2020.
  39. [Wang et al., 2022] Qin Wang, Olga Fink, Luc Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7201-7211, 2022.
  40. [Yan et al., 2023] Zhiyuan Yan, Yong Zhang, Xinhang Yuan, Siwei Lyu, and Baoyuan Wu. Deepfakebench: A compre- hensive benchmark of deepfake detection. arXiv preprint arXiv:2307.01426, 2023.
  41. [Yan et al., 2024] Zhiyuan Yan, Yuhao Luo, Siwei Lyu, Qingshan Liu, and Baoyuan Wu. Transcending forgery specificity with latent space augmentation for generaliz- able deepfake detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8984-8994, 2024.
  42. [Ye et al., 2023] Xichen Ye, Xiaoqiang Li, Tong Liu, Yan Sun, Weiqin Tong, et al. Active negative loss functions for learning with noisy labels. Advances in Neural Infor- mation Processing Systems, 36:6917-6940, 2023.
  43. [Zhang et al., 2022] Marvin Zhang, Sergey Levine, and Chelsea Finn. Memo: Test time robustness via adapta- tion and augmentation. Advances in neural information processing systems, 35:38629-38642, 2022.
  44. [Zhang et al., 2024] Qingyang Zhang, Yatao Bian, Xinke Kong, Peilin Zhao, and Changqing Zhang. Come: Test-time adaption by conservatively minimizing entropy. arXiv preprint arXiv:2410.10894, 2024.
  45. [Zhou et al., 2021] Xiong Zhou, Xianming Liu, Junjun Jiang, Xin Gao, and Xiangyang Ji. Asymmetric loss func- tions for learning with noisy labels. In International con- ference on machine learning, pages 12846-12856. PMLR, 2021.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards