NegFaceDiff: The Power of Negative Context in Identity-Conditioned Diffusion for Synthetic Face Generation

Eduarda Caldeira, Naser Damer, Fadi BoutrosarXiv 2025

TL;DR

NegFaceDiff introduces a novel sampling mechanism for identity-conditioned diffusion models that leverages negative context to prevent identity overlap in synthetic face generation. By explicitly guiding the model away from unwanted identity features during inference, it drastically improves inter-class separability and intra-class consistency. Face recognition models trained on NegFaceDiff-generated datasets achieve state-of-the-art accuracy and reduced demographic bias across multiple standard benchmarks.

What Problem Does This Paper Address?

Training high-performance face recognition (FR) systems traditionally requires massive datasets of real faces scraped from the internet. This practice raises severe privacy, ethical, and legal concerns, famously leading to the retraction of widely used datasets like MS-Celeb-1M. While synthetic data generated by Diffusion Models (DMs) offers a legally compliant alternative, current identity-conditioned DMs suffer from a major flaw: they rely solely on positive identity conditions (i.e., "generate images that look like Person A").

Without explicit constraints to keep different identities distinct, the generative model often suffers from identity bleed, resulting in overlapping features or unwanted intra-class variations (such as sudden gender swaps or identity drift). This lack of inter-class separability ultimately degrades the performance of downstream FR models trained on synthetic data.

Methods

The authors introduce NegFaceDiff, a training-free sampling modification for identity-conditioned Latent Diffusion Models (LDMs). Instead of altering the computationally expensive training phase, NegFaceDiff introduces dual guidance directly into the denoising process during inference.

The model's noise prediction ($\hat{\epsilon}_\theta$) is modified to subtract the influence of a negative identity condition ($p^-$) from the positive identity condition ($p^+$):

$$\hat{\epsilon}_\theta(x_t, t, p^+, p^-) = (1 + w)\epsilon_\theta(x_t, t, p^+) - w\epsilon_\theta(x_t, t, p^-)$$

where $w$ represents the negative guidance strength.

The paper explores several strategies for selecting the negative identity context ($p^-$) from the identity pool:

  • Close-Neg: Choosing the closest identity vector to $p^+$.
  • Far-Neg: Choosing the farthest identity vector from $p^+$.
  • Rand-Neg: Randomly selecting an alternative identity.
  • Mid-Neg: Selecting the median-distance identity.
  • Null: Using an empty/null vector as the negative condition.

Among these, the Far-Neg strategy emerged as the superior choice for training robust FR models.

Overview of NegFaceDiff training and dual-guidance sampling process.

Datasets

  • Generative Model Training: Pre-trained on FFHQ (70k images) and further trained on CASIA-WebFace (C-WF, 500k images).
  • FR Evaluation Benchmarks: Labeled Faces in the Wild (LFW), AgeDB-30, Cross-Age LFW (CA-LFW), Celebrities in Frontal-Profile in the Wild (CFP-FP), and Cross-Pose LFW (CP-LFW).
  • Large-Scale Evaluation: IARPA Janus Benchmark–C (IJB-C).
  • Demographic Bias Evaluation: Racial Faces in the Wild (RFW).

Key Insights and Ideas

  • The Power of Saying "What Not to Be": Just telling a model who to generate isn't enough to prevent identity bleeding. Explicitly instructing the model to steer away from a completely different identity (Far-Neg) constrains the identity space cleanly without destroying the diversity (like lighting or pose) needed to train robust FR models.
  • The Null Vector Paradox: Interestingly, using a Null negative condition yields the absolute highest statistical separability (lowest EER and highest FDR) on paper. However, it performs worse when used to train actual FR models. This is because Null over-constrains the generation, stripping away the intra-class variations (diversity) that FR models need to generalize well. Far-Neg strikes the perfect balance.
  • Plug-and-Play Implementation: Because NegFaceDiff is purely a sampling-stage intervention, it can be applied directly to existing pre-trained identity-conditioned diffusion models without the massive computational overhead of retraining.
Visual comparison showing how NegFaceDiff eliminates unwanted variations (like gender swaps) present in the baseline.

Key Results

  • Identity Separability: On datasets generated via Far-Neg, the Fisher Discriminant Ratio (FDR) jumped from 2.427 (baseline IDiff-Face) to 5.687, and the Equal Error Rate (EER) dropped from 0.130 to 0.039.
  • Downstream FR Performance: FR models trained on NegFaceDiff (C-WF) achieved an average accuracy of 92.23% across small-scale benchmarks, outperforming the baseline IDiff-Face (91.47%).
  • Massive Gains on IJB-C: On the challenging, large-scale IJB-C benchmark, NegFaceDiff trained on C-WF achieved a True Acceptance Rate (TAR) of 77.38% at FAR=1e-5, compared to just 23.44% for the baseline IDiff-Face.
  • Reduced Fairness Bias: On the RFW dataset, NegFaceDiff achieved the lowest standard deviation (2.74) and Skewed Error Ratio (1.58) among all diffusion-based methods, indicating a significant reduction in demographic bias.
Histograms showing the improved separability between genuine and impostor score distributions using NegFaceDiff.

Limitations and Future Work

  • Sampling Latency: Like most diffusion-based negative prompting methods, sampling with NegFaceDiff requires running the denoising U-Net twice per step (once for positive, once for negative guidance), which increases inference latency compared to GANs.
  • Dependency on Pre-trained FR Models: The quality of the identity conditioning relies heavily on the feature space of the pre-trained face recognition model used to extract the identity vectors ($p^+$ and $p^-$).
  • Future Directions: The authors suggest exploring more advanced dual-conditioning techniques and extending negative context guidance to other generative tasks to build more robust, privacy-preserving, and ethically compliant AI systems.

Summary updated

BibTeX
@misc{caldeira2025negfacediff,
  author = {Eduarda Caldeira and Naser Damer and Fadi Boutros},
  title = {{NegFaceDiff: The Power of Negative Context in Identity-Conditioned Diffusion for Synthetic Face Generation}},
  year = {2025},
  eprint = {2508.09661},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.09661},
}
Figure