A Dual-Branch CNN for Robust Detection of AI-Generated Facial Forgeries
1 st Xin Zhang, 2 nd Yuqi Song, 3 rd Fei Zuo · 2025
Read A Dual-Branch CNN for Robust Detection of AI-Generated Facial Forgeries by 1 st Xin Zhang, 2 nd Yuqi Song, 3 rd Fei Zuo (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-24640.txt.
Introduction
Xin Zhang, Yuqi Song, and Fei Zuo build a tool to spot fake face shots made by AI. Swaps, edits, and full fake shots can be used for fraud, lies, and harm to a name. Their net has two arms that look for clues in unlike ways.
One arm reads the plain color shot for sense clues, while the other reads wave traits that fakes often leave behind. A weight step joins the two arms and picks the most telling parts. A new loss plan guides training with hard and clear cases in mind. The aim is a spotter that holds up on new fake styles.
Catalog record
| CREATOR | 1 st Xin Zhang, 2 nd Yuqi Song, 3 rd Fei Zuo |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 27 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2510-24640
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Dual-Branch CNN for Robust Detection of AI-Generated Facial Forgeries 1 st Xin Zhang, 2 nd Yuqi Song, 3 rd Fei Zuo Abstract The rapid advancement of generative AI has enabled the creation of highly realistic forged facial images, posing significant threats to AI security, digital media integrity, and public trust. Face forgery techniques—ranging from face swapping and attribute editing to powerful diffusion-based image synthesis—are increasingly being used for malicious purposes such as misinformation, identity fraud, and defamation. This growing challenge underscores the urgent need for robust and generalizable face forgery detection methods as a critical component of AI security infrastructure. In this work, we propose a novel dual-branch convolutional neural network for face forgery detection that leverages complementary cues from both spatial and frequency domains. The RGB branch captures semantic information, while the frequency branch focuses on high-frequency artifacts that are difficult for generative models to suppress. A channel attention module is introduced to adaptively fuse these heterogeneous features, highlighting the most informative channels for forgery discrimination. To guide the network’s learning process, we design a unified loss function—FSC Loss—that combines focal loss, supervised contrastive loss, and a frequency center margin loss to enhance class separability and robustness. We evaluate our model on the DiFF benchmark, which includes forged images generated from four representative methods: text-to-image, image-to-image, face swap, and face edit. Our method achieves strong performance across all categories and outperforms average human accuracy. These results demonstrate the model’s effectiveness and its potential contribution to safeguarding AI ecosystems against visual forgery attacks. I Introduction The rapid advancement of generative artificial intelligence (AI), particularly in deep generative models such as GANs and diffusion models, has transformed the way digital images are created [ 1 ] . These models can synthesize highly realistic, photorealistic images that are virtually indistinguishable from real ones, even to trained observers [ 2 ] . While these technologies have led to remarkable progress in creative industries, advertising, entertainment, and virtual reality, they also pose significant societal threats when misused for malicious purposes [ 3 ] . Image forgeries can be exploited for identity theft, political propaganda, harassment, and large-scale misinformation campaigns, eroding trust in digital media and compromising personal and national security [ 4 ] . With the widespread dissemination of forged content on social platforms, the development of robust image forgery detection systems is more critical than ever. As illustrated in the DiFF benchmark [ 5 ] , modern image forgeries can be generated using four primary methods: (a) text-to-image (T2I) generation from textual prompts, (b) image-to-image (I2I) synthesis via fine-tuned diffusion models, (c) face swapping (FS) where the identity in a target image is replaced with a source face, and (d) face editing (FE) where attributes such as age, expression, or gender are altered using prompt-based modifications. All these techniques leverage advanced generative models that produce forgeries with highly natural textures, making detection extremely challenging. The detailed generation pipelines are shown in Fig. 1 . Fig. 1: Detailed pipelines for generating diffusion-based facial forgeries under four conditions. (a) T2I: Prompts are extracted from face images and fed into a diffusion model to synthesize new faces. (b) I2I: The dataset is divided by identities (e.g., identity a to n ), and each identity is used to fine-tune a separate diffusion model to generate diverse images of that specific identity. (c) FS: The dataset is split into source and target subsets; the diffusion model swaps identity features between the two subsets to produce realistic swapped faces. (d) FE: Prompts and face images are extracted, the prompts are modified, and the updated prompts are passed to a diffusion model to edit attributes such as expression, age, or style while preserving the core facial features. The detection challenge is evident in the DiFF dataset, where human performance is only 59.65% for text-to-image, 59.63% for image-to-image, 51.50% for face swapping, and 45.53% for face editing [ 5 ] . Such results show that even human observers struggle to reliably identify diffusion-based forgeries, highlighting the need for automated detection systems capable of capturing subtle artifacts in both spatial and frequency domains. In this paper, we propose a dual-branch CNN-based forgery detection model that integrates spatial and frequency information using channel attention fusion. The RGB branch learns semantic and structural features, while the frequency branch focuses on high-frequency residuals where imperceptible generative artifacts are often present. The two branches are fused via a channel attention module, which adaptively assigns weights to the most informative features from each branch. This design enables the network to effectively leverage complementary cues for forgery detection. To further enhance discriminative feature learning, we introduce FSC Loss (Focal–Supervised Contrastive–Center Loss), which consists of three components: focal loss [ 6 ] , supervised contrastive loss [ 7 ] , and frequency center margin loss [ 8 ] . The combination is designed to not only emphasize hard-to-classify samples (via focal loss) but also to improve the compactness and separability of feature embeddings (via supervised contrastive loss) while ensuring that frequency-domain features of real and fake images remain well-distinguished (via frequency center margin loss). Our main contributions are as follows: • We propose a dual-branch ResNet-based architecture with channel attention fusion, effectively combining spatial and frequency cues for robust forgery detection. • We design a novel FSC Loss, integrating focal, supervised contrastive, and frequency center margin objectives to improve classification performance and feature separability. • We conduct extensive experiments on the DiFF dataset, demonstrating that our approach outperforms existing detectors across all four forgery categories (T2I, I2I, FS, FE). II Realted Work The research on face forgery detection has evolved from early handcrafted forensic features to deep learning-based methods that can capture subtle artifacts introduced by modern generative models. Traditional techniques—such as splicing detection, copy-move detection, and noise inconsistency analysis—relied on pixel-level anomalies like unnatural transitions or lighting inconsistencies [ 9 , 10 ] . While effective for conventional image tampering, these methods fail on AI-generated forgeries, which exhibit smooth textures and high photorealism. With the rise of GAN-based deepfakes, CNNs became the foundation of forgery detection. XceptionNet demonstrated strong performance by capturing pixel-level manipulation patterns [ 11 , 12 ] , while Face X-ray [ 13 ] improved detection by focusing on blending artifacts near manipulated boundaries. To better generalize to unseen forgeries, frequency-domain methods have been explored. It has been shown that GAN-generated images exhibit distinctive anomalies in the Fourier spectrum [ 14 , 15 ] . F3-Net [ 16 ] combines spatial and frequency cues in a multi-branch architecture, leading to robust performance across manipulation types. More recently, attention mechanisms [ 17 ] and transformer-based models [ 18 ] have been applied to focus on manipulation-prone regions and long-range dependencies. However, diffusion models pose a new challenge, as their iterative denoising process produces fewer frequency artifacts and more natural textures [ 19 , 20 ] , making traditional GAN-trained detectors less effective. This motivates hybrid approaches which captures both spatial structures and high-frequency residual cues to address diffusion-based forgeries. III Proposed Method The overall pipeline of our proposed face forgery detection model is illustrated in Figure 2 . Our framework adopts a dual-branch architecture that leverages both RGB and frequency-domain cues to enhance detection robustness.