Fairness in AI sounds like a straightforward goal, but the moment you try to define it mathematically, complexity explodes. There are over twenty formal definitions of fairness in the computer science literature, and they often contradict each other. A system cannot simultaneously satisfy all fairness criteria, forcing designers to make difficult choices about which definition of fairness best serves their context. Understanding these metrics is essential for anyone building or evaluating AI systems.
Group Fairness Metrics
Group fairness metrics compare model behavior across demographic groups. They ask: does the model treat groups equitably in aggregate?
Demographic Parity (Statistical Parity)
The simplest fairness metric requires that the probability of a positive outcome is the same across all groups. If 30% of male applicants receive a loan, then 30% of female applicants should too, regardless of other factors.
When to use: Situations where you want to ensure equal representation in outcomes, such as ensuring diverse candidate pools in hiring. Limitation: Ignores whether the groups have different base rates for the outcome. If 50% of Group A applicants are qualified but only 20% of Group B are (due to factors outside the model's control), demographic parity forces the model to lower standards for Group B or raise them for Group A.
Equalized Odds
Requires that the true positive rate (TPR) and false positive rate (FPR) are equal across groups. In a medical screening context, this means the test is equally likely to detect the disease in patients from all groups, and equally unlikely to produce false alarms across groups.
When to use: High-stakes classification tasks where both types of errors (missing a positive, or falsely flagging a negative) have significant consequences. Limitation: Can be hard to achieve in practice, especially when groups have different base rates or feature distributions.
Equal Opportunity
A relaxation of equalized odds that only requires equal true positive rates across groups. The false positive rates are allowed to differ. In a hiring context, this means qualified candidates from all groups have an equal chance of being selected, even if the rate of false positives varies.
"Choosing a fairness metric is fundamentally a values question, not a technical one. The math tells you how to measure; ethics tells you what to measure."
Predictive Parity
Requires that the positive predictive value (precision) is equal across groups. When the model predicts a positive outcome, it should be equally likely to be correct regardless of the individual's group. In a recidivism prediction context, if the model predicts someone will reoffend, that prediction should be equally reliable for all racial groups.
Key Takeaway
The impossibility theorem (Chouldechova, 2017; Kleinberg et al., 2016) proved that when base rates differ across groups, it is impossible to simultaneously achieve equalized odds and predictive parity. This mathematical constraint means fairness always involves tradeoffs.
Individual Fairness
While group fairness looks at aggregate statistics, individual fairness focuses on treating similar individuals similarly. Formalized by Dwork et al. (2012), it states that individuals who are similar with respect to the task should receive similar predictions.
The challenge lies in defining what "similar" means. This requires a domain-specific distance metric that captures task-relevant similarity while ignoring protected attributes. In lending, two applicants with similar income, credit history, and debt-to-income ratio should receive similar decisions, regardless of their race or gender.
Individual fairness is appealing in principle but difficult to operationalize because the appropriate similarity metric is often debatable and context-dependent.
Causal Fairness
Causal fairness approaches use causal reasoning to define and test fairness. Rather than comparing statistical properties of predictions, they ask whether the protected attribute has a causal effect on the prediction.
Counterfactual Fairness
A prediction is counterfactually fair if it would remain the same in a hypothetical world where the individual belonged to a different demographic group, with all causally downstream variables adjusted accordingly. This requires building a causal model of the data-generating process, which is complex but provides the most principled notion of fairness.
Path-Specific Fairness
Recognizes that some causal paths from the protected attribute to the outcome may be considered fair (e.g., gender influencing profession choice, which then influences salary) while others are unfair (e.g., gender directly influencing salary for the same profession). Path-specific fairness blocks only the unfair causal paths.
"Causal fairness asks the deepest question: not whether outcomes differ by group, but whether group membership caused those different outcomes."
Practical Guide: Choosing the Right Metric
The choice of fairness metric should be guided by the specific context, stakes, and values of the application. Here are practical guidelines:
- Criminal justice: Equalized odds is often preferred because both false positives (wrongful detention) and false negatives (missed threats) have serious consequences.
- Hiring: Equal opportunity is common -- ensuring qualified candidates from all groups have equal chances, while accepting that overall selection rates may differ if qualification rates differ.
- Lending: Predictive parity ensures that among approved applicants, default rates are similar across groups, protecting both borrowers and lenders.
- Healthcare: Calibration (predicted probabilities match actual outcomes within each group) ensures that clinical decisions based on model scores are equally well-informed across populations.
- Advertising: Demographic parity may be appropriate to ensure equal exposure to opportunities like job ads and housing listings.
Key Takeaway
There is no universally "correct" fairness metric. The appropriate choice depends on the domain, the consequences of different types of errors, legal requirements, and stakeholder values. Document your choice and its rationale transparently.
Beyond Single Metrics
In practice, responsible AI systems should report multiple fairness metrics rather than optimizing for just one. This gives stakeholders a comprehensive view of the system's behavior across groups and enables informed discussions about which tradeoffs are acceptable. Tools like Fairlearn dashboards and AIF360 reports make it straightforward to compute and visualize multiple metrics simultaneously.
The field continues to evolve, with researchers developing intersectional fairness metrics that consider the intersection of multiple protected attributes (e.g., race and gender together), dynamic fairness metrics that account for how decisions affect groups over time, and participatory approaches that involve affected communities in defining what fairness means in their context. As AI systems become more consequential, the sophistication of our fairness measurements must keep pace.
