1. Introduction
With the rise of artificial intelligence (AI), significant progress has been made in image generation and manipulation, notably through Generative Adversarial Networks (GANs). GANs can create hyper-realistic images nearly indistinguishable from real ones and have found use in medical imaging, art, and gaming. However, they are also exploited for malicious purposes such as misinformation, identity theft, and deepfake creation [1][2]. The growing realism of AI-generated content has outpaced traditional forensic tools, prompting a shift toward deep learning-based detection methods, including CNNs and hybrid models [3]. Techniques like texture inconsistency detection and frequency-based analysis have shown promise [4], while hybrid CNN-statistical models and transformer-based systems offer improved resilience to adversarial attacks [5][6]. Newer GANs like StyleGAN and BigGAN have made detection even more challenging [7], pushing the need for adaptive solutions like transfer learning and multimodal analysis combining visual and metadata features [8][9]. Approaches like PRNU analysis and hybrid attention mechanisms further enhance performance [10][11]. Despite advancements, issues like dataset bias and adversarial threats persist [12][13]. Ethical considerations must also be addressed to balance regulation with legitimate GAN applications such as art and privacy-preserving tools [14]. To build upon this growing need for reliable detection methods, several recent studies have proposed diverse approaches for distinguishing real and GAN-generated images, as discussed in the following literature review.
Recent advancements in real and fake image classification have led to the development of various methods using deep learning, frequency analysis, and hybrid models. CNNs are widely used in GAN-based deepfake detection due to their ability to capture pixel-level inconsistencies [1]. Hybrid models combining CNNs and transformers improve generalization and show robustness against adversarial attacks when optimized with Adam [2]. Frequency domain techniques, such as FFT and wavelet transforms, effectively detect generation artifacts using multi-band analysis [3]. Multimodal approaches that incorporate CNNs and metadata analysis further enhance classification accuracy [4]. Adversarial training and data augmentation improve model resilience against tampering [5]. StyleGAN synthesis and transfer learning with ResNet have shown promise in both generation and detection tasks [6][8]. Explainable AI, including attention-based CNNs, helps interpret model decisions [7]. DCT-based methods [9] and ensemble learning models, such as CNN with Random Forest, further boost classification performance and robustness [10].
R1: How does integrating a Traditional CNN, Effi-cientNetV2, and adversarial-trained GAN discriminator improve deepfake detection performance compared to standalone state-of-the-art models (e.g., ResNet-50, Xception)?
Ans: The hybrid model combines CNN's local artifact detection, EfficientNetV2's hierarchical features, and GAN's adversarial robustness, achieving 96.1% accuracy (vs. 91.3% for Xception[30,31,32]).
R2: To what extent does pretraining the GAN discriminator in an adversarial framework enhance its ability to identify synthetic artifacts, particularly in reducing false negatives (recall) compared to traditional supervised training?
Ans: Adversarial pretraining enhances synthetic artifact detection, achieving 91% recall (vs 87% in supervised training [31]) by reducing false negatives through adversarial exposure.
R3: How does the weighted ensemble strategy harmonize the strengths of individual models (e.g., EfficientNetV2’s accuracy, GAN discriminator’s re-call) to achieve balanced precision, recall, and F1-score (0.95)?
Ans: Weighted voting (0.5 EfficientNetV2, 0.2 GAN) balances accuracy and recall, achieving 0.95 F1-score through complementary strengths.
R4: Does the hybrid framework maintain robust performance on diverse deepfake datasets (e.g., CIFAKE) and unseen synthetic methods (e.g., diffusion models, StyleGAN variants)?
Ans: Maintains robustness on CIFAKE/Celeb-DF (88% accuracy on StyleGAN) and adapts to diffusion/StyleGAN variants with minor performance drops [34],[35].
Our main contributions to this research include the following:
Integration of a Traditional CNN, transfer learning (EfficientNetV2), and a repurposed GAN discriminator, offering a multi-perspective approach to deepfake detection.
Achieved 96.1% accuracy via weighted ensemble learning, combining diverse model strengths to reduce false negatives by 40%.
Clear guidelines for context-specific model selection (e.g., EfficientNetV2 for accuracy, CNN for edge devices,
GAN discriminator for adversarial robustness).
Balancing computational efficiency (CNN’s 15 ms/image inference) with state-of-the-art performance
(EfficientNetV2’s 94.7% accuracy) for scalable solutions.
2. Dataset
The data set includes a carefully constructed set of 190,305 images, wisely divided into training, validation, and test sets to facilitate rigorous model development and testing. The training set, the largest data subset, is comprised of 140,000 images evenly distributed between 70,000 authentic and 70,000 fabricated samples, thus providing equal exposure to both classes for model development. This parity counteracts class imbalance, a prevalent issue in deepfake detection, and allows the model to learn discriminative features instead of being biased toward data distributions. The dataset is obtained from Kaggle for analysis and insights.[22] The validation set consists of 39,400 images, with 19,600 fake and 19,800 real samples, having a near-perfect balance (49.7% fake vs. 50.3% real) to be able to guide hyper parameter tuning reliably and avoid overfitting. The final test set has 10,905 images, with a slight bias towards simulated samples (5,492 simulated vs. 5,413 actual), representing real-world applications where synthetic content could become more prevalent marginally. Even with this slight asymmetry (50.4% fake), the test set is still statistically representative, which means fair performance measurement. Figure 1 displays the real and fake images dataset. The scale and structure of the dataset also conform to deep learning best practices: the training set (7c3.6% of all data) has a large number of samples for extracting features, while the validation (20.7%) and test (5.7%) sets have a proportionally modified but efficient split ratio compared to the standard 70-20-10 rule. This setup allows for enough data for iterative model tuning and final generalization testing.
a) Fake Image b) Real Image
Significantly, the virtually equal counts of genuine (95,213) and spurious (95,092) images per split highlight thorough curation with minimal systemic imbalance. This balance is important in applications such as deepfake identification, where the cost of misclassification is high and balanced metrics (precision, recall) are significant. Table 1 depicts a tabular presentation of the dataset summary. The size and variability of the dataset (140,000 training images) are conducive to training sophisticated architectures such as CNNs, EfficientNetV2, and GANbased models. Its organization not only accommodates solo model training but also ensemble methods and adversarial robustness research. Figure 2 depicts the original flowchart of a hybrid method. By simulating realworld data distribution without compromising class balance, this dataset is a solid base for training generalizable, high-performance deepfake detection systems. The dataset is taken from Kaggle for analysis and insights.
3. Proposed Model
The approach begins with dataset preprocessing (resizing, augmentation, normalization) and the choice of three classifiers: a Traditional CNN, an EfficientNetV2 transfer learning model, and a GAN discriminator for comparison. The suggested model is a high-end hybrid deep learning architecture aimed at overcoming the growing challenge of separating genuine images from ever-more realistic deepfakes by combining three different yet complementary classifiers: a Conventional Convolutional Neural Network (CNN), a transfer learning-based EfficientNetV2 model, and a retrained Generative Adversarial Network (GAN) discriminator. This tri-modal architecture synergizes computation efficiency, hierarchical feature extraction, and adversarial resilience, resulting in an ensemble model that balances accuracy, generalization, and resistance to changing synthetic media.
a. Convolutional Neural Networks
The network has four serial blocks of convolutional with each block comprising a convolution layer activated with ReLU followed by spatial down sampling via max pooling. The initial block employs 32 filters with a kernel size of 3×3, gradually rising to 64, 128, and 256 filters in later blocks, allowing hierarchical feature extraction from simple edges and textures in shallow layers to intricate patterns in deeper layers. A dropout layer (rate = 0.5) is used following the flattening of the last convolutional output to prevent overfitting, then a dense layer of 512 ReLU units for the abstraction of high-level feature construction and a sigmoid-activated output neuron for binary classification (real or fake). Trained from scratch on the CIFAKE dataset, the CNN uses the Adam optimizer (learning rate = 0.001) and binary cross-entropy loss for 20 epochs, with early stop-ping (patience = 5) to stop training if validation loss stagnates. Nevertheless, it falls short compared to EfficientNetV2 (94.7% accuracy) owing to its poor ability to capture global structural abnormalities.
The CNN's computational speed (15 ms/image inference time) makes it suitable for edge deployment, and its modular architecture enables easy integration into the hybrid framework. Figure 3 shows the architecture of Convolutional Neural Networks. Its limitations are vulnerability to overfitting on noisy data without dropout and decreased sensitivity to high-quality synthetic patterns that need global context.
b. Generative Adversarial Network (GAN)
The Discriminator of the Generative Adversarial Network (GAN) is the central part of the envisioned hybrid system, providing adversarial resilience and sensitivity to artificially created artifacts that conventional classifiers tend to overlook. Trained beforehand in an adversarial pre-trained conditional GAN (cGAN) setup, the discriminator first learns to separate real images from artificially created images through a companion GAN generator. This step utilizes the minimax loss function:
Where LD is Loss and D is Discriminator, G is Generator, x is Real data, z is Latent variable, pdata is Real data distribution and pz specifies Latent distribution Adversarial training enables the discriminator to recognize subtle pixel-level anomalies (e.g., irregular lighting and unnatural gradients) and structural incoherence (e.g., misaligned facial features) that are typical of deepfakes.
During post-adversarial training, the discriminator's convolutional blocks are frozen in order to keep this acquired sensitivity intact, but its last classification blocks are trained on labeled real/fake data in order to tune decision boundaries for the given task. Figure 4 shows the architecture of GAN. The architecture of the discriminator usually involves a series of convolutional blocks with Leaky ReLU activation, batch normalization, and stride convolutions in order to down-sample spatial sizes without losing feature hierarchies. In the hybrid ensemble, its outputs are concatenated with the CNN and EfficientNetV2 outputs, enabling the model to take advantage of its adversarial sharpness. This integration fills a major void in deepfake detection: While CNNs and Efficient Net are good at localized or structural anomalies; the GAN discriminator is good at global coherence tests, e.g., unnatural shadow transitions or implausible background textures. The loss is computed as:
Where LG represents the loss, z is the latent variable sampled from the pz distribution, while G (generator) and D (discriminator) are the key components of the GAN.
c. Efficient net V2
EfficientNetV2 grounds the hybrid deepfake detection system, utilizing its pre-trained ImageNet backbone and compound scaling to perform efficient multi-scale feature extraction. Frozen conv layers retain universal pattern detection (edges, textures), while a trainable sigmoid layer supports binary classification. Tuned with a low learning rate (1e-5), it reaches 94.7% accuracy and 0.98 AUC-ROC on CIFAKE, outperforming ResNet-50/Xception through depth-wise convolutions and combined-MBConv blocks detecting minor artifacts (unnatural shapes, misplaced features). Figure 5 shows the architecture of EfficientNetV2. In the ensemble, its results (weight=0.5) combine with CNN/GAN features to compensate for localized noise sensitivity. With computation intensiveness (2.5 GPU hours), its FP16 compatibility and scaling up to 256x256 inputs guarantee flexibility. Future development is focused on federated learning and dynamic scaling.
d. Ensemble Model
The hybrid framework suggested integrates the pre-dictions of three domain-specific components - Traditional CNN, EfficientNetV2, and GAN discriminator through weighted voting to enhance deepfake detection performance. The contributions of each model are unique: the CNN detects localized artifacts (e.g., texture abnormalities), EfficientNetV2 exploits hierarchical features for structural consistency checks, and the GAN discriminator exploits adversarial pretraining for identifying synthetic patterns. Predictions are weighted (CNN: 0.3, EfficientNetV2: 0.5, GAN: 0.2), tuned through grid search on validation data to balance recall and precision. This approach has 96.1% accuracy, 0.95 F1-score, and 0.99 AUC-ROC, outperforming individual models by balancing their strengths and compensating for weaknesses (e.g., CNN's reduced recall or GAN's precision compromises). The robustness of the ensemble comes from its capacity to generalize across a wide range of deepfakes, such as adversarial and unseen synthetic methods, while keeping computational efficiency intact through component synergy. While computationally expensive in comparison to standalone models, its modularity facilitates flexible deployment—lightweight CNN for edge devices and high-accuracy ensemble for cloud-based applications. Such an approach illustrates the strategic model integration increases confidence in high-stakes applications such as content moderation, where one's goal is to minimize false negatives and positives.
The suggested model works on a carefully orchestrated workflow that combines three different classifiers a Traditional Convolutional Neural Network (CNN), a transfer learning-based Effi-cientNetV2 model, and a repurposed GAN discriminator into one framework, optimizing for ac-curacy, robustness, and computational savings in identifying real vs. fake images. The process starts with data preprocessing in which raw images are resized to a normalized resolution of 224×224 pixels to provide uniformity and then normalized to normalize pixel values to be within 0 to 1 for best neural network performance. Figure 6 is the methodology flowchart for real & fake image detection with a hybrid approach. To promote generalization, the training set is augmented in real-time with ran-dom rotations (±20°), horizontal flips, shear (0.2), and zoom (0.2), artificially enlarging the diversity of the dataset and mimicking variations in lighting, orientation, and scale. The validation and test sets are normalized only to avoid data leakage and maintain fair evaluation. After being pre-processed, the data is passed into three parallel pipelines, one each for training every one of the classifiers, followed by an ensemble mechanism that aggregates their outputs. The model uses adam optimizer to update the weights in the described models, and is computed mathematically as:
Where θ_(t+1): Updated parameter, θt: Current parameter, η: Learning rate, 𝑚𝑡̂: Biased first moment, 𝑣̂𝑡: Biased second moment, ϵ: Smoothing term.
The Traditional CNN is the initial classifier, designed for speed and efficiency. Its design consists of four successive blocks of convolution, where each is made up of a convolution layer with ReLU activation (32, 64, 128, and 256 filters, respectively) followed by max-pooling to step by step down sample spatial sizes and capture hierarchical features like edges, textures, and local artifacts. A dropout layer with a rate of 0.5 is added after flattening the last convolutional output to prevent overfitting, and then a dense layer of 512 ReLU units that generates high-level features, leading to a sigmoid-activated output neuron for binary classification. Trained with Adam optimizer (learning rate = 0.001) and binary cross-entropy loss for 20 epochs, the CNN learns its weights in batch mode (batch size = 32), adapting dynamically to variations in augmented data while validation metrics track its generalization power. Although it has limited accuracy (87.2%), its minimalist approach allows for fast inference (15 ms/image), making it perfect for edge deployment. Overfitting is avoided in traditional CNN model, which is described as:
Where a_drop^((l)) is the dropped activation, a^((l)) is the activation, m is the mask, mi is a Bernoulli sample, and p is the probability.
Algorithm 1: Hybrid Model Training
1. Real/FakeDataset (D),Split D intoTrain Dtrain (70%), Validation Dval (20%), Test Dtest (10%)
Models: CNN: Traditional architecture with dropout, EfficientNetV2: Pretrained on ImageNet, fine-tuned, GAN Discriminator: Pretrained adversarially. Parameters: Batchsize b=32, Learningrates ηCNN=0.001=0.001, ηEfficientNet=1e-5, ηGAN=0.0002η a. Image size s=224×224, Early stop patience = 5, Epochs = 20 2. Procedure: class HybridModel(n.Module): 3. def __init__(self): 4. super().__init__() 5. # Initialize Models 6. self.cnn = CNN() 7. # Traditional CNN with 4 Conv blocks 8. self.effnet = EfficientNetV2B0(pretrained=True) # Transfer learning 9. self.gan_disc = GANDiscriminator() # Pretrained adversarially 10. for param in self.effnet.parameters(): 11. param.requires_grad = False 12. self.effnet.classifier = nn.Linear(1280, 1) # Fine-tune last layer 13. # Ensemble classifier 14. self.classifier = nn.Linear(3, 1) # Combine 3 model outputs 15. def forward(self, x): 16. x1 = self.cnn(x) # CNN features 17. x2 = self.effnet(x) # EfficientNetV2 features 18. x3 = self.gan_disc(x) # GAN Discriminator features 19. x = torch.cat([x1, x2, x3], dim=1) # Concatenate 20. return torch.sigmoid(self.classifier(x)) 21. def Train_Hybrid(\(D_{\text{train}}\), \(D_{\text{val}}\)): 22. # Initialize 23. model = HybridModel() 24. optimizer = Adam([ 25. {'params': model.cnn.parameters(), 'lr': 0.001}, 26. {'params': model.effnet.classifier.parameters(), 'lr': 1e-5}, 27. {'params': model.gan_disc.parameters(), 'lr': 0.0002} 28. ]) 29. scheduler = ReduceLROnPlateau(optimizer, 'min', patience=3) 30. criterion = nn.BCELoss() 31. # Adversarial Pretraining for GAN Discriminator retrain_gan_discriminator(model.gan_disc, \(D_{\text{train}}\)) 32. # Main Training Loop 33. best_val_acc = 0.0 34. for epoch in range(20): 35. model.train() 36. for batch in \(D_{\text{train}}\) (batch_size=32): a. x, y = batch b. y_pred = model(x) c. loss = criterion(y_pred, y) d. optimizer.zero_grad() e. loss.backward() f. optimizer.step() 37. # Validation 38. model.eval() 39. val_acc, val_loss = evaluate(model, \(D_{\text{val}}\)) 40. scheduler.step(val_loss) 41. # Early Stopping 42. if val_acc > best_val_acc:
a. best_val_acc = val_acc b. torch.save(model.state_dict(), 'best_hybrid.pth') c. patience = 0 43. else: a. patience += 1 b. if patience >= 5: c. break 44. Return model 45. # Image Augmentation (Training) 46. train_transform = Compose([ 47. Resize((224, 224)), 48. RandomHorizontalFlip(), 49. RandomRotation(20), 50. ToTensor(), 51. Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) 52. ]) 53. # Validation/Test (No Augmentation) 54. val_transform = Compose([ 55. Resize((224, 224)), 56. ToTensor(), 57. Normalize (...) 58. ])
The convolutional layers are frozen during early training to maintain their capacity to recognize universal visual patterns (e.g., shapes, gradients), and a global average pooling layer reduces spatial information into a feature vector, which is input to a trainable dense layer with sigmoid output. This strategy allows EfficientNetV2 to attain state-of-the-art accuracy (94.7%) and AUC-ROC (0.98), surpassing traditional CNNs and hybrid models such as ResNet-50 or Xception. The GAN discriminator has a distinctive two-phase training schedule. It is first pre-trained adversarial in a conditional GAN (cGAN) setup, where it is pitted against a generator to identify real images versus fake images. In this process, the discriminator is trained to recognize faint artifacts like pixel-level inaccuracies or impossible lighting by minimizing the mini-max loss function:
Where LD: Loss, D: Discriminator, G: Generator, x_real: Real data, z: Latent variable, E: Expectation. Postadversarial training involves the freezing of the discriminator's convolutional layers to maintain its sensitivity toward artificial features but retraining the classifier layers of the discriminator on labeled data to sharpen real/fake task-specific decision boundaries. Lastly, the ensemble model aggregates the output of all three classifiers using weighted voting. Weights are learned through grid search on the validation set, keeping EfficientNetV2's high accuracy in check while making up for the CNN's low recall and the GAN discriminator's precision issues. The final prediction of the ensemble is calculated as:
Where Prediction: Output, argmax: Maximization, w1, w2, w3: Weights, yCNN: CNN output, yEfficientNetV2: EfficientNetV2 output, yGAN: GAN output. The synergy-based method yields the highest possible accuracy of 96.1% and the F1-score of 0.95, outperforming individual models significantly. The model is tested on the balanced test set (10,905 images) after training with evaluation metrics including accuracy, precision, recall, F1score, and AUC-ROC. The flexibility of deployment of the framework is highlighted through its support for edge devices (through CNN) and cloud platforms (through EfficientNetV2 or the ensemble), promoting adaptability across various real-world situations. By balancing architectural variability, adversarial training, and ensemble optimization, the developed model establishes a new state-of-the-art in deepfake detection, providing a strong, scalable solution to counter increasingly sophisticated synthetic media attacks.
5. Results & Discussion
With 96.1% accuracy, 0.95 F1-score, and 0.99 AUC-ROC, the hybrid ensemble model outperformed EfficientNetV2 (94.7% accuracy) and GAN-based classifiers (88.6% accuracy). EfficientNetV2's transfer learning backbone achieved excellent accuracy (0.95), while the adversarial training of the GAN discriminator improved recall (0.91), reducing synthetic material missed. The CNN with modifications was less accurate (87.2%) but had fast inference (15 ms/image), suitable for edge deployment. As dropout, (0.5) and early stopping avoided overfitting (patience=5), training dynamics showed steady convergence with the highest validation accuracy at 91.05% (at epoch 10) and losses declining steadily (training: 0.2242, validation: 0.2778).
The ensemble's weighted voting strategy effectively balanced component strengths: EfficientNetV2's structural modeling, CNN's local artifact detection, and the GAN's synthetic pattern recognition. This synergy reduced false negatives by 40% from solo models, resolving precision-recall trade-offs. Computing costs (2.5-hour GPU training for EfficientNetV2) and novel deepfake types (e.g., diffusion-based) are limitations. Dynamic weighting to build threats, frequency-domain analysis, and cross-dataset generalization must be explored. Modularity unites edge efficiency (CNN) with cloud precision (ensemble), making it a scalable deepfake detection solution.
5.1 | Performance Parameters
Hybrid tri-classifier (CNN, EfficientNetV2, GAN discriminator) is evaluated using accuracy, precision, recall, F1score, and AUC-ROC. EfficientNetV2 beats in accuracy (92–96%) and separability (AUC: 0.98), and the GAN discriminator beats in recall (91%) on synthetic artifacts. Computational comparisons reveal CNN's edge efficiency (15 ms/image) over EfficientNetV2's demands. Robustness tests show GAN's adversarial tolerance and cross-dataset experiments show EfficientNetV2's generalization (88% on StyleGAN). Ethical practices ensure equality, while sustainability is skewed towards CNN's low power usage. The ensemble (accuracy=96.1%) averages strengths by weighted voting and controls deployment for speed, accuracy, or stability. This section completes the following parameters: accuracy, precision, recall, F1-score, and confusion matrix.
5.1.1 Accuracy
The hybrid model (CNN, EfficientNetV2, GAN) achieves 91.05% validation accuracy (91.68% training) by epoch 10, rising from 21.83% initially. The rapid improvement to 55.49% (epoch 2) stems from CNN’s local artifact detection, EfficientNetV2’s structural analysis, and GAN’s synthetic pattern sensitivity. Figure 7 illustrates the training and validation accuracy w.r.t epochs. The ensemble mitigates overfitting and precision-recall trade-offs via dropout (0.5) and early stopping, maintaining minimal accuracy gaps (0.63%). Table 2 represents the Tabular View of hyperparameters for a hybrid approach. Losses decline steadily (training: 2.03→0.22; validation: 1.30→0.28), with a transient dip at epoch 9 (86.45%) before recovery, demonstrating robustness and adaptability.
5.1.2 Loss
Loss captures prediction errors, minimized through binary cross-entropy among classifiers (CNN, EfficientNetV2, and GAN). CNN's initial high loss subsides as features are learned; validation loss chasms indicate overfitting, addressed by dropout (0.5) and augmentation. EfficientNetV2's pre-trained weights provide lower starting loss, spiking briefly during fine-tuning. Table 3 is the tabular representation of training configuration and Hyper parameters for CNN, EfficientNetV2, and GAN Models. Loss of a GAN fluctuates throughout adversarial training but converges after fine-tuning. Early stopping (patience=5) stops training when validation loss is flat. Figure 8 shows training and validation loss w.r.t epochs.
Although test loss shows robustness (EfficientNetV2: 0.2 vs. CNN: 0.3), precision/recall compensates for class biases, providing balanced performance beyond loss measures.
Parameter Value/Role
Optimizer Adam (CNN: lr=0.001lr=0.001, EfficientNetV2: lr=1e-5lr=1e-5, GAN: lr=0.0002lr=0.0002)
Batch Size 32
Regularization Dropout (0.5), Early Stopping (patience=5)
Learning Rate Scheduling Reduce on Plateau (gamma=0.5)
Data Augmentation Rotation, flips, shear, zoom
5.1.1 Precision
Precision, the true positive rate for all predicted fakes is paramount in detecting deepfakes to prevent falsely classifying valid content. The hybrid model registers ~91% precision (epoch 10) by combining the strengths of three parts: CNN identifies local defects (e.g., abnormal texture), EfficientNetV2 identifies structural defects using pre-trained features, and the GAN discriminator detects adversarial cues (e.g., pixel differences). First low (~53% at epoch 1), precision increases to ~83.5% at epoch 3 as EfficientNetV2's multi-resolution feature extraction becomes more effective. Figure 9 depicts the precision during training epochs.
5.1.1 Recall
Recall, defined as the ratio of correctly detected forged images (true positives) out of all real forged instances (true positives + false negatives), is essential for reducing false negatives in deepfake detection. The hybrid model, as proposed, attains a recall of ~91% at epoch 10, indicating that it can detect most forged images while reducing false negatives. First, recall follows the model's precision and accuracy (~53% in epoch 1), since initial training stages cannot learn fine synthetic patterns. Yet, by epoch 3, recall increases to ~83.5%, fueled by pretraining in an adversarial mode for the GAN discriminator, which makes it more sensitive to pixel-level inconsistencies (e.g., inconsistent lighting, unnatural boundaries) that tend to fool conventional CNNs. Figure 10 shows the recall across training epochs. The EfficientNetV2 also improves recall by taking advantage of its compound scaling to identify structural abnormalities (e.g., facial feature misalignment), while the CNN helps by detecting localized artifacts such as texture inconsistencies. The weighted voting mechanism of the ensemble favors the high recall (~91%) of the GAN discriminator and the balanced performance of EfficientNetV2, guaranteeing strong detection of varied synthetic patterns. Interestingly, recall stabilizes at ~83.5% throughout mid-training (epochs 3–5), coinciding with validation accuracy plateaus, then jumps to ~91% upon the onset of adversarial training improvements. Such development highlights the model's potential to learn varying deepfake shifts without overfitting, corroborated by tactics such as dropout (0.5 in CNN) and early stopping (patience=5). While the recall is at a maximum of ~91%, difficulties remain in the identification of rare or emerging deepfake varieties (e.g., diffusion-based), where false negatives can occur. Overall, high recall guarantees the model's robustness in high-risk applications such as content moderation, where synthetic content failure has high risks. Future research might further increase recall by incorporating temporal or spectral analysis to compensate for changing deepfake methods.
5.1.2 F1-SCORE
The F1-Score, a harmonic mean of precision and re-call, quantifies the model’s balance between minimizing false positives (precision) and false negatives (recall). For the proposed hybrid framework, the F1-Score peaks at ~91% by epoch 10, reflecting its robust ability to harmonize these metrics and reliably classify real and fake images. Initially, the F1-Score mirrors low precision and recall values (~53% at epoch 1), as the model struggles with underfitting and noisy feature extraction. However, by epoch 3, the score rises to ~83.5%, driven by EfficientNetV2’s hierarchical feature learning and the GAN discriminator’s adversarial sensitivity to synthetic artifacts, which together refine both precision and recall. The Traditional CNN complements this by detecting localized anomalies (e.g., texture mismatches), ensuring comprehensive coverage of deepfake signatures. The F1-Score stabilizes around ~83.5% during mid-training (epochs 3–5), coinciding with validation accuracy plateaus, before surging to ~91% as the ensemble mechanism optimizes weight assignments. Figure 11 illustrates the F1score over Training Epochs. This final equilibrium highlights the model’s ability to avoid bias toward either class critical in balanced datasets while lever-aging dropout (0.5 in the CNN) and early stopping (patience=5) to prevent overfitting. Compared to standalone models (ResNet-50: ~87%, GAN-based classifiers: ~86%), the hybrid approach’s superior F1-Score underscores the value of integrating diverse architectures. However, challenges remain: rare deepfake types (e.g., diffusion-based images) may slightly reduce the F1-Score in real-world deployment due to unseen artifacts. Future enhancements, such as dynamic ensemble weighting or multimodal analysis (e.g., audio-visual consistency checks), could further improve this metric. Overall, the high F1-Score positions the model as a reliable tool for applications like content moderation or forensic analysis, where balancing precision and recall is paramount to minimizing both misinformation risks and undue censorship.
5.1.1 Confusion matrix
A confusion matrix is a basic performance evaluation tool for classification models, providing a detailed breakdown of predictions against true labels. It classifies results into four groups: True Positives (TP) identified correctly fake images; True Negatives (TN) identified correctly real images; False Positives (FP) real images incorrectly classified as fake (over-detection); and False Negatives (FN) fake images incorrectly classified as real (missed detections). As opposed to accuracy, which is expressed as one success rate, the confusion matrix uncovers differentiated strengths and weaknesses that are very important for functions such as detecting deepfakes, where different types of errors have varying repercussions. For example, high false positive rates risk the dissemination of unsuspected synthetics. The Confusion matrix is depicted in Figure 12. From this matrix, the following key measures are extracted: precision (TP / (TP + FP)) quantifies the accuracy of positive predictions, recall (TP / (TP + FN)) measures the model's capacity to find all positives, and the F1-score reconciles both. For deepfake detection, a confusion matrix could report excellent recall (91%) but somewhat poorer precision (86%), reflecting effective fake detection at the expense of some false positives. Visualizing this matrix (e.g., through heatmaps) emphasizes class-specific mistakes, informing focused improvements—like increasing training data for underrepresented types of fakes or modifying classification thresholds. Although mostly applied to binary tasks, it can be applied to multiclass tasks. For the hybrid model suggested, the matrix confirmed its balanced performance with little FP/FN differences, providing practical reliability in real-world use cases such as content moderation. By breaking down error patterns, the confusion matrix is still invaluable for tuning model robustness and explain ability.
5.2 | Comparative Analysis
The comparative analysis of existing and proposed models reveals significant performance disparities, emphasizing the efficacy of the hybrid framework. Among existing models, Xception achieves the highest accuracy (91.3%) and AUC-ROC (0.95), outperforming ResNet-50 (89.5%), DenseNet-121 (90.1%), and VGG-16 (85.2%), primarily due to its depthwise separable convolutions optimizing feature extraction. However, all existing models exhibit limitations: ResNet-50 and DenseNet-121 show modest recall (0.87–0.88), struggling to detect subtle deepfakes, while the GAN-based classifier (88.6% accuracy) trades precision (0.86) for marginally better recall (0.87), reflecting its focus on synthetic artifact detection. The Basic CNN (82.4% accuracy) lags across all metrics, underscoring the need for advanced architectures. The proposed models address these gaps through strategic architectural innovations.
The Traditional CNN (87.2% accuracy) performs poorly compared to ResNet-50 and Xception but shows wellbalanced precision (0.85) and recall (0.85), providing a lightweight option for edge deployment. The EfficientNetV2 model stands out with 94.7% accuracy, 0.95 precision, and 0.98 AUC-ROC—better than all the current models. Its compound scaling method and transfer learning from ImageNet provide better generalization, as seen by a 3.4% accuracy improvement over Xception and a 0.03 AUC-ROC improvement. GAN Discriminator, though moderate in precision (89.5%), is high in recall (0.91) and beats even EfficientNetV2 (0.94) in identifying fake samples, confirming the strength of its adversarial training. Its precision (0.86) being lower indicates a compromise because it incorrectly identifies intricate real images as fake sometimes. Table 4 shows the comparative study of the current model w.r.t the new model. The Ensemble model combines these strengths harmoniously, attaining state-of-the-art performance: 96.1% accuracy, 0.95 F1-Score, and 0.99 AUC-ROC. Its weighted voting system alleviates individual weaknesses. For instance, the precision gap of GAN Discriminator and EfficientNetV2's infrequent recall failure decrease false negatives by 8% when compared to the topperforming single model (EfficientNetV2). Figures 13 and 14 show the bar graph and pie chart that depict data comparing series. Table 5 shows the tabular representation of the classification report. Interestingly, the Ensemble's AUC-ROC (0.99) illustrates near-perfect reparability, a 0.04 improvement over Xception, which is essential for high-stakes usage.
This figure bar graph represents the data comparing Series1–Series5 across epochs, training/validation phases, loss metrics, and accuracy, illustrating performance variations and trends over different evaluation categories.
This figure pie chart represents the data distribution of key training metrics, including Epoch, Training Accuracy, Training Loss, Validation Accuracy, and Validation Loss, illustrating their proportional relationships or contributions to the model is learning process. Each slice corresponds to a metric’s relative significance or performance across the training phases.
4. Conclusion
The experiment unequivocally proves that classifier selection for detecting real and fake images depends on particular operational priorities, with each model presenting unique benefits and drawbacks. EfficientNetV2 is the most accurate (94.7%) and best generalizing (AUC: 0.98) model, confirming the validity of deepfake detection using transfer learning, especially when high-confidence decisions and robustness against varied artifacts are required. Its pre-trained feature hierarchy allows for better detection of subtle inconsistencies, although it is computational requirements (training time: 2.5 hours, inference latency: 32 ms/image) might restrict deployment in low-resource settings. The Traditional CNN, although less precise (87.2%), offers a light alternative (training: 45 minutes, inference: 15 ms/image) for edge devices or real-time use, though with lower sensitivity to sophisticated synthetic methods. The GAN discriminator balances between, attaining niche excellence in identifying adversarially created imitations (recall: 91%) as a result of pretraining on synthetic artifacts, while its lower precision (86%) for actual images highlights the difficulty of repurposing adversarial networks for supervised tasks. The ensemble solution, which combines the three models, reaches the highest accuracy (96.1%) by balancing their respective strengths—EfficientNetV2's structural sensitivity, the CNN's effectiveness, and the GAN discriminator's artifact detectability—emphasizing the promise of hybrid systems in mission-critical missions. It is at the expense of additional computational overhead, which emphasizes context-specific model selection. The main limitations encompass performance instability over underrepresented deepfake categories (e.g., diffusion-based imagery) and hardware dependence, notably for EfficientNetV2. Future research is expected to entail the optimization of hybrid models (e.g., combining EfficientNet's backbone with adversarial learning), cross-dataset generalizability via domain adaptation, as well as designing quantization algorithms to democratize access to accurate models. For deployment in the real world, EfficientNetV2 is suggested for high-stakes verification systems, the CNN for use in mobile or IoT platforms, and the GAN discriminator for adversarial environments with changing synthetic threats. Ultimately, this tri-model framework advances the field by providing a versatile, empirically validated toolkit to combat deepfakes, emphasizing that no single solution is universally optimal, but strategic model selection and integration can significantly bolster detection capabilities in the face of rapidly advancing synthetic media technologies.
Data Availability- The datasets generated and analyzed during the current study are publicly available at https://www.kaggle.com/code/vijaymadaan7/gan-cnn-2.