Introduction to AI Lesson 22 of 25

Part 2 · Lesson 12 · 6 min

Garbage in, garbage out: when data is biased

If a hiring model learns from ten years of a company's hiring decisions, whose habits does it learn?

A model is a mirror. It reflects its data, smudges included.

A model only knows what its examples show it. If some kinds of examples are rare in the data, the model barely learns them.

Rarely seen, poorly learned

Swap fruit for people and this stops being funny. A face or skin model trained mostly on one group can be wrong more often for everyone else. That is not only unfair, it is also simply less accurate.

It gets worse when the data records past human decisions. Then the model learns those decisions, habits and all.

The hiring model

This really happened. In 2018, Reuters reported that Amazon had dropped an experimental hiring tool. Trained on about ten years of CVs, mostly from men, it had learned to mark down CVs containing the word "women's", as in "women's chess club captain".

Bias is one kind of garbage. Plain mistakes are another.

Wrong labels

The maths is not prejudiced or careless. It just copies whatever pattern the data contains, very faithfully. That is why "the algorithm decided" is never a full answer. Ask what it learned from.

Go deeper optional

Bias in data comes in a few common types:

  • Sampling bias: some groups are missing or rare in the data.
  • Historical bias: the data is accurate, but it records an unfair past.
  • Label bias: the answers themselves are wrong or inconsistent.
  • Measurement bias: the data is collected differently for different groups.

Deleting a sensitive column, like gender, does not remove bias on its own. Other features, like a postcode or a job title, can stand in for it. These are called proxies. Fairness checks compare the model's error rates group by group. Part 9 covers them in detail.

Check yourself

1. A model is trained on data where one group is barely represented. What is the likely result?

2. A bank removes "gender" from its data. Is the model now free of gender bias?

3. A model keeps calling apples "orange". What should you check first?