Jekyll2020-06-05T06:59:15+00:00/feed.xmlÖmer Kırnap’s HomepageWrite an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.Omer KirnapWhich way is fair, which way is not?2019-02-16T00:00:00+00:002019-02-16T00:00:00+00:00/fairness/2019/02/16/beginning-of-bias<script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
<p>The journey of Artificial Intelligence (AI) consists of so many ups and downs, so do AI fairness. There is mostly an exciting pulse causing an <em>up-ing wave</em> in AI research. In this post, we are going to deep dive into one of these <em>“thought provoking”</em> pulses in AI fairness.</p>
<p><img src="/assets/images/machine_bias.png" alt="ProPublica's Article on Machine Bias" style="width:500px;" /></p>
<p><strong>Introduction</strong>
<br />In 2016, <a href="https://www.propublica.org/">ProPublica</a> an investigative journalist newsroom, published an article -<a href="https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing"><strong>Machine Bias</strong></a>- showing that the software to predict future criminals was biased against black people. The technical details for this analysis can be found in [<a href="https://www.propublica.org/article/how-we-analyzed-the-compas-recidivism-algorithm">1</a>] and [<a href="https://docs.google.com/document/d/1pKtyl8XmJH7Z09lxkb70n6fa2Fiitd7ydbxgCT_wCXs/edit?pref=2&pli=1">2</a>].</p>
<p>In contrary to what ProPublica found, another group of detailed analysis argued that ProPublica is misleading the tool as well as the results in [<a href="http://www.northpointeinc.com/northpointe-analysis.">3</a> ], [<a href="(https://www.documentcloud.org/documents/2998391-ProPublica-Commentary-Final-070616.html)">4</a>], [<a href="http://www.crj.org/cji/entry/false-positives-false-negatives-and-false-analyses-a-rejoinder.">5</a>] and [<a href="https://medium.com/@AbeGong/ethics-for-powerful-algorithms-1-of-3-a060054efd84#.dhsd2ut3i">6</a>].</p>
<p><strong>Background</strong>
<br />To “roughly” understand the debate we need a little bit of technical explanations.</p>
<p><em>Calibrated Scores</em>. A rule of thumb in statistical risk assement tools is <em>calibrating the scores</em>. Suppose your weather forecasting app predicts 40 percent of rain for today, how do you scientifically measure the goodness of this prediction? You need to collect data points… If you have 100 days of prediction with 40 percent rain, and approximately 40 of them actually rains, then your predictions are <strong><em>statistically calibrated</em></strong>. Hence, your risk asssement for rain is scientifically fine.</p>
<p><em>Balance for Classes</em>. Suppose we have two group of people, group X and group Y and the same risk prediction system predicting individuals as high risk-<em>positive</em>- (HR) or low risk-<em>negative</em>- (LR).</p>
<ul>
<li>Average score for the HR predicteds from group Y should be equal to average score for the HR predicteds from group X. This is similar to saying True and False Positive Rates should be equal across groups.</li>
<li>Average score for the LR predicteds from group Y should be equal to average score for the LR predicteds from group X. This is similar to saying True and False Negative Rates should be equal across groups.</li>
</ul>
<p>These two constraint must be true to hold <em>Balance for Classes</em>.</p>
<h3 id="what-is-really-going-on">What is really going on?</h3>
<p>What ProPublica did is -<em>roughly</em>- showed that <em>Balance for Classes</em> is not hold in the software[1]. Yet, what the company build the software argued their tool’s scores <strong>statistically calibrated</strong>. Yet, research stimulating question has arrived:</p>
<ul>
<li>Can we achieve both criteria simultaneously?</li>
</ul>
<p>Chouldechova [<a href="https://arxiv.org/pdf/1610.07524.pdf">8</a>] and Kleinberg et al. [7] came out to elaborate problem of achieving these notions of fairness simultaneously.</p>
<h3 id="problem-formulation">Problem formulation</h3>
<p>We are going to walk through a simplified version of the same example Kleinberg explains in his <a href="https://www.cornell.edu/video/jon-kleinberg-inherent-trade-offs-algorithmic-fairness">talk</a>.</p>
<p>Suppose you have a system predicts Low Risk(LR) or High Risk(HR) for individuals. For LR individuals you know that the probablity of being risky is 0.2, similary 0.8 for HR ones. If you put every LRs to a single bin and HRs to another bin, you should have the ~0.2 proportion of actually risky individual in LR bin and ~0.8 in HR bin. In Figure 2, there are 10 invidiuals half of them predicted as HR, and the rest LR. 4 out of 5 individuals are actually risky in HR bin, and vice versa for LR bin. Thus, <strong>scores are calibrated</strong> in this system.</p>
<figure class="image">
<img src="/assets/images/risk_bins.jpg" alt="Risk Assesment tool" style="width:400px;" />
<font face="courier new"><figcaption>Figure 2 depicts 2 bins for 2 types of risk predicitions, low and high with probabilities 0.2 and 0.8 respectively. Red dots denote actually risky and white dots non-risky individuals. </figcaption></font>
</figure>
<p>I am going to use the same notation with Kleinberg et al. [7]</p>
<p><sup>
$bin_L$: Low bin, where every individual predicted as low risk<br />
$bin_H$: High bin, where every individual predicted as high risk<br />
$p_{bin_L}$: probability score, 0.2 in our case, of being LR in given individual in $bin_L$<br />
$p_{bin_H}$: probability score, 0.8 in our case, of being HR in given individual in $bin_H$<br />
$b_L^t$: total score in $bin_L$ for group t<br />
$b_H^t$: total score in $bin_H$ for group t<br />
$k_t$: number of people in group t and belongs to risky (positive) class<br />
$N_t$: total number of people in group<br /><sup></sup></sup></p>
<script type="math/tex; mode=display">\begin{equation}
b_L^t : = \sum_{i \in bin_L \cap t}{p_{bin_L}}\\
b_H^t : = \sum_{i \in bin_H \cap t}{p_{bin_H}}
\tag{1}
\end{equation}</script>
<p><sup>One can deduce from the equation (1) that <em>calibration</em> implies the total score in any given bin is equal to expected number of people actually in risky class in that bin for group t. Total score for $bin_L$ and $bin_H$ are $0.2*5=1$ and $0.8*5=4$ respectively, where these numbers are equal to actually risky (red) individuals in those bins. <sup></sup> Now assume we have only one group in Figure 2, in other words everybody is coming from the same group. Hence, summing total scores over all bins gives the total number of people belonging to risky class:</sup></p>
<script type="math/tex; mode=display">\begin{equation}
b_L^t+b_H^t = 1+4 = k_t
\tag{2}
\end{equation}</script>
<p>As to make formulation even more clear, let’s have our final two definitions, please note that the above definitions are <strong>group independent</strong>:</p>
<p><sup>
$x$: The average score of an individual predicted in the nonrisky (negative).<br />
$y$: The average score of an individual predicted in the risky (positive).<br />
$n_{b_{risky}}$: Number of actually risky people in bin b.<br />
$n_{b_{nonrisky}}$: Number of actually nonrisky people in bin b.<br />
<sup></sup></sup></p>
<script type="math/tex; mode=display">\begin{equation}
x := \frac{\sum_{p_b \in \{p_{bin_L}, p_{bin_H}\}} p_b n_{b_{risky}}}{\sum_{p_b \in \{p_{bin_L}, p_{bin_H}\}} n_{b_{risky}}}
\tag{3}
\end{equation}</script>
<script type="math/tex; mode=display">\begin{equation}
y := \frac{\sum_{p_b \in \{p_{bin_L}, p_{bin_H}\}} p_b n_{b_{nonrisky}}}{\sum_{p_b \in \{p_{bin_L}, p_{bin_H}\}} n_{b_{nonrisky}}}
\tag{4}
\end{equation}</script>
<p>If we apply equations (3) and (4) in our example in Figure 2:<br />
<br /> <script type="math/tex">x=(0.2*4+0.8*1)/5=0.32</script>
<script type="math/tex">y=(0.2*1+0.8*4)/5=0.68</script></p>
<p>We know from equation (2) that summing scores over all bins gives the total number of risky (positive) people in that group. Moreover, we know that the total score for a group t is equal to summation of total scores from risky (positive) and nonrisky (negative) classes:</p>
<script type="math/tex; mode=display">\begin{equation}
x*(N_t-k_t)+y*k_t = k_t\\
\Rightarrow \\
x = (1-y) * \frac{k_t}{(N_t - k_t)}
\tag{5}
\end{equation}</script>
<p>Equation (5) indicates a line with a slope of proportional to $\frac{k_t}{(N_t - k_t)}$. Okay, but wait what is this slope?
Yes! It is the rate of risky individuals to nonrisky individuals. To achieve <em>calibrated scores</em> we need this equality. However, slope trend shows that ($x$, $y$) driven from have different lines, based on the slope or risky proportions, which causes not to have <em>class balances</em> for different groups.</p>
<p>As a result, if we have a two grouped version of the same system, with different rates of risky individuals and the <strong><em>Scores are Calibrated</em></strong>, it is impossible to achieve equal <strong><em>Balance for Classes</em></strong> condition.</p>
<h3 id="results">Results</h3>
<p>We can now esaily claim that it is <em>“impossible”</em> to achieve what ProPublica argued as unfair because the company making this software is calibrated the scores with data having two different rates of risky individuals for black and white people.</p>
<figure class="image">
<img src="/assets/images/bias_after.png" alt="Risk Assesment tool" style="width:550px;" />
</figure>
<p>Last but not least, along with this work Chouldechova [<a href="https://arxiv.org/pdf/1610.07524.pdf">8</a>]’s paper also proved again <em>“impossibility”</em> of reaching multiple (more than 3) predefined fairness criteria instantaneously. It is common wisdom isn’t it:)</p>
<h3 id="conclusions">Conclusions</h3>
<p>ProPublica’s contradictory analysis on a software helped to discover new territories in huge adventurous AI-Fairness land. Yet, we clearly learned there are trade-offs in such risk assessment tools. If you are interested in math and probability <a href="https://en.wikipedia.org/wiki/Simpson%27s_paradox">Simpson’s paradox</a> is a very interesting topic to discover!</p>
<hr />
<h3 id="references">References:</h3>
<p>[1] <a href="https://www.propublica.org/article/how-we-analyzed-the-compas-recidivism-algorithm">ProPublica Article</a><br />
[2] <a href="https://docs.google.com/document/d/1pKtyl8XmJH7Z09lxkb70n6fa2Fiitd7ydbxgCT_wCXs/edit?pref=2&pli=1">ProPublica Analysis-doc</a><br />
[3] <a href="http://www.northpointeinc.com/northpointe-analysis.">William Dieterich, Christina Mendoza, and Tim Brennan. COMPAS risk scales: Demonstrating accuracy equity and predictive parity. Technical report, Northpointe, July 2016.</a><br />
[4] <a href="https://www.documentcloud.org/documents/2998391-ProPublica-Commentary-Final-070616.html">Northpointe Technical Report</a><br />
[5] <a href="http://www.crj.org/cji/entry/false-positives-false-negatives-and-false-analyses-a-rejoinder.">Anthony Flores, Christopher Lowenkamp, and Kristin Bechtel. False positives, false negatives, and false analyses: A rejoinder to “machine bias: Theres software used across the country to predict future criminals. and its biased against blacks.”. Technical report, Crime & Justice Institute, September 2016.</a><br />
[6] <a href="https://medium.com/@AbeGong/ethics-for-powerful-algorithms-1-of-3-a060054efd84#.dhsd2ut3i">Abe Gong. Ethics for powerful algorithms 1 of 4. Medium, July 12, 2016</a><br />
[7] Jon Kleinberg, Sendil Mullainathan, and Manish Raghavan. Inherent trade-offs in the fair determination of risk scores. arXiv, 2016.<br />
[8] Alexandra Chouldechova. Fair prediction with disparate impact: A study of bias in recidivism prediction instruments. arXiv, 2017.<br />
[9] <a href="https://www.propublica.org/article/bias-in-criminal-risk-scores-is-mathematically-inevitable-researchers-say">ProPublica Inevitable Bias Article</a></p>Ömer KırnapWelcome to LBF Notes2018-11-15T00:00:00+00:002018-11-15T00:00:00+00:00/lbf/2018/11/15/welcome-lbf<h2 id="what-is-lbf">What is LBF?</h2>
<p>LBF is an acronym for Learn by Fun. I share the fun that I learn while trying to find shortcuts:)</p>Ömer KırnapWhat is LBF?Welcome to Machine Learning2018-11-15T00:00:00+00:002018-11-15T00:00:00+00:00/ml/2018/11/15/welcome<h2 id="this-is-my-very-first-post-on-machine-learning">This is my very first post on machine learning</h2>Ömer KırnapThis is my very first post on machine learning