Text-to-Image (TTI) models, such as Stable Diffusion, have revolutionized content creation but frequently exhibit significant social biases, often underrepresenting minorities or reinforcing gender stereotypes in professional contexts. While the prevailing narrative often attributes these biases to imbalanced training datasets, this research investigates a more fundamental bottleneck: the text embedding space.
This paper demonstrates that biased text embeddings (such as CLIP) are a "necessary condition" for bias in diffusion models. If the underlying mathematical coordinates used to understand the world are skewed, the model will produce biased images even if it is trained on perfectly balanced data.
The Embedding Bottleneck in Generation
The authors investigate whether a biased text embedding—where a prompt like "nurse" is mathematically closer to "woman" than "man"—forces a diffusion model to generate biased outputs regardless of the training data.
To explore this, the researchers established a Theoretical Framework using Girsanov’s theorem to link the score function of a diffusion model to the resulting image distribution. They proved that if a prompt embedding is significantly closer to one protected attribute than another, the model is mathematically compelled to produce an imbalanced distribution of images.
To validate this empirically, they conducted a "From-Scratch" Proof. They created a synthetic dataset of 36,000 images with a perfect 50/50 gender split for various professions. They then trained a diffusion model from scratch using biased embeddings (w2vNEWS). Despite the perfectly balanced training data, the model still favored stereotypes in its output (e.g., generating more female nurses). This confirms that an unbiased embedding space is a requirement for a fair model; data balancing is only half the battle.
The Feedback Loop: Bias in Evaluation
Beyond generation, the paper identifies a critical issue in how we measure success. Automated tools like CLIPScore are frequently used to evaluate "prompt-image alignment"—how well a generated image matches a text caption. However, because these metrics rely on the same biased embeddings, they create a feedback loop that rewards stereotypical content.
The authors found that CLIPScore gives higher alignment points to stereotypical images. In their audit:
- Male medical professionals received a 0.02 higher score than females for the prompt "doctor."
- Female nurses received a 0.061 higher score than males for the prompt "nurse."
This means a model generating only male doctors would technically receive a higher "accuracy" score than a perfectly balanced model, simply because the word "doctor" is closer to "man" in CLIP's latent space.
Proposed Solution: Subclass-Score
To break this cycle, the authors propose a new evaluation method called subclass-score. This method adapts the concepts of "multiaccuracy" and "multicalibration" from classical supervised learning to the generative context.
Instead of measuring the similarity between an image and a general prompt (e.g., "doctor"), the subclass-score measures similarity against a set of attribute-specific prompts (e.g., "male doctor," "female doctor") and takes the maximum. This prevents the "gravity" of a biased base embedding from skewing the results. In testing, the subclass-score remained consistent across different gender ratios, effectively debiasing the evaluation process compared to the standard CLIPScore.
Key Results and Implications
- Correlation: The study found a measurable correlation ($R^2 = 0.209$) between the gender bias present in CLIP embeddings and the actual proportion of men and women generated by Stable Diffusion 2.1 across 146 professions.
- The "Necessary Condition": The most striking insight is that you cannot "train away" bias if the very coordinates the model uses to perceive the world are skewed.
Limitations and Future Work
While the subclass-score is effective, it requires a predefined list of attributes (like gender or race), and identifying which attributes are appropriate for a given prompt remains a non-trivial challenge. Furthermore, while the paper establishes that unbiased embeddings are a necessary condition for fairness, further research is required to determine the sufficient conditions needed to guarantee a truly fair generative model. Future work will also need to scale these "from-scratch" experiments beyond the 64x64 resolution used in this study to capture the full complexity of high-resolution commercial models.
Summary updated