Source-linked AI summary

Preserving Fairness Generalization in Deepfake Detection

Li Lin, Xinan He, Yan Ju, Xin Wang, Feng Ding, Shu Hu

arXiv:2402.17229v1cs.CVcs.CYcs.LG

TL;DR

Deepfake detectors can show performance disparities across demographic groups, and existing fair-loss methods do not preserve fairness reliably across forgery domains. This paper combines feature disentanglement, fairness learning, and loss flattening; experiments report improved fairness preservation in cross-domain detection. The method depends on datasets containing forged videos produced by multiple manipulation techniques.

  • Problem

    Deepfake detectors can perform inconsistently across demographic groups, while fair-loss methods that work within a domain do not necessarily preserve fairness on unknown forgery domains.

    Source: §1 · p. 1
  • Method

    The framework disentangles demographic and domain-agnostic forgery features, combines them for fair learning, and flattens the loss landscape during optimization.

    Source: §1 · p. 2
  • Results

    Experiments on diverse deepfake datasets show that the method outperforms state-of-the-art approaches in preserving fairness during cross-domain detection.

    Source: §1 · p. 2, §6 · p. 8
  • Takeaways & Limitations

    The reported results support the framework’s fairness-preservation capability across domains in the evaluated deepfake datasets.

    Source: §6 · p. 8

    The method depends on datasets containing forged videos generated by multiple manipulation techniques, and few deepfake datasets have this characteristic.

    Source: §6 · p. 8

Abstract

from arXiv · show

Although effective deepfake detection models have been developed in recent years, recent studies have revealed that these models can result in unfair performance disparities among demographic groups, such as race and gender. This can lead to particular groups facing unfair targeting or exclusion from detection, potentially allowing misclassified deepfakes to manipulate public opinion and undermine trust in the model. The existing method for addressing this problem is providing a fair loss function. It shows good fairness performance for intra-domain evaluation but does not maintain fairness for cross-domain testing. This highlights the significance of fairness generalization in the fight against deepfakes. In this work, we propose the first method to address the fairness generalization problem in deepfake detection by simultaneously considering features, loss, and optimization aspects. Our method employs disentanglement learning to extract demographic and domain-agnostic forgery features, fusing them to encourage fair learning across a flattened loss landscape. Extensive experiments on prominent deepfake datasets demonstrate our method's effectiveness, surpassing state-of-the-art approaches in preserving fairness during cross-domain deepfake detection. The code is available at https://github.com/Purdue-M2/Fairness-Generalization

1. Introduction

Deepfake detectors can perform inconsistently across demographic groups, and fair performance within one domain does not ensure fairness on unknown forgery domains. The paper proposes a framework combining feature disentanglement, fairness learning, and loss-landscape flattening, and reports improved fairness preservation in cross-domain detection.

1. Introduction

  • Performance disparities across demographic groups, including gender, age, and ethnicity, are a fairness concern in deepfake detection.Some advanced detectors have higher accuracy on deepfakes featuring lighter skin tones than darker skin tones.Source: §1 · pp. 1–2
  • DAW-FDD performs well in intra-domain fairness evaluation but does not preserve fairness when tested on data from unknown forgery techniques.The paper identifies fairness generalization as important because fair detectors without it may become obsolete easily.Source: §1 · p. 2
  • The framework combines demographic and domain-agnostic forgery features for fair learning, adds a bi-level fairness loss, and flattens the loss landscape through optimization.Its three modules address disentanglement, fairness learning, and optimization.Source: §1 · p. 2
  • Experiments on leading deepfake datasets show that the method outperforms state-of-the-art approaches in preserving fairness during cross-domain detection.The paper presents this as its first method to address deepfake-detection fairness generalization across features, loss, and optimization.Source: §1 · p. 2

2. Related Work

Related work covers data-driven deepfake detectors and approaches to generalization and fairness. The paper positions fairness under cross-domain testing as a gap left by prior methods focused on same-domain evaluation.

2. Related Work

  • Data-driven detectors learn artifacts from authentic and deepfake videos, but may suffer sharp performance degradation in cross-domain testing.Disentanglement approaches have been used to extract forgery-related features for improved generalization.Source: §2 · p. 2
  • Prior fairness studies report demographic biases in datasets and detectors, while proposed remedies include richer annotations and gender-balanced data.The gender-balanced dataset approach yielded modest improvements and required extensive annotation.Source: §2 · p. 2
  • Ju et al. addressed fairness within the same data domain but did not address fairness in cross-domain testing.Source: §2 · p. 2

3. Motivation

The motivation section shows that fairness gains from fair loss within a domain do not necessarily carry over to cross-domain testing. It links this gap to entangled demographic and forgery features and sharp loss landscapes with multiple minima.

3. Motivation

  • In cross-domain testing, DAW-FDD’s fairness scores are worse than Ori’s, and DAW-FDD (UCF) scores worse than UCF, unlike their intra-domain comparisons.The evaluation trains models on FF++ and tests on FF++ and DFD, using FMEO and FDP fairness metrics.Source: §3 · pp. 2–3, Figure 2 · p. 3
  • A perfect classifier on representations entangled with target and demographic information does not guarantee demographic parity.The paper uses this observation to suggest a reason for DAW-FDD’s limited fairness generalization.Source: §3 · p. 3
  • Disentangling demographic and forgery representations may improve fairness, but removing demographic features alone could also discard facial information relevant to forgery detection.Prior generalization methods extract forgery features without disentangling demographic representations.Source: §3 · p. 3
  • Overparameterized detectors can memorize demographic patterns, while sharp loss landscapes with multiple minima can lead to varying generalization.The paper argues that flattening the landscape is important for improving fairness generalization.Source: §3 · p. 3

4. Method

The method combines disentangled feature learning, fair classification, and loss-landscape optimization to preserve fairness when testing on unseen deepfake domains. Its modules extract demographic and forgery features, fuse them for fair prediction, and jointly optimize the model.

4.1. Overview of Proposed Method

  • The framework combines disentanglement, fair learning, and optimization to train a model for accuracy and fairness on unseen deepfake datasets.The modules are trained end-to-end: feature learning extracts demographic and domain-agnostic forgery features, fair learning uses them for classification, and optimization supports fairness generalization.Source: §4.1 · pp. 3–4, Figure 3 · p. 4

4.2. Exposing Demographic & Forgery Features

  • Feature learning combines subgroup-aware margins, contrastive objectives, and reconstruction losses to learn demographic and forgery representations.Larger margins are used for minority subgroups with fewer training examples; contrastive learning encourages generalizable forgery representations, while self- and cross-reconstruction work together to improve disentanglement.Source: §4.2 · pp. 4–5

4.3. Fair Learning under Generalization

  • Fair learning fuses demographic and domain-agnostic forgery features with AdaIN and applies a bi-level loss across and within demographic subgroups.The outer level promotes fairness between subgroups, while the inner level addresses real and fake examples within each subgroup.Source: §4.3 · p. 5

4.4. Joint Optimization

  • Joint optimization uses sharpness-aware minimization to perturb model weights toward higher loss and flatten the landscape for fairness generalization.The perturbation magnitude γ and trade-off λ are hyperparameters; training updates the model using a gradient approximation.Source: §4.4 · pp. 5–6

5. Experiment

Experiments train on FF++ and test across intra- and cross-domain datasets, comparing detection and fairness metrics. Results and visualizations show strong cross-domain fairness performance, with ablations examining the contributions of the method’s components.

5.1. Experimental Settings

  • Models train on FF++ and test on FF++, DFD, DFDC, and Celeb-DF; evaluation uses AUC, four fairness metrics, and eight intersectional demographic groups.The FF++ intra-domain test sets are separated by five forgery types.Source: §5.1 · p. 6, Table 1 · p. 6

5.2. Results

  • 8.63% improvement in FDP on DFDC, and FF P R improves 11.69% on Celeb-DF and 7.94% on DFD versus DAW-FDD; overall, ours leads most fairness metrics and AUC.Table 2 compares detection and fairness performance across intra-domain FF++ and cross-domain DFDC, Celeb-DF, and DFD scenarios.Source: §5.2 · p. 6, Table 2 · p. 7
  • ResNet-50 and EfficientNet-B3 backbones show similar superior fairness-generalization results, indicating the approach is not limited to Xception.The experiments substitute these backbones for Xception.Source: §5.2 · p. 7

5.3. Ablation Study

  • On Celeb-DF, the reconstructive loss lowers FF P R by 5.47% and increases AUC by 2.69%, while the contrastive loss lowers FF P R by 6.32% and increases AUC by 4.03%.Replacing cross-entropy with the demographic distribution-aware margin loss reduces FF P R by 5.95% on methods trained only on FF++.Source: §5.3 · p. 7, Table 3 · p. 7
  • Loss flattening improves FF P R by 7.94% on Celeb-DF and 4.18% on DFDC versus its ablation; feature fusion improves it by 4.10% and 0.44%, respectively.The authors report that flattening boosts fairness generalization more than fusion, and that using both yields the strongest fairness and AUC gains across datasets.Source: §5.3 · p. 7, Table 3 · p. 7

5.4. Visualization

  • With flattening, the loss landscape is smoother than the sharp, peak-and-valley landscape without it, suggesting an easier optimization path that may improve generalization.Figure 4 visualizes the landscape with and without flattening.Source: §5.4 · p. 8, Figure 4 · p. 8
  • Grad-CAM shows our model consistently focuses on facial salient features across datasets; its disentangled forgery and demographic features highlight faces, while content features highlight backgrounds.Figure 5 contrasts these visualizations with Ori and DAW-FDD and displays the input, DAW-FDD features, and the three disentangled feature types.Source: §5.4 · p. 8, Figure 5 · p. 8

6. Conclusion

The paper presents a framework for fairness generalization across deepfake domains and reports superior fairness maintenance across datasets. Its method depends on datasets containing videos generated by multiple manipulation techniques, a property that few datasets have.

6. Conclusion

  • The framework combines disentanglement learning, fair learning, and loss flattening to improve fairness generalization across domains.Experiments on diverse deepfake datasets show superior fairness maintenance across domains.Source: §6 · p. 8
  • The method depends on datasets containing forged videos generated by multiple manipulation techniques, but few deepfake datasets have this property..Source: §6 · p. 8
  • Future work aims to address fairness without multi-forged data, detect diffusion- or GAN-generated images, and extend fairness work to multimodal settings.Source: §6 · p. 8

Appendix for “Preserving Fairness Generalization in Deepfake Detection”

Prior work addresses deepfake detection through data-driven models and disentanglement, while studies document demographic performance disparities. Fairness methods have shown intra-domain benefits, but maintaining fairness across testing domains remains a challenge.

A. Related Work

  • Data-driven detectors perform well intra-domain but sharply degrade in cross-domain testing; disentanglement methods aim to isolate forgery-related features.Examples include locating forgery regions, adding auxiliary supervision, and imposing consistency and contrastive constraints.Source: A. Related Work · p. 12
  • Deepfake detectors use physical or physiological cues, synthesis artifacts, or data-driven models, with the latter forming the largest group.The physical and signal-level approaches are described as usually having relatively low detection performance.Source: A. Related Work · p. 12
  • Fairness studies report subgroup error-rate differences and model bias, while gender balancing brought only modest improvement and required extensive annotation.Ju et al. improved fairness within the same data domain but did not maintain it in cross-domain testing.Source: A. Related Work · p. 12

B. Fairness Metrics

The section defines four fairness metrics for binary real/fake predictions across demographic subgroups. Lower values indicate better performance on all four metrics.

B. Fairness Metrics

  • All four fairness metrics are interpreted so that lower values indicate better performance.The metrics are computed over test samples with true and predicted binary labels.Source: B. Fairness Metrics · p. 12
  • FFPR measures subgroup disparity in false positive rates relative to the overall population, while FOAE measures the maximum accuracy gap across demographic groups.The test labels are binary: 0 denotes real and 1 denotes fake.Source: B. Fairness Metrics · p. 12
  • FDP measures the maximum difference in prediction rates across demographic groups, and FMEO captures the largest disparity in prediction outcomes for either label.The outcome disparity is compared across demographic groups and true-label conditions.Source: B. Fairness Metrics · p. 13

C. The Network Details

The network encodes paired fake and real images, then reconstructs images from disentangled features. Reconstruction visualizations track the model’s learned details during training.

C. The Network Details

  • The encoder takes a fake-and-real image pair as input and uses an Xception backbone.Figure C.1 presents the encoder architecture.Source: C. The Network Details · p. 13, Figure C.1 · p. 13
  • The decoder reconstructs images from demographic, content, domain-specific, and domain-agnostic features to preserve the extracted features’ integrity.Figure C.2 presents the decoder architecture, which includes upsampling and convolutional layers and applies AdaIN.Source: C. The Network Details · p. 13, Figure C.2 · p. 13
  • Reconstruction visualizations show the model capturing more facial detail as training progresses, supporting the decoder’s preservation of feature completeness.Figure C.3 shows reconstruction images during training.Source: C. The Network Details · p. 13, Figure C.3 · p. 14

D. End-to-end Training Algorithm

The end-to-end algorithm jointly trains the model using a loss-flattening strategy based on sharpness-aware minimization. It searches for subgroup loss-minimizing parameters, computes a perturbation and gradient approximation, then updates model weights.

D. End-to-end Training Algorithm

  • Joint optimization integrates sharpness-aware loss flattening throughout end-to-end training.The pseudocode identifies the procedure as Algorithm 1, Joint Optimization.Source: D. End-to-end Training Algorithm · p. 14
  • The algorithm takes a demographic-labeled training set, subgroup set, hyperparameters, iteration and batch counts, and learning rate, and outputs a fairness-generalizable detector.It initializes model weights and repeats the training loop for the specified maximum iterations.Source: D. End-to-end Training Algorithm · p. 14
  • Each iteration samples a mini-batch, finds subgroup loss-minimizing values by binary search, computes a perturbation and gradient approximation, and updates the weights.The algorithm also uses binary search to find the value minimizing the overall formulation before the parameter update.Source: D. End-to-end Training Algorithm · p. 14

E. Additional Experimental Settings

The experimental settings report dataset sample counts and intersectional attributes, with FF++ used for training and validation.

E. Additional Experimental Settings

F. Additional Experimental Results

Additional experiments examine fairness and detection trade-offs, training stability, subgroup performance, and feature visualizations. They report improved subgroup AUC and fairness results, including across demographic subgroups and testing domains.

Stability Evaluation

Effect of Trade-off λ

Comparison of the Loss Convergence

Comparison of AUC on Intersectional Subgroups

Comparison on Cross-demographic Subgroup

Visualization

  • UMAP visualizations separate demographic groups in the learned latent space, while FF++ is dominated by Male-White and Female-White subgroups.The authors identify this dataset imbalance as a challenge for fair detection and motivate their demographic distribution-aware margin loss for minority-subgroup generalization.Source: F. Additional Experimental Results · p. 17, Figure F.6 · p. 17, Figure F.7 · p. 17
Loading 2402.17229v1…