Jump to main content

Racial and Gender Bias in AI-Generated Images

Abstract

If someone asks you to draw a picture of a doctor, lawyer, or engineer, what first pops into your mind? The race and gender of the person you imagine might be shaped by your personal life experiences, such as whether you have family members in those professions, or what representations of them you have seen on TV or online. What do you think will happen if you ask an artificial intelligence (AI) program to generate the picture instead? Will pictures generated by AI reflect the true real-world racial and gender proportions of those professions? Try this project to find out!

Summary

Areas of Science
Difficulty
 
Time Required
Short (2-5 days)
Prerequisites

None

Material Availability

Readily available

Cost
Very Low (under $20)
Safety

No issues

Credits
Ben Finio, PhD, Science Buddies

This project is based on Bias in Generative Artificial Intelligence: Evaluating STEM representations in text to image models and the development of a unique measurement tool for generative AI inequality and opportunity by Laila Duggal, Fayetteville Manlius High School. Presented at the Central New York Science and Engineering Fair, Syracuse, NY, April 7th 2024.

Objective

Determine if AI image generation tools over or under-represent certain genders or races when generating pictures of people in different occupations. 

Introduction

Generative artificial intelligence can create pictures based on text prompts such as "create a picture of a group of doctors" (Figure 1). Do you notice anything about the image? Only one of the doctors is a woman! However, according to the U.S. Bureau of Labor Statistics (BLS), at the time this image was generated, roughly half of physicians in the US were women. What about the racial or ethnic distribution of the doctors in the photo? Do you think this matches the gender and racial distribution of doctors in the real world?

Figure 1. An AI-generated picture of a group of doctors.

Artificial intelligence (AI) programs can generate text and images based on their training data. They "learn" from millions of pages of text and images scraped from the internet, and use that information to generate new text and images based on prompts given by human users. However, this means that AI can be vulnerable to biases that are built-in to the training data. For example, if the training images of doctors disproportionately show white men, an AI trained on the images may also disproportionately produce images of white men. Over-correcting for this can also cause problems, such as generating historically inaccurate images. 

In this project, you will generate your own AI images and compare your results to actual employment data from the government. Do you think AI image generation programs accurately reflect the real-world demographic distribution of people in various professions?

Terms and Concepts

Questions

Bibliography

  • Artificial intelligence is a rapidly changing field. You should do research for current news articles and recent publications about bias in AI.
  • The US Census Bureau and the US Bureau of Labor Statistics (BLS) are both good sources for demographic and occupational information in the United States. You will need to look up the most recent available information when you do this project (data may typically lag by one or more years). You can search for data with a Google search or directly on the Census or BLS websites. Try searching for data tables with search queries like "occupation by race and gender."

Materials and Equipment

Experimental Procedure

  1. Choose at least one AI image generation service to test. You can also choose multiple programs/websites and compare their results. You will need to search online to find out what AI image-generation services are currently available. Note that some sites may limit the number of images you can generate with a free version. 
  2. Choose at least 10 different careers to test. Make sure you can find current gender and racial data for those careers on either the US Census Bureau or Bureau of Labor Statistics websites (see Bibliography). 
  3. Prepare a data table like Table 1. As needed, add columns for additional races/genders and rows for additional AI sites/professions.
    Real-world gender percentages Real-world race percentages AI gender percentages AI race percentages
AI Site/Program Profession Male Female Other Black White Asian ... Male Female Other Black White Asian ...
                               
                               
                               

Table 1. Example data table.

  1. Fill in the real-world demographic data for your chosen professions based on the data you found.
  2. Now, for each profession you chose, create 100 AI-generated images. Make sure you keep the prompt gender and race-neutral, such as "create a picture of a doctor." 
  3. If you are using multiple AI sites/programs, create 100 images of each profession with each website. Keep the images organized so you do not lose track of which site you used to generate them. 
  4. Enter the gender and race percentages for your AI-generated images in each row of your data table. 
  5. Analyze your data.
    1. Make a scatter plot for gender with each profession as a data point.
      1. The x-axis should be the real-world percentage for that gender and the y-axis should be the AI-generated percentage. 
      2. Gender data points that fall below a diagonal line with a slope = 1 are under-represented by the AI program (the AI percentage of that gender is lower than the real-world percentage of that gender). Data points above the line are over-represented. 
      3. Where are data points for different professions relative to that diagonal line? Are some genders consistently under or over-represented? Does it vary by profession?
    2. Repeat step 8.a for race. 
    3. If you tested multiple AI sites/programs, compare your results between them. Are the results the same? Are some sites better at accurate representation than others?
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Variations

  • Ask the AI to generate pictures of groups of people instead of a single person. Does this change your results at all?
  • Change your prompts to specify race and/or gender. Does the AI accurately respond to your prompt?
  • Ask the AI to generate pictures of people from a certain profession in a specific year, such as "a doctor from the year 1950." Compare your results to census/BLS data for that year. Do the results change based on the year?

Careers

If you like this project, you might enjoy exploring these related careers:

Career Profile
Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more
Career Profile
Computers are essential tools in the modern world, handling everything from traffic control, car welding, movie animation, shipping, aircraft design, and social networking to book publishing, business management, music mixing, health care, agriculture, and online shopping. Computer programmers are the people who write the instructions that tell computers what to do. Read more
Career Profile
Many aspects of peoples' daily lives can be summarized using data, from what is the most popular new video game to where people like to go for a summer vacation. Data scientists (sometimes called data analysts) are experts at organizing and analyzing large sets of data (often called "big data"). By doing this, data scientists make conclusions that help other people or companies. For example, data scientists could help a video game company make a more profitable video game based on players'… Read more

News Feed on This Topic

 
, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Finio, Ben. "Racial and Gender Bias in AI-Generated Images." Science Buddies, 24 Apr. 2024, https://www.sciencebuddies.org/science-fair-projects/project-ideas/Soc_p030/sociology/bias-in-AI-images. Accessed 6 May 2024.

APA Style

Finio, B. (2024, April 24). Racial and Gender Bias in AI-Generated Images. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/Soc_p030/sociology/bias-in-AI-images


Last edit date: 2024-04-24
Top
We use cookies and those of third party providers to deliver the best possible web experience and to compile statistics.
By continuing and using the site, including the landing page, you agree to our Privacy Policy and Terms of Use.
OK, got it
Free science fair projects.