FairGen: Controlling Sensitive Attributes for Fair Generations in Diffusion Models via Adaptive Latent Guidance

Mintong Kang, Vinayshekhar Bannihatti Kumar, Shamik Roy, Abhishek Kumar, Sopan Khosla, Narayanaswamy Balakrishnan, Rashmi Gangadharaiah

Abstract

Mintong Kang, Vinayshekhar Bannihatti Kumar, Shamik Roy, Abhishek Kumar, Sopan Khosla, Balakrishnan Murali Narayanaswamy, Rashmi Gangadharaiah. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing.

2025.

Introduction

Text-to-image diffusion models frequently mirror or amplify societal biases present in their training data. For example, a prompt for "a software engineer" often generates images predominantly featuring men. Existing mitigation strategies—such as prompt intervention, model finetuning, or static latent guidance—often suffer from degraded image quality, high computational costs, or an inability to handle complex, nuanced prompts.

FairGen is a training-free, inference-time algorithm designed to provide precise control over the distribution of sensitive attributes (e.g., gender, race, age) in generated images. By treating fairness as a collective property of a set of generations rather than a single image, FairGen achieves significant bias reduction while maintaining high visual fidelity and prompt alignment.

Methodology

FairGen introduces a dual-module system that operates during the image sampling process without requiring model retraining.

Overview of the FairGen architecture, featuring the Indicator Guidance Module and the Adaptive Latent Guidance Module.

The system consists of two primary components:

  1. Indicator Guidance Module: This module acts as a controller, utilizing a Memory Module to track the statistics of past generations for similar prompt clusters. It dynamically determines the target attribute for the current generation to align the overall output set with a user-defined target distribution.
  2. Adaptive Latent Guidance Module: Once a target attribute is selected, this module calculates a specific "nudge" in the latent space. It employs a fine-tuned LLM (refined via Direct Policy Optimization) to generate attribute-aware guidance prompts. The guidance direction is derived from the difference in noise estimates between attribute-specific versions of the prompt, ensuring the steering remains orthogonal to the original scene description.

Evaluation Framework

The researchers evaluated FairGen using two benchmarks:

  • Stable Bias: A standard benchmark focusing on common occupations.
  • Holistic Bias Evaluation (HBE): A new, more rigorous benchmark introduced in this study. HBE includes 2,000 prompts across 10 diverse domains (e.g., healthcare, finance, criminal justice) and utilizes complex, scenario-based descriptions to test model robustness beyond simple templates.

Key Insights

  • Fairness as a Collective Property: The innovation of the memory module allows the system to "remember" its bias and self-correct over time, shifting the focus to ensuring a set of images follows a target distribution.
  • The "Middle Step" Hypothesis: The study identifies a "sweet spot" for applying guidance—specifically during the middle 25% of diffusion steps. Applying guidance too early disrupts global structure, while applying it too late is ineffective as attributes are already "baked in."
  • Orthogonal Guidance: By using the difference between two attribute-specific prompts, the guidance vector steers the model toward the desired demographic without overwriting the user's specific scene details.

Results

FairGen consistently outperforms baselines like FairDiffusion and prompt intervention across various models, including Stable Diffusion 2 (SD2), SDXL, and SD-3.5-large.

Performance comparison of FairGen against baselines across multiple diffusion models and sensitive attributes.

On the HBE benchmark with SD2, FairGen achieved a gender bias score (B) of 0.231, a significant improvement over the vanilla model's 0.734. Crucially, image quality (measured by CLIP scores, Q) remained nearly identical to unguided models, avoiding the distortions common in prompt-editing methods. The system also demonstrated granular control, successfully hitting non-equal target distributions (e.g., specific census-based ratios).

Limitations

While effective, FairGen introduces a marginal inference overhead (approximately 10-15%) due to additional noise estimates. Additionally, the memory module's storage of query embeddings raises potential privacy concerns, which the authors suggest could be addressed with differential privacy in future work. The "cold start" problem—where the first generation in a new cluster relies on a random choice—also remains an area for refinement.

Summary updated

BibTeX
@misc{kang2025fairgen,
  author = {Mintong Kang and Vinayshekhar Bannihatti Kumar and Shamik Roy and Abhishek Kumar and Sopan Khosla and Narayanaswamy Balakrishnan and Rashmi Gangadharaiah},
  title = {{FairGen: Controlling Sensitive Attributes for Fair Generations in Diffusion Models via Adaptive Latent Guidance}},
  year = {2025},
  eprint = {2503.01872},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.01872},
}
Figure