Introduction
Current text-to-image (TTI) models like Stable Diffusion have demonstrated remarkable generative capabilities but suffer from deep-seated societal biases. Most existing debiasing efforts focus on surface-level output distributions—ensuring a 50/50 split of genders for a "doctor" prompt, for example. However, these methods often ignore latent representational entanglement, where the internal concept of "doctor" remains structurally linked to "male" features even when a female subject is generated.
BiasMap is a novel framework designed to look inside the "black box" of diffusion models. It quantifies this hidden entanglement using cross-attention maps and mitigates it in real-time through energy-guided sampling, producing images that are both statistically fair and conceptually disentangled.
Bias Discovery: Quantifying Entanglement
The first phase of BiasMap involves identifying where and how much concepts are entangled within the model's internal representations. The authors utilize Open Vocabulary Attention Maps (OVAM) to extract spatial masks for both semantic concepts (e.g., "profession") and demographic attributes (e.g., "gender" or "race").
By calculating the Intersection over Union (IoU) of these masks, BiasMap provides a precise metric for entanglement. A high IoU indicates that the model's internal "gaze" for a profession heavily overlaps with its representation of a specific demographic, signaling a deep-seated stereotype. This discovery phase revealed a "U-shaped" bias curve, where entanglement is highest at the very beginning and very end of the U-Net architecture.
Bias Mitigation: Energy-Guided Sampling
To address these biases, BiasMap intervenes during the image generation process. The authors frame mitigation as an energy-based guidance problem. The goal is to minimize the expected IoU between demographic and semantic masks during the denoising steps.
Because standard IoU is non-differentiable, the authors introduced a differentiable SoftIoU using entropy-regularized optimal transport. This SoftIoU serves as an energy penalty. At each step of the diffusion process, the model calculates the gradient of this energy and adjusts the latent trajectory to physically separate the overlapping concepts while maintaining overall image quality through standard Classifier-Free Guidance (CFG).
Key Insights and Results
The research yielded several critical insights into the nature of bias in generative models:
- Output Parity vs. Latent Fairness: Traditional methods like FairDiffusion can actually increase internal entanglement while fixing output statistics. They treat the symptom (the final image) without curing the underlying disease (the entangled latent space).
- Significant Entanglement Reduction: BiasMap reduced gender entanglement by 40.8% and race entanglement by 39.6% compared to baseline Stable Diffusion v1.5.
- Methodological Synergy: When combined with distributional methods (e.g., FD+BiasMap), the system achieves the "best of both worlds"—balanced output demographics (Risk Difference of 0.16) and low internal concept entanglement (mIoU of 0.189).
Conclusion and Future Work
BiasMap represents a significant step toward more transparent and fair generative AI. By moving beyond simple output statistics and addressing the structural entanglement of concepts, it offers a more robust way to mitigate societal stereotypes. While the method faces a strict fairness-fidelity trade-off at high guidance scales, it remains highly competitive in maintaining image quality (FID of 38.65). Future work will focus on intersectional identities and the compounding effects of multiple demographic attributes on internal representations.
Summary updated