fairness metrics
**Fairness Metrics** are **quantitative measures designed to evaluate whether AI systems treat different demographic groups equitably** — providing mathematical definitions of fairness that can be computed, monitored, and optimized, enabling organizations to detect discriminatory patterns in model predictions and make informed decisions about which fairness criteria are most appropriate for their specific application context.
**What Are Fairness Metrics?**
- **Definition**: Mathematical formulas that quantify the degree to which an AI system's predictions or decisions are equitable across protected demographic groups.
- **Core Challenge**: Multiple valid definitions of fairness exist, and they are often mathematically incompatible — no system can satisfy all fairness criteria simultaneously.
- **Key Insight**: Fairness is context-dependent — the appropriate metric depends on the application, stakeholders, and potential harms.
- **Legal Context**: Connected to anti-discrimination law concepts like disparate impact and disparate treatment.
**Why Fairness Metrics Matter**
- **Bias Detection**: Quantify discrimination that may be invisible in aggregate performance metrics.
- **Regulatory Compliance**: EU AI Act, US Equal Credit Opportunity Act, and other regulations require fairness assessment.
- **Accountability**: Provide measurable evidence that AI systems meet fairness standards.
- **Improvement Tracking**: Enable monitoring of fairness over time as models and data change.
- **Stakeholder Communication**: Translate abstract fairness concerns into concrete, discussable numbers.
**Key Fairness Metrics**
| Metric | Definition | Formula |
|--------|-----------|---------|
| **Demographic Parity** | Equal positive prediction rates across groups | P(Y=1|A=a) = P(Y=1|A=b) |
| **Equal Opportunity** | Equal true positive rates across groups | P(Y=1|A=a,Y*=1) = P(Y=1|A=b,Y*=1) |
| **Equalized Odds** | Equal TPR and FPR across groups | TPR and FPR equal for all groups |
| **Predictive Parity** | Equal precision across groups | P(Y*=1|Y=1,A=a) = P(Y*=1|Y=1,A=b) |
| **Calibration** | Equal calibration across groups | P(Y*=1|S=s,A=a) = P(Y*=1|S=s,A=b) |
| **Individual Fairness** | Similar individuals treated similarly | d(f(x),f(x')) ≤ L·d(x,x') |
**The Impossibility Theorem**
A foundational result (Chouldechova 2017, Kleinberg et al. 2016) proves that **demographic parity, equal opportunity, and predictive parity cannot all be satisfied simultaneously** when base rates differ across groups — meaning every fairness-critical application must choose which fairness criteria to prioritize based on context and values.
**Choosing the Right Metric**
- **Lending/Hiring**: Equal opportunity (qualified applicants should have equal chances regardless of group).
- **Criminal Justice**: Predictive parity (predictions should be equally accurate across groups).
- **Advertising**: Demographic parity (opportunity exposure should be equal across groups).
- **Healthcare**: Calibration (risk scores should mean the same thing across groups).
Fairness Metrics are **essential tools for responsible AI deployment** — providing the quantitative framework needed to evaluate, communicate, and improve equity in AI systems, while acknowledging that fairness is inherently contextual and requires deliberate value choices.