Topic 5 of 5 · 5 min read
Choosing a bias fix that works
Goal: Choose and justify a mitigation for a measured disparity, including how you will confirm the gap closed.
Pick the fix that matches where the bias entered and what you can change, then measure again to prove the gap closed and nothing else got worse.
Check yourself · 1 of 3
A language-model CV scorer gives lower scores when a name signals a minority background. Which fix best matches the cause?
Why it matters
A measured gap is not the end of the work. Teams often grab the nearest fix, such as "tell the model to be fair", and never check. Each fix has a cost and a limit, and some problems cannot be fixed inside the system at all.
The options
- Fix the data. Add examples of under-represented groups, correct labels, or reweight cases. Works when the cause is a skewed sample or bad labels. Costs time and needs new data.
- Change features. Remove a proxy or limit what the model sees, such as stripping names from a CV. Works for identity signals. Does not help if the labels are biased.
- Change the threshold or post-process. Set different cut-offs per group to equalise a chosen error rate, as in the equal-opportunity method in the references. Quick, but it is an open decision to treat groups differently, and laws may restrict it.
- Change the instructions. For a language model, give a rubric, remove identity cues, and score cases separately. Asking the model to "avoid bias" on its own is weak. Always re-test.
- Add human review. Have a person check borderline or rejected cases. It helps only if the reviewer has time and does not simply agree with the model.
- Do not deploy, or narrow the use. If no fix closes the gap and the harm is serious, the right answer is to keep a person making the decision.
Confirm it worked
- State the target before the fix: for example, true positive rate gap under 5 points.
- Re-run the same test on a fresh audit set, not the data you tuned on.
- Check side effects: overall accuracy, other groups, and the cost of errors.
- Write down the result, the remaining gap and who will re-test and when.
Before and after
Weak: "We added a line to the prompt saying be fair. Fixed."
Better: "The gap came from names. We strip names before scoring and use a rubric. On 500 fresh matched pairs the lower-score share fell from 15.5% to 2%, accuracy held, and we will re-test each model update."
What goes wrong
- Fixing the symptom: equalising a threshold when the label was the problem.
- Tuning and testing on the same data, so the gap seems to close.
- Closing one gap and opening another for a group nobody measured.
- Treating a person in the loop as a fix when they rubber-stamp the output.
Examples
Choosing between fixes
| Cause found | Better fix | Weak fix |
|---|---|---|
| Names change the LLM score | Strip names, use a rubric | Prompt says 'be fair' |
| Qualified group missed more often | Add training examples, adjust threshold | Raise overall accuracy |
| Labels reflect manager bias | Relabel against job outcomes | Add a reviewer at the end |
A closing check
Target: true positive rate gap <= 5 points
Before: X 80%, Y 60% (gap 20)
After, fresh audit set of 600: X 79%, Y 75% (gap 4)
Overall accuracy: 91% -> 90%
Re-test: every model or prompt change
The gap met the target, the cost in accuracy is stated, and a re-test is scheduled.
Key points
- Match the fix to the stage where the bias entered: data, features, thresholds, instructions or human review.
- A prompt line saying 'be fair' is not a mitigation until a test shows the gap closed.
- Set a numeric target before the fix and re-test on fresh data, not the data you tuned on.
- Check side effects on accuracy and on groups you did not target.
- If no fix closes a serious gap, do not deploy, or keep a person as the decision-maker.
Common mistakes
- Adding 'do not be biased' to a prompt and treating the problem as solved.
- Measuring the fix on the same data it was tuned on.
- Fixing one group's gap without checking the others.
- Counting a human reviewer as a safeguard when they approve almost everything.
Check yourself · 2 of 3
A team lowers a bias gap and measures it on the same data it used to tune the fix. What is the risk?
Check yourself · 3 of 3
A mitigation closes a 20-point gap for group Y but overall accuracy falls from 91% to 90%. What should the team do?
Practice items, not counted towards your mastery.
Start here
- Fairness and Machine Learning (Barocas, Hardt, Narayanan) (opens in a new tab)BookFree
Free textbook; the chapters on classification and legal background cover every definition in this skill.
- Towards a Standard for Identifying and Managing Bias in AI (NIST SP 1270) (opens in a new tab)PaperFree
Splits AI bias into statistical, human and systemic sources, which is the map used in the first topic.
- Machine Learning Crash Course: Fairness (Google) (opens in a new tab)CourseFree
Short lessons on bias types, how to evaluate for bias and fairness metrics, with worked numbers.
More for this topic
- Equality of Opportunity in Supervised Learning (Hardt, Price, Srebro) (opens in a new tab)PaperFree
The paper that defines equal opportunity (equal true positive rates) and a post-processing fix.
- AI Risk Management Framework (NIST) (opens in a new tab)StandardFree
Voluntary US framework that treats harmful bias as a risk to measure, manage and document.