MIST: Mitigating Intersectional Bias with Disentangled Cross-Attention Editing in Text-to-Image Diffusion Models

Hidir Yesiltepe, Kiymet Akdemir, Pinar YanardagarXiv 2024

Abstract

Diffusion-based text-to-image models have rapidly gained popularity for their ability to generate detailed and realistic images from textual descriptions. However, these models often reflect the biases present in their training data, especially impacting marginalized groups. While prior efforts to debias language models have focused on addressing specific biases, such as racial or gender biases, efforts to tackle intersectional bias have been limited. Intersectional bias refers to the unique form of bias experienced by individuals at the intersection of multiple social identities. Addressing intersectional bias is crucial because it amplifies the negative effects of discrimination based on race, gender, and other identities. In this paper, we introduce a method that addresses intersectional bias in diffusion-based text-to-image models by modifying cross-attention maps in a disentangled manner. Our approach utilizes a pre-trained Stable Diffusion model, eliminates the need for an additional set of reference images, and preserves the original quality for unaltered concepts. Comprehensive experiments demonstrate that our method surpasses existing approaches in mitigating both single and intersectional biases across various attributes.

Introduction: The Challenge of Intersectional Bias

Current text-to-image (T2I) models, such as Stable Diffusion, are known to reflect societal biases inherent in their massive, internet-scale training datasets. For instance, a prompt for "CEO" typically yields a gallery of middle-aged white men. While previous research has attempted to debias these models, most efforts focus on a single attribute at a time, such as gender or race in isolation.

This approach ignores intersectional bias—the unique discrimination faced by individuals at the crossroads of multiple identities (e.g., a Black woman or an elderly Latina). Furthermore, existing editing techniques often suffer from "concept leakage," where attempts to diversify one profession (e.g., "doctor") inadvertently alter the representations of related concepts (e.g., "nurse") because the model's internal representations are entangled.

The MIST Framework

We introduce MIST (Mitigating Intersectional Bias), a framework that performs disentangled cross-attention editing to address these limitations. MIST is built upon several key technical pillars:

  1. The <EOS> Discovery: We observed that in the CLIP text encoder, the <EOS> (End-of-Sentence) token acts as a global summary of the entire prompt. Modifying only the weights associated with this token allows for highly targeted, global edits without the need to update projection matrices for every token in a prompt.
  2. Disentangled Fine-Tuning: By focusing on the <EOS> token, MIST prevents the "leakage" problem. This surgical approach ensures that editing one specific concept does not degrade or unintentionally alter unrelated concepts.
  3. Optimization without Reference Images: MIST formulates debiasing as a constrained minimization problem. It fine-tunes the Key ($W_k$) and Value ($W_v$) projection matrices in the cross-attention layers so that the model's output for a neutral prompt (e.g., "a firefighter") matches a balanced distribution of "guidance" prompts (e.g., "a female firefighter," "an Asian male firefighter"). Unlike competing methods, MIST operates entirely within the model's existing latent space, requiring no external reference images.

Experimental Results

We evaluated MIST using the WinoBias dataset, covering 36 professional titles to test diversity across gender, race, and age.

Quantitative Performance

  • Biasedness Score ($\psi$): On a scale where 0 is perfectly unbiased, MIST achieved a score of 0.14, significantly outperforming the base Stable Diffusion model (0.86) and previous methods like UCE (0.28) and TIME (0.38).
  • Content Preservation: Using the "Average Pixel Shift" metric, MIST demonstrated superior preservation of original image structures. When debiasing a concept like "Lawyer," the background and composition remained nearly identical to the original output, changing only the subject's demographic attributes.

Qualitative Success

Visual results confirm that MIST successfully generates diverse individuals across multiple intersecting identities. For example, when prompted for a "firefighter," the model produces a balanced distribution including various races, genders, and ages, where the base model typically fails.

MIST generates a diverse set of firefighters across intersecting identities including race, gender, and age, demonstrating successful bias mitigation.

Discussion and Limitations

While MIST represents a significant step forward, it faces certain limitations. The method relies on the CLIP classifier to evaluate progress; however, CLIP itself contains inherent biases that may slightly skew the "ground truth" for a balanced distribution. Additionally, to remain compatible with existing benchmarks, this study focused on perceived binary gender, though we acknowledge that gender exists on a spectrum. Future work will explore making these debiasing edits more dynamic and universal across all possible prompts without requiring per-concept optimization.

Summary updated

BibTeX
@misc{yesiltepe2024mist,
  author = {Hidir Yesiltepe and Kiymet Akdemir and Pinar Yanardag},
  title = {{MIST: Mitigating Intersectional Bias with Disentangled Cross-Attention Editing in Text-to-Image Diffusion Models}},
  year = {2024},
  eprint = {2403.19738},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.19738},
}
Figure