Bias in Training Data: Where It Hides and How to Find It
Updated: Oct 19
In 2018, Reuters reported that Amazon had scrapped an experimental tool for rating job applicants. The models had been trained on patterns in résumés submitted to the company over a ten-year period, most of them from men. According to people familiar with the project, the system taught itself that male candidates were preferable. It penalised résumés that included the word "women's", as in "women's chess club captain", and downgraded graduates of two all-women's colleges.
Amazon edited the programs to make them neutral to those terms. But, the same people said, that was no guarantee the models wouldn't find other ways of sorting candidates that could prove discriminatory, and the team was eventually disbanded. Amazon said the tool "was never used by Amazon recruiters to evaluate candidates."
Nothing in that story is a coding error. The model did what models do: it learned the patterns in its data. The data recorded who had applied and who had been hired, and those decisions carried the bias in with them. Removing the obvious word didn't help, because the pattern was spread across many other features.
That's why bias has to be looked for in the data, before training, and why deleting the sensitive column is not the check. This post shows where bias enters a dataset, and five checks that find it.
The companion post, Fairness Metrics: What They Measure and Where They Conflict, covers measuring a trained model. This one goes upstream.
Where bias enters
Suresh and Guttag's framework identifies seven distinct sources of harm across the machine learning life cycle. Four of them start in the data, and each has a check:
Source | What happens | Example | Check |
Historical bias | The data accurately records a world that was unfair | Ten years of hiring decisions in a male-dominated field | What the label records (check 3) |
Representation bias | Some groups are under-sampled relative to who the system will serve | Face datasets 79.6% and 86.2% lighter-skinned | Representation against your population (check 2) |
Measurement bias | The features or label are proxies that work differently across groups | Healthcare cost used as a stand-in for illness | What the label records (check 3); proxy test (check 4) |
Evaluation bias | The test set doesn't represent the people the system will meet | A benchmark that is mostly one group hides failures on others | Slice evaluation (check 5) |
The other three (aggregation, learning and deployment bias) arise in modelling and use, but they are often first visible in the same checks.
Check 1: Write the datasheet before the audit
Gebru and colleagues proposed "datasheets for datasets": a standard set of questions every dataset should come with, about why it was created, what's in it, how it was collected and labelled, and what it shouldn't be used for. Writing one for your training data is the discovery move. It's where most teams find out they can't answer basic questions about their own data.
For a bias audit, five of the questions matter most:
Who is in the data, and who isn't? Which people, places and time periods, and how were they selected?
Who or what produced each label? A person's judgement, a past decision, a measurement or a proxy?
What does the label actually record? In one sentence, without the word you hope it means.
What is the data's time range, and did practices change within it?
Who will the model be used on, and how does that population differ from the one in the data?
The test: can someone on your team answer all five in writing, with sources, today? Each "we're not sure" is the first item on the audit.
Check 2: Compare the data with who you'll serve
Counting groups within a dataset only tells you about the dataset. The question that matters is how it compares with the people the system will be used on.
In 2018, Buolamwini and Gebru measured the composition of two widely used facial analysis benchmarks and found them overwhelmingly lighter-skinned: 79.6% for IJB-A and 86.2% for Adience. A system tested mainly on lighter-skinned faces could look accurate on those benchmarks and still fail for the people they barely contained.
Build a simple comparison table for every attribute you can measure or reasonably estimate:
Group Share of users Share of training data Ratio
Age 18-29 22% 31% 1.41
Age 30-49 41% 47% 1.15
Age 50-64 25% 17% 0.68
Age 65 and over 12% 5% 0.42
The figures are illustrative. Any group with a ratio well below 1 is one the model will have seen less of, and its errors there are likely to be higher and noisier. If you don't hold demographic data, use what you have legitimately (region, language, device, account type), and say in the datasheet what you couldn't check.
The test: for each group, compare its share of the training data with its share of the people the model will serve. Flag any group below about half its expected share, and record the count. A group with 40 examples needs a different conversation from one with 4,000.
Check 3: Check what the label records
Historical and measurement bias both live in the label. Amazon's label was, in effect, "resembles people we hired before". That's a reasonable target only if past hiring was fair. In healthcare, Obermeyer and colleagues found a widely used algorithm predicted future healthcare costs rather than illness. Because less was spent on Black patients' care, Black patients were considerably sicker than white patients at the same risk score.
Two checks find this. First, compare the positive label rate by group. A large gap doesn't prove bias, but it tells you the model will learn the gap. Then ask whether it reflects a real difference in the outcome, or a difference in who was given the chance. Second, find an independent measure of the outcome for a sample (a clinical measure instead of cost, a later performance review instead of the hiring decision) and check whether the label agrees with it equally well across groups.
The test: if your label is a past human decision, a cost or a count of something that depends on where people looked, such as arrests or reported incidents, name the independent measure you've checked it against. If there isn't one, write that in the datasheet as a known limitation.
Check 4: Test for proxies
Dropping the sensitive attribute doesn't remove it. Amazon removed the explicit terms and still couldn't be confident the model wasn't sorting by gender in other ways. Postcode tracks ethnicity where housing is segregated. First names, clubs, colleges, career gaps and even writing style can carry gender.
A direct test: try to predict the sensitive attribute from the features you plan to use. If a simple model can do it well, the information is still in your data, and your production model can use it too.
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score
# X: the features the model will use (sensitive attribute removed)
# g: the sensitive attribute, held separately for auditing only
auc = cross_val_score(LogisticRegression(max_iter=1000), X, g,
cv=5, scoring="roc_auc").mean()
print(f"sensitive attribute predictable from features: AUC {auc:.2f}")
# Around 0.5: little proxy signal. Well above 0.5: proxies present;
# inspect the largest coefficients to see which features carry it.
A high score doesn't mean you must drop features. Some may carry real, legitimate signal. It means you can't claim the model is blind to the attribute, and you'll need check 5 to see whether it is using it.
The test: run the proxy test for each sensitive attribute you can audit. Record the score and the top five contributing features in the datasheet.
Check 5: Evaluate by slice, not just overall
Overall accuracy hides group failures. In the same study, Buolamwini and Gebru tested three commercial gender classifiers on a new benchmark balanced by gender and skin type. Darker-skinned women were the most misclassified group, with error rates of up to 34.7%. The maximum error rate for lighter-skinned men was 0.8%. Each system's overall figure looked respectable.
Split every evaluation by group, and by combinations of groups (the largest gap in that study was at the intersection of gender and skin type). Report counts alongside rates, and make sure the test set contains enough of each group for the rates to mean something. If it doesn't, that's a representation finding for check 2.
The test: does your evaluation report show error rates per group and per intersection, each with its count? If a slice has too few examples to estimate, say so rather than leaving it out.
What to do when you find it
Each fix has a cost, and none replaces judgement about the specific domain:
Fix | What it does | Trade-off |
Collect more data from under-represented groups | Fixes representation at the source | The most expensive; may need different collection methods or partners |
Reweigh or resample | Reweights or resamples examples so group and label are balanced in training (Kamiran and Calders) | Doesn't add new information; small groups stay noisy |
Relabel, or audit labels against an independent measure | Addresses historical and measurement bias at the root | Needs human review and a better measure, which may not exist |
Remove or transform a proxy | Reduces the model's access to the sensitive attribute | May remove legitimate signal; other proxies may remain (re-run check 4) |
Change the label | Predict the outcome you care about instead of a convenient proxy | Needs new data; often the most effective fix (Obermeyer et al.) |
Don't automate the decision | Keeps a human decision where the data can't support a fair model | Loses the efficiency the project was for; sometimes the right call |
Then re-run the checks. A fix that improves one slice can worsen another.
The decision about which fix, and whether to deploy at all, isn't only a technical one. Decisions about parole, child welfare or benefits affect lives deeply enough that "debias and deploy" may be the wrong answer. Involve the people who own the decision and, where you can, the people affected by it.
Regulators now expect this work
For high-risk AI systems in the EU, Article 10 of the AI Act requires data governance that includes "examination in view of possible biases" likely to affect health and safety, fundamental rights or lead to prohibited discrimination, and measures "to detect, prevent and mitigate" them. It also requires training, validation and testing data to be "relevant, sufficiently representative, and to the best extent possible, free of errors and complete in view of the intended purpose." The five checks above, written down in a datasheet, are a practical way to produce that evidence. High-Risk AI Systems Under the EU AI Act covers whether your system is in scope.

What to do this week
Pick one model in development or production that makes decisions about people. Write the five datasheet answers for its training data. Build the representation table against the population it serves. Run the proxy test for one sensitive attribute you can audit. Then check whether its evaluation report breaks results down by group with counts. If not, add that before the next release. The AI Governance in the Pipeline checklist shows where these checks belong in your release gates.
Final takeaway
Bias in training data usually isn't a mistake anyone made. It's an accurate record of decisions, coverage and measurements that weren't equal, and the model learns it faithfully. Amazon's recruiting model showed that removing the obvious signal isn't enough. So look in the data before training. Write the datasheet, especially what the label really records. Compare the data with the people the model will serve, not with itself. Check the label against an independent measure. Test whether the features can predict the sensitive attribute. Then evaluate by group and intersection, with counts. When you find bias, pick the fix by its trade-offs, re-run the checks, and be willing to conclude that some decisions shouldn't be automated on this data.
Sources
Dastin, J., "Amazon scraps secret AI recruiting tool that showed bias against women", Reuters, 10 October 2018: trained on résumés submitted over a 10-year period, most from men; penalised "women's" and downgraded graduates of two all-women's colleges; edits for neutrality were "no guarantee"; team disbanded; Amazon said the tool "was never used by Amazon recruiters to evaluate candidates." https://www.reuters.com/article/us-amazon-com-jobs-automation-insight-idUSKCN1MK08G
Buolamwini, J. and Gebru, T., "Gender Shades: Intersectional Accuracy Disparities in Commercial Gender Classification", Proceedings of Machine Learning Research 81 (FAT* 2018): IJB-A and Adience 79.6% and 86.2% lighter-skinned; darker-skinned females misclassified at error rates up to 34.7%; maximum error rate for lighter-skinned males 0.8%. https://proceedings.mlr.press/v81/buolamwini18a.html
Suresh, H. and Guttag, J., "A Framework for Understanding Sources of Harm throughout the Machine Learning Life Cycle", EAAMO '21, 2021: seven distinct potential sources of downstream harm across data collection, development and deployment. https://doi.org/10.1145/3465416.3483305
Gebru, T., Morgenstern, J., Vecchione, B., Vaughan, J. W., Wallach, H., Daumé III, H. and Crawford, K., "Datasheets for Datasets", Communications of the ACM 64(12), 2021, pp. 86–92. https://doi.org/10.1145/3458723
Obermeyer, Z., Powers, B., Vogeli, C. and Mullainathan, S., "Dissecting racial bias in an algorithm used to manage the health of populations", Science 366(6464), 2019, pp. 447–453: the algorithm predicted costs rather than illness; at a given risk score, Black patients were considerably sicker than white patients. https://doi.org/10.1126/science.aax2342
Kamiran, F. and Calders, T., "Data preprocessing techniques for classification without discrimination", Knowledge and Information Systems 33(1), 2012, pp. 1–33: suppression, massaging (relabelling), and reweighing or resampling to remove discrimination before training. https://doi.org/10.1007/s10115-011-0463-8
Regulation (EU) 2024/1689 (AI Act), Article 10, Data and data governance: examination in view of possible biases; measures to detect, prevent and mitigate them; data sets "relevant, sufficiently representative, and to the best extent possible, free of errors and complete in view of the intended purpose." https://eur-lex.europa.eu/eli/reg/2024/1689/oj
Related reading
Keep learning. This article is part of the AI Governance & Responsible AI path in the ShiftQuality Learning Center. Ship AI you can stand behind — fair, transparent, and accountable.


