Bias simulator: hiring

See how historical labels, proxies and under-representation turn into biased hiring decisions, and measure mitigation.

BeginnerAlgorithmic Bias Lab
العربية

The idea

Change sample size, group B share, historical bias, proxy strength, missing data and threshold; compare per-group selection and error rates before and after mitigation.

Data description

Synthetic data generated in your browser from stated distributions; no real personal data. The true qualification is known; the historical label differs from it by the bias you choose.

Suggested next experiment

Concepts in this experiment

Algorithmic bias

A systematic error in an AI system's outputs that treats groups of people unequally without a legitimate reason. It usually comes from the data and model life cycle: historical label bias, under-representation, measurement error, proxies for sensitive attributes, a target that does not measure what we want, and evaluation and deployment choices. It is measured by comparing selection and error rates across groups.

Why is dropping the gender column not enough?

Other correlated variables act as proxies, so the model infers it; and removing it from evaluation data prevents measuring gaps. Try "remove attribute" with a strong proxy in the bias simulator.

Historical bias

Occurs when data reflects past unfair decisions or conditions, even if collected accurately. A model trained on biased past hiring decisions learns and automates that bias. In the lab you can set the historical label bias to watch the model reproduce it.

Proxy variable

A seemingly neutral variable strongly linked to a sensitive attribute, such as district or school. Dropping the sensitive attribute does not stop discrimination while the proxy remains; fairness through unawareness is not enough.

Where do I start?

Beginner: hiring bias simulator, fairness calculator, personal vs anonymous data, balanced vs imbalanced data, the hiring scenario. Intermediate: fairness explorer, SHAP, differential privacy, audit studio. Advanced: impossibility, SMOTE leakage, membership inference, human in the loop.

Bias mitigation

Three stages: pre-processing (e.g. reweighing, Kamiran & Calders), in-processing (fairness constraints in training) and post-processing (group thresholds). Each improves a chosen criterion and may cost accuracy or another criterion.

Reweighing weights formula

Makes group and label independent in the weighted data (Kamiran & Calders).

w(g,y)=\frac{P(G=g)\,P(Y=y)}{P(G=g,Y=y)}

Scientific sources for this experiment

  1. Fairness and Machine Learning: Limitations and OpportunitiesS. Barocas, M. Hardt, A. Narayanan (2023) — Book
  2. A Framework for Understanding Sources of Harm throughout the ML Life Cycle (arXiv:1901.10002)H. Suresh, J. Guttag (2019) — Paper
  3. Data preprocessing techniques for classification without discrimination. Knowledge and Information Systems 33. DOI 10.1007/s10115-011-0463-8F. Kamiran, T. Calders (2012) — Paper — print reference; no verified open link
  4. Fairlearn — open-source fairness toolkitFairlearn contributors (2025) — Tool

More in this module