Abstract
Deepfake content forgery compromises the integrity of digital media and the protection of personal identity, making its detection essential for preserving trust and enabling effective forensic analysis. Most deepfake detection approaches focus on global classification with a binary decision, which is inadequate for precise localization of manipulated regions. This limitation becomes particularly evident under image processing distortions. This paper proposes a dual-decoder architecture for the detection and segmentation of original and deepfake facial manipulations. Unlike conventional single-decoder segmentation models, the proposed approach introduces two decoding branches that learn complementary feature representations of authentic and forgery facial textures. In addition, attention mechanism modules are incorporated to refine encoder features based on decoder context, introducing adaptive feature selection during reconstruction. This architectural design reduces feature interference during reconstruction and enhances the localization of subtle inconsistencies introduced by deepfake manipulations. This approach generates complementary masks for real and forged regions, providing more precise boundary delineation. Experimental results highlight the robustness of the proposed method under image processing distortions, achieving intersection over union (IoU) scores of 0.9387 for real faces and 0.9254 for deepfake segmentation. These results underscore the effectiveness of the dual-decoder architecture in accurately detecting and localizing deepfake facial manipulations.
1. Introduction
The distribution of manipulated digital content via social media platforms, particularly deepfakes, generates challenges to personal identity and media integrity. Deepfakes modify images or videos by adding, replacing, or removing people or objects and manipulating facial regions to compromise the authenticity of the content. These manipulations contribute to disinformation, fraud, and malicious image forgery. For this reason, it is necessary to generate an accurate method for detection and precise localization, which are essential for verifying authenticity and enabling interpretable forensic analysis [1,2,3,4,5,6].
The detection of manipulated facial content is essential for verifying authenticity, preventing the dissemination of forged images, and protecting individual identity by accurately identifying authentic and altered regions. In this context, faces are the primary targets of deepfake manipulation and subtle manipulations are difficult to detect, particularly combined with common image processing distortions such as compression, scaling, cropping, noise, and blurring. In this context, deep learning models can identify features between real and manipulated faces, achieving a robust performance across different manipulation techniques; meanwhile, global binary classification methods lack the spatial resolution to localize manipulations, limiting interpretability and forensic reliability [7,8].
The segmentation of deepfake and authentic faces in digital images provides valuable information for the detection of image forgery. In this context, neural networks have demonstrated the ability to accurately recognize manipulated facial regions, even in the presence of common image distortions such as compression, scaling, noise, or blurring. Recent studies have explored diverse neural network architectures to improve the segmentation of deepfake faces; however, most approaches focus primarily on the localization of forged regions. Several relevant methods have been proposed in the literature. Chang et al. [9] introduced NA-VGG, a network based on the VGG16 model combined with Spatial Rich Model (SRM) features to extract residual noise, enabling the detection of subtle forgeries. Yu et al. [10] employed the SegNet architecture as a separable convolutional neural network (CNN) with ensemble learning for image segmentation. Wang et al. [11] proposed a facial semantic segmentation approach combined with binary classification using ASPP with Xception modules and a DeepLabV3-based decoder, improving segmentation accuracy through contextual information. Nirkin et al. [12] employed a dual-network approach combining facial segmentation and context recognition, enhancing detection performance. Abdulla [13] used a DenseNet121 for image segmentation, focusing on local feature extraction. Wang et al. [14] introduced a two-stage method using residual spatial maps and a weighted fusion strategy with spatial attention. Sekar et al. [15] combined feature extraction using Gabor filters, ResNet-50, and attention mechanisms. Jagam et al. [16] focused on fast training from a CNN with eight layers, which was developed to detect deepfakes. Kurniawan [17] focused on real-time deepfake detection using a YOLOv11. Additionally, Alsolai et al. [18] combined Vision Transformers and temporal modeling with long short-term memory (LSTM) and attention mechanisms to improve detection in video sequences. Gupta et al. [19] proposed a framework combining attention-enhanced convolutional networks with quantum components to improve feature representation and model efficiency. Their approach highlights the importance of focusing on the manipulation of facial regions and improving generalization across datasets.
Most deepfake detection research methodologies realize a binary classification, determining whether an image or video is real or fake. To address these limitations, we propose a dual-decoder neural network architecture that separates feature representations of authentic and manipulated facial regions within a unified architecture. One decoder emphasizes the localization of forged regions at the pixel level, while the other focuses on segmenting authentic facial areas. The features from both classes are processed in both branches, and the network reduces interference between real and manipulated features. In addition, attention modules are incorporated to selectively refine encoder features based on decoder context to enhance boundary precision and detection of subtle deepfake artifacts. This approach generates complementary masks for real and manipulated regions, providing a structured representation to improve forensic analysis and automated verification tasks that also maintains robustness under challenging image conditions. The main contributions consist of the following:
- The dual-decoder architecture enhances the localization of manipulated regions by separating specific features, increasing the robustness against common image distortions, including compression, scaling, cropping, noise, and blurring.
- The proposed architecture generates complementary masks, improving interpretability and providing pixel-level localization of both authentic and forged facial regions.
- The dual-decoder architecture employs attention mechanisms to improve boundary precision by detecting subtle manipulations that conventional single-decoder segmentation models and global classifiers often fail to capture.
- The unified segmentation framework enables multitask learning while maintaining high accuracy for both authentic and manipulated regions.
- The dual-decoder outputs provide structured masks that support subsequent forensic applications, including automated verification, forgery localization, and confidence estimation.
The next section reviews related work to provide context for the proposed methodology and highlight existing approaches for detecting and segmenting authentic and deepfake faces.
2. Materials and Methods
2.1. Materials
The OpenForensics dataset [20] was employed for training and validation, comprising 41,194 images, with 20% allocated for validation. The OpenForensics dataset includes labels for authentic and manipulated facial regions. The dataset consists of two subsets: a Train set containing undistorted images and a Test Challenge set including images affected by various digital distortions, such as noise addition, filtering, brightness variations, grayscale conversion, and cropping. Additionally, the proposed neural network was evaluated using 6028 undistorted images from the Test set and 6670 distorted images from the Test Challenge set.
The algorithm was implemented in Python 3.11.5 using the PyTorch 2.1.0+cu118 framework and executed on an NVIDIA GTX 4050 GPU and an Intel Core i7-155H processor (4.8 GHz) running Windows 11. This configuration ensured efficient processing during model training and evaluation.
2.2. Proposed Dual-Decoder for Authentic and Manipulated Deepfake Face Segmentation
The proposed neural network learns discriminative visual patterns to accurately detect and segment forged regions, enabling explicit localization of regions of interest in both authentic and manipulated faces. This enhances image analysis by providing spatial information, in contrast to most of the conventional approaches that are limited to image-level classification.
The designed architecture enhances the robustness of the segmentation against common image processing distortions. The overall architecture of the proposed method is illustrated in Figure 1.
Figure 1.
Dual-decoder neural network.
The proposed architecture is designed with a dual-decoder structure for the segmentation of authentic and manipulated facial regions [21]. Each branch learns complementary feature representations to capture consistent facial patterns and subtle inconsistencies introduced by manipulation.
One branch focuses on modeling the structures and textures of authentic faces, such as smooth boundaries and natural appearance. In parallel, the second branch detects anomalous patterns, like inconsistencies introduced during face manipulation processes. This complementary learning strategy improves the segmentation performance. The learning of each branch is based on pixel annotations provided by the OpenForensics dataset, which include labels for authentic and manipulated facial regions.
This strategy enhances the segmentation performance and robustness in challenging scenarios such as partial manipulations, boundary overlaps, and ambiguous regions near hair, accessories, and occlusions.
Furthermore, residual blocks are incorporated into the encoder to facilitate feature propagation and stabilize training, while attention mechanisms are introduced in the decoder to refine feature selection during the upsampling stages. These mechanisms emphasize relevant spatial regions, enhancing segmentation accuracy. The detailed configuration of the neural network is presented in Table 1.
Table 1.
Configuration of the layers from the proposed U-Net with dual-decoder.
The neural network is trained using pairs of input images and their corresponding masks , where and contain the authentic and manipulated regions for the neural network learning. Each pixel location encodes the belonging class. Given an input image , the proposed model learns the following mapping (1):
where the neural network simultaneously predicts two segmentation masks, which are presented as follows (2):
where represents the predicted mask for authentic regions, while corresponds to the predicted mask for manipulated regions. This complementary representation models facial consistency and the other emphasizes the detection of anomalous patterns.
The encoder employs residual blocks (Resblock, Figure 2), which facilitate the learning of hierarchical features by mitigating the vanishing gradient problem and improving feature propagation [22,23]. The residual blocks consist of a shortcut connection with a convolution kernel of 1 × 1 to match the input and the output feature map size. In addition, two CNNs with a kernel of 3 × 3 are employed, and each block uses a stride of 1 and padding of 1 to preserve the feature maps. A batch normalization is applied to stabilize the training of the neural network, followed by a ReLU activation function.
Figure 2.
Residual block diagram.
The operation of a residual block can be expressed as follows (3):
where represents the input feature maps, and denotes the residual feature maps learned by the convolutional layers, with corresponding to the linear projection induced by the convolution in the shortcut block.
Therefore, each decoder begins with a transposed convolutional layer (TCNN) to increase resolution of the feature maps. The transposed convolution produces an upsample feature map. This operation can be interpreted as an upsampling process that refines the identification of face feature regions. The transposed convolution can be formally expressed as follows (4):
where denotes the kernel associated with the transposed convolution, and represents the transposed convolution operation. This operation is employed to reconstruct spatial details from feature maps. The transposed convolution at the beginning of each decoding stage ensures an appropriate spatial scale. Subsequently, the UpConv blocks are incorporated, and they employ attention mechanisms to refine the feature information for the predicted mask (Figure 3).
Figure 3.
(a) UpConv block, (b) attention mechanism.
The UpConv operation can be expressed as follows (5):
where Xe represents the input feature maps from the encoder skip connection upsample layer, Xd is the output of the TCNN and Xat is the output of the attention mechanism.
The attention mechanism is relevant for deepfake detection, where the forgeries are subtle. Conventional skip connections propagate encoder features without discrimination, introducing noise. In contrast, the attention module enables adaptive feature selection, prioritizing boundary detection for the localization of image manipulations that are difficult to identify using standard encoder–decoder architectures. First, both feature maps and are transform by δ, which consists of 1 × 1 convolutions, to project them into a common feature space. This can be expressed as follows (6):
Subsequently, a scalar attention coefficient map is generated by the following sigmoid activation (7):
where denotes the layers operations. Finally, the attention map modulates the encoder features through the following (8):
The resulting feature map suppresses features before being fused with the decoder. The dual-decoder realizes a feature disentanglement. Each decoder generates predicted masks using encoder representations (9) and (10), which are as follows:
This design focuses on each decoder branch learning complementary representations. Specifically, one branch focuses on modeling natural texture and structural consistency associated with authentic faces, while the other emphasizes image inconsistencies and localized distortions from manipulated regions. Through the separation of these objectives, the proposed architecture reduces feature interference between classes, enhancing the localization of facial manipulations that are difficult to capture using conventional single-decoder architectures.
In this context single-decoder architectures have demonstrated strong performance in image segmentation tasks, particularly in identifying regions of interest in manipulated images [24,25]. However, conventional designs may present some limitations for segmenting classes with similar visual patterns, such as authentic and deepfake faces. To overcome this limitation, the architecture with a dual-decoder is employed to learn independent features and avoid interference between classes [26,27,28,29], improving the precision of authentic and deepfake face segmentation.
To optimize network training, a set of hyperparameters and training strategies were used, as defined in Table 2.
Table 2.
Training hyperparameters.
The proposed loss function is designed for the segmentation of subtle, original facial and deepfake manipulation classes, where accuracy and boundary precision are critical. The employed composite loss combines the Binary Cross-Entropy (BCE), Dice, and intersection over union (IoU) losses with a boundary consistency term to optimize pixel classification, region overlap, and boundary localization.
The BCE loss ensures stable pixel classification between manipulated and authentic regions, which can be depicted as follows (11):
where is the ground truth label, is the predicted mask, and N represents the total pixels in the image. The term Çdigit represents the scheduling of the learning rate and the regularization coefficient. Both parameters are periodically adjusted every 30 epochs to improve training stability and feature discrimination.
Specifically, the learning rate is updated to refine the optimization process, while the regularization coefficient is progressively reduced as an optimization learning strategy. The model initially learns robust feature representations under stronger regularization and later focuses on finer adjustments.
The update interval of 30 epochs was selected to balance training stability and adaptability, providing sufficient time for the model to learn the most important patterns before applying further adjustments. The learning rate decayed by a factor of 0.005 every 30 epochs. This strategy stabilizes gradient updates and improves the discrimination between manipulated and authentic regions at the local level.
The Dice Loss () evaluates the overlap between the predicted mask and the ground truth mask. It is defined as follows (12):
This term effectively addresses class imbalance and improves the segmentation of subtle manipulated regions. The IoU Loss () measures the ratio between the intersection (∩) and the union (∪) of the predicted and ground truth masks. It is depicted as follows (13):
where directly penalizes the proportion of overlap relative to the total union, making it a widely used metric for object segmentation. To enhance boundary localization, the is introduce, which is a consistency term based on spatial gradients and can be depicted as follows (14):
This term enhances boundary delineation between authentic and manipulated regions by incorporating edge information derived from image gradients into the learning process. Since image gradients capture intensity variations corresponding to structural transitions, they enable more accurate extraction of edge information for precise segmentation of both classes, especially near region boundaries. As a result, it improves convergence behavior and strengthens structural transitions in the localization of deepfake forgeries. The boundary loss is incorporated as an additional component in the overall loss function.
The total loss is expressed as (15), where the loss function includes the boundary consistency term. This loss function reduces feature interference and improves the localization of subtle deepfake manipulations, and is depicted as follows:
where the loss for each branch is defined as (16), where each decoder is optimized independently.
To ensure a stable convergence, all weights were set to 1 () during the initial training (100 epochs). However, the fine-tunning stage improved the IoU metric, and so the weights were adjusted to . The selection and impact of these values are further justified through the ablation study.
The proposed method combines a dual-decoder architecture with a composite loss function to achieve accurate and robust segmentation of authentic and manipulated facial regions. The loss function optimize pixel segmentation accuracy, region overlapping, and boundary consistency to captures subtle deepfake forgeries.
3. Results
The proposed dual-decoder architecture was evaluated through a series of experiments to validate its effectiveness for the segmentation of authentic and deepfake face manipulations. The experiments assessed the robustness under standard conditions and the robustness of the method against common image processing distortions, including JPEG compression, scaling, cropping, noise addition, and blurring. The results demonstrate that the proposed neural network identifies manipulated regions under challenging conditions.
3.1. Quantitative Performance Evaluation Under Image Distortions
The proposed segmentation method was evaluated using mean Dice score, mean intersection over union (IoU), accuracy, mean F1 score, and Area Under the ROC Curve (AUC), providing a comprehensive assessment of pixel-level classification, region overlap, and discrimination capability.
The Dice score measures the overlap between predicted and ground truth masks and is defined as follows (17):
where Tp represents the true positives, which are the pixels correctly classified; the false positives Fp are pixels incorrectly classified; the true negatives Tn are the pixels that are not manipulated and are correctly identified as non-manipulated; and finally, the false negatives Fn are pixels that belong to a class but were missed by the prediction.
The IoU evaluates the ratio of the overlapping area between the predicted mask and the ground truth and indicates a segmentation accuracy (18).
Additionally, accuracy, F1-score, and AUC are computed. The F1-score reflects the balance between precision and recall. The accuracy evaluates the overall pixel classification, and AUC measures the discrimination between authentic and manipulated regions
Table 3 presents the robustness of the proposed dual-decoder neural network for the segmentation of authentic and deepfake facial regions under various image distortions. The F1-score is adopted as a key indicator of segmentation balance, as it captures the relation between precision and recall.
Table 3.
Performance of the proposed dual-decoder neural network for authentic and deepfake face segmentation.
To evaluate the robustness of the proposed method, controlled distortion experiments were conducted. Each distortion type was applied independently to the same set of test images to ensure a fair comparison across conditions. In the case of random distortion, the transformation was applied following the protocol defined in the Test Challenge image set from the OpenForensics dataset benchmark, where distortions are randomly assigned. This setting was preserved to ensure consistency with the original evaluation framework.
Table 3 demonstrates the robustness of the proposed method under common image processing distortions. The results demonstrate that the model segmentation performance across authentic and deepfake regions is consistent. The performance remains stable under JPEG compression with different quality factors QF (QF = 70 and QF = 30).
Under Gaussian noise (), the Dice score decreases. This behavior suggests that manipulated features are more sensitive to distortions that affect boundary consistency. Similarly, salt and pepper noise () introduces noticeable degradation, although the model maintains a consistent performance.
In contrast, the method shows a high robustness against image blurring (kernel ) and gamma correction. Additionally, accuracy and AUC values remain consistent (above 0.98 and ~0.94, respectively), demonstrating the robustness of the model across different conditions.
These results indicate that the proposed architecture effectively learns robust and complementary feature representations for an accurate localization of manipulated regions, maintaining a consistent performance against image distortions. Additionally, Figure 4 shows the distribution of IoU scores for both real and deepfake face segmentation.
Figure 4.
Distribution of the IoU scores for real face and deepfake segmentation.
Figure 4 illustrates the distribution of IoU values for the predicted segmentation masks. The results show low variance, particularly for deepfake regions, indicating stable and consistent segmentation performance. In contrast, slightly higher variability is observed for real face segmentation, with lower minimum IoU values (around 0.90), which may be attributed to the greater complexity and variability of authentic facial textures.
3.2. Qualitative Evaluation of Deepfake Segmentation
Table 4 presents a visual comparison between the ground truth masks and the predictions generated by the proposed architecture. The results depict that each decoder branch efficiently identifies patterns from the corresponding class, even under for subtle manipulations.
Table 4.
Qualitive comparison.
Table 4 presents the qualitative results from the segmentation performance of the proposed model under undistorted conditions. The comparison between the ground truth and the predicted masks shows a high similarity. Additionally, the results exhibit accurate boundaries detection, with minimal misclassification. Overall, Table 5 demonstrates that the proposed dual-decoder architecture achieves precise segmentation under standard conditions, consistent with the quantitative results.
Table 5.
Cross-dataset validation of the proposed method.
3.3. Cross-Dataset Validation
To evaluate the generalization capability of the proposed method, an additional experiment was conducted by validating the trained neural network on a different dataset without applying any fine-tuning. Specifically, the FaceForensics++ dataset was used to assess the performance of the trained model under cross-dataset conditions. All evaluations were performed using images without additional distortions.
As expected, Table 5 shows a decrease in performance when the model is evaluated on the FaceForensics++ dataset. This can be attributed to the fact that the model was trained on the OpenForensics dataset, which consists of image data with more evident forgeries and precise annotations for authentic and manipulated facial regions, facilitating spatial patterns learning. In contrast, FaceForensics++ includes more subtle manipulations and focuses on video facial modifications, such as expression changes and identity alterations. These differences in data distribution impact on the performance of the neural network generalization.
Despite this, the proposed method maintains competitive performance, suggesting that the learned latent representations capture features that do not depend on a specific dataset.
3.4. Comparative Analysis of Neural Network Architectures
The proposed method is compared against other neural network architectures by analyzing its segmentation accuracy. Figure 5 presents the accuracy comparison, while Figure 6 shows the corresponding inference time for each model.
Figure 5.
Neural network performance comparison.
Figure 6.
Inference processing time.
The results in Figure 5 indicate that the proposed dual-decoder neural network outperforms the evaluated architectures in terms of segmentation accuracy. This improvement can be attributed to the separation of authentic and deepfake regions, ensuring that it learns specialized patterns to discriminate feature representations. In contrast, conventional architectures focus on single decoding, which mixes feature representations and leads to less precise localization of manipulated regions.
In addition, the computational efficiency of the proposed architecture was evaluated. As shown in Figure 6, the proposed model achieves lower inference time compared to other neural networks. This computational efficiency is achieved through the encoder feature sharing design of the dual-decoder architecture, which enables effective feature reuse while avoiding unnecessary computational overhead.
3.5. Comparison with State-of-the-Art Methods
The proposed method is compared with other approaches reported in the literature, using the performance metrics provided by their respective authors.
The results in Table 6 show that the proposed method achieves high robustness and efficiency, outperforming or matching several existing approaches. These results highlight its effectiveness for the segmentation of precise, localized manipulated facial regions.
Table 6.
Comparative analysis of the proposed and existing method.
Many existing approaches focus on binary deepfake detection without providing spatial localization or are limited to detecting deepfakes without identifying the manipulated regions. In contrast, the proposed method performs pixel segmentation of authentic and manipulated facial regions, explicitly separating the two classes. This provides a visual analysis of facial content and improves the identification of subtle deepfakes.
The model must simultaneously segment both authentic and manipulated regions, introducing more complex feature learning. If the approach were restricted to only deepfake segmentation, a higher performance could be achieved by focusing on features of manipulated areas. However, the proposed dual-decoder architecture is designed to provide a more complete image analysis.
However, a performance decrease is observed when the model is evaluated on the FaceForensics dataset, where accuracy and AUC decrease to 96% and 81%, respectively. This reduction can be attributed to the nature of the dataset, which consists of video sequences. The proposed method focus on images, and it does not correctly identify model temporal features on consecutive frames.
3.6. Ablation Study
To analyze the contribution of the proposed architecture, this section evaluates the impact of both the loss function components and the network structure. First, the effect of the composite loss function is assessed by removing individual terms, in order to analyze their impact on segmentation accuracy.
Table 7 demonstrates the effect of each component of the proposed loss function on deepfake segmentation. Removing the BCE term results in a significant performance decrease, highlighting its importance in stabilizing pixel-wise classification during segmentation. Excluding the IoU term reduces the overlap refinement between the predicted masks and the ground truth. In addition, removing the Dice component increases errors in imbalanced classes, negatively affecting the segmentation of small or subtle regions. Finally, eliminating the boundary term leads to errors in edge detection, since this component contributes to the generation of a precise localization of manipulated facial regions. Overall, this analysis demonstrates that each component improves the deepfake segmentation performance of the proposed model.
Table 7.
Ablation study of loss function components.
Additionally, the architectural design is analyzed by comparing the proposed model with different configurations: a standard U-Net architecture, a dual-decoder network, and the proposed dual-decoder architecture with attention modules. This comparison highlights the role of attention mechanisms in enhancing feature representation and improving the localization and accuracy of segmentation.
Table 8 compares different architectural configurations of the neural network. The U-Net model achieves the lowest performance for multitask segmentation. On the other hand, the dual-decoder architecture improves the results by separating feature learning for authentic and deepfake regions, allowing each branch to specialize and enhancing overall segmentation accuracy. Additionally, the proposed dual-decoder architecture with attention mechanisms achieves the best segmentation accuracy due to the attention mechanisms, which improve feature selection by focusing on the relevant patterns. This enables the detection of subtle patterns and enhances deepfake segmentation performance.
Table 8.
Abalation study for different neural networks architectures.
Table 9 presents the ablation study conducted on the gain parameters . The baseline configuration set the gains equal to one (1,1,1,1). Therefore, the fine-tuning adjusts the contribution of this component.
Table 9.
Ablation study of loss function gains.
The baseline configuration, where all gains are equally set to one, provides a balanced reference. However, this configuration does not make for an efficient boundary segmentation. The balanced configuration decreases IoU performance, particularly for deepfake regions, suggesting that these components affect spatial localization. Similarly, the skewed configuration indicates a deficient balance between region accuracy and boundary refinement.
In contrast, the proposed configuration achieves the best overall performance, with significant improvements in both deepfake and authentic IoUs, as well as AUC scores. These results demonstrate that increasing the contribution of terms related to structural consistency and boundary information generates an accurate segmentation of manipulated and authentic regions.
The ablation study confirms that the optimal performance is obtained when the gain parameters are fine-tuned from the initial equal setting, enabling a more effective balance between detection sensitivity and segmentation precision.
4. Discussion
Figure 5 shows that the proposed dual branch architecture achieves higher accuracy compared with other neural network architectures. This improvement can be attributed to the dual-decoder design, which learns specific patterns from authentic and deepfake facial regions.
In contrast, pretrained neural networks exhibit lower accuracy, because a subset of layers is fine-tuned, limiting feature learning. In this context, the proposed architecture is trained end-to-end, resulting in more stable and discriminative feature representations for accurate segmentation.
Table 3 demonstrates the robustness of the proposed architecture in identifying patterns across facial regions, effectively differentiating authentic and deepfake faces, even under image distortions. Each decoder branch is dedicated to modeling features associated with its corresponding class, improving the robustness of the segmentation process.
Additional experiments conducted on the FaceForensics dataset decrease the performance when processing video sequences, highlighting a limitation of the current architecture. This behavior suggests that the model, designed for image-based analysis, does not explicitly capture temporal dependencies across frames.
The ablation study demonstrates the contribution of the elements from the loss function on the neural network performance. The removal of this elements may generate a decrease in the segmentation accuracy. In addition, the architectural comparison shows that the incorporation of attention mechanisms enhances feature representation for deepfake segmentation.
These findings indicate that incorporating temporal modeling strategies, such as recurrent networks or temporal modules, could improve performance when using video-based datasets. Furthermore, task-specific architectures could be explored to optimize performance for scenarios, such as deepfake-only segmentation or video-based analysis. Training the model directly on FaceForensics++ data could also improve its generalization capability in such conditions.
5. Conclusions
This paper presented a dual-decoder neural network architecture for the segmentation of authentic and deepfake facial regions. The proposed method realizes a precise localization of manipulated areas by generating complementary masks for forged faces and original faces, improving interpretability compared to traditional classification approaches.
The results demonstrate the effectiveness of the proposed neural network architecture for the segmentation of authentic and deepfake facial regions. The model shows a high robustness against common image processing distortions introduced during deepfake generation.
The main contribution of this work lies in the integration of a dual-decoder structure with attention mechanisms, which enhances feature representation and reduces interference between classes during reconstruction. Additionally, the proposed method maintains stable performance under image processing distortions, including JPEG compression, Gaussian noise, salt and pepper noise, blurring, illumination variations, histogram equalization, and random perturbations. This robustness is attributed to the dual-decoder design, where each branch learns distinct features. Another advantage of the proposed architecture lies in its ability to independently segment authentic and manipulated regions, enabling detailed image analysis and precise localization of deepfake artifacts.
As future work, the incorporation of temporal modeling is proposed to extend the architecture to video sequences, improving the detection of manipulated regions across frames. Additionally, the integration of attention mechanisms in the temporal domain could further enhance the identification of subtle patterns in dynamic scenarios. Moreover, a demographic analysis will be conducted to investigate the impact of different factors and facial attributes on model performance, as these variations may influence manipulation patterns and detection behavior.
Author Contributions
Conceptualization, R.E.A.-A. and M.C.-H.; methodology, R.E.A.-A.; software, R.E.A.-A. and M.C.-H.; validation, R.E.A.-A., A.C.-H., and F.J.G.-U.; formal analysis, R.E.A.-A. and M.C.-H.; investigation, R.E.A.-A.; data curation, A.C.-H., F.J.G.-U., and M.C.-H.; writing, R.E.A.-A. and M.C.-H.; review and editing, A.C.-H. and M.C.-H.; visualization, F.J.G.-U.; supervision, F.J.G.-U. and M.C.-H.; funding acquisition, M.C.-H. and F.J.G.-U. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Secretaria de Ciencia, Humanidades, Tecnologia e Innovacion (SECIHTI) with granted numbers 744415 and 161591.
Data Availability Statement
The dataset used in this study (OpenForensics) is publicly available and has been cited in the manuscript [19]. It can be accessed through the official repository provided by the authors https://github.com/ltnghia/openforensics (accessed on 30 January 2026).
Acknowledgments
The authors thank the Secretaria de Ciencia, Humanidades, Tecnologia e Innovacion (SECIHTI) of Mexico; Instituto Politecnico Nacional, Tecnologico de Monterrey; and Universidad Nacional Autonoma de Mexico for the support provided during the realization of this research.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| CNN | Convolutional Neural Network |
| SRM | Spatial Rich Model |
| LSTM | Long short-term memory |
| IoU | Intersection over union |
| AUC | Area under the curve |
References
- Zhang, L.; Lu, T.; Du, Y. Overview of facial deepfake video detection methods. Front. Comput. Sci. Technol. 2023, 17, 1. [Google Scholar] [CrossRef]
- Alrashoud, M. Deepfake video detection methods, approaches, and challenges. Alex. Eng. J. 2025, 125, 265–277. [Google Scholar] [CrossRef] [Scilit]
- Gong, L.Y.; Li, X.J. A contemporary survey on deepfake detection: Datasets, algorithms, and challenges. Electronics 2024, 13, 585. [Google Scholar] [CrossRef] [Scilit]
- Zha, R.; Lian, Z.; Li, Q. Centroid-based contrastive consistency learning for transferable deepfake detection. Neurocomputing 2025, 637, 130009. [Google Scholar] [CrossRef] [Scilit]
- Sun, Z.; Han, Y.; Hua, Z.; Ruan, N.; Jia, W. Improving the efficiency and robustness of deepfakes detection through precise geometric features. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021; pp. 3609–3618. [Google Scholar] [CrossRef] [Scilit]
- Ahmed, N.U.R.; Badshah, A.; Adeel, H.; Tajammul, A.; Daud, A.; Alsahfi, T. Visual deepfake detection: Review of techniques, tools, limitations, and future prospects. IEEE Access 2024, 13, 1923–1961. [Google Scholar] [CrossRef] [Scilit]
- Rana, M.S.; Nobi, M.N.; Murali, B.; Sung, A.H. Deepfake detection: A systematic literature review. IEEE Access 2022, 10, 25494–25513. [Google Scholar] [CrossRef] [Scilit]
- Ni, Y.; Meng, D.; Yu, C.; Quan, C.; Ren, D.; Zhao, Y. CORE: Consistent representation learning for face forgery detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), New Orleans, LA, USA, 18–24 June 2022; pp. 12–21. [Google Scholar] [CrossRef] [Scilit]
- Chang, X.; Wu, J.; Yang, T.; Feng, G. DeepFake face image detection based on improved VGG convolutional neural network. In Proceedings of the 39th Chinese Control Conference (CCC), Shenyang, China, 27–29 July 2020. [Google Scholar] [CrossRef] [Scilit]
- Yu, C.-M.; Chen, K.-C.; Chang, C.-T.; Ti, Y.-W. SegNet: A network for detecting deepfake facial videos. Multimed. Syst. 2022, 28, 793–814. [Google Scholar] [CrossRef] [Scilit]
- Wang, R.; Yang, Z.; You, W.; Zhou, L.; Chu, B. Fake face images detection and identification of celebrities based on semantic segmentation. IEEE Signal Process. Lett. 2022, 29, 2018–2022. [Google Scholar] [CrossRef] [Scilit]
- Nirkin, Y.; Wolf, L.; Keller, Y.; Hassner, T. DeepFake detection based on discrepancies between faces and their context. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 6111–6121. [Google Scholar] [CrossRef] [Scilit]
- Abdullah, M.T.; Ali, N.H.M. Deploying facial segmentation landmarks for deepfake detection. J. Al-Qadisiyah Comput. Sci. Math. 2023, 15, 137–149. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Zhang, H.; Yang, G.; Guo, Z.; Chen, J. A two-stage fake face image detection algorithm with expanded attention. Multimed. Tools Appl. 2024, 83, 55709–55730. [Google Scholar] [CrossRef] [Scilit]
- Raja Sekar, R.; Dhiliphan Rajkumar, T.; Rao Anne, K. Deep fake detection using an optimal deep learning model with multi-head attention-based feature extraction scheme. Vis. Comput. 2025, 41, 2783–2800. [Google Scholar] [CrossRef] [Scilit]
- Jagam, A.; Patel, N.; Chidirala, B.; Acharya, B. Deepfake detection in facial images using convolutional neural networks. In Proceedings of the Fourth International Conference on Power, Control and Computing Technologies (ICPC2T), Raipur, India, 20–22 January 2025. [Google Scholar] [CrossRef] [Scilit]
- Kurniawan, W.; Kurniasih, A.; Ghani, M.A. Real or deepfake face detection in images and video data using YOLO11 algorithm. J. Artif. Intell. Eng. Appl. 2025, 4, 1514–1521. [Google Scholar] [CrossRef] [Scilit]
- Alsolai, H.; Mahmood, K.; Alshuhail, A.; Ben Miled, A.; Alqahtani, M.; Alshareef, A.; Alallah, F.S.; Alghamdi, B.M. Guardian-AI: A novel deep learning based deepfake detection model in images. Alex. Eng. J. 2025, 126, 507–514. [Google Scholar] [CrossRef] [Scilit]
- Gupta, S.; Hariprasad, Y.; Iyengar, S.S.; Gurappa, S.; Mohanty, P. Enhancing digital security: A novel dual-paradigm approach for robust deepfake detection using pre and post quantum-trained neural networks. Digit. Threat. Res. Pract. 2026, 7, 1–15. [Google Scholar] [CrossRef] [Scilit]
- Le, T.-N.; Nguyen, H.H.; Yamagishi, J.; Echizen, I. OpenForensics: Large-scale challenging dataset for multi-face forgery detection and segmentation in-the-wild. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 9996–10006. [Google Scholar] [CrossRef] [Scilit]
- Arevalo-Ancona, R.E.; Haro-Mendoza, D.; Cedillo-Hernandez, M.; Gonzalez-Villela, V.J. Advanced dual-branch U-Net decoder for precise and robust surgical instrument and organ segmentation. Biomed. Signal Process. Control 2025, 110, 108348. [Google Scholar] [CrossRef] [Scilit]
- Pandiri, D.N.K.; Murugan, R.; Goel, T. ARM-UNet: Attention residual path modified UNet model to segment the fungal pathogen diseases in potato leaves. Signal Image Video Process. 2024, 19, 80. [Google Scholar] [CrossRef] [Scilit]
- Arora, S.; Banerjee, A.; Katal, N. Enhanced urban driving scene segmentation using modified UNet with residual convolutions and attention guided skip connections. Discov. Artif. Intell. 2025, 5, 198. [Google Scholar] [CrossRef] [Scilit]
- Fan, Y.; Song, J.; Yuan, L.; Jia, Y. HCT-Unet: Multi-target medical image segmentation via a hybrid CNN-transformer U-Net incorporating multi-axis gated multilayer perceptron. Vis. Comput. 2025, 41, 3457–3472. [Google Scholar] [CrossRef] [Scilit]
- de Haro, S.; González-Férez, P.; García, J.M.; Bernabé, G. Application of YOLOv8 and a model based on vision transformers and U-Net for LVNC diagnosis: Advantages and limitations. In Proceedings of the Practical Applications of Computational Biology and Bioinformatics (PACBB 2024); Springer: Cham, Switzerland, 2025. [Google Scholar] [CrossRef] [Scilit]
- Wang, W.; Mao, Q.; Tian, Y.; Zhang, Y.; Xiang, Z.; Ren, L. FMD-UNet: Fine-grained feature squeeze and multiscale cascade dilated semantic aggregation dual-decoder UNet for COVID-19 lung infection segmentation from CT images. Biomed. Phys. Eng. Express 2024, 10, 055031. [Google Scholar] [CrossRef] [Scilit]
- Wei, F.; Wang, S.; Sun, Y.; Yin, B. A dual attentional skip connection based Swin-UNet for real-time cloud segmentation. IET Image Process. 2024, 18, 3460–3479. [Google Scholar] [CrossRef] [Scilit]
- Huang, X.; Chen, J.; Chen, M.; Chen, L.; Wan, Y. TDD-UNet: Transformer with double decoder UNet for COVID-19 lesions segmentation. Comput. Biol. Med. 2022, 151, 106306. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Huy, V.T.Q.; Lin, C.-M. D2CBDAMAttUnet: Dual-decoder convolution block dual attention UNet for retinal vessel segmentation from fundus images. IEEE Access 2025, 13, 19635–19649. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




















