DeepFake Image Detection using Swin Transformer with Attention-guided Feature Fusion and Explainable AI Techniques

Authors

  • Vineela Krishna Suri Mrs.
  • Doctor G.V.S.N.R.V Prasad

Abstract

Deepfakes, synthetic media created using advanced machine learning techniques, pose significant societal challenges by spreading misinformation and undermining trust in media. With the increasing sophistication of deepfake technologies, distinguishing between genuine and synthetic media has become increasingly difficult. This paper presents a robust deepfake image detection framework using the Swin-B Transformer, a pre-trained model fine-tuned for our application. By integrating a hybrid dataset that combines real images from the FFHQ dataset and synthetically generated fake images from a publicly available Kaggle dataset, we simulate real-world media scenarios. Our model achieves an impressive accuracy of 97.47\% on the test set, demonstrating superior generalization to both real and synthetic visual data. Using Grad-CAM, we visualize the spatial segments of the image that the model focuses on during classification, providing insight into the decision-making process. This work contributes to enhancing content authenticity, controlling fake news, and ensuring digital trust and safety.

Keywords

Deepfakes, Vision Transformers, Generative Adversarial Networks, Convolutional Neural Networks

References

[1] M. -Y. Liu, X. Huang, J. Yu, T. -C. Wang and A. Mallya, ”Generative Adversarial Networks for Image and

Video Synthesis: Algorithms and Applications,” in Proceedings of the IEEE, vol. 109, no. 5, pp. 839-862,

May 2021, doi: 10.1109/JPROC.2021.3049196.

[2] Salman Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir, Fahad Shahbaz Khan, and

Mubarak Shah. 2022. Transformers in Vision: A Survey. ACM Comput. Surv. 54, 10s, Article 200 (January

2022), 41 pages. https://doi.org/10.1145/3505244

[3] FakeApp, ”FakeApp: Deepfake Creation Tool,” [Online]. Available: https://www.fakeapp.org/.

4] FaceSwap, ”Deepfakes FaceSwap GitHub Repository,” [Online]. Available: https://github.com/

deepfakes/faceswap.

[5] J. Vincent, ”AI-generated fake faces are being used to trick people online,” *The Verge*,

Jun. 13, 2019. [Online]. Available: https://www.theverge.com/2019/6/13/18677341/

ai-generated-fake-faces-spy-linked-in-contacts-associated-press

[6] A. Hern, ”What are deepfakes – and how can you spot them?” *The Guardian*, Jan. 13,

2020. [Online]. Available: https://www.theguardian.com/technology/2020/jan/13/

what-are-deepfakes-and-how-can-you-spot-them.

[7] X. a. P. B. a. W. W. a. D. J. Xuan, “On the Generalization of GAN Image Forensics,” in Biometric Recog-

nition: 14th Chinese Conference, CCBR 2019, Zhuzhou, 2019.

[8] F. Matern, C. Riess and M. Stamminger, “Exploiting visual artifacts to expose deepfakes and face manipu-

lations,” 2019 IEEE Wintere Applications of Computer Vision Workshops (WACVW), pp. 83-92, 2019

[9] C.-C. Hsu, Y.-X. Zhuang and C.-Y. Lee, “Deep Fake Image Detection Based on Pairwise Learning,” Ap-

plied Sciences, vol. 10, p. 370, 2020.

[10] T. a. X. X. a. X. M. a. D. H. a. X. Y. a. X. W. Zhao, “Learning Self-consistency for Deepfake Detection,”

in IEEE/CVF Conference on Computer Vision (ICCV), 2021.

[11] P. Zhou, X. Han, V. I. Morariu and L. S. Davis, “Two-stream Neural Networks for Tampered Face De-

tection,” in 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW),

2017.

[12] X. Chang, J. Wu, T. Yang and G. Feng, “DeepFake Face Image Detection based on Improved VGG

Convolutional Neural Network,” 39th Chinese Control Conference, pp. 7252-7256, 2020.

[13] P. Theerthagiri and G. b. Nagaladinne, ”Deepfake Face Detection Using Deep InceptionNet Learning Al-

gorithm,” 2023 IEEE International Students’ Conference on Electrical, Electronics and Computer Science

(SCEECS), Bhopal, India, 2023.

[14] V. R. Pasupuleti, P. Reddy Tathireddy, G. Dontagani and S. A. Rahim, ”Deepfake Detection Using Custom

Densenet,” 2023 14th International Conference on Computing Communication and Networking Technolo-

gies (ICCCNT), Delhi, India, 2023, pp. 1-5, doi: 10.1109/ICCCNT56998.2023.10307521.

[15] B. Ghita, I. Kuzminykh, A. Usama, T. Bakhshi and J. Marchang, ”Deepfake Image Detection Using Vision

Transformer Models,” 2024 IEEE International Black Sea Conference on Communications and Networking

(BlackSeaCom), Tbilisi, Georgia, 2024, pp. 332-335, doi: 10.1109/BlackSeaCom61746.2024.10646310.

[16] Usmani, S., Kumar, S. & Sadhya, D. Efficient deepfake detection using shallow vision transformer. Mul-

timed Tools Appl 83, 12339–12362 (2024). https://doi.org/10.1007/s11042-023-15910-z

[17] NVLabs, ”Flickr-Faces-HQ (FFHQ) Dataset,” [Online]. Available: https://github.com/

NVlabs/ffhq-dataset

[18] Karras, Tero, et al. ”A Style-Based Generator Architecture for Generative Adversarial Networks.” CVPR

2019.

[19] M. Karki, ”Deepfake and Real Images,” Kaggle, [Online]. Available: https://www.kaggle.com/

datasets/manjilkarki/deepfake-and-real-images.

20] Liu, Ze & Lin, Yutong & Cao, Yue & Hu, Han & Wei, Yixuan & Zhang, Zheng & Lin, Stephen & Guo,

Baining. (2021). Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. 9992-10002.

10.1109/ICCV48922.2021.00986.

[21] Hugging Face, ”Swin Transformer,” [Online]. Available: https://huggingface.co/docs/

transformers/model_doc/swin

[22] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh and D. Batra, ”Grad-CAM: Visual Expla-

nations from Deep Networks via Gradient-Based Localization,” 2017 IEEE International Conference on

Computer Vision (ICCV), Venice, Italy, 2017, pp. 618-626, doi: 10.1109/ICCV.2017.74.

[23] Gradio, ”Build & share delightful machine learning apps,” [Online]. Available: https://www.

gradio.app/.

[24] Le, T.-N., Nguyen, H. H., Yamagishi, J., & Echizen, I. (2021). OpenForensics: Multi-Face Forgery De-

tection And Segmentation In-The-Wild Dataset [V.1.0.0] (1.0.0) [Data set]. International Conference on

Computer Vision (ICCV). Zenodo. https://doi.org/10.5281/zenodo.5528418

Published

2026-09-08

How to Cite

(1)
Suri, V. K.; Prasad, G. DeepFake Image Detection Using Swin Transformer With Attention-Guided Feature Fusion and Explainable AI Techniques. ELCVIA 2026, 25, 130-151.

Downloads

Download data is not yet available.