Exploring Intrinsic Fairness in Stable Diffusion

Eunji Kim, Siwon Kim, Robin Rombach, Rahim Entezari, Sungroh YoonRBFM @ NeurIPS 2024

TL;DR

This paper investigates the root causes of demographic biases in Stable Diffusion, demonstrating that the model possesses inherent fairness that can be unlocked. By analyzing the diffusion process, they found that an over-reliance on text prompts is a primary driver of bias, and propose methods to mitigate it by adjusting noise sampling and text guidance.

What Problem Does This Paper Address?

Text-to-image models like Stable Diffusion are capable of generating incredibly realistic images, but they often inherit and even amplify societal biases present in their training data. This leads to imbalanced representations of demographic groups (e.g., gender, race) in generated images, particularly for certain professions. While many existing debiasing methods focus on retraining or fine-tuning these large models, which is computationally expensive, this paper questions whether these biases are an inherent limitation or a consequence of how the models are used. They aim to uncover Stable Diffusion's "intrinsic fairness" and explore ways to leverage it for debiasing without extensive retraining.

Methods

The authors propose a "mode test" to investigate biases originating from different regions of the initial noise distribution. They simulate sampling from low-density noise regions (which are typically underexplored) by adding noise to images generated with specific attributes and then using attribute-neutral prompts for the reverse diffusion process.

To address the identified bias source (excessive text prompt correlation), they explore two main strategies:

  1. Decreasing Classifier-Free Guidance (CFG) Scale: Lowering the CFG scale weakens the influence of text prompts on the diffusion process, leading to more diverse outputs and reduced bias.
  2. Noisy Text Conditions (CADS): This approach, inspired by Condition-Annealed Sampling (CADS), injects noise into the text conditioning signal during the reverse diffusion process. This perturbs the text guidance, making it less dominant and thus reducing bias.
  3. Minor Attribute Guidance: They also investigate directly guiding the early stages of diffusion with prompts specifying minor attributes, aiming to steer the generation towards more balanced representations.

Datasets

The paper primarily uses Stable Diffusion v1.5 for its experiments, with additional results for SD-v2 and SDXL to demonstrate generalizability. They focus on binary gender bias (male/female) and racial bias (White, Black, Asian, Indian, Latino) across four professions: doctor, CEO, nurse, and teacher. The CLIP zero-shot classifier is used to determine the attributes in generated images. The LAION-5B dataset distribution is used as a reference point for comparison.

Key Insights and Ideas

  • Inherent Fairness Exists: Stable Diffusion isn't inherently biased; its biases can be "unlocked" by understanding and manipulating the generation process.
  • Low-Density Noise Matters: Sampling from less dense regions of the initial noise distribution can lead to the generation of minor attributes, even with neutral prompts. This suggests that the model has the capacity for diverse representations that are not always accessed.
  • Text Prompt Dominance is Key: The strong correlation between text prompts and the diffusion process is a primary driver of amplified bias. When the model relies too heavily on the prompt, it tends to favor majority attributes.
  • Debiasing Trade-offs: While weakening text guidance (via lower CFG or noisy prompts) effectively reduces bias, it can sometimes compromise the alignment between the generated image and the text prompt (measured by CLIP score).
  • Targeted Early Guidance Works: Directly guiding the diffusion process with minor attribute prompts in the early stages is an effective way to mitigate bias without significantly degrading image quality.

Key Results

  • The "mode test" showed that sampling from low-density noise regions increased the ratio of minor attributes, bringing it closer to the LAION-5B distribution.
  • Decreasing the CFG scale consistently reduced the major attribute ratio, indicating bias mitigation.
  • The CADS approach (noisy text conditions) also reduced major attribute ratios for both gender and racial bias across different professions and model versions (SD-v1.5, SD-v2, SDXL).
  • Guiding early diffusion steps with minor attribute prompts led to a steady increase in the minor attribute ratio, effectively mitigating bias. For example, with SDXL, using a minor attribute prompt from t=1 to t=0.5 resulted in over 90% minor attribute generation for most professions.
  • However, these debiasing methods, particularly CADS, sometimes led to a decrease in CLIP scores, suggesting a potential trade-off with prompt alignment.

Limitations and Future Work

  • Limited Bias Scope: The study primarily focuses on binary gender and five racial categories, acknowledging that this does not encompass all demographic groups. Future research should explore a wider range of biases.
  • Prompt Alignment Trade-off: While debiasing methods are effective, they can sometimes impact the image-text alignment. Future work should focus on designing perturbation schemes that carefully balance bias reduction with maintaining prompt fidelity.
  • Exploring Low-Density Regions: The paper opens avenues for exploring the low-density regions of the initial noise space, which could lead to more equitable generative models.
  • Broader Applications: The findings could inspire new debiasing strategies for other generative models beyond Stable Diffusion.

Summary updated

BibTeX
@inproceedings{kim2024exploring,
  author = {Eunji Kim and Siwon Kim and Robin Rombach and Rahim Entezari and Sungroh Yoon},
  title = {{Exploring Intrinsic Fairness in Stable Diffusion}},
  booktitle = {RBFM @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=nM75a1CzOI},
}
Figure