Fairness

CSCI 3921w Social, Legal, and Ethical Issues in Computing
Adriana Picoral

Q&A (10 minutes)

Q&A about ethics, computing, and logistics of the course.

No question is too silly, naive, controversial, basic, or advanced.

What is fairness?

Many definitions of fairness

  • individual fairness: the goal of giving similar individuals similar decisions
  • group fairness: the goal of giving similar decisions across demographic groups

Discrimination manifests itself in unequal treatment of groups.

From Friedler et al. (2021)

Classification Metrics

  • Accuracy is the proportion of all classifications that were correct, whether positive or negative. \(( TP + TN) / all\)
  • Recall, or true positive rate (TPR) is the proportion of all actual positives that were classified correctly as positives. \(TP / (TP + FN)\)
  • False positive rate (FPR) is the proportion of all actual negatives that were classified incorrectly as positives (probability of false alarm). \(FP / (TN + FP)\)
  • Precision is the proportion of all the positive classifications that are actually positive. \(TP / (TP + FP)\)

Google Developer’s ML Concepts

Fairness Metrics

Each metric requires that some aspects of the predictor behavior be comparable across groups.

Definition Requirement Plain language
Demographic parity Same % flagged/selected in each group The probability of a certain prediction is not dependent on group membership
Equal opportunity Same true positive rate in each group Qualified people have an equal chance
Equalized odds Same true positive and false positive rates Equal error rates
Predictive parity/calibration Same precision in each group Scores mean the same for everyone

A taxonomy of fairness metrics

More key metrics

Practice example

Two groups of 100 people.

Group A Group B
Flagged high-risk 50 20
…Flagged that did reoffend (TP) 40 16
…Flagged did not reoffend (FP) 10 4
Not Flagged that did reoffend (FN) 10 2

Calculate accuracy, precision, true positive rate, and false positive rate

Practice example

Two groups of 100 people.

Group A Group B
Accuracy (TP+TN / all) 80/100 = 0.80 94/100 = 0.94
Precision (TP / flagged) 40/50 = 0.80 16/20 = 0.80
True positive rate (TP / reoffend) 40/50 = 0.80 16/18 = 0.88
False positive rate (FP / did not reoffend) 10/50 = 0.20 4/82 = 0.05

Same precision, similar true positive rate, but people in Group A who do not reoffend are 4x more likely to be wrongly flagged.

Group Discussion: Ethics frameworks

  • Consequentialism: In the example, which error is worse: a false positive (wrongly flagged) or a false negative (missed)? Does your answer depend on the domain (bail, loans, medical care)?
  • Deontology: Is it ever acceptable to use a protected attribute (e.g., race) to correct for bias?
  • Contractualism: Which fairness definition could be justified to everyone affected, including the group with the higher base rate?
  • Political economy: Who chooses the fairness metric? Who benefits from that choice?

The impossibility result

Kleinberg, Mullainathan & Raghavan (2016) and Chouldechova (2017) showed:

When base rates differ between groups, a (non-perfect) classifier cannot satisfy calibration/predictive parity and equal false positive and false negative rates at the same time.

  • Fairness is not a bug to be fixed with better code
  • Choosing a fairness definition is a value choice, not a technical one
  • Someone must decide which errors matter most, and for whom

Fairness and the law

US anti-discrimination law (e.g., Title VII of the Civil Rights Act, Fair Housing Act, Equal Credit Opportunity Act) recognizes:

  • Disparate treatment: intentionally treating people differently because of a protected characteristic
  • Disparate impact: a neutral-looking practice that disproportionately harms a protected group (Griggs v. Duke Power Co., 1971)
  • The EEOC’s four-fifths rule: a selection rate for one group below 80% of the rate for the highest group is evidence of adverse impact

Most algorithmic bias looks like disparate impact, not intent.

Fairness in generative AI

  • Image generators asked for “a CEO” or “a doctor” produce mostly white men; “a fast-food worker” produces mostly people with darker skin (Bloomberg analysis of Stable Diffusion, 2023)
  • Attempts to correct this can overcorrect: in 2024, Google paused Gemini’s image generation of people after it produced historically inaccurate images (e.g., racially diverse 1940s German soldiers)
  • Language models can associate names, dialects (e.g., African American English), and identities with negative traits

What would “fair” output even look like for a generative model?

Group Discussion: Fairness

  • Should algorithms be used for high-stakes decisions at all, if perfect fairness is mathematically impossible? Are human decision-makers any fairer?
  • Who should get to decide which fairness definition a system uses: engineers, companies, regulators, or affected communities?
  • Base rates often differ because of historical injustice. Should a model treat those base rates as “ground truth”?

References and Further Readings

Journal Writing

Reflect on what you liked and disliked about this lecture, what you learned, and what you wished you’d learned.

  1. What you learned from the lecture and discussion – this can be something that surprised you, something you had not considered before, a new way of thinking about something
  2. What you wish you’d learned from the discussion – this can be questions you still have and questions you would like to explore further
  3. Anything you liked or disliked