Fairness metric
A fairness metric is a mathematical test of whether a model's decisions or errors are distributed fairly, such as comparing approval rates or error rates between groups of people.
A fairness metric turns a particular idea of fairness into a number that can be computed from a model's predictions. Google's machine learning glossary defines it as a measurable mathematical definition of fairness. Each metric encodes a different view of what fair treatment means, so picking one is a choice about values as much as statistics.
The most common metrics compare groups. Demographic parity asks whether each group receives positive decisions at the same rate, for example whether men and women are invited to interview at equal rates. It looks only at the decisions, not at who was actually qualified. Equalised odds asks whether the model's true positive rate and false positive rate are the same for each group, so that qualified people are approved, and unqualified people wrongly approved, at equal rates. Equal opportunity is a looser version that checks only the true positive rate. Predictive parity asks whether the model's precision, the share of its positive predictions that turn out correct, is the same for each group.
Take a hiring model that invites 30% of male applicants and 20% of female applicants. The ratio of selection rates is about 0.67, so it fails demographic parity. But if the model's true positive and false positive rates are equal across the two groups, it could satisfy equalised odds at the same time. Which result matters depends on whether the historical hiring labels it was judged against can be trusted.
Metrics often conflict. When groups have different underlying rates of the outcome being predicted, several common metrics cannot all be satisfied together, a result proved for risk scores by Jon Kleinberg and colleagues in 2016. Google's glossary concludes that there is no universal fairness metric, and that fairness should be defined for each problem according to the harms it could cause.
The Fairlearn project, an open-source toolkit, gives practical warnings worth knowing. Metrics based on historical labels inherit any bias in those labels. Aggregate numbers can hide gaps within smaller subgroups, and small groups give noisy results. The four-fifths rule, taken from US federal guidelines on employee selection, treats a group selection rate below 80% of the highest group's rate as evidence of adverse impact; Fairlearn warns it is often misapplied outside that original context. And meeting a metric does not on its own make a classifier fair.
Demographic parity, which compares positive decision rates across groups; equalised odds, which compares true positive and false positive rates; equal opportunity, which compares true positive rates only; and predictive parity, which checks that precision, the share of positive predictions that are correct, is equal across groups. It depends on the harm you are trying to prevent. Demographic parity suits concerns about how opportunities or resources are allocated, while error-rate metrics such as equalised odds suit concerns that a system works worse for some groups. Many teams report several metrics and explain the trade-offs. Usually not. When groups differ in the base rate of the outcome, several common metrics are mathematically incompatible, so improving one can worsen another. Kleinberg, Mullainathan and Raghavan proved this for risk scores in 2016. It comes from US federal guidelines on employee selection, which generally treat a selection rate for any race, sex or ethnic group below four-fifths, or 80%, of the highest group's rate as evidence of adverse impact. Toolkits such as Fairlearn warn that it is often misapplied outside that original context.Common questions
What are the most common fairness metrics?
Which fairness metric should I use?
Can a model satisfy all fairness metrics at once?
What is the four-fifths rule?
Search for "demographic parity vs equalized odds", "fairness metrics Fairlearn" or "impossibility of fairness" to compare metrics and their limits. Documentation from open-source toolkits, Google's machine learning glossary and peer-reviewed papers are dependable sources. When a company reports a fairness score, look for which metric it used, which groups it compared and how large those groups were.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.