Article
Algorithmic bias
A computer has no opinions. It does not like or dislike anyone. So how can a program treat some people worse than others? The answer is that programs are built by people, and they learn from data that people collected. Unfairness can travel along that road without anyone planning it.
What algorithmic bias is
Bias means unfair results that repeat: one group of people is treated worse (or better) than others, again and again. When a computer program does this, it is algorithmic bias.
Bias does not need a bad intention. Most of the time nobody wanted it. People have unfair beliefs and habits, and these can pass into computing in two ways:
- Biased data. The data the program learns from is incomplete or unfair.
- Biased design choices. The people who built it made choices (what to measure, what counts as a good result) that favour some groups.
This is the idea the AP exam wants: computing innovations can reflect existing human biases, because of biased data or biased choices in the program. The people who build them should work to reduce the bias.
Check your understanding
Which sentence best describes algorithmic bias?
Where bias comes from
Bias can enter at every step of building a system, not only at one.
Bias can enter at every step
Collect data
Some groups are missing, or the data records unfair history.
chooseChoose what to measure
A stand-in measure favours some people.
trainTrain the model
The model copies the patterns it is given.
checkTest it
Only some kinds of people are tested.
releaseUse it
It is used on people it was not built for.
Here are the most common sources, with invented examples.
| Source | What goes wrong | Example |
|---|---|---|
| Missing or rare groups | Too few examples of some people, so the model guesses about them | A voice tool is trained mostly on adult voices. It works worse for children. |
| Unfair history | The data records past unfair decisions, and the model repeats them | A tool learns from old hiring decisions in which one group was often turned down. It turns that group down too. |
| What is measured | The measure is a stand-in that favours some people | A scholarship tool counts hours of online practice at home as "effort". Students with no home Internet score lower, however hard they work. |
| Uneven collection | Some people were much more likely to be counted | A survey is answered only through a smartphone app. People without smartphones are missing. |
| Who builds and tests | The team is alike, so no one thinks of other users | An app is tested only by its developers, who are all about the same age. It is hard to use for older people. |
The scholarship example is the digital divide again. A gap in access becomes a gap in data, and then a gap in results.
Check your understanding
A scholarship tool was trained on past students from city schools only. It now gives lower scores to students from village schools. What is the most likely cause?
What reduces bias
The summary of this lesson, on one page:
Algorithmic bias at a glance
Where it comes from
- too few examples of some groups
- data that records past unfairness
- a measure that favours some people
- a team that tests only on people like itself
What it causes
- more mistakes for some groups
- fewer chances such as loans or jobs
- unfairness repeated at a huge scale
What reduces it
- representative data
- testing each group separately
- human review
- transparency
- a varied team
- Representative data. The data includes every group the system will be used on, in good numbers.
- Test each group separately. One overall score can hide a group that does badly. Run the code to see how.
- Human review. For important decisions, a person checks the result, and people can appeal.
- Transparency. Be open about what data and measures the system uses, and how well it works for each group.
- A varied team. People with different backgrounds notice problems that others miss.
- Keep checking. Test again after release, because the people using it change.
"85% right" sounds good. But for Group B it is only 40%. Group B is small, so it hardly changes the overall number. Change b_right to 9 and run it again.
Worked example
For each scenario, name the source and choose an action.
| Scenario | Source | Best action |
|---|---|---|
| A speech tool, trained on recordings from its own staff, mishears people with other accents | Missing groups in the data | Add recordings of many accents and test on each |
| A study-help app ranks students by hours online at home | What is measured | Use a measure that does not depend on home Internet |
| A health app is tested only on the developers' families | Who tests it | Test on people of different ages and backgrounds |
Common mistakes
- "A computer is neutral, so it cannot be biased." It copies the data and the choices it is given.
- "Bias means someone meant to be unfair." It usually happens by accident.
- "Bias comes only from the data." The choice of what to measure, the testing and the team matter too.
- "Delete the column about the group and the problem is gone." Other columns, such as a home area, can stand in for it.
- "A high overall score means it is fair." Look at each group.
On the exam
You may get a scenario in which a system works worse for one group. Ask: what was in the data, what was measured, who tested it? The best cause is usually under-represented data or an unfair choice. The best fix is usually more representative data, testing across groups, or human review. Be careful of answers that blame the computer for "disliking" people, or that only make it faster.
Key words
Bias: unfair results that favour some groups over others.
Algorithmic bias: bias in a computer program's results, from biased data or biased design choices.
Representative data: data that includes every group the system will be used on.
Transparency: being open about how a system works, what data it uses and how well it performs.