24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives...

34
Fairness, Ethics, and Machine Learning 3 Tufts COMP 135: Introduction to Machine Learning https://www.cs.tufts.edu/comp/135/2019s/ Many ideas/slides attributable to: Alexandra Chouldechova Moritz Hardt Prof. Mike Hughes

Transcript of 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives...

Page 1: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Fairness, Ethics, and Machine Learning

3

Tufts COMP 135: Introduction to Machine Learninghttps://www.cs.tufts.edu/comp/135/2019s/

Many ideas/slides attributable to:Alexandra ChouldechovaMoritz Hardt

Prof. Mike Hughes

Page 2: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Fairness: Unit Objectives

• How to think systematically about end-to-end ML• Where does data come from?• What features am I measuring? What protected

information can leak in unintentionally?• Who will be impacted?

• How to define and measure notions fairness• Use concepts: accuracy, TPR, FPR, PPV, NPV• What is achievable? What is impossible?

4Mike Hughes - Tufts COMP 135 - Spring 2019

Page 3: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Example Concerns about Fairness

5Mike Hughes - Tufts COMP 135 - Spring 2019

Page 4: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

6Mike Hughes - Tufts COMP 135 - Spring 2019

Unfair image search

Page 5: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Unfair Word Embeddings

7Mike Hughes - Tufts COMP 135 - Spring 2019

Page 6: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Unfair Hiring?

Page 7: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Job Ad Classifier: Is this fair?

Page 8: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Unfair Recidivism Prediction

10Mike Hughes - Tufts COMP 135 - Spring 2019

Page 9: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Focus: Binary Classifier

• Let’s say we have two groups, A and B• Could be any protected group (race / gender / age)

• We’re trying to build a binary classifier that will predict individuals as HIGH or LOW risk

• Likelihood of recidivism• Ability to pay back a loan

11Mike Hughes - Tufts COMP 135 - Spring 2019

Page 10: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Group Discussion

• When should protected information (gender, race, age, etc) be provided as input to a predictor?

• Can you build a “race-blind” classifier?

• How could we measure if the predictions are fair?

• Is it enough to ensure accuracy parity?• ACC( group A) = ACC( group B )

12Mike Hughes - Tufts COMP 135 - Spring 2019

Page 11: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Notation for Binary Classifier

13Mike Hughes - Tufts COMP 135 - Spring 2019

Page 12: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Example of Accuracy Parity

14Mike Hughes - Tufts COMP 135 - Spring 2019

Group A Group B

true outcomes1 = would fail to appear in court

Y 0 0 1 1 0 0 1 1

classifier prediction1 = too risky for bail

C 0 0 0 0 1 1 1 1

Is this fair?

Page 13: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Case Study: The COMPAS future crime prediction algorithm

15Mike Hughes - Tufts COMP 135 - Spring 2019

Page 14: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

16Mike Hughes - Tufts COMP 135 - Spring 2019

HIGH RISK of future crimehold in jail before trial

LOW RISK of future crimerelease before trial

COMPAS classifier

other features (e.g. demographics, questionnaire answers, family history)

Page 15: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Mike Hughes - Tufts COMP 135 - Spring 2019 2

Page 16: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

18Mike Hughes - Tufts COMP 135 - Spring 2019

Page 17: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

The COMPAS tool assigns defendants scores from 1 to 10 that indicate how likely they are to reoffend based on more than 100 factors, including age, sex and criminal history. Notably, race is not used. These scores profoundly affect defendants’ lives: defendants who are defined as medium or high risk, with scores of 5-10, are more likely to be detained while awaiting trial than are low-risk defendants, with scores of 1-4.

19Mike Hughes - Tufts COMP 135 - Spring 2019

Page 18: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

20Mike Hughes - Tufts COMP 135 - Spring 2019

Page 19: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

21Mike Hughes - Tufts COMP 135 - Spring 2019

Page 20: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

22Mike Hughes - Tufts COMP 135 - Spring 2019Full Document: https://www.documentcloud.org/documents/2702103-Sample-Risk-Assessment-COMPAS-CORE.html

Page 21: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

23Mike Hughes - Tufts COMP 135 - Spring 2019

ProPublica says:“Groups have different False Pos. Rates”

Page 22: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Compas Team Says:“Groups have same predictive value”

24Mike Hughes - Tufts COMP 135 - Spring 2019

Page 23: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

False Positive Rate =

• When true outcome is 0, how often does classifier say “1”.

Page 24: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

True Positive Rate =

• When true outcome is 1, how often does classifier say “1”.

Page 25: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Positive Predictive Value =

When classifier says “1”, how often is true label 1.

Page 26: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Negative Predictive Value =When classifier says “0”, how often is true label 0.

Page 27: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

29Mike Hughes - Tufts COMP 135 - Spring 2019

ProPublica says:“Groups have different False Pos. Rates”

Page 28: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Compas Team Says:“Groups have same predictive value”

30Mike Hughes - Tufts COMP 135 - Spring 2019

Page 30: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

32Mike Hughes - Tufts COMP 135 - Spring 2019

Equation of the Day

FPR =p

1� p

1� PPV

PPVTPR

where prevalence p = Pr(Y = 1)

If two groups have different p values, can we simultaneously have TPR parity AND FPR parity AND PPV parity AND NPV parity?

Page 31: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

33Mike Hughes - Tufts COMP 135 - Spring 2019

https://www.propublica.org/article/bias-in-criminal-risk-scores-is-mathematically-inevitable-researchers-say

Page 32: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

34Mike Hughes - Tufts COMP 135 - Spring 2019

Unless classifier is perfect, must chose one:Disparate Treatment (PPV or NPV not equal)

or Disparate Impact (FPR or TPR not equal)

Page 33: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

35Mike Hughes - Tufts COMP 135 - Spring 2019

Try demo of making decisions from risk scores:goo.gl/P8rmA3

Page 34: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What

Fairness: Unit Objectives

• How to think systematically about end-to-end ML• Where does data come from?• What features am I measuring? What protected

information can leak in unintentionally?• Who will be impacted?

• How to define and measure notions fairness• Use concepts: accuracy, TPR, FPR, PPV, NPV• What is achievable? What is impossible?

36Mike Hughes - Tufts COMP 135 - Spring 2019