Deepfake Face Images: Explainable Detection using Deep Neural Networks and Class Activation Mapping
Bambang Sugiantoro · 2024
Our study presents an improved method for detecting deepfake content using advanced explainable artificial intelligence (XAI) techniques. We focused on enhancing deep neural networks, specifically Residual Network (ResNet) models such as ResNet50V2, ResNet101V2, and ResNet152V2, with Gradient-weighted Class Activation Mapping (Grad-CAM) to more accurately differentiate between real and artificial faces. The addition of XAI principles through Grad-CAM not only increases the detection accuracy but also makes the decision-making process of the models transparent, fostering trust, and making the technology more accessible for real-world applications. We evaluated our models using the FFHQ dataset, which comprises a vast array of real and fake facial images. The results demonstrated significant improvements in both precision and recall rates across all models with the integration of Grad-CAM. Specifically, the enhanced ResNet50V2 model achieved a precision of 87% for fake images and 94% for real images, with recall rates of 94% for fake images and 86% for real images, resulting in f1 scores of 90% for both classes. The ResNet101V2 and ResNet152V2 models with Grad-CAM also showed notable improvements, with the ResNet101V2 + Grad-CAM model reaching a precision of 87% for fake and 96% for real, and the ResNet152V2 + Grad-CAM model achieving a precision of 90% for fake and 92% for real, both with high recall and f1 scores, highlighting the precision and reliability of the method. Our approach not only addresses the challenge of detecting deepfakes with high accuracy but also balances the model complexity with computational efficiency. Despite some limitations, such as data set biases and occasional misclassifications, our method significantly advances digital media authentication and shows promising prospects for identity and security verification. Future work will focus on refining these models, emphasizing the importance of XAI, and exploring their application to broader image-classification challenges to strengthen defenses against the evolving threat of deepfake technology.