Auditing AI Images for Bias

Plenty of news stories have no image to go with them, and AI image generators look like an easy fix until you see who they picture as a construction worker or a social worker. This multi-year Studio project built an article-to-illustration pipeline, ran into the bias built into the models, and ended up building a tool to measure it.

View Project

Role

Faculty Lead Research Design

Technology

Stable Diffusion Flux LoRA LLMs

The problem

Platforms reward stories that have a strong image, and many news articles don’t have one, especially at small newsrooms with no budget for photographers or illustrators. When Stable Diffusion arrived, our first question was practical: can a reported article be turned into a good prompt, and the prompt into usable editorial art?

It can. In 2023 Knight Lab Studio teams built an automated path from article to LLM-written image prompt to generated illustration, and later a tool called PromptPal that rewrites an article into a stereotype-averse illustration prompt. But as soon as people appeared in the pictures, the models’ assumptions came with them. Ask for a doctor, a lawyer or a professor and Stable Diffusion over-represented white men. Ask for a fast food worker, a janitor or a social worker and it over-represented people of color; the prompt “social worker” returned a woman of color more than 99% of the time. Even when the team fed it more than 100 deliberately diverse reference images of race car drivers, it still returned almost entirely white men.

An image that misrepresents people does real damage in a news context, so the project changed direction.

Trying to fix the model

Over four training cycles in Winter 2024, the team fine-tuned LoRA models on SD-XL and tested one idea at a time, each with a clear hypothesis:

  • Over-represent the missing group. Train on illustrations of male social workers, male fast food workers and women in construction. The style transferred, but construction workers still came out male.
  • Fix the captions. Words like “hard hat” and “tractor” carried a gendered charge, and describing the wheelchairs in social work scenes made the model obsessed with wheelchairs. Rewriting the captions changed the output dramatically, which confirmed how much the language around training images matters, but very plain captions degraded faces.
  • Repair instead of retrain. Generate a high-quality image, then use IP-Adapter to mask and replace the biased features, with negative prompting to keep the results coherent.

Each round made progress for specific jobs. None of it generalized. Debiasing construction workers didn’t help professors, and the team kept running into a harder question: unbiased compared to what?

Building a way to measure it

If you can’t fully fix bias, you need to be able to measure it. In Spring 2024 the team stopped trying to fix the generator and built a yardstick instead: a demographic classifier, fine-tuned on 8,000 images, that can compare any set of images against census data for a place.

Classifier accuracy: gender 83% to 93%, race 70% to 81%
Classifier accuracy before and after fine-tuning. The hardest distinction was between Asian and Pacific Islander.

Then they pointed it at two things. First, more than 800 images the current model generated for “doctors” and “social workers.” The doctors roughly matched who actually works as a doctor in the U.S., which is itself far from the population as a whole. Second, real news photography: 150 Chicago Tribune images from one week in May 2024. Those turned out to be well balanced against Chicago’s population, at least in that sample, the imbalance the team set out to study lived in the models more than in the newsroom.

In 2025 the work moved to Flux, where new teams found the same pattern in new places: “a group of people” defaults to young adults in Western clothes, “a happy family” to a white two-parent household, a church to modern dress and a temple to traditional dress.

The result is less a finished product than a method: generate, measure against the real community, adjust, and be honest about where the tools still fall short.

Classifier notebook on Kaggle