Stereotype

In AI, a stereotype is an over-generalised belief about a group of people that a model picks up from its training data and repeats in its outputs, such as linking certain jobs or traits to one gender or ethnicity.

A stereotype is an over-generalised belief about a group of people. AI models do not hold beliefs, but they learn statistical associations from the text and images people have produced, and those associations include society's stereotypes. When a model is asked to write about a nurse and defaults to she, or to picture a chief executive and produces only men, it is reproducing patterns in its training data, sometimes more strongly than they appear there.

An early, widely cited demonstration came in July 2016. In Man is to Computer Programmer as Woman is to Homemaker?, Tolga Bolukbasi and colleagues showed that word embeddings trained on Google News articles contained clear gender stereotypes, and that gender showed up as a measurable direction in the embedding space. They proposed a method to remove stereotyped links, such as between receptionist and female, while keeping legitimate ones, such as between queen and female.

Benchmarks followed for larger language models. StereoSet, published in April 2020 by Moin Nadeem, Anna Bethke and Siva Reddy, measures stereotypes about gender, profession, race and religion, and found strong stereotypical biases in BERT, GPT-2, RoBERTa and XLNet. A UNESCO study released on March 7, 2024, Bias Against Women and Girls in Large Language Models, tested GPT-2, GPT-3.5 and Meta's Llama 2. It found that women were linked to words such as home, family and children and men to business, executive, salary and career; that Llama 2 described women in domestic roles four times as often as men; and that Llama 2 produced negative content in 70% of completions of the prompt "a gay person is".

The harm comes in two forms. Stereotyped outputs shape how groups are portrayed in the text and images people read and share, and when models are used in hiring, lending or other decisions, the same associations can shape who gets opportunities. Because generative AI produces content at enormous scale, a small skew can be repeated millions of times.

Developers reduce stereotyping by curating training data, fine-tuning on balanced examples, adding filters and testing against benchmarks like StereoSet. These methods reduce the problem but do not remove it, and a benchmark only measures the groups and situations it includes. Testing a system in the setting where it will be used, with the people it will affect, tells you more than a headline score.

Common questions

Why do AI models produce stereotypes?

Models learn from large amounts of human-produced text and images, and that material contains stereotypes. The model picks up the statistical associations, such as which jobs appear alongside which pronouns, and reproduces them when it generates content. Training choices and the way outputs are sampled can make those patterns stronger or weaker.

How are stereotypes in AI measured?

Researchers use benchmark datasets that test whether a model prefers stereotyped completions over neutral or anti-stereotyped ones. StereoSet, for example, covers gender, profession, race and religion. Studies such as UNESCO's 2024 report also prompt models to write about different groups and count the roles and words they assign.

Can stereotypes be removed from AI models?

They can be reduced but not reliably removed. Methods include filtering and balancing training data, fine-tuning, and output filters, and the 2016 Bolukbasi paper showed how stereotyped associations can be stripped from word embeddings. Testing after each change is needed, because fixes for one group or prompt do not automatically carry over to others.

Is a stereotype the same as bias in AI?

A stereotype is one kind of bias. Bias in AI covers any systematic skew in a system's outputs or decisions, including errors from unrepresentative data or flawed measurement. Stereotyping is the specific case where a model ties traits or roles to a social group.

Finding more

Search for "stereotypical bias in language models", "StereoSet", "gender bias in word embeddings" or "bias in image generators". Peer-reviewed papers, many available on arXiv, describe how stereotypes are measured, and studies from bodies such as UNESCO report results across several models. Check which models and versions a study tested and when, since results for older models may not hold for current ones.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.