Source-linked AI summary

Debiasing Text-to-Image Diffusion Models

Ruifei He, Chuhui Xue, Haoru Tan, Wenqing Zhang, Yingchen Yu, Song Bai, Xiaojuan Qi

arXiv:2402.14577v1cs.CV

TL;DR

Text-to-image diffusion models can generate socially biased images, with bias attributed to web-scraped training data or CLIP. This paper formalizes debiasing as weight optimization and proposes iterative distribution alignment (IDA); it reports effective gender and ethnic debiasing in practical GPU time, while noting prompt-specific reruns and a lack of formal explanation.

  • Problem

    Text-to-image diffusion models can exhibit social bias, potentially originating in web-scraped training data or inherited CLIP bias.

    Source: §1 · p. 1
  • Method

    The paper uses text descriptions of biased groups to guide diffusion and optimizes their weights, proposing iterative distribution alignment to match a biased distribution to a uniform one.

    Source: §1 · p. 1, §3.2 · p. 4
  • Results

    Up to 20 minutes on an A100, IDA effectively addressed gender and ethnic bias in the Stable Diffusion experiments.

    Source: §5 · p. 8
  • Takeaways & Limitations

    The reported experiments examine resolving social bias in text-to-image diffusion models from gender and ethnicity perspectives.

    Source: §5 · p. 8

    A new prompt requires rerunning the algorithm, which may be costly in practice; the authors also report no formal proof or explanation of IDA's success.

    Source: §4.4 · p. 8

Abstract

from arXiv · show

Learning-based Text-to-Image (TTI) models like Stable Diffusion have revolutionized the way visual content is generated in various domains. However, recent research has shown that nonnegligible social bias exists in current state-of-the-art TTI systems, which raises important concerns. In this work, we target resolving the social bias in TTI diffusion models. We begin by formalizing the problem setting and use the text descriptions of bias groups to establish an unsafe direction for guiding the diffusion process. Next, we simplify the problem into a weight optimization problem and attempt a Reinforcement solver, Policy Gradient, which shows sub-optimal performance with slow convergence. Further, to overcome limitations, we propose an iterative distribution alignment (IDA) method. Despite its simplicity, we show that IDA shows efficiency and fast convergence in resolving the social bias in TTI diffusion models. Our code will be released.

1. Introduction

Text-to-image diffusion models can reflect social bias from web-scraped training data or inherited CLIP bias, and Stable Diffusion exhibits gender and ethnic skews in generated images. The paper formalizes debiasing as weight optimization, proposes iterative distribution alignment (IDA), and reports efficient, fast convergence.

1. Introduction

  • Stable Diffusion showed a 74% preference for males and a bias toward whiteness, while methods for resolving these biases remained under-explored.The study uses the Fitzpatrick Skin Scale, which divides people into six skin-type groups.Source: §1 · p. 1
  • The paper formalizes debiasing with text descriptions of biased groups as an unsafe direction, then optimizes their weights; Policy Gradient was slow to converge and sub-optimal, motivating IDA.IDA matches the biased distribution to a unique distribution.Source: §1 · p. 1
  • Generated examples show prompt-dependent stereotypes: “good-looking person” prompts skew toward white young males, cashier toward females, and CEO toward whiteness and masculinity.The authors describe these patterns as an ethical concern.Source: §1 · p. 1, Figure 1 · p. 2
  • IDA is presented as an efficient, fast-converging method for resolving social bias in text-to-image diffusion models.The authors also explore gender bias across occupations.Source: §1 · p. 2

2. Related Works

Text-to-image diffusion models generate images conditioned on natural-language descriptions. Prior work documents social biases in generated images, while the paper identifies resolving social bias in these models as an unaddressed problem.

Text-to-image Diffusion models

  • Text-to-image generation is conditional image generation: sampled images are intended to match the natural-language description.Diffusion models learn to reverse a noising process and sample images from a prior Gaussian distribution.Source: §2 · p. 2

Bias in Text-to-image Diffusion models

  • Luccioni et al. (2023) and Naik & Nushi (2023) report social biases across text-to-image systems and attributes, including whiteness and masculinity.The studies examine variations across attributes such as gender, ethnicity, professions, age, race, and geographical location.Source: §2 · p. 2
  • The authors state that, to their knowledge, no prior research had formally addressed resolving social bias in text-to-image diffusion models.Source: §2 · p. 2

3. Method

The method turns social debiasing into weight optimization over text-described groups, then uses iterative distribution alignment (IDA) to move generated frequencies toward uniformity. IDA reduces KL divergence and yields balanced gender and ethnic distributions, whereas the policy-gradient solver converges slowly and is less effective.

3.1. Background on Diffusion models

  • Text-to-image diffusion conditions image generation on a natural-language description; DDPM first adds noise and then generates images through an iterative reverse process.The forward process progressively perturbs clean data, while the reverse process starts from noise.Source: §3.1 · pp. 2–3

3.2. Problem Formulation

  • The method seeks uniform generated frequencies across evaluation attributes by combining their text descriptions into a weighted unsafe direction that guides diffusion.The weights are optimized to balance attributes and debias generated samples.Source: §3.2 · p. 3
  • The authors cast guided generation as a black-box mapping from group-description weights to class-wise frequencies and define loss using KL divergence from a uniform distribution.The normalized frequency vector is compared with the uniform distribution over attributes.Source: §3.2 · pp. 3–4

3.3.1. REINFORCEMENT SOLVER

  • The policy-gradient solver samples candidate weights and updates its parameters using rewards based on loss, but experiments find slow convergence and unfavorable debiasing effectiveness.The algorithm stops when collected loss falls below a predefined threshold.Source: §3.3.1 · p. 4

3.3.2. ITERATIVE DISTRIBUTION ALIGNMENT

  • IDA uses the previous iteration’s residual from uniformity to update weights, penalizing above-average groups and encouraging below-average groups.The process feeds generated-image frequencies back into the weights and stops when KL loss is below a threshold.Source: Figure 3 · p. 4, §3.3.2 · p. 5
  • IDA largely reduces KL divergence and achieves favorable performance in 1–3 iterations, with gender and ethnic distributions redistributed toward balance.The figure describes balanced distributions after IDA; the text reports the 1–3-iteration result.Source: Figure 2 · p. 3, §3.3.2 · p. 5
  • The automatic classifier crops generated faces and matches them to group descriptions using CLIP cosine similarity.Face cropping is used to exclude background interference during classification.Source: §3.3.2 · p. 5, Figure 4 · p. 5

4. Experiments

IDA substantially reduced gender and ethnic bias in Stable Diffusion, also reducing occupation-specific gender bias while preserving reported image fidelity and text alignment. The experiments contrast its fast convergence with the slower reinforcement solver and note prompt-specific and explainability limitations.

4.1. Experimental Settings

  • Experiments use Stable Diffusion, evaluate male/female gender and six Fitzpatrick skin types, and estimate generated-image attributes using FaceNet crops and CLIP matching.Each iteration generates 100 images from prompts containing “person” without gender or ethnicity preferences.Source: §4.1 · pp. 5–6

4.2. Main Results.

  • After one IDA iteration, male/female frequencies shifted from 74%/26% to 48%/52%, while KL divergence fell from 0.12 to 0.0008.One additional iteration further improved gender debiasing.Source: §4.2 · p. 6, Table 1 · p. 6
  • After one iteration, ethnic-bias KL divergence fell from 0.238 to 0.007, then to 0.003 after another iteration.The distribution shifted toward uniformity across the six Fitzpatrick skin types.Source: §4.2 · p. 6, Table 2 · p. 6
  • IDA visualizations show gender and skin-color edits while preserving major image structure, and the reported evaluation found no effect on image fidelity or text alignment.The fidelity and alignment evaluation reports COCO FID-30k scores and CLIP distance.Source: §4.2 · pp. 6–8, Figure 5 · p. 6, Table 3 · p. 8
  • The reinforcement solver needed over 50,000 iterations to converge in simulation, while IDA achieved promising results in 1–3 iterations.The paper reports IDA taking around 5–20 minutes on an A100 GPU and describes the solver's runtime as impractical in realistic settings.Source: §4.2 · p. 7, Figure 7 · p. 7

4.3. Gender Bias Study on Occupations

  • For six occupations, IDA reduced gender bias in both higher- and lower-paying roles, including cashier and politician distributions.Cashiers shifted from about 7 in 10 female images to nearly uniform; politicians began at up to 90% male, with around 25% of male figures changed to female.Source: Table 4 · p. 8, §4.3 · p. 8

4.4. Discussion and Limitations

  • IDA must be rerun when a prompt changes, which may be costly in practice, and the authors report no formal explanation or proof for its success.They infer a possible connection to positive correlation between outputs and conditional text embeddings.Source: §4.4 · p. 8

5. Conclusion

The paper investigates resolving social bias in text-to-image diffusion models from gender and ethnicity perspectives. It reports that IDA can address this bias within practical GPU hours and calls for further work on efficiency, explainability, and ethical alignment.

5. Conclusion

  • The paper investigates social-bias mitigation in text-to-image diffusion models from gender and ethnicity perspectives.It reports that IDA effectively resolves bias within practical GPU hours, up to 20 minutes on an A100.Source: §5 · p. 8
  • The authors identify efficiency and explainability as limitations and future-work directions.Source: §5 · p. 8
  • The paper describes social bias in text-to-image models as under-explored and hopes to inspire work aligning generative AI with social ethics.Source: §5 · p. 8
Loading 2402.14577v1…