# Explainable AI for DeepFake Detection
## 3 Experiments  
In recent years, considerable progress has been made within the domain of computer vision, especially in the areas of image manipulation and detection. With the proliferation of manipulated or fake images and videos, detecting such alterations has become a critical challenge. To test the explainability of deepfake detection models, the proposed work has been categorized into two stages--detection and explainability. The advent of deepfake technology has raised serious concerns regarding the authenticity of visual content in various applications, such as news reporting, entertainment, and cybersecurity. In response to this challenge, researchers have turned to CNNs as a robust solution for detecting manipulated images and videos. During the detection phase, the classification process is carried out using three CNN models: ResNet-50, Inception V3, and VGG-16. A comparison is then made based on the accuracy of each model to determine how effectively they can distinguish between authentic and manipulated images. The models are trained using the Celeb-DF dataset, which contains deepfake images. The explainability model is tested by using a deepfake face dictionary formed from the CelebAMask-HQ dataset. In the following network dissection algorithm, the proposed explainability model is used to understand the individual units of the pre-trained CNNs in classifying images as real or fake. The implementation stages of deepfake detection and explainable artificial intelligence are portrayed in Figures 3 and 4. The dataset used to train the three convolutional neural network models is crucial in advancing deep learning systems for image classification. In this instance, the dataset contains a mix of real and fake images, taken from the Celeb-DF dataset [23]. This dataset is crucial for advancing deep learning and computer vision research, particularly in addressing the challenges posed by deepfake videos, which have the potential to spread misinformation and manipulate digital media. The Celeb-DF dataset provides researchers with a substantial collection of both deepfake and genuine videos, making it an invaluable resource in this field. The dataset comprises a considerable number of images, with 19,457 frames obtained from the videos. To effectively train, validate, and test the CNN models, the dataset is divided in a balanced manner. Specifically, a percentage of the images, equivalent to 15,565 frames, are used for training. This comprehensive training set enables the models to identify key features and patterns essential for differentiating between deepfake and genuine content. Additionally, a percentage of the data are designated for the purpose of validation, a key process in monitoring model performance and adjusting hyperparameters to avoid overfitting, ensuring the model's capability to be applied to unseen data. Lastly, the final 10 percent of the dataset is set aside for testing purposes, providing a final evaluation of the CNN models' effective  
Figure 4: Implementation Stages for XAI. Figure 3: Implementation Stages for DF Detection. ness in classifying real and fake images accurately. Figure 5 presents a visual sample of both fake and real images belonging to the Celeb-DF dataset that were utilized for training purposes. To test the explainability potential of the models, the network dissection algorithm is used to dissect various layers of the CNN models. This aims to assess the feasibility of implementing the deepfake detection models. Unit-concept mapping for network dissection is built upon our deepfake face dictionary, featuring numerous facial concepts. In the proposed work, the network dissection algorithm uses the deepfake face dictionary that incorporates concepts of different features of faces. The proposed method, the explainability model based on the network dissection algorithm for the trained CNN models, detects units that could detect corresponding facial concepts using unit-concept pairing.