-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalgo-fairness-part2.html
686 lines (554 loc) · 21.9 KB
/
algo-fairness-part2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Algorithmic fairness — Part 1</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="custom_themes/sussex.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div id="hidden" style="display:none;">
<div id="static-content">
<footer>
<p>Topics in Computer Science</p>
</footer>
</div>
</div>
<div class="reveal">
<div class="slides">
<section>
<h1>Algorithmic fairness</h1>
<p>by Oliver Thomas and Thomas Kehrenberg</p>
<img src="images/sussex_logo.svg" style="width: 15%; border: none;"/>
</section>
<section>
<h2>Part 2</h2>
<ul>
<li>How to enforce fairness?</li>
<li>Delayed Impact of Fair Learning</li>
</ul>
</section>
<section data-markdown><textarea data-template>
## How to enforce fairness?
Fairness constraints can be added pre, during or post training.
### Pre-training examples
- Zemel Fair Representations
- Beutel / Edwards & Storkey Adversarial Representation
- Quadrianto Fair Interpretable Representations
- Feldman
</textarea></section>
<section data-markdown><textarea data-template>
### During Training
- Zafar's methods
- Zhang
- Kehrenberg Fair GP
<br/>
### Post Training
- Hardt Recalibration
</textarea></section>
<section data-markdown><textarea data-template>
<h2>Pre-Training</h2>
Popular approach is to add produce a "fair" representation. Consider that we have 2 roles, a data vendor, who is charge of collecting the data and preparing it. Our other role is a data user, someone who will be making predictions based on our data.
The data vendor is concerned that the data user may be using their data to make unfair decisions. So the data vendor decides to learn a new, fair representation.
</textarea></section>
<section data-markdown><textarea data-template>
The state-of-the-art method a fair representation this is to use an *adversarial* network, using a "Gradient-Reversal Layer" from Ganin et al.
![](./images/adversarial.svg)
</textarea></section>
<section>
<section>
<h2>Problems with doing this?</h2>
<h4>Any Ideas?</h4>
</section>
<section>
<h2>Problems with doing this?</h2>
<h4>What does this representation mean?</h4>
<p>The learned representation is uninterpretable by default. Recently Quadrianto et al constrained the representation to be in the same same as the input so that we could look at what changed</p>
</section>
<section>
<h2>Problems with doing this?</h2>
<h4>What if the vendor data user decides to be fair as well?</h4>
<p>Referred to as "fair pipelines". Work has only just begun exploring these. Current research shows that these don't work (at the moment!)</p>
</section>
</section>
<section>
<h2>During Training</h2>
Instead of building a fair representation, we just make the fairness constraints part of the objective during training of the model.
An early example of this is by Zafar et al.
</section>
<section>
<p>Given we have a loss function, $\mathcal{L}(\theta)$.</p>
<p>In an unconstrained classifier, we would expect to see</p>
$$
\min{\mathcal{L}(\theta)}
$$
</section>
<section>
<section>
<p>To reduce Disparate Impact, Zafar adds a constraint to the loss function.</p>
$$
\begin{aligned}
\text{min } & \mathcal{L}(\theta) \\
\text{subject to } & \frac{1}{N}\sum_{i=1}^{N} (s_i - \bar{s})d_{\theta}(x_i) \leq c \\
\text{subject to } & \frac{1}{N}\sum_{i=1}^{N} (s_i - \bar{s})d_{\theta}(x_i) \geq -c
\end{aligned}
$$
</section>
<section>
<p>Where $\{{s_i \} }_{i=1}^{N}$ denotes a user's sensitive attributes</p>
<p>$\{ {d_{\theta}(x_i) \} }_{i=1}^{N}$ the signed distance to the decision boundary</p>
<p>$c$ is the trade-off between accuracy and fairness.</p>
<p>If $c$ is sufficiently small, this is the equivalent of</p>
$$
P(d_{\theta}(x) \geq 0 | s = 0) = P(d_{\theta}(x) \geq 0 | s = 1)
$$
</section>
<section>
In other words, the decisions for both sensitive groups must be equally distributed across the decision boundary up to some threshold $c$.
</section>
</section>
<section>
<h2>Post-training</h2>
<p>Calders and Verwer (2010) train two separate models: one for all datapoints with $s=0$ and another one for $s=1$</p>
<p>The thresholds of the model are then tweaked until they produce the same <i>positive rate</i>
($P(\hat{y}=1|s=0)=P(\hat{y}=1|s=1)$)</p>
<p>Disadvantage: $s$ has to be known for making predictions in order to choose the correct model.</p>
</section>
<section>
<h2>Delayed Impact of Fair Learning</h2>
<p>In the real world there are implications.</p>
<p>An individual doesn't just cease to exist after we've made our loan or bail decision.</p>
<p>The decision we make has <b>consequences</b>.</p>
</section>
<section data-markdown><textarea data-template>
Consider a bank's lending decision.
The outcome is not simply reject or accept the applicant for a loan. In fact, there are multiple effects of this decision.
If the applicant receives a loan, then goes on to successfully pay it back, then not only will the bank make a profit, but then the applicant's credit score will increase.
This will make future loan decisions more favorable to the applicant.
</textarea></section>
<section data-markdown><textarea data-template>
We could think of this in terms of loss functions.
The banks objective was to maximize profit. After deciding to give the loan, the loan was repaid (with interest). The bank made money.
To maximize the objective (minimize the negative of the loss) the bank wants to give out as many loans that are likely to be repaid as possible.
</textarea></section>
<section data-markdown><textarea data-template>
In this scenario we have a slightly different concern. We don't want loans to be given to one subgroup (such as blue race), more often than members of another subgroup (green race).
Our concern is that if the number of people who receive loans from one group outweigh the other, then as a whole, the credit rating will become a euphemism for race.
</textarea></section>
<section>
<section>
<h2>The Outcome Curve</h2>
<img src="images/outcome_curve.png" width="65%">
</section>
<section>
<h2>Possible areas</h2>
<table>
<tr>
<th>Area</th>
<th>Description</th>
</tr>
<tr>
<td>Active Harm</td>
<td>Expected change in credit score of an individual is negative</td>
</tr>
<tr>
<td>Stagnation</td>
<td>Expected change in credit score of an individual is 0</td>
</tr>
<tr>
<td>Improvement</td>
<td>Expected change in credit score of an individual is positive</td>
</tr>
</table>
</section>
<section>
<h2>Possible areas</h2>
<table>
<tr>
<th>Area</th>
<th>Description</th>
</tr>
<tr>
<td>Relative Harm</td>
<td>Expected change in credit score of an individual is less than if the selection policy had been to maximize profit</td>
</tr>
<tr>
<td>Relative Improvement</td>
<td>Expected change in credit score of an individual is better than if the selection policy had been to maximize profit</td>
</tr>
</table>
</section>
<section>
<p>For those interested in more of an explanation of the equations, see Appendix</p>
</section>
</section>
<section>
</section>
<section>
<h2>Causality</h2>
<p>"Correlation doesn't imply causation"</p>
<p class="fragment">But what is causation?</p>
<p class="fragment">If we can understand what <b>causes</b> unfair behavior, then we can take steps to mitigate it.</p>
<p class="fragment">Basic idea: if a sensitive attribute has no causal influence on prediction, don't use it.</p>
<p class="fragment">But how do we model causation?</p>
</section>
<section>
<h2>Causal Graphs</h2>
<p><b>Solution:</b> build causal graphs of your problem</p>
<p><b>Problem:</b> causality cannot be inferred from observational data</p>
<p>Observational data can only show correlations</p>
<p>For causal information we have to do <i>experiments</i>. (But that is often not ethical.)</p>
</section>
<section>
<h2>Example with Causal Graphs</h2>
<p><b>Example:</b> Law school success</p>
<p>Task: given GPA score and LSAT (law school entry exam), predict grades after one year in law school:
FYA (first year average)</p>
<p>Additionally two sensitive attributes: <i>race</i> and <i>gender</i></p>
</section>
<section>
<h2>Example with Causal Graphs</h2>
<p>Two possible graphs</p>
<img src="./images/lsat_causal.png"/>
</section>
<section>
<h2>Counterfactual Fairness</h2>
<p>$U$: set of all unobserved background variables</p>
<p>$P(\hat{y}_{s=i}(U) = 1|x, s=i)=P(\hat{y}_{s=j}(U) = 1|x, s=i)$</p>
<p>$i, j \in \{0, 1\}$</p>
<p>$\hat{y}_{s=k}$: prediction in the counterfactual world where $s=k$</p>
<p><b>practical consequence:</b> $\hat{y}$ is counterfactually fair if it does not causally depend
(as defined by the causal model) on $s$ or any descendants of $s$.</p>
</section>
<section>
<h2>Related idea: fairness based on similarity</h2>
<ul>
<li>First define a distance metric on your datapoints (i.e. how similar are the datapoints)
<ul>
<li>Can be just Euclidean distance but is usually something else (because of different scales)</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Pre-processing based on similarity</h2>
<ul>
<li>An individual is then considered to be unfairly treated if it is treated differently than its "neighbours".</li>
<li>For any data point we can check how many of the $k$ nearest neighbours have the same class label as that data point</li>
<li>If the percentage is under a certain threshold then there was discrimination against the individual corresponding to that data point.</li>
<li>Then: flip the class labels of those data points where the class label is considered unfair</li>
</ul>
</section>
<section>
<h2>Considering similarity during training</h2>
<p>Alternative idea:</p>
<ul>
<li>a classifier is fair if and only if the predictive distributions for any two data points are at least as similar
as the two points themselves
<ul>
<li>(according to a given similarity measure for distributions and a given similarity measure for data points)</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Considering similarity during training</h2>
<ul>
<li>Needed similarity measure for distributions</li>
<li>Then add fairness condition as additional loss term to optimization loss</li>
</ul>
</section>
<section>
<h2>Appendix</h2>
</section>
<section data-markdown>
<textarea data-template>
# Delayed Impact of Fair Machine Learning
Lydia T. Liu, Sarah Dean, Esther Rolf, Max Simchowitz, Moritz Hardt
</textarea>
</section>
<section>
"intuition may be a poor guide in judging the long-term impact of fairness constraints"
</section>
<section data-markdown>
<textarea data-template>
This presentation is structured like so:
- Introduction
- Problem Setting
- Fairness Criteria
- Outcome Curve
- Findings
- Outcome-Based Approach?
- Experimental Results
- Criticisms / Areas to explore
</textarea>
</section>
<section>
<h2>Introduction</h2>
<p>This paper is about acknowledging a feedback loop.</p>
<p>Credit decisions are ultimately more than just whether or not you get a loan. It also affects an applicant's credit history is they're accepted for a loan that they can't repay.</p>
</section>
<section data-markdown>
<textarea data-template>
## Problem Setting
The population comprises 2 groups, $A$ and $B$.
$A$ is disadvantaged in comparison to group $B$.
$\pi_j$ is the distribution of the scores in group $j$.
$\pi_j(x)$ is the probability that score $x$ is in group $j$.
</textarea>
</section>
<section data-markdown>
<textarea data-template>
An institution (i.e. a bank) selects a policy $(\tau_A, \tau_B)$
$\tau_j(x)$ is the probability the bank selects an individual with group $j$ with score $x$.
$p(x) =$ Probability that an individual with score $x$ satisfactorily repays the loan.
</textarea>
</section>
<section>
Assume a function $u(x)$ that returns the expected utility for score $x$.
<br/>
<br/>
$$
u(x) = u_+ p(x) + u_- ( 1 - p(x) )
$$
<br/>
Where $u_+$ is the profit of a repaid loan
<br/>
and $u_-$ is the loss on an unpaid loan
</section>
<section>
Expected utility for policy $\tau$
<br/>
<br/>
$$
U(\tau) = \sum_{j \in \{A,B\}} g_j \sum_{x \in \mathcal{X}} \tau_j(x) \pi_j(x)u(x)
$$
<br/>
where $g_j$ is the fraction of the total population
</section>
<section>
$$
\Delta (x) = c_+ p(x) + c_- (1 - p(x))
$$
<br/>
Where $c_+$ isa constant gain in credit score if loan repaid
<br/>
and $c_-$ is a constant loss in the case of an unpaid loan
</section>
<section>
Average change of the mean score $\mu_j$ for group $j$
<br/>
<br/>
$$
\Delta\mu_j(\tau) = \sum_{x \in \mathcal{X}} \pi_j(x) \tau_j(x) \Delta (x)
$$
<br/>
Where $\Delta(x)$ as defined on the slide before is the expected change in score of an individual with score $x$
</section>
<section>
<h2>Fairness Criteria</h2>
</section>
<section>
<section>Different fairness criteria have been defined, such as Demographic Parity, Equalised Odds and Equality of Opportunity</section>
<section>
Demographic Parity
$$
P(\hat{Y}=1 | S=0) = P(\hat{Y}=1 | S=1)
$$
$$
Y \in \{0,1\} \\
S \in \{0,1\}
$$
</section>
<section>
Equalised Odds
$$
P(\hat{Y}=1 | S=0, Y=y) = P(\hat{Y}=1 | S=1, Y=y)
$$
$$
Y \in \{0,1\} \\
S \in \{0,1\}
$$
</section>
<section>
Equalised Opportunity
$$
P(\hat{Y}=1 | S=0, Y=1) = P(\hat{Y}=1 | S=1, Y=1)
$$
$$
Y \in \{0,1\} \\
S \in \{0,1\}
$$
</section>
</section>
<section>
<p>This paper considers 3</p>
<ul>
<li>Maximizing Utility</li>
<li>Demographic Parity</li>
<li>Equality of Opportunity</li>
</ul>
</section>
<section>
<h2>Maximizing Utility</h2>
This is the null constraint. The bank solely focusses on utility (earning money)
</section>
<section>
<h2>Demographic Parity</h2>
Equal selection rates for groups $A$ and $B$
</section>
<section>
<h2>Equality of Opportunity</h2>
Equal True Positive Rates across the 2 groups
<br/>
$$TPR_A(\tau_A) = TPR_B(\tau_B)$$
<br/>
Where
<br/>
<br/>
$$
TPR_j(\tau) = \frac{\sum_{x \in \mathcal{X}} \pi_j (x) p(x) \tau)x)}{\sum_{x \in \mathcal{X}} \pi_j(x) p(x)}
$$
</section>
<section>
<h2>The Outcome Curve</h2>
<img src="images/outcome_curve.png" width="65%"/>
</section>
<section>
<h2>Possible areas</h2>
<table>
<tr>
<th>Area</th>
<th>Description</th>
</tr>
<tr>
<td>Active Harm</td>
<td>$\Delta \mu_j (\tau_j) < 0$</td>
</tr>
<tr>
<td>Stagnation</td>
<td>$\Delta \mu_j (\tau_j) = 0$</td>
</tr>
<tr>
<td>Improvement</td>
<td>$\Delta \mu_j (\tau_j) > 0$</td>
</tr>
<tr>
<td>Relative Harm</td>
<td>$\Delta \mu_j (\tau_j) < \Delta \mu_j (\tau^{\text{MAXUTIL}})$</td>
</tr>
<tr>
<td>Relative Improvement</td>
<td>$\Delta_j (\tau_j) > \Delta \mu_j (\tau^{\text{MAXUTIL}})$</td>
</tr>
</table>
</section>
<section>
<h2>Selection Rates</h2>
$$
\beta_j = \sum_{x \in \mathcal{X}} \pi_j(x) \tau_j(x)
$$
</section>
<section>
To explicitly connect selection rates to decision policies we define a rate function
$$
r_\pi (\tau_j)
$$
Which returns the proportion of group $j$ selected by the policy
</section>
<section>
The outcome curve is the graph of the mapping
$$
\beta \rightarrow \Delta \mu_A (r_{\pi_A}^{-1}(\beta))
$$
$r^{-1}$ is the inverse of the rate function. Same as the rate function, but the input and output are reversed.
</section>
<section>
<table>
<tr>
<th>Selection Rate</th>
<th>Description</th>
</tr>
<tr>
<td>$\beta^{\text{MAXUTIL}}$</td>
<td>The selection rate under max util</td>
</tr>
<tr>
<td>$\beta^*$</td>
<td> selection rate such that $\Delta \mu_A$ is maximized</td>
</tr>
<tr>
<td>$\bar{\beta}$</td>
<td>the outcome complement of the MaxUtil selection rate, $\Delta \mu_A r_{\pi_A}^{-1}(\bar{\beta}) = \Delta \mu_A (r_{\pi_A}^{-1} (\beta^{\text{MAXUTIL}}))$ with $\bar{\beta} > \beta^{\text{MAXUTIL}}$</td>
</tr>
<tr>
<td>$\beta_0$</td>
<td>the harm threshold, such that $\Delta \mu_A r_{\pi_A}^{-1} (\beta_0) = 0$ </td>
</tr>
</table>
</section>
<section>
<h2>Findings/Results</h2>
Under the assumption $\frac{u_-}{u_+} < \frac{c_-}{c_+}$ which means that the risk to the bank is greater than the risk to the individual
</section>
<section>
Then Max. Util. can't cause active harm because $(x) > 0$ for all loans, therefore $\Delta\mu (x) \geq 0$
<br/>
<br/>
$$
0 \leq \Delta \mu (\tau^{\text{MAXUTIL}}) \leq \Delta \mu^*
$$
</section>
<section>
Fairness criteria <em>can</em> cause relative improvement.
<br/>
Under the assumption $\beta_{A}^{\text{MAXUTIL}} < \bar{\beta}$ and $\beta_{A}^{\text{MAXUTIL}} < \beta_{B}^{MAXUTIL}$
there exists population proportions $g_0 < g_1 < 1$ such that for all $g_A \in [g_0,g_1]$, $\beta_{A}^{\text{MAXUTIL}} < \beta_{A}^{\text{DEMPARITY}} < \bar{\beta}$
</section>
<section>
Demographic Parity <em>can</em> cause relative improvement.
Under the assumption $\beta_{A}^{\text{MAXUTIL}} < \beta < \beta' < \bar{\beta}$ such that $\beta_{A}^{\text{MAXUTIL}} > \beta_{A \rightarrow B}, \beta^*_{A \rightarrow B}$
Where $A \rightarrow B$ is the mapping of the selection rate in A to the selection rate in B such that the TPR in A is the same in A as it is in B.
</section>
<section>
Eq Opp <em>can</em> cause relative improvement
there exists population proportions $g_2 < g_3 < 1$ s.t. for all $g_A \in [g_2, g_3], \beta_{A}^{\text{MAXUTIL}} < \beta_{A}^{\text{EQOPP}} < \bar{\beta}$
</section>
<section>
Demographic parity <em>can</em> cause harm by being over eager.
Assume $\beta_{B}^{\text{MAXUTIL}} > \beta_{A}^{\text{MAXUTIL}}$
There exists a population proportion $g_0$ such that for all $g_A \in [0, g_0], \beta_{A}^{\text{DEMPARITY}} > \beta$
If $\beta = \beta_0$, then active harm
else if $\beta = \bar{\beta}$, the active harm
</section>
<section>
Similarly for Eq. Opp. Assume $\beta_{A}^{\text{MAXUTIL}} < \beta$ and $\beta_{B}^{\text{MAXUTIL}} > \beta_{a \rightarrow B}$
There exists a population proportion s.t. $\beta < \beta{A}^{\text{EQOPP}}$
if $\beta = $ consditions in the last slide, same conclusions apply.
</section>
<section>
<h2>Outcome Based Alternative</h2>
Imagine the bank's goal wasn't max. utility, but was to aid the disadvantaged group $A$ as much as possible.
$$
\max_{\tau_A} \Delta \mu_A (\tau_A) \text{ s.t. } U_{A}^{\text{MAXUTIL}} - U(\tau) < \sigma
$$
This is left as an open question.
</section>
<section>
<h2>Experimental Results</h2>
In one experiment ($\frac{u_-}{u_+}=-10$) fairness doesn't cause active harm. In another ($\frac{u_-}{u_+}=-4$), DemPar causes active harm, but Eq.Opp does not.
In all experiments $c_- = -150$ and $c_+ = 75$
</section>
<section>
The experiments were done with the FICO dataset, which consists of 301,536 TransUnion TransRisk scores from 2003. Scores range from 300-850 and are meant to predict credit risk. Data is labelled by race. This is restricted to only include `white' and `black' races. These are then set so that the population proportions are $18%$ and $82%$ ``to match national demographic data''.
Labelled as default if failed to pay a debt for at least 90 days on at least one account in the ensuing 18-24 month period.
</section>
</div>
</div>
<script type="module" src="settings.js"></script>
</body>
</html>