GradBias: Unveiling Word Influence on Bias in Text-to-Image Generative Models

Moreno D'Incà, Elia Peruzzo, Massimiliano Mancini, Xingqian Xu, Humphrey Shi, Nicu Sebe · DOI

Abstract

Current research on fairness in Text-to-Image (T2I) models primarily focuses on a narrow set of predefined attributes like gender and race. This paper presents a novel framework that moves beyond these "closed-set" limitations. By leveraging Large Language Models (LLMs) for bias proposal and Vision Question Answering (VQA) for measurement, the authors identify a wide array of "open-set" biases. Crucially, they introduce GradBias, a gradient-based attribution method that identifies the specific words in a prompt responsible for biased outputs, providing a scalable and efficient way to explain model behavior.

Introduction

Text-to-Image models have shown remarkable capabilities but are prone to inheriting and amplifying societal biases. Most existing evaluation methods are "closed-set," targeting a handful of social categories. However, biases can manifest in unexpected ways, such as a model's preference for specific brands (e.g., Apple laptops) or stylistic associations with certain objects. Identifying these biases and, more importantly, understanding their linguistic triggers is essential for developing fairer generative systems.

Methodology

The proposed framework operates in three distinct stages to discover, quantify, and explain bias:

  1. Bias Proposal: An LLM (Llama2-7B) analyzes real-world captions to suggest potential bias dimensions (e.g., "train color," "laptop brand") and defines relevant classes.
  2. Image Generation & Evaluation: The target T2I model generates images from these captions. A VQA model (Llava1.5-13B) then answers LLM-generated questions about these images to determine the distribution of classes.
  3. Quantification & Attribution:
    • OpenBias measures bias intensity using normalized entropy of the VQA outputs. Low entropy indicates high bias toward specific classes.
  4. GradBias attributes bias to input tokens. By backpropagating the loss from the VQA output through the T2I model to the input text, it calculates gradient magnitudes for each word, indicating its influence on the biased result.
The GradBias and OpenBias pipeline, illustrating the flow from caption to bias proposal, image generation, VQA evaluation, and finally word-level influence attribution.

Key Insights

The framework revealed several critical aspects of T2I bias:

  • Influence of Seemingly Neutral Words: Words like "chef" or "doctor" strongly drive gender bias, even when the prompt is intended to be neutral. GradBias identifies these high-influence tokens effectively.
  • Brand and Contextual Bias: Models like Stable Diffusion XL exhibit significant brand bias (e.g., favoring Apple logos) and socioeconomic correlations (e.g., associating specific road types with certain demographics).
  • Efficiency of GradBias: Unlike traditional "leave-one-out" methods that require multiple inferences, GradBias identifies influential words in a single backward pass, making it highly scalable for complex prompts.

Results and Validation

The effectiveness of the framework was validated through several experiments:

  • Human Alignment: OpenBias scores demonstrated a high correlation with human perception of bias intensity, with an Absolute Mean Error of only 0.15 and 67% agreement on bias direction.
  • GradBias Performance: In benchmarking against other explanation methods, GradBias achieved a 48.23% Top-1 accuracy in identifying the most influential word for a bias on Stable Diffusion 2, significantly outperforming random and heuristic baselines.
Comparison of OpenBias intensity scores with human judgment across various bias categories, showing strong alignment.

Conclusion

GradBias and OpenBias provide a comprehensive toolkit for auditing T2I models. By automating the discovery of novel biases and providing a mathematically grounded way to attribute them to specific prompt words, this work paves the way for more targeted "fair guidance" and mitigation strategies in generative AI.

Summary updated

BibTeX
@article{dinca2025gradbias,
  author = {Moreno D'Incà and Elia Peruzzo and Massimiliano Mancini and Xingqian Xu and Humphrey Shi and Nicu Sebe},
  title = {{GradBias: Unveiling Word Influence on Bias in Text-to-Image Generative Models}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2025},
  doi = {10.1109/tpami.2025.3592901},
}
Figure