How Algorithms Create Bias
Even with perfectly balanced data, algorithms can introduce bias: Objective function bias — optimizing for overall accuracy means the model performs best on the majority group and worst on minorities. A 95% accurate model might be 99% accurate for Group A (90% of data) and 60% accurate for Group B (10% of data). Feature selection bias — using zip code as a feature is a proxy for race in many US cities. The model doesn’t need explicit race data to discriminate. Aggregation bias — a single model for all populations may fail for subgroups with different patterns. HbA1c thresholds for diabetes differ across ethnicities, but a single threshold disadvantages some groups. Evaluation bias — testing on a non-representative benchmark gives a false sense of performance.
Algorithmic Bias Examples
// How algorithms create bias
Objective function:
Optimize: overall accuracy = 95%
Group A (90% of data): 99% accurate
Group B (10% of data): 60% accurate
// "High accuracy" hides disparities
Proxy features:
Zip code → proxy for race
Name → proxy for ethnicity
School → proxy for socioeconomic status
// No explicit protected attribute needed
Aggregation:
One model for all populations
Diabetes: HbA1c thresholds differ
by ethnicity → single threshold fails
// One-size-fits-all doesn't fit all
Evaluation:
Benchmark: 90% Group A, 10% Group B
Model: 95% on benchmark
Reality: 60% for Group B
// Benchmark doesn't represent reality
Key insight: Proxy features are the most common source of algorithmic discrimination. Removing the “race” column doesn’t prevent racial bias — zip code, name, and other features carry the same information. Fairness requires testing outcomes, not just inputs.