How do generative models draw a software engineer? An empirical study on implicit bias of open-source image generation models
Year: 2025
Type: article
Abstract: Context: Generative models are nowadays widely used to generate graphical content used for multiple purposes. However, it has been shown that the images generated by these models could reinforce societal biases already existing in specific contexts. The Software Engineering (SE) community is not immune to 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. Objective: In this paper, we focus on understanding the implicit bias exposed by general-purpose open-source image generation models towards SE tasks. In addition, we investigate the extent to which it is possible to mitigate the bias by using prompt engineering techniques. Methods: We perform an extensive empirical evaluation of the implicit gender and ethnicity bias exposed by six popular open-source image generation models towards SE tasks. We obtain 20,160 images by feeding each model with three sets of prompts describing different software-related tasks: One set does not include any specification of the person performing the task, one set specifies that the person performing the task is a Software Engineer , and the last set explicitly request a fair representation of different genders and ethnicities. Next, we evaluate the gender and ethnicity disparities in the generated images. Results: The results indicate that all models exhibit a significant bias related to gender and ethnicity in SE tasks. Furthermore, we demonstrate that prompt engineering effectively reduces gender bias in only one of the six models; however, none of the models achieves fair representation with respect to ethnicity. Conclusion: The results of our analysis highlight serious concerns about the adoption of these models to generate content for SE tasks and open the field for future research on bias mitigation in this context.
Institutions: University of L'Aquila, University College London
Language: English
Subfield: Safety Research
Field: Social Sciences
Domain: Social Sciences
SDG: Reduced inequalities
Open Access status: hybrid
Estimated APC paid: $3,830
OpenAlex ID: W4415746513
