TL;DR: Bias enters through data (historical and sampling bias), labels (biased ground truth), and features (proxies for protected attributes). Detect it by measuring performance and error rates per subgroup, never in aggregate, using a fairness definition you choose deliberately (demographic parity, equalized odds, or calibration), since they are mathematically incompatible when base rates differ. Mitigate at the data, training, or post-processing stage, and keep humans in the loop on high-stakes decisions.
How to approach it. State up front that "fair" is not one thing: several formal definitions exist and cannot all hold at once, so the first job is choosing the right one for the context and the law. Then cover where bias enters, how you measure it (subgroup metrics), and the mitigation options across the pipeline.
A strong answer. Where bias enters. Historical bias (the data reflects past discrimination, so a model trained on it perpetuates it), representation or sampling bias (subgroups under-sampled, so the model performs worse on them), label bias (the ground truth itself is biased, for example past hiring decisions), and proxy features (zip code or name correlating with a protected attribute, so dropping the attribute does not remove the bias).
Detection. Measure performance and error rates disaggregated by subgroup (gender, race, age), not just overall accuracy, which hides disparate harm. Concretely: false-positive and false-negative rates per group, selection rates, and calibration per group. Aggregate metrics can look excellent while one group is systematically harmed.
Choosing a definition (the crux). The common fairness criteria conflict mathematically, and you generally cannot satisfy more than one at once when base rates differ across groups:
| Definition | Equalizes | Picks it when |
|---|---|---|
| Demographic parity | Selection rates across groups | Equal access is the goal regardless of base rates |
| Equalized odds | True-positive and false-positive rates | Error costs matter and labels are trusted |
| Calibration | Score-to-probability meaning | A score must mean the same thing for everyone |
Which one is right depends on the decision and the law (for example disparate-impact rules). You pick deliberately and justify it, rather than claiming a model is simply "fair."
Mitigation at three stages: pre-processing (reweight or resample, fix label bias, improve representation), in-processing (fairness constraints or adversarial debiasing during training), and post-processing (group-specific thresholds to equalize the chosen metric). Pair this with governance: document the model and its limits, monitor fairness metrics in production (they drift), and keep human oversight on consequential decisions (the EU AI Act expects this for high-risk uses).
The honest framing: there is no bias-free model and no single fairness metric. You make the tradeoff explicit, measure per subgroup, and build accountability around it.
Key takeaways
- Aggregate accuracy is the trap: report false-positive, false-negative, and selection rates per subgroup or you will miss systematic harm.
- Demographic parity, equalized odds, and calibration are provably incompatible when base rates differ; name the one you chose and why.
- Dropping the protected attribute does not remove bias because proxies remain; you often need the attribute to measure and correct fairness.
- Fairness drifts in production, so monitor subgroup metrics over time and re-audit on every retrain.
What interviewers probe next.
- "Just drop the protected attribute?" Insufficient; proxies remain. You often need the attribute to measure and correct fairness, even if you never use it as a feature.
- "Why can't you satisfy all fairness metrics?" When base rates differ between groups, demographic parity, equalized odds, and calibration are provably incompatible. You must choose.
- "Accuracy vs fairness tradeoff?" Often a real tension. Frame it as a values and policy decision with stakeholders, not a pure optimization.
- "How do you keep it fair post-deployment?" Monitor subgroup metrics over time (they drift) and re-audit on retrains.
Common mistakes.
- Reporting only aggregate accuracy, hiding subgroup harm.
- Claiming a model is "fair" without naming which definition and why.
- Assuming removing the protected attribute removes bias (proxies persist).
- Treating it as purely technical and skipping documentation, monitoring, and human oversight.
