Spatially Gated Demographic Steering for Debiasing Multi-Person Text-to-Image Generation
Organizations: Technische Hochschule Ingolstadt, Ingolstadt, Germany
Abstract
Text-to-Image models reproduce societal stereotypes, and existing mitigation applies one demographic correction to the whole scene. In multi-person scene generation this creates a trade-off: global steering improves aggregate balance only by homogenizing the people within an image. Steering-based methods like Embedding Arithmetic drive the intra-image diversity below the unsteered baseline. Text- and latent-projection approaches shift the aggregate skew with only marginal gains in intra-image diversity. We present Spatially Gated Steering (SGS), which steers the demographics of each person independently by extracting per-person masks from the Diffusion Transformer's (DiT) internal attention maps at a critical denoising timestep and applying a distinct demographic vector within each mask for the remaining steps. SGS needs no fine-tuning, inversion or layout specifications, and uses a lightweight segmentor over frozen DiT attention features to localize subjects at early timesteps. On skewed occupational prompts, SGS reaches high intra-image racial and gender diversity while keeping aggregate balance competitive and image quality near baseline, a result we validate on two architecturally distinct diffusion transformers, FLUX.1-Dev and SD3.5-Large. Codebase and model weights are available at https://github.com/cvims/spatially-gated-steering
Figures & tables
| FLUX.1-Dev | SD3.5-Large | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | CLIP | DR | DR | CLIP | DR | DR | ||||
| Baseline | 0.524 0.016 | 0.321 0.001 | – | 0.748 0.015 | 0.608 0.022 | 0.549 0.015 | 0.325 0.001 | – | 0.615 0.018 | 0.367 0.026 |
| EA [ 39 ] | 0.285 0.013 | 0.236 0.002 | +0.336 0.011 | 0.079 0.016 | 0.434 0.027 | 0.319 0.012 | 0.323 0.001 | +0.163 0.010 | 0.069 0.016 | 0.303 0.029 |
| SDID [ 25 ] | 0.515 0.016 | 0.314 0.001 | +0.118 0.008 | 0.797 0.013 | 0.593 0.023 | 0.573 0.015 | 0.322 0.001 | +0.006 0.015 | 0.628 0.017 | 0.456 0.026 |
| RespoDiff [ 40 ] | 0.540 0.017 | 0.315 0.001 | 0.055 0.006 | 0.737 0.017 | 0.624 0.022 | 0.575 0.015 | 0.326 0.001 | 0.042 0.009 | 0.584 0.018 | 0.458 0.025 |
| FairImagen [ 12 ] | 0.534 0.016 | 0.320 0.001 | +0.004 0.005 | 0.744 0.015 | 0.574 0.025 | 0.539 0.015 | 0.319 0.001 | +0.057 0.011 | 0.385 0.019 | 0.293 0.028 |
| vs. | Diversity | Faithful. | Preference |
|---|---|---|---|
| Baseline | 88.5% ∗ | 46.2% | 47.4% |
| EA | 90.5% ∗ | 89.4% ∗ | 75.6% ∗ |
| FairImagen | 88.8% ∗ | 45.8% | 46.8% |
| RespoDiff | 89.0% ∗ | 51.9% | 51.3% |
| SDID | 90.5% ∗ | 52.3% | 55.1% |
| Method | FPs | Time (s) | Overhead |
|---|---|---|---|
| Baseline | 21 | 7.8 0.1 | 1.0 |
| EA | 21 | 7.9 0.0 | 1.0 |
| SGS (K=2) | 33 | 12.3 0.0 | 1.6 |
| SGS (K=3) | 39 | 14.6 0.0 | 1.9 |
| SGS (K=4) | 45 | 16.8 0.0 | 2.2 |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Bin | mIoU | AP50 | AP50-95 |
|---|---|---|---|
| Bin 1 | 0.539 | 0.581 | 0.225 |
| Bin 2 | 0.583 | 0.661 | 0.287 |
| Bin 3 | 0.606 | 0.710 | 0.333 |
| Bin 4 | 0.626 | 0.736 | 0.360 |
| 3+4 | 0.631 | 0.747 | 0.368 |
| (mean) | ||||
|---|---|---|---|---|
| 2 | 0.733 | 0.748 | 2.050 | 0.662 |
| 3 | 0.683 | 0.766 | 3.075 | 0.861 |
| Mask source | |||||
| 2 | DETR | 0.843 | 0.896 | 0.792 | 0.743 |
| Oracle | 0.812 | 0.849 | 0.799 | 0.750 | |
| 3 | DETR | 0.722 | 0.806 | 0.835 | 0.738 |
| Oracle | 0.705 | 0.776 | 0.902 | 0.740 | |
| 4 | DETR | 0.643 | 0.720 | 0.834 | 0.756 |
| Oracle | 0.701 | 0.764 | 0.874 | 0.753 |
| Race | Gender | |||
|---|---|---|---|---|
| Classifier | Accuracy | Abstain | Accuracy | Abstain |
| FairFace | 95.7% | 2.5% | 99.7% | 0.0% |
| CLIP | 95.3% | 0.0% | 99.9% | 0.0% |
| DeepFace | 87.7% | 7.5% | 92.7% | 0.0% |
| (a) EA strength [ fixed] | |||||
| 1.5 | 0.573 | 0.722 | +0.009 | 0.916 | 0.026 |
| 2.0 | 0.708 | 0.757 | +0.027 | 0.900 | 0.033 |
| 2.5 | 0.723 | 0.740 | +0.010 | 0.890 | 0.042 |
| 3.0 | 0.636 | 0.738 | 0.134 | 0.876 | 0.052 |
| 3.5 | 0.438 | 0.566 | 0.762 | 0.842 | 0.104 |
| 2 | 8 | 0.713 | 0.784 | 0.097 | 0.760 | 0.097 |
|---|---|---|---|---|---|---|
| 10 | 0.718 | 0.783 | 0.123 | 0.759 | 0.102 | |
| 12 | 0.749 | 0.791 | 0.179 | 0.758 | 0.105 | |
| 14 | 0.754 | 0.783 | 0.237 | 0.757 | 0.106 | |
| 4 | 8 | 0.632 | 0.744 | +0.008 | 0.904 | 0.029 |
| 10 | 0.708 | 0.757 | +0.027 | 0.900 | 0.033 |
| 1.0 | 1.0 | 0.443 | 0.620 | 0.958 |
| 1.0 | 2.0 | 0.526 | 0.646 | 0.938 |
| 1.0 | 4.0 | 0.707 | 0.693 | 0.904 |
| 1.5 | 1.0 | 0.561 | 0.653 | 0.946 |
| 1.5 | 2.0 | 0.694 | 0.677 | 0.912 |
| 1.5 | 4.0 | 0.809 | 0.722 | 0.877 |
| 3 | 10 | 0.391 | 0.624 | 0.921 |
|---|---|---|---|---|
| 12 | 0.402 | 0.624 | 0.920 | |
| 14 | 0.427 | 0.642 | 0.919 | |
| 4 | 11 | 0.378 | 0.623 | 0.945 |
| 13 | 0.397 | 0.617 | 0.944 | |
| 16 | 0.424 | 0.617 | 0.944 |
| Baseline | SGS | |||||
|---|---|---|---|---|---|---|
| Occupation | ||||||
| Driver | 0.480 | 0.544 | 1.000 | 0.578 | 0.324 | 0.680 |
| Mover | 0.406 | 0.486 | 0.920 | 0.717 | 0.297 | 0.627 |
| Developer | 0.482 | 0.794 | 0.987 | 0.843 | 0.279 | 0.787 |
| Farmer | 0.426 | 0.759 | 0.987 | 0.761 | 0.324 | 0.587 |
| Guard | 0.503 | 0.333 | 0.813 | 0.661 | 0.270 | 0.720 |
Demographic Bias in T2I Models
Demographic bias in text-to-image models is the unequal or stereotyped representation of people across generated images.
See all 31 papers