Bias testing

Bias testing is a structured check of whether an AI system produces different outcomes or error rates for different groups, often done before deployment and, in some places, required by law as a bias audit.

Bias testing puts a system through a defined procedure to see whether it treats groups differently. For a classifier, that usually means running it on a dataset with known group membership and comparing selection rates and error rates. For a language model, it means running a benchmark of prompts designed to reveal stereotypes and scoring the answers.

The longest-standing yardstick in US employment is the four-fifths rule from federal guidelines on employee selection: a selection rate for any race, sex or ethnic group below four-fifths of the rate for the group with the highest rate is generally regarded by federal enforcement agencies as evidence of adverse impact. NIST's 2022 publication on AI bias notes that courts do not apply such tests uniformly.

New York City made bias testing a legal requirement for hiring tools. Under Local Law 144 of 2021, enforced from July 5, 2023, employers and employment agencies may not use an automated employment decision tool unless it has had a bias audit by an independent auditor within the past year and a summary of the results is public. The audit must at least calculate selection or scoring rates and impact ratios across sex, race and ethnicity, and intersectional categories. The law does not require any particular action based on the results.

Language models have their own tests. The BBQ benchmark, published in 2022 by Alicia Parrish and colleagues, uses hand-built question sets across nine social dimensions relevant to US English speakers. It found that models often fell back on stereotypes when the context was ambiguous, and that even with enough information their accuracy was up to 3.4 percentage points higher when the right answer matched a stereotype, rising above 5 points for gender for most models tested.

A test only measures what it is designed to measure. A clean result on one benchmark or one set of categories does not show a system is unbiased in every context, and audits that use the vendor's own data deserve extra scrutiny. Testing is most useful when repeated after deployment, on data that looks like the real use.

Common questions

What is an AI bias audit?

It is a structured evaluation of whether an AI system produces different outcomes for different groups. New York City's Local Law 144 requires one for automated hiring tools, carried out by an independent auditor and covering selection rates and impact ratios by sex, race and ethnicity.

What is the four-fifths rule?

It is a guideline from US employment practice: if one group's selection rate is less than four-fifths, or 80 per cent, of the highest group's rate, that is generally treated as evidence of adverse impact. It is often used as a first screen in bias testing of hiring tools.

How are large language models tested for bias?

With benchmark datasets of prompts designed to reveal stereotypes, such as BBQ, which covers nine social dimensions. Researchers score whether the model's answers rely on stereotypes, both when the context is ambiguous and when it contains enough information to answer correctly.

Does passing a bias test mean an AI system is fair?

No. A test checks particular measures on particular data. A system can pass and still disadvantage groups that were not measured, perform differently on real-world data, or be used in ways that create unfair outcomes.

Finding more

Search for "bias audit", "Local Law 144", "impact ratio" and "bias benchmark" for language models. Official sources include New York City's Department of Consumer and Worker Protection and NIST; for language model testing, benchmark papers on arXiv describe exactly what each test measures. Published audit summaries vary widely in quality, so check who did the audit, on what data and with which categories.

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.