REVIEW 3 major objections 6 minor 34 references
How Do Generative Models Draw a Software Engineer? A Case Study on Stable Diffusion Bias
T0 review · 3 major / 6 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Stable Diffusion versions 2, XL, and 3 all generate images of software engineers that are overwhelmingly male and skewed toward White or Asian ethnicity, and explicitly naming the occupation significantly worsens the gender skew.
desk verdict A solid empirical audit that convincingly shows Stable Diffusion skews male when drawing software engineers; the ethnicity-rare-class claims need per-class labeler metrics before they can be taken at face value. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The argument is carried by a controlled empirical comparison: 56 software-engineering tasks from prior work are turned into two parallel prompt sets—“Photo portrait of a person that <task>” and “Photo portrait of a software engineer that <task>”—and each of three Stable Diffusion versions generates 20 images per prompt, yielding 6,720 images. Gender and ethnicity are labelled automatically by the BLIP visual-question-answering model, with the labels validated against a manually labelled 534-image subsample at 95% confidence and ±10% margin of error. Bias is then quantified with statistical-parity measures: gender bias is the absolute difference between the share of male and female images, and ethnicity bias is the gap between the most and least represented of five ethnicity categories.
What would settle it
Re-label all 6,720 generated images with human annotators or an independent, higher-accuracy model and check whether the male-share and White/Asian-dominant distributions persist; if, for example, SD 2's SE-prompt images turn out not to be roughly 99% male or SD XL's not roughly 99% White, the headline numbers would be overturned.
Extended reading notes
Core claim
The paper's central claim is that Stable Diffusion models are systematically biased when generating images of software engineers: across 56 software-related tasks, all three versions (SD 2, SD XL, SD 3) produce a large majority of male figures, and the bias grows when the prompt explicitly says “software engineer”—gender bias rises from 0.47 to 0.98 for SD 2, from 0.71 to 0.96 for SD XL, and from 0.59 to 1.00 for SD 3 on a 0–1 scale. For ethnicity, SD 2 and SD XL are strongly skewed toward White figures (87.27% and 98.72% with the SE prompt), while SD 3 is slightly skewed toward Asian figures (69.18%), and all models severely under-represent Black and Arab figures regardless of prompt style. The authors conclude that these models, including the newer SD 3 with its safety filters, are not safe to use for large-scale SE-related content without explicit bias checks.
Load-bearing premise
The automated BLIP gender and ethnicity labels used to compute every reported percentage are accurate enough on the full dataset, even though they were only spot-checked on a 534-image subsample with a 10-percentage-point margin of error and ethnicity accuracy as low as 0.91.
Editorial extensions
If this is right
- Practitioners who use Stable Diffusion to generate SE-related images will, without mitigation, obtain content that visually portrays software engineers as overwhelmingly male and mostly White or Asian, which can reinforce stereotypes in advertising, tutorials, and web content.
- Naming the occupation in a prompt is not a neutral act: it amplifies gender bias in every Stable Diffusion version tested, so prompt design alone cannot fix the problem.
- The newest model, SD 3, does not escape the pattern: although its ethnicity distribution is more balanced between White and Asian, it still severely under-represents Black and Arab figures, and its gender bias is the highest of the three when the SE keyword is used.
- Organisations adopting these models for large-scale content generation need explicit bias checks or prompt strategies that specify gender and ethnicity, since statistical parity is not achieved by default.
Reading between the lines
- A natural extension would be to test whether the male skew is caused by the occupation label itself or by the specific task verbs common in the SE prompt set, since prior work has shown that other occupation words can reverse gender skews.
- The consistently severe under-representation of Black and Arab figures across all three models and both prompt styles suggests the cause lies in the training-data distribution rather than in prompt wording, so targeted data filtering or fine-tuning would likely shrink the ethnicity gap more than any prompt rewrite.
- A direct follow-up could measure how many explicitly enumerated gender and ethnicity values in a prompt are needed to approach statistical parity, and what cost in image quality that enumeration incurs.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. This manuscript reports an empirical audit of gender and ethnicity bias in three Stable Diffusion versions (SD 2, SD XL, SD 3). The authors generate 6,720 images from 56 software-engineering tasks using two prompt styles, one including the keyword "Software Engineer" and one without role specification. They label the images automatically with BLIP VQA, validate the labels on a 534-image subsample, and compute statistical-parity style bias scores. The paper reports that all three models are strongly male-biased when depicting software engineers, that including the "Software Engineer" keyword increases gender bias in all versions, that SD 2 and SD XL favor White figures while SD 3 tends to favor Asian figures, and that Black and Arab figures are under-represented across all models and prompt styles. Task-level bias results and practitioner recommendations are also provided.
Significance. The study addresses a timely and socially important question, and its basic empirical design is a strength: 6,720 generated images, 20 repetitions per prompt, three model families, and a public replication package are concrete assets. The gender-bias finding is likely robust given the near-perfect gender-label agreement reported in Table I. If the ethnicity underrepresentation claim were fully supported, the paper would be a valuable contribution to fairness research in software engineering. However, the Black/Arab part of the headline is currently under-evidenced because the labeler validation does not report per-class accuracy on these rare categories, and the "significance" language is not backed by inferential statistics. These issues are fixable within the manuscript's scope.
major comments (3)
- [Section III-B, Table II, Figure 2] The validation of BLIP's ethnicity labels reports only overall Accuracy and Weighted F1 per model/prompt-style cell. The central claim that "all models significantly under-represent Black and Arab figures" depends on very small proportions (e.g., SD XL SE: Black 0.91%, Arab 0.00%; SD 3 General: Black 2.04%, Arab 0.89%). A labeler that never outputs Black or Arab can still achieve the reported aggregate scores because these classes are only a few percent of the sample. Without per-class precision and recall, a confusion matrix, or manual verification of all images labeled Black/Arab plus a sample of false negatives, the measured underrepresentation may be an artifact of BLIP rather than of Stable Diffusion. Please report per-class validation metrics and, if possible, manually inspect all rare-class images.
- [Section IV-A, Tables III and IV] The abstract and the RQ1/RQ2 answers use the word "significantly" (e.g., "significantly increases the bias towards images representing Male figures"), but no statistical test or confidence interval is reported for the bias estimates or for the prompt-style variations (+69%, +108%, +35%). These are point estimates from 1,120 images per cell. With these sample sizes, binomial confidence intervals are straightforward to compute. Add confidence intervals for the proportions and for the differences between General and SE conditions, or a formal test such as a chi-square or bootstrap test, and reserve "significant" for results supported by such evidence.
- [Section III-C, Table V] The thresholds used to classify task-level bias as "significantly high" (≥0.8) and "fair" (≤0.2) are introduced without justification or sensitivity analysis, and they directly determine the RQ3 answer that no task has a fair ethnicity distribution. The paper should justify these thresholds, provide a sensitivity analysis, or report the continuous bias values so that readers can judge the task-level claims independently of arbitrary cutoffs.
minor comments (6)
- [Section III-B, Eq. (1)] In the description of Cochran's formula, p is described as "the confidence level (95% in our case)", but in the standard formula p denotes the expected proportion. Please correct this notational confusion.
- [Tables I and II] The "±0.1" entries appear to be the pre-specified 10% margin of error rather than estimated confidence intervals for accuracy; they produce intervals outside [0,1] for values like 0.98 and 1.00. Clarify what these intervals represent or replace them with actual bootstrap or exact confidence intervals.
- [Section III-A] The phrase "To account for the non-stochastic behavior of image-generation models" should read "stochastic behavior"; the models are stochastic, which is why 20 repetitions per prompt are generated.
- [Section IV-C] The text contains a typo, "Perfoms support tasks", while Table V lists "Performs support tasks"; please unify the wording.
- [Section III-B, ethnicity mapping] The statement that no image was mapped to the "Other" category would be more convincing if the paper explained how ambiguous BLIP labels were mapped to the five census-based categories and whether the two manual annotators agreed on this mapping.
- [Figures 1 and 2] Add sample sizes per condition to the figures (or state in the captions that each bar is based on 1,120 images) so that small percentages such as 0.00% and 0.18% can be interpreted with the appropriate denominator.
Circularity Check
No significant circularity: the study is a direct empirical audit of generated images using externally validated labels.
full rationale
The paper's claims are empirical measurements, not derivations from a fitted model or from a self-citation chain. Images are generated from fixed prompts, labeled by BLIP, and the gender/ethnicity distributions (Figures 1 and 2, Tables III and IV) are computed directly from those labels via simple proportion formulas (Equations 2 and 3). No parameter is fitted to the target conclusion, and no quantity is defined in terms of the outcome it is said to predict. The fairness criterion (statistical parity) is an external, standard definition, and the citations used for it, including the authors' own prior work, are not load-bearing because the bias metric is a direct descriptive statistic of the labeled data. The only plausible circularity concern is that BLIP, as a web-trained model, might share the stereotypes being measured. But this is not circularity by construction: the paper validates BLIP against a manually labeled subsample and reports accuracy and weighted F1; the headline proportions are aggregates of those labels, not outputs of a model whose parameters were chosen to reproduce the conclusion. Concerns about per-class recall on rare ethnicity categories are validity threats, not circularity. Self-citations appear in the paper, but they justify prior context and recommendations, not the empirical result itself. Accordingly, the derivation chain is self-contained with respect to the claims made, and the circularity score is 0.
Assumptions & free parameters
free parameters (3)
- High-bias threshold =
0.8
- Fairness threshold =
0.2
- Margin of error for BLIP validation =
10%
assumptions (6)
- domain assumption Statistical parity (equal representation) is the appropriate fairness criterion for image generation.
- domain assumption BLIP provides valid gender and ethnicity labels for generated images.
- domain assumption Binary gender classification is sufficient for this analysis.
- domain assumption The 56 tasks and prompt templates are representative of software engineering activities.
- domain assumption Adding 'photo portrait' to prompts produces images with humans and does not introduce systematic bias.
- standard math Cochran's sample size formula with finite population correction is correctly applied.
Cite this review
Pith. "Pith review of How Do Generative Models Draw a Software Engineer? A Case Study on Stable Diffusion Bias." pith.science (2026). https://pith.science/paper/W2E25FUR
@misc{pith2026250109014,
author = {Pith},
title = {Pith review of: How Do Generative Models Draw a Software Engineer? A Case Study on Stable Diffusion Bias},
year = {2026},
howpublished = {\url{https://pith.science/paper/W2E25FUR}},
note = {Machine review of arXiv:2501.09014}
}
read the original abstract
Generative models are nowadays widely used to generate graphical content used for multiple purposes, e.g. web, art, advertisement. However, it has been shown that the images generated by these models could reinforce societal biases already existing in specific contexts. In this paper, we focus on understanding if this is the case when one generates images related to various software engineering tasks. In fact, the Software Engineering (SE) community is not immune from gender and ethnicity disparities, which could be amplified by the use of these models. Hence, if used without consciousness, artificially generated images could reinforce these biases in the SE domain. Specifically, we perform an extensive empirical evaluation of the gender and ethnicity bias exposed by three versions of the Stable Diffusion (SD) model (a very popular open-source text-to-image model) - SD 2, SD XL, and SD 3 - towards SE tasks. We obtain 6,720 images by feeding each model with two sets of prompts describing different software-related tasks: one set includes the Software Engineer keyword, and one set does not include any specification of the person performing the task. Next, we evaluate the gender and ethnicity disparities in the generated images. Results show how all models are significantly biased towards male figures when representing software engineers. On the contrary, while SD 2 and SD XL are strongly biased towards White figures, SD 3 is slightly more biased towards Asian figures. Nevertheless, all models significantly under-represent Black and Arab figures, regardless of the prompt style used. The results of our analysis highlight severe concerns about adopting those models to generate content for SE tasks and open the field for future research on bias mitigation in this context.
Figures
Reference graph
Works this paper leans on
-
[1]
Large-scale text-to-image generation models for visual artists’ creative works,
H.-K. Ko, G. Park, H. Jeon, J. Jo, J. Kim, and J. Seo, “Large-scale text-to-image generation models for visual artists’ creative works,” in Procs. of the 28th Int. Conf. on Intelligent User Interfaces , ser. IUI ’23. New York, NY , USA: ACM, 2023, p. 919–933. [Online]. Available: https://doi.org/10.1145/3581641.3584078
arXiv 2023
-
[2]
AI Image Statistics for 2024: How Much Content Was Created by AI,
A. Valyaeva, “AI Image Statistics for 2024: How Much Content Was Created by AI,” Aug. 2023. [Online]. Available: https: //journal.everypixel.com/ai-image-statistics
work page 2024
-
[3]
Easily accessible text-to-image generation amplifies demographic stereotypes at large scale,
F. Bianchi, P. Kalluri, E. Durmus, F. Ladhak, M. Cheng, D. Nozza, T. Hashimoto, D. Jurafsky, J. Zou, and A. Caliskan, “Easily accessible text-to-image generation amplifies demographic stereotypes at large scale,” in Procs. of the 2023 ACM Conf. on Fairness, Accountability, and Transparency, 2023, pp. 1493–1504
work page 2023
-
[4]
Social biases through the text-to-image gener- ation lens,
R. Naik and B. Nushi, “Social biases through the text-to-image gener- ation lens,” in Procs. of the 2023 AAAI/ACM Conf. on AI, Ethics, and Society, 2023, pp. 786–808
work page 2023
-
[5]
Data-driven analysis of gender fairness in the software engineering academic landscape,
G. d’Aloisio, A. D’Angelo, F. Marzi, D. Di Marco, G. Stilo, and A. Di Marco, “Data-driven analysis of gender fairness in the software engineering academic landscape,” in European Conf. on Software Ar- chitecture. Springer Nature Switzerland Cham, 2023, pp. 89–103
work page 2023
-
[6]
A. D’Angelo, G. d’Aloisio, F. Marzi, A. Di Marco, and G. Stilo, “Uncovering gender gap in academia: A comprehensive analysis within the software engineering community,” Journal of Systems and Software , p. 112162, 2024
work page 2024
-
[7]
Understanding fairness in software engineering: Insights from stack exchange sites,
E. Sesari, F. Sarro, and A. Rastogi, “Understanding fairness in software engineering: Insights from stack exchange sites,” in ESEM ’24: Procs. of the 18th ACM/IEEE Int. Symposium on Empirical Software Engineering and Measurement, X. Franch, M. Daneva, S. Mart ´ınez-Fern´andez, and L. Quaranta, Eds. ACM Press Digital Library, Oct. 2024, pp. 269–280
work page 2024
-
[8]
Perceived diversity in software engineering: a systematic literature review,
G. Rodr ´ıguez-P´erez, R. Nadri, and M. Nagappan, “Perceived diversity in software engineering: a systematic literature review,”Empirical Software Engineering, vol. 26, pp. 1–38, 2021
2021
Show all 34 references
-
[9]
It is giving major satisfaction: Why fairness matters for developers,
E. Sesari, F. Sarro, and A. Rastogi, “It is giving major satisfaction: Why fairness matters for developers,” 2024. [Online]. Available: https://arxiv.org/abs/2410.02482
2024 arXiv
-
[10]
High- resolution image synthesis with latent diffusion models,
R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer, “High- resolution image synthesis with latent diffusion models,” in Procs. of the IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR) , June 2022, pp. 10 684–10 695
2022
-
[11]
Sdxl: Improving latent diffusion models for high-resolution image synthesis,
D. Podell, Z. English, K. Lacey, A. Blattmann, T. Dockhorn, J. M ¨uller, J. Penna, and R. Rombach, “Sdxl: Improving latent diffusion models for high-resolution image synthesis,” arXiv preprint arXiv:2307.01952 , 2023
2023 arXiv
-
[12]
Scaling rectified flow transformers for high-resolution image synthesis,
P. Esser, S. Kulal, A. Blattmann, R. Entezari, J. M ¨uller, H. Saini, Y . Levi, D. Lorenz, A. Sauer, F. Boeselet al., “Scaling rectified flow transformers for high-resolution image synthesis,” in Forty-first Int. Conf. on Machine Learning, 2024
2024
-
[13]
A case study of fairness in generated images of Large Language Models for Software Engineering tasks,
M. Sami, A. Sami, and P. Barclay, “A case study of fairness in generated images of Large Language Models for Software Engineering tasks,” in 2023 IEEE Int. Conf. on Software Maintenance and Evolution (ICSME), Oct. 2023, pp. 391–396, iSSN: 2576-3148. [Online]. Available: https:...
2023
-
[14]
She Elicits Requirements and He Tests: Software Engineering Gender Bias in Large Language Models,
C. Treude and H. Hata, “She Elicits Requirements and He Tests: Software Engineering Gender Bias in Large Language Models,” in 2023 IEEE/ACM 20th Int. Conf. on Mining Software Repositories (MSR), May 2023, pp. 624–629, iSSN: 2574-3864. [Online]. Available: https://ieeexplore.ie...
2023
-
[15]
Replication Package,
T. Fadahunsi, G. d’Aloisio, A. Di Marco, and F. Sarro, “Replication Package,” Dec. 2024. [Online]. Available: https: //github.com/giordanoDaloisio/sd-bias
2024
-
[16]
High- resolution image synthesis with latent diffusion models,
R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer, “High- resolution image synthesis with latent diffusion models,” in Procs. of the Conf. on Computer Vision and Pattern Recognition , 2022, pp. 10 684– 10 695
2022
-
[17]
Laion- 5b: An open large-scale dataset for training next generation image-text models,
C. Schuhmann, R. Beaumont, R. Vencu, C. Gordon, R. Wightman, M. Cherti, T. Coombes, A. Katta, C. Mullis, M. Wortsmanet al., “Laion- 5b: An open large-scale dataset for training next generation image-text models,” Advances in Neural Information Processing Systems , vol. 35, pp....
2022
-
[18]
Smiling women pitching down: auditing representational and presentational gender biases in image-generative ai,
L. Sun, M. Wei, Y . Sun, Y . J. Suh, L. Shen, and S. Yang, “Smiling women pitching down: auditing representational and presentational gender biases in image-generative ai,” Journal of Computer-Mediated Communication, vol. 29, no. 1, p. zmad045, 2024
2024
-
[19]
Stable Bias: Evaluating Societal Representations in Diffusion Models,
S. Luccioni, C. Akiki, M. Mitchell, and Y . Jernite, “Stable Bias: Evaluating Societal Representations in Diffusion Models,” Advances in Neural Information Processing Systems, vol. 36, pp. 56 338–56 351, Dec. 2023. [Online]. Available: https://proceedings.neurips.cc/paper file...
2023
-
[20]
Survey of bias in text-to- image generation: Definition, evaluation, and mitigation,
Y . Wan, A. Subramonian, A. Ovalle, Z. Lin, A. Suvarna, C. Chance, H. Bansal, R. Pattichis, and K.-W. Chang, “Survey of bias in text-to- image generation: Definition, evaluation, and mitigation,” arXiv preprint arXiv:2404.01030, 2024
2024 arXiv
-
[21]
Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation,
J. Li, D. Li, C. Xiong, and S. Hoi, “Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation,”
-
[22]
Organizational research: Determining appro- priate sample size in survey research appropriate sample size in survey research,
J. Kotrlik and C. Higgins, “Organizational research: Determining appro- priate sample size in survey research appropriate sample size in survey research,” Information technology, learning, and performance journal , vol. 19, no. 1, p. 43, 2001
2001
-
[23]
A coefficient of agreement as a measure of thematic classification accuracy
G. Rosenfield and K. Fitzpatrick-Lins, “A coefficient of agreement as a measure of thematic classification accuracy.” Photogrammetric Engineering and Remote Sensing , vol. 52, no. 2, pp. 223–227, 1986. [Online]. Available: http://pubs.er.usgs.gov/publication/70014667
1986
-
[24]
Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool,
A. A. Taha and A. Hanbury, “Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool,” BMC Medical Imaging, vol. 15, no. 1, p. 29, Aug. 2015. [Online]. Available: https://doi.org/10.1186/s12880-015-0068-x
2015 doi
-
[25]
On the use of evaluation measures for defect prediction studies,
R. Moussa and F. Sarro, “On the use of evaluation measures for defect prediction studies,” in Procs. of the 31st ACM SIGSOFT Int. Symposium on Software Testing and Analysis . New York, NY , USA: ACM, 2022. [Online]. Available: https://doi.org/10.1145/3533767.3534405
2022
-
[26]
The misgendering machines: Trans/hci implications of au- tomatic gender recognition,
O. Keyes, “The misgendering machines: Trans/hci implications of au- tomatic gender recognition,” Procs. of the ACM on human-computer interaction, vol. 2, no. CSCW, pp. 1–22, 2018
2018
-
[27]
Debiaser for Multiple Variables to enhance fairness in classification tasks,
G. d’Aloisio, A. D’Angelo, A. D. Marco, and G. Stilo, “Debiaser for Multiple Variables to enhance fairness in classification tasks,” Inf. Process. Manag., vol. 60, no. 2, p. 103226, 2023. [Online]. Available: https://doi.org/10.1016/j.ipm.2022.103226
2023
-
[28]
Democratizing quality- based machine learning development through extended feature models,
G. d’Aloisio, A. Di Marco, and G. Stilo, “Democratizing quality- based machine learning development through extended feature models,” in International Conference on Fundamental Approaches to Software Engineering. Springer Nature Switzerland Cham, 2023, pp. 88–110
2023
-
[29]
Weerts, An Introduction to Responsible Machine Learning, 2024
H. Weerts, An Introduction to Responsible Machine Learning, 2024. [Online]. Available: https://hildeweerts.github.io/ responsiblemachinelearning/
2024
-
[30]
Greenstableyolo: Optimizing inference time and image quality of text- to-image generation,
J. Gong, S. Li, G. d’Aloisio, Z. Ding, Y . Ye, W. B. Langdon, and F. Sarro, “Greenstableyolo: Optimizing inference time and image quality of text- to-image generation,” in Search-Based Software Engineering. Springer Nature Switzerland, 2024, pp. 70–76
2024
-
[31]
Search-based software engineering in the era of modern software systems,
F. Sarro, “Search-based software engineering in the era of modern software systems,” in 2023 IEEE 31st International Requirements En- gineering Conference (RE) , 2023, pp. 3–5
2023
-
[32]
Multi-objective search for gender-fair and semantically correct word embeddings,
M. Hort, R. Moussa, and F. Sarro, “Multi-objective search for gender-fair and semantically correct word embeddings,” Applied Soft Computing , vol. 133, p. 109916, 2023. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S1568494622009656
2023
-
[33]
Search-based automatic repair for fairness and accuracy in decision-making software,
M. Hort, J. M. Zhang, F. Sarro, and M. Harman, “Search-based automatic repair for fairness and accuracy in decision-making software,” Empirical Softw. Engg. , vol. 29, no. 1, 2024. [Online]. Available: https://doi.org/10.1007/s10664-023-10419-3
2024 doi
-
[2022]
Available: https://arxiv.org/abs/2201.12086
[Online]. Available: https://arxiv.org/abs/2201.12086
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.