DebiasDiff: Debiasing Text-to-image Diffusion Models with Self-discovering Latent Attribute Directions

Yilei Jiang, Weihong Li, Yiyuan Zhang, Minghong Cai, Xiangyu YuearXiv 2024 · DOI

Abstract

Text-to-image (T2I) diffusion models often inherit and amplify social biases present in their training data, leading to stereotypical representations of gender, race, and other attributes. We present FairGen (DebiasDiff), a lightweight, "plug-and-play" framework that identifies and steers latent attribute directions within the model's own representation space. By utilizing self-discovering attribute adapters and a distribution indicator, FairGen achieves state-of-the-art fairness without requiring expensive retraining or external labeled datasets.

1. Introduction

Modern T2I models like Stable Diffusion frequently exhibit significant "fairness gaps." For instance, prompts for "CEO" typically yield images of men, while "nurse" prompts predominantly produce images of women. Existing mitigation strategies often require computationally intensive retraining or rely on biased external classifiers. FairGen addresses these challenges by "self-discovering" latent directions for specific attributes and using efficient adapters to steer generation toward a user-defined distribution.

Stereotypical representation of a nurse often found in biased T2I outputs.

2. Methodology

FairGen introduces a two-stage system integrated into the diffusion process:

  • Self-Discovering Attribute Adapters: Tiny, 1-dimensional adapters are attached to the cross-attention layers of the U-Net. These adapters identify latent directions for attributes (e.g., gender or race) using the model's internal representations, derived through a mathematical composition of noise predictions based on classifier-free guidance principles.
  • Distribution Indicator: During inference, this component acts as a controller, selecting the appropriate adapter for each image to ensure the final set matches a target distribution (e.g., a 50/50 gender split).
  • Orthogonal Regularization: To handle intersectional biases, a regularization loss ensures that different attribute vectors remain mathematically independent, preventing debiasing for one trait from negatively impacting another.

3. Experimental Results

The framework was evaluated using standard datasets like CelebA and FairFace across multiple Stable Diffusion versions (v1.4 to v2.1).

  • Fairness Gains: On the "CEO" prompt, FairGen reduced the Fairness Discrepancy (FD) score from 0.424 to 0.003, significantly outperforming previous methods like ITI-GEN and F4Fair.
  • Efficiency: Training requires only approximately one hour on a single A100 GPU, a 4x improvement over existing state-of-the-art methods.
  • Quality and Transferability: Metrics such as BRISQUE and CLIP similarity confirm that image quality and prompt adherence are preserved. Furthermore, adapters trained on one model version (e.g., v2.1) demonstrate high transferability to others (e.g., v1.4), suggesting consistent latent representations across architectures.
Example of a male professional, illustrating the intersection of gender and racial attributes in generated content.

4. Conclusion and Future Work

FairGen demonstrates that T2I models already contain the latent information necessary for fair generation. By isolating these directions without external labels, the framework provides a scalable, efficient solution for mitigating social bias. While the method relies on the base model having some internal concept of the target attributes, it represents a significant step toward controllable and ethical generative AI. Future work will focus on automated attribute discovery and refining orthogonal regularization for complex intersectional groups.

Summary updated

BibTeX
@misc{jiang2024debiasdiff,
  author = {Yilei Jiang and Weihong Li and Yiyuan Zhang and Minghong Cai and Xiangyu Yue},
  title = {{DebiasDiff: Debiasing Text-to-image Diffusion Models with Self-discovering Latent Attribute Directions}},
  year = {2024},
  eprint = {2412.18810},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.18810},
}
Figure