24 fairness and machine learning - department of computer ...€¦ · fairness: unit objectives...
TRANSCRIPT
![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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/1.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/2.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/3.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/4.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/5.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/6.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/7.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/8.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/9.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/10.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/11.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/12.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/13.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/14.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/15.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/16.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/17.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/18.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/19.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/20.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/21.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/22.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/23.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/24.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/25.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/26.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/27.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/28.jpg)
Compas Team Says:“Groups have same predictive value”
30Mike Hughes - Tufts COMP 135 - Spring 2019
![Page 29: 24 fairness and machine learning - Department of Computer ...€¦ · Fairness: Unit Objectives •How to think systematically about end-to-end ML •Where doesdatacomefrom? •What](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/29.jpg)
31Mike Hughes - Tufts COMP 135 - Spring 2019
Worksheet
![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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/30.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/31.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/32.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/33.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022043019/5f3b9efec99335015963221c/html5/thumbnails/34.jpg)
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