Classifier Fairness

Fraida Fund

In addition to evaluating the error of a classifier, we are also often concerned with the fairness of a classifier.

Suppose samples come from two groups: \(a\) and \(b\). What does it mean for a classifier to treat both groups fairly? There are a number of different types of fairness, and like the error metrics described previously, we are often stuck in a situation where we must sacrifice on one fairness measure to improve another.

This week’s case study expands on this topic.

For this case study, you will work through some online material:

  1. First, read the ProPublica article, Machine Bias. Based on their description, what type of fairness is violated by the COMPAS recidivism risk prediction algorithm? (Choose one of the fairness measures described below in the section titled “Fairness metrics”.) We will revisit this later in the week.
  2. Next, read the article and work through the activity Can you make AI fairer than a judge? The article discusses two types of fairness regarding COMPAS - why is it not possible to reconcile them?
  3. You should also interact with the activity on Measuring Fairness, which explains in greater detail why it may not be possible for an algorithm to be fair according to all metricsl.
  4. Finally, read The quest to make AI less prejudiced, which discusses some other types of biases and fairness issues in machine learning.

Question

Fairness metrics

This section lists some metrics related to fairness. You won’t have to memorize these, but you should understand them, and given the definition of any of these metrics, you should be able say whether or not it is satisfied in a particular scenario.

\[P(\hat{y}=1 | G = a) = P(\hat{y}=1 | G = b)\]

\[P(\hat{y}=1 | G = a, F=f) = P(\hat{y}=1 | G = b, F=f)\]

\[E(S|y=1, G=a) = E(S|y=1, G=b)\]

\[E(S|y=0, G=a) = E(S|y=0, G=b)\]

\[P(y = 1 | \hat{y} = 1, G = a) = P(y = 1 | \hat{y} = 1, G = b) \]

\[P(y = 0 | \hat{y} = 1, G = a) = P(y = 0 | \hat{y} = 1, G = b) \]

\[P(y = 1 | S = s, G = a) = P(y = 1 | S = s, G = b) \]

\[P(y = 1 | S = s, G = a) = P(y = 1 | S = s, G = b) = s\]

\[P(\hat{y} = 1 | y = 0, G = a) = P(\hat{y} = 1 | y = 0, G = b)\]

\[P(\hat{y} = 0 | y = 0, G = a) = P(\hat{y} = 0 | y = 0, G = b)\]

\[P(\hat{y} = 0 | y = 1, G = a) = P(\hat{y} = 0 | y = 1, G = b)\]

\[P(\hat{y} = 1 | y = 1, G = a) = P(\hat{y} = 1 | y = 1, G = b)\]

\[P(\hat{y} = 0 | y = i, G = a) = P(\hat{y} = 0 | y = i, G = b), i \in 0,1\]

\[P(y = 1 | \hat{y} = 1, G = a) = P(y = 1 | \hat{y} = 1, G = b)\]

\[P(y = 0 | \hat{y} = 0, G = a) = P(y = 0 | \hat{y} = 0, G = b)\]

\[P(\hat{y} = y | G = a) = P((\hat{y} = y | G = b)\]