Source-linked AI summary
Swin Meets EfficientNet: Lightweight Architectures for GAN-Based Face Forensics
Sejuti Basu, Ashima Sood, Vijay Kumar, Sahil Sharma
TL;DR
Photorealistic GAN-generated faces make image-only forgery detection difficult because detectors must balance local artefact sensitivity with global facial-context modelling. The paper evaluates compact and pretrained Swin variants plus an EfficientNet-B0-Swin hybrid, whose 99% accuracy and 99.44% recall on 5,000 test images outperform the compared detectors on this benchmark.
Problem
The paper asks how Swin-based architectures perform against robust CNN baselines for image-only detection of GAN-generated synthetic faces.
Method
It evaluates task-specific and ImageNet-pretrained Swin variants alongside an EfficientNet-B0 hybrid using shifted-window self-attention on the 140K Real and Fake Faces dataset.
Results
99% accuracy and 99.44% recall were achieved by the EfficientNet-B0+Swin hybrid on a balanced 5,000-image test set, surpassing the compared Swin and CNN detectors.
Takeaways & Limitations
Combining mid-level convolutional features with shifted-window self-attention is a viable lightweight design for binary GAN-based face detection.
Takeaways & Limitations
The evaluation is limited to static images, one GAN generator family, and one benchmark dataset, so it provides controlled architectural evidence rather than comprehensive real-world robustness.
Abstract
from arXiv · showhide
Modern generative models, such as GANs, diffusion architectures, and autoregressive systems, now produce facial images that are nearly indistinguishable from authentic photographs. This capability makes detecting forged images increasingly difficult, raising serious concerns about identity theft, fraud, and misinformation campaigns. Our research focuses specifically on GAN-generated synthetic faces, which underpin many face-centric deepfakes, and investigates efficient detection approaches using image analysis alone. Existing detection systems rely heavily on either convolutional neural networks (CNNs) or global vision transformers. While CNNs excel at identifying texture-based local features, they struggle with broader contextual understanding. Traditional Vision Transformer (ViT) models can capture long-range structures effectively, but demand substantial computational resources. Our work explores Swin-Transformer-based architectures across three implementations: a compact Swin Transformer trained from the ground up, ImageNet-1K pre-trained Swin-Tiny and Swin-Small models adapted for binary classification, and a novel hybrid combining EfficientNet-B0's convolutional processing with a Swin Transformer backend. We evaluated all models using the 140K Real and Fake Faces dataset, which includes StyleGAN-generated fake faces alongside authentic images from Flickr and DFDC, with balanced splits for training, validation, and testing. The EfficientNetB0+Swin hybrid achieved 99% accuracy and a 99.44% recall on 5,000 test images, outperforming both pure Swin variants and a previous CNN-only baseline on this dataset. Our results suggest that combining hierarchical CNN features with shifted-window self-attention provides an efficient and computationally lightweight method for detecting GAN-generated synthetic faces.
1 Introduction
The paper addresses image-only detection of GAN-generated synthetic faces amid growing risks from photorealistic synthetic media. It evaluates Swin-based designs, including a lightweight EfficientNet-Swin hybrid, on a controlled benchmark.
- Motivation: Deepfake detection must capture both local artefacts and global facial structure, whereas CNNs emphasize locality and transformers provide broader context.Relevant evidence includes texture inconsistencies, blending artefacts, abnormal noise, and cross-region facial consistency.
- Research question: The study focuses on StyleGAN-like synthetic faces and asks how Swin architectures compare with robust CNN baselines under practical computational constraints.The evaluation uses the 140K Real and Fake Faces dataset as a controlled testbed.
- Contributions: The study systematically varies Swin patch size, window size, and training regime, including training from scratch and transfer learning.These design choices are evaluated for GAN-generated synthetic-face detection.
- Contributions: The proposed hybrid combines EfficientNet-B0 convolutional features with shifted-window self-attention to model local artefacts and global facial context at lower cost than standard ViT.The architecture is designed to maintain a significantly lighter computational profile.
- Results: 99% accuracy and 99.44% recall were achieved by EfficientNet+Swin on 5,000 test images, surpassing solely Swin-based and CNN-based detectors on the benchmark.The comparison is reported for the 140K Real and Fake Faces dataset.
2 Related Work
Related work spans CNN detectors, global transformer and hybrid models, and Swin architectures. This paper positions Swin-based hybrids as a resource-aware middle ground between CNN locality and global ViT context.
- CNN-based detectors: CNN detectors remain dominant because locality bias supports strong accuracy-efficiency trade-offs for spatial artefacts and abnormal noise.Examples include VGG, ResNet, Xception, and EfficientNet adaptations.
- Transformer and hybrid detectors: Vision transformers use self-attention across image patches to model long-range inconsistencies in facial layout, illumination, and geometry.Hybrid CNN-transformer systems combine local and global cues for forgery detection.
- Swin-Transformer approaches: Swin confines attention to windows and shifts those windows between layers, producing hierarchical representations with complexity that scales linearly with image size.This design addresses scalability challenges associated with global self-attention.
- Positioning and scope: The paper targets GAN-based synthetic faces with architectures trainable and deployable under limited computational resources.Its Swin configurations are presented as a compact, reproducible framework rather than a single maximally large model.
- Positioning and scope: Well-designed Swin-based and hybrid models can match or exceed robust CNN baselines without large-scale training or advanced hardware on a GAN-based dataset.The contribution is framed as resource-efficient synthetic-face forensics.
3 Method
The method formulates GAN-face detection as binary image classification and instantiates compact Swin, pretrained Swin, and EfficientNet-Swin configurations. The hybrid combines convolutional detail with shifted-window contextual modelling for lightweight detection.
- Problem formulation: The detector distinguishes authentic faces from GAN-generated synthetic faces using cropped RGB images and image-only processing.The task excludes temporal information and extra metadata.
- Training setup: Models are trained as binary classifiers with standard binary cross-entropy on a balanced subset of the 140K dataset.The subset contains 25,000 training, 5,000 validation, and 5,000 test images.
- Swin backbone: Swin uses patch tokens, window attention, shifted-window attention, MLP residual blocks, and patch merging to build a multiscale feature pyramid.Early stages model local texture and boundary artefacts, while deeper stages assess broader facial coherence.
- Swin Base: The Swin Base variant is a compact model trained from scratch with low resolution and small windows to reduce parameters and FLOPs.It serves as a no-pretraining baseline for evaluating Swin and transfer-learning advantages.
- Swin Transfer: Swin Transfer fine-tunes ImageNet-1K-pretrained Swin-Tiny2 and Swin-Small backbones after replacing the classification head with a sigmoid unit.The two backbones support comparison of accuracy-efficiency trade-offs within the Swin family.
- Hybrid integration: The hybrid processes 384 × 384 faces with EfficientNet-B0, applies Swin attention to intermediate features, fuses pooled branch outputs, and predicts pθ(I).This design combines spatially detailed mid-level features with compressed high-level EfficientNet semantics.
- Method outcome: The EfficientNet+Swin hybrid significantly surpasses pure Swin variants and the prior CNN-only baseline while remaining compact for standard computational constraints.The method is presented as suitable for practical deployment.
4 Experiments and Discussion
The experiments compare compact and pretrained Swin variants with an EfficientNet+Swin hybrid on balanced 140K Real and Fake Faces splits. The hybrid achieves the strongest reported performance, while qualitative visualizations associate it with both local artifact and broader facial-region attention.
- Experimental setup: All models use the 140K Real and Fake Faces dataset with balanced splits, while input size and training configurations vary across backbones.The dataset contains authentic and StyleGAN-generated faces; the supplied passages specify shared balanced splits and model-specific settings.
- Quantitative results: The Swin Base model trained from scratch reaches 88.50% accuracy, while ImageNet-pretrained Swin-Tiny reaches 91.13%.The corresponding F1-scores are 88.00% and 91.14%, respectively.
- Quantitative results: 89.14% accuracy: Swin-Small performs below Swin-Tiny despite greater capacity and longer training.Its F1-score is 89.13%, and the passage states that increasing model size alone does not inherently improve this binary task.
- Qualitative analysis: Grad-CAM visualizations show the hybrid attending to local texture and boundary artifacts as well as broader facial regions, unlike the more localized EfficientNet baseline.The passage interprets this qualitative pattern as evidence that the Swin head contributes contextual reasoning beyond CNN feature reweighting.
- Limitations: The evaluation is limited to one dataset and the StyleGAN generator family, so the findings are controlled GAN-based evidence rather than complete real-world robustness.The authors call for cross-dataset and cross-generator testing and extension to video deepfakes.
5 Conclusion and Future Scope
The conclusion frames the study as a resource-aware evaluation of Swin architectures for StyleGAN-based synthetic-face detection. The EfficientNet-B0+Swin hybrid performs best in the tested binary setting, but broader validation remains necessary.
- Conclusion: The study evaluates Swin architectures for GAN-based synthetic-face detection under defined computational constraints using StyleGAN faces from the 140K dataset.The conclusion characterizes the test as a binary GAN configuration.
- Conclusion: The compact Swin model matches a robust ELA+CNN baseline, Swin-Tiny provides moderate improvement, and Swin-Small adds no benefit.This conclusion summarizes the comparative pattern across the tested Swin configurations.
- Conclusion: 99% accuracy and 99.44% recall: the EfficientNet-B0+Swin hybrid performs best on a balanced 5,000-image test set and is trainable on standard hardware.The conclusion presents the hybrid as a viable design approach for this binary GAN configuration.
- Future scope: The evidence is restricted to static images, one GAN generator category, and one benchmark dataset, requiring replication across datasets and generator families.The authors identify diffusion, autoregressive, video, and resource-aware benchmarking as future directions.