<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>divergences</title>
<link>https://divergences.xyz/tag/fairness.html</link>
<atom:link href="https://divergences.xyz/tag/fairness.xml" rel="self" type="application/rss+xml"/>
<description>A blog by Sigrid Keydana. Opinions are exclusively mine.</description>
<generator>quarto-1.10.19</generator>
<lastBuildDate>Thu, 15 Jul 2021 00:00:00 GMT</lastBuildDate>
<item>
  <title>Starting to think about AI Fairness</title>
  <dc:creator>Sigrid Keydana</dc:creator>
  <link>https://divergences.xyz/posts/ai-fairness/</link>
  <description><![CDATA[ 






<p>If you use deep learning for unsupervised part-of-speech tagging of Sanskrit <sup>1</sup>, or knowledge discovery in physics <sup>2</sup>, you probably don’t need to worry about model fairness. If you’re a data scientist working at a place where decisions are made about <em>people</em>, however, or an academic researching models that will be used to such ends, chances are that you’ve already been thinking about this topic. — Or feeling that you should. And thinking about this is hard.</p>
<div class="no-row-height column-margin column-container"><div id="fn1"><p><sup>1</sup>&nbsp;<span class="citation" data-cites="Srivastava">Srivastava et al. (2018)</span></p><div id="ref-Srivastava" class="csl-entry">
Srivastava, Prakhar, Kushal Chauhan, Deepanshu Aggarwal, Anupam Shukla, Joydip Dhar, and Vrashabh Prasad Jain. 2018. <span>“Deep Learning Based Unsupervised POS Tagging for Sanskrit.”</span> <em>Proceedings of the 2018 International Conference on Algorithms, Computing and Artificial Intelligence</em> (New York, NY, USA), ACAI 2018. <a href="https://doi.org/10.1145/3302425.3302487">https://doi.org/10.1145/3302425.3302487</a>.
</div></div><div id="fn2"><p><sup>2</sup>&nbsp;<span class="citation" data-cites="Cranmer">Cranmer et al. (2020)</span></p><div id="ref-Cranmer" class="csl-entry">
Cranmer, Miles D., Alvaro Sanchez-Gonzalez, Peter W. Battaglia, et al. 2020. <span>“Discovering Symbolic Models from Deep Learning with Inductive Biases.”</span> <em>CoRR</em> abs/2006.11287. <a href="https://arxiv.org/abs/2006.11287">https://arxiv.org/abs/2006.11287</a>.
</div></div></div><p>It is hard for several reasons. In this text, I will go into <em>just one</em>.</p>
<section id="the-forest-for-the-trees" class="level2">
<h2 class="anchored" data-anchor-id="the-forest-for-the-trees">The forest for the trees</h2>
<p>Nowadays, it is hard to find a modeling framework that does <em>not</em> include functionality to assess fairness. (Or is at least planning to.) And the terminology sounds so familiar, as well: “calibration”, “predictive parity”, “equal true [false] positive rate”… It almost seems as though we could just take the metrics we make use of anyway (recall or precision, say), test for equality across groups, and that’s it. Let’s assume, for a second, it really was that simple. Then the question still is: Which metrics, exactly, do we choose?</p>
<p>In reality things are <em>not</em> simple. And it gets worse. For very good reasons, there is a close connection in the ML fairness literature to concepts that are primarily treated in other disciplines, such as the legal sciences: <em>discrimination</em> and <em>disparate impact</em> (both not being far from yet another statistical concept, <em>statistical parity</em>). Statistical parity means that if we have a classifier, say to decide whom to hire, it should result in as many applicants from the disadvantaged group (e.g., Black people) being hired as from the advantaged one(s). But that is quite a different requirement from, say, equal true/false positive rates!</p>
<p>So despite all that abundance of software, guides, and decision trees, even: This is not a simple, technical decision. It is, in fact, a technical decision only to a small degree.</p>
</section>
<section id="common-sense-not-math" class="level2">
<h2 class="anchored" data-anchor-id="common-sense-not-math">Common sense, not math</h2>
<p>Let me start this section with a disclaimer: Most of the sources referenced in this text appear, or are implied on the <a href="http://aif360.mybluemix.net/resources#guidance">“Guidance” page</a> of IBM’s framework AI Fairness 360. If you read that page, and everything that’s said and not said there appears clear from the outset, then you may not need this more verbose exposition. If not, I invite you to read on.</p>
<p>Papers on fairness in machine learning, as is common in fields like computer science, abound with formulae. Even the papers referenced here, though selected not for their theorems and proofs but for the ideas they harbor, are no exception. But to start thinking about fairness as it might apply to an ML process at hand, common language – and common sense – will do just fine. If, after analyzing your use case, you judge that the more technical results <em>are</em> relevant to the process in question, you will find that their verbal characterizations will often suffice. It is only when you doubt their correctness that you will need to work through the proofs.</p>
<p>At this point, you may be wondering what it is I am contrasting those “more technical results” with. This is the topic of the next section, where I’ll try to give a birds-eye characterization of fairness criteria and what they imply.</p>
</section>
<section id="situating-fairness-criteria" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="situating-fairness-criteria">Situating fairness criteria</h2>
<p>Think back to the example of a hiring algorithm. What does it mean for this algorithm to be fair? We approach this question under two – incompatible, mostly – assumptions:</p>
<ol type="1">
<li><p>The algorithm is fair if it behaves the same way independent of which demographic group it is applied to. Here demographic group could be defined by ethnicity, gender, abledness, or in fact any categorization suggested by the context.</p></li>
<li><p>The algorithm is fair if it does not discriminate against any demographic group.</p></li>
</ol>
<p>I’ll call these the technical and societal views, respectively.</p>
<section id="fairness-viewed-the-technical-way" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="fairness-viewed-the-technical-way">Fairness, viewed the technical way</h3>
<p>What does it mean for an algorithm to “behave the same way” regardless of which group it is applied to?</p>
<p>In a classification setting, we can view the relationship between prediction (<img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">) and target (<img src="https://latex.codecogs.com/png.latex?Y">) as a doubly directed path. In one direction: Given true target <img src="https://latex.codecogs.com/png.latex?Y">, how accurate is prediction <img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">? In the other: Given <img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">, how well does it predict the true class <img src="https://latex.codecogs.com/png.latex?Y">?</p>
<p>Based on the direction they operate in, metrics popular in machine learning overall can be split into two categories. In the first, starting from the true target, we have <em>recall</em>, together with “the <em>rate</em>s”: true positive, true negative, false positive, false negative. In the second, we have <em>precision</em>, together with positive (negative, resp.) <em>predictive value</em>.</p>
<p>If now we demand that these metrics be the same across groups, we arrive at corresponding fairness criteria: equal false positive rate, equal positive predictive value, etc. In the inter-group setting, the two types of metrics may be arranged under headings “equality of opportunity” and “predictive parity”. You’ll encounter these as actual headers in the summary table at the end of this text. (Said table organizes concepts from different areas into a three-category format. The overall narrative builds up towards that “map” in a bottom-up way – meaning, most entries will not make sense at this point.}</p>
<p>While overall, the terminology around metrics can be confusing (to me it is), these headings have some mnemonic value. <em>Equality of opportunity</em> suggests that people similar in real life (<img src="https://latex.codecogs.com/png.latex?Y">) get classified similarly (<img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">). <em>Predictive parity</em> suggests that people classified similarly (<img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">) are, in fact, similar (<img src="https://latex.codecogs.com/png.latex?Y">).</p>
<p>The two criteria can concisely be characterized using the language of statistical independence. Following <span class="citation" data-cites="barocas">Barocas et al. (2019)</span>, these are:</p>
<div class="no-row-height column-margin column-container"></div><ul>
<li><p>Separation: Given true target <img src="https://latex.codecogs.com/png.latex?Y">, prediction <img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D"> is independent of group membership (<img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D%20%5Cperp%20A%20%7C%20Y">).</p></li>
<li><p>Sufficiency: Given prediction <img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D">, target <img src="https://latex.codecogs.com/png.latex?Y"> is independent of group membership (<img src="https://latex.codecogs.com/png.latex?Y%20%5Cperp%20A%20%7C%20%5Chat%7BY%7D">).</p></li>
</ul>
<p>Given those two fairness criteria – and two sets of corresponding metrics – the natural question arises: Can we satisfy both? Above, I was mentioning precision and recall on purpose: to maybe “prime” you to think in the direction of “precision-recall trade-off”. And really, these two categories reflect different preferences; usually, it is impossible to optimize for both. The most famous, probably, result is due to <span class="citation" data-cites="2016arXiv161007524C">Chouldechova (2016)</span> : It says that predictive parity (testing for sufficiency) is incompatible with error rate balance (separation) when prevalence differs across groups. This is a theorem (yes, we’re in the realm of theorems and proofs here) that may not be surprising, in light of Bayes’ theorem, but is of great practical importance nonetheless: Unequal prevalence usually is the norm, not the exception.</p>
<div class="no-row-height column-margin column-container"><div id="ref-2016arXiv161007524C" class="csl-entry">
Chouldechova, Alexandra. 2016. <span>“<span class="nocase">Fair prediction with disparate impact: A study of bias in recidivism prediction instruments</span>.”</span> <em>arXiv e-Prints</em>, October, arXiv:1610.07524. <a href="https://arxiv.org/abs/1610.07524">https://arxiv.org/abs/1610.07524</a>.
</div><div id="ref-abs-1808-08619" class="csl-entry">
Yeom, Samuel, and Michael Carl Tschantz. 2018. <span>“Discriminative but Not Discriminatory: <span>A</span> Comparison of Fairness Definitions Under Different Worldviews.”</span> <em>CoRR</em> abs/1808.08619. <a href="http://arxiv.org/abs/1808.08619">http://arxiv.org/abs/1808.08619</a>.
</div></div><p>This necessarily means we have to make a choice. And this is where the theorems and proofs <em>do</em> matter. For example, <span class="citation" data-cites="abs-1808-08619">Yeom and Tschantz (2018)</span> show that in this framework – the strictly technical approach to fairness – separation should be preferred over sufficiency, because the latter allows for arbitrary disparity amplification. Thus, <em>in this framework</em>, we may have to work through the theorems.</p>
<p>What is the alternative?</p>
</section>
<section id="fairness-viewed-as-a-social-construct" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="fairness-viewed-as-a-social-construct">Fairness, viewed as a social construct</h3>
<p>Starting with what I just wrote: No one will likely challenge fairness <em>being</em> a social construct. But what does that entail?</p>
<p>Let me start with a biographical reminiscence. In undergraduate psychology (a long time ago), probably the most hammered-in distinction relevant to experiment planning was that between a hypothesis and its operationalization. The hypothesis is what you want to substantiate, conceptually; the operationalization is what you measure. There necessarily can’t be a one-to-one correspondence; we’re just striving to implement the best operationalization possible.</p>
<p>In the world of datasets and algorithms, all we have are measurements. And often, these are treated <em>as though</em> they were the concepts. This will get more concrete with an example, and we’ll stay with the hiring software scenario.</p>
<p>Assume the dataset used for training, assembled from scoring previous employees, contains a set of predictors (among which, high-school grades) and a target variable, say an indicator whether an employee did “survive” probation. There is a concept-measurement mismatch on both sides.</p>
<p>For one, say the grades are intended to reflect ability to learn, and motivation to learn. But depending on the circumstances, there are influence factors of much higher impact: socioeconomic status, constantly having to struggle with prejudice, overt discrimination, and more.</p>
<p>And then, <em>the target variable</em>. If the thing it’s supposed to measure is “was hired for seemed like a good fit, and was retained since was a good fit”, then all is good. But normally, HR departments are aiming for more than just a strategy of “keep doing what we’ve always been doing”.</p>
<p>Unfortunately, that concept-measurement mismatch is even more fatal, and even less talked about, when it’s about the target and not the predictors. (Not accidentally, we also call the target the “ground truth”.) An infamous example is recidivism prediction, where what we really want to measure – whether someone did, in fact, commit a crime – is replaced, for measurability reasons, by whether they were convicted. These are not the same: Conviction depends on more then what someone has done – for instance, if they’ve been under intense scrutiny from the outset.</p>
<p>Fortunately, though, the mismatch is clearly pronounced in the AI fairness literature. <span class="citation" data-cites="FriedlerSV16">Friedler et al. (2016)</span> distinguish between the <em>construct</em> and <em>observed</em> spaces; depending on whether a near-perfect mapping is assumed between these, they talk about two “worldviews”: “We’re all equal” (WAE) vs.&nbsp;“What you see is what you get” (WYSIWIG). If we’re all equal, membership in a societally disadvantaged group should not – in fact, may not – affect classification. In the hiring scenario, any algorithm employed thus has to result in the same proportion of applicants being hired, regardless of which demographic group they belong to. If “What you see is what you get”, we don’t question that the “ground truth” <em>is</em> the truth.</p>
<div class="no-row-height column-margin column-container"></div><p>This talk of worldviews may seem unnecessary philosophical, but the authors go on and clarify: All that matters, in the end, is whether the data is seen as reflecting reality in a naïve, take-at-face-value way.</p>
<p>For example, we might be ready to concede that there could be small, albeit uninteresting effect-size-wise, statistical differences between men and women as to spatial vs.&nbsp;linguistic abilities, respectively. We know for sure, though, that there are much greater effects of socialization, starting in the core family and reinforced, progressively, as adolescents go through the education system. We therefore apply WAE, trying to (partly) compensate for historical injustice. This way, we’re effectively applying affirmative action, <a href="https://www.law.cornell.edu/wex/affirmative_action">defined as</a></p>
<blockquote class="blockquote">
<p>A set of procedures designed to eliminate unlawful discrimination among applicants, remedy the results of such prior discrimination, and prevent such discrimination in the future.</p>
</blockquote>
<p>In the already-mentioned summary table, you’ll find the WYSIWIG principle mapped to both equal opportunity and predictive parity metrics. WAE maps to the third category, one we haven’t dwelled upon yet: <em>demographic parity</em>, also known as <em>statistical parity</em>. In line with what was said before, the requirement here is for each group to be present in the positive-outcome class in proportion to its representation in the input sample. For example, if thirty percent of applicants are Black, then at least thirty percent of people selected should be Black, as well. A term commonly used for cases where this does <em>not</em> happen is <em>disparate impact</em>: The algorithm affects different groups in different ways.</p>
<p>Similar in spirit to demographic parity, but possibly leading to different outcomes in practice, is conditional demographic parity <sup>3</sup>. Here we additionally take into account other predictors in the dataset; to be precise: <em>all</em> other predictors. The desiderate now is that for any choice of attributes, outcome proportions should be equal, given the protected attribute <strong>and</strong> the other attributes in question. I’ll come back to why this may sound better in theory than work in practice in the next section.</p>
<div class="no-row-height column-margin column-container"><div id="fn3"><p><sup>3</sup>&nbsp;<span class="citation" data-cites="abs-2005-05906">Wachter et al. (2020b)</span></p></div></div><p>Summing up, we’ve seen commonly used fairness metrics organized into three groups, two of which share a common assumption: that the data used for training can be taken at face value. The other starts from the outside, contemplating what historical events, and what political and societal factors have made the given data look as they do.</p>
<p>Before we conclude, I’d like to try a quick glance at other disciplines, beyond machine learning and computer science, domains where fairness figures among the central topics. This section is necessarily limited in every respect; it should be seen as a flashlight, an invitation to read and reflect rather than an orderly exposition. The short section will end with a word of caution: Since drawing analogies can feel highly enlightening (and is intellectually satisfying, for sure), it is easy to abstract away practical realities. But I’m getting ahead of myself.</p>
</section>
</section>
<section id="a-quick-glance-at-neighboring-fields-law-and-political-philosophy" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="a-quick-glance-at-neighboring-fields-law-and-political-philosophy">A quick glance at neighboring fields: law and political philosophy</h2>
<p>In jurisprudence, fairness and discrimination constitute an important subject. A recent paper that caught my attention is <span class="citation" data-cites="nondisc">Wachter et al. (2020a)</span> . From a machine learning perspective, the interesting point is the classification of metrics into bias-preserving and bias-transforming. The terms speak for themselves: Metrics in the first group reflect biases in the dataset used for training; ones in the second do not. In that way, the distinction parallels <span class="citation" data-cites="FriedlerSV16">Friedler et al. (2016)</span> ’s confrontation of two “worldviews”. But the exact words used also hint at how guidance by metrics feeds back into society: Seen as strategies, one preserves existing biases; the other, to consequences unknown a priori, <em>changes the world</em>.</p>
<div class="no-row-height column-margin column-container"></div><p>To the ML practitioner, this framing is of great help in evaluating what criteria to apply in a project. Helpful, too, is the systematic mapping provided of metrics to the two groups; it is here that, as alluded to above, we encounter <em>conditional demographic parity</em> among the bias-transforming ones. I agree that in spirit, this metric can be seen as bias-transforming; if we take two sets of people who, per all available criteria, are equally qualified for a job, and then find the whites favored over the Blacks, fairness is clearly violated. But the problem here is “available”: per all <em>available</em> criteria. What if we have reason to assume that, in a dataset, all predictors are biased? Then it will be very hard to prove that discrimination has occurred.</p>
<p>A similar problem, I think, surfaces when we look at the field of political philosophy, and consult theories on <a href="https://plato.stanford.edu/entries/justice-distributive/">distributive justice</a> for guidance. <span class="citation" data-cites="abs-1809-03400">Heidari et al. (2018)</span> have written a paper comparing the three criteria – demographic parity, equality of opportunity, and predictive parity – to egalitarianism, equality of opportunity (EOP) in the Rawlsian sense, and EOP seen through the glass of luck egalitarianism, respectively. While the analogy is fascinating, it too assumes that we may take what is in the data at face value. In their likening predictive parity to luck egalitarianism, they have to go to especially great lengths, in assuming that the <em>predicted</em> class reflects <em>effort exerted</em>. In the below table, I therefore take the liberty to disagree, and map a libertarian view of distributive justice to both equality of opportunity and predictive parity metrics.</p>
<div class="no-row-height column-margin column-container"><div id="ref-abs-1809-03400" class="csl-entry">
Heidari, Hoda, Michele Loi, Krishna P. Gummadi, and Andreas Krause. 2018. <span>“A Moral Framework for Understanding of Fair <span>ML</span> Through Economic Models of Equality of Opportunity.”</span> <em>CoRR</em> abs/1809.03400. <a href="http://arxiv.org/abs/1809.03400">http://arxiv.org/abs/1809.03400</a>.
</div></div><p>In summary, we end up with two highly controversial categories of fairness criteria, one bias-preserving, “what you see is what you get”-assuming, and libertarian, the other bias-transforming, “we’re all equal”-thinking, and egalitarian. Here, then, is that often-announced table.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 17%">
<col style="width: 34%">
<col style="width: 21%">
<col style="width: 25%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th>Demographic parity</th>
<th>Equality of opportunity</th>
<th>Predictive parity</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>A.K.A. / subsumes / related concepts</strong></td>
<td>statistical parity, group fairness, disparate impact, conditional demographic parity <sup>4</sup></td>
<td>equalized odds, equal false positive / negative rates</td>
<td>equal positive / negative predictive values, calibration by group</td>
</tr>
<tr class="even">
<td><strong>Statistical independence criterion</strong> <sup>5</sup></td>
<td><p>independence</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D%20%20%5Cperp%20A"></p></td>
<td><p>separation</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Chat%7BY%7D%20%20%5Cperp%20A%20%7C%20Y"></p></td>
<td><p>sufficiency</p>
<p><img src="https://latex.codecogs.com/png.latex?Y%20%5Cperp%20%20A%20%7C%20%5Chat%7BY%7D"></p></td>
</tr>
<tr class="odd">
<td><strong>Individual / group</strong></td>
<td>group</td>
<td>group (most) or individual (fairness through awareness)</td>
<td>group</td>
</tr>
<tr class="even">
<td><strong>Distributive Justice</strong></td>
<td>egalitarian</td>
<td>libertarian (contra Heidari et al., see above)</td>
<td>libertarian (contra Heidari et al., see above)</td>
</tr>
<tr class="odd">
<td><strong>Effect on bias</strong> <sup>6</sup></td>
<td>transforming</td>
<td>preserving</td>
<td>preserving</td>
</tr>
<tr class="even">
<td><strong>Policy / “worldview”</strong> <sup>7</sup></td>
<td>We’re all equal (WAE)</td>
<td>What you see is what you get (WYSIWIG)</td>
<td>What you see is what you get (WYSIWIG)</td>
</tr>
</tbody>
</table>
<div class="no-row-height column-margin column-container"><div id="fn4"><p><sup>4</sup>&nbsp;<span class="citation" data-cites="abs-2005-05906">Wachter et al. (2020b)</span></p><div id="ref-abs-2005-05906" class="csl-entry">
Wachter, Sandra, Brent D. Mittelstadt, and Chris Russell. 2020b. <span>“Why Fairness Cannot Be Automated: Bridging the Gap Between <span>EU</span> Non-Discrimination Law and <span>AI</span>.”</span> <em>CoRR</em> abs/2005.05906. <a href="https://arxiv.org/abs/2005.05906">https://arxiv.org/abs/2005.05906</a>.
</div></div><div id="fn5"><p><sup>5</sup>&nbsp;<span class="citation" data-cites="barocas">Barocas et al. (2019)</span></p><div id="ref-barocas" class="csl-entry">
Barocas, Solon, Moritz Hardt, and Arvind Narayanan. 2019. <em>Fairness and Machine Learning</em>. Fairmlbook.org.
</div></div><div id="fn6"><p><sup>6</sup>&nbsp;<span class="citation" data-cites="nondisc">Wachter et al. (2020a)</span></p><div id="ref-nondisc" class="csl-entry">
Wachter, Sandra, Brent D. Mittelstadt, and Chris Russell. 2020a. <span>“Bias Preservation in Machine Learning: The Legality of Fairness Metrics Under EU Non-Discrimination Law.”</span> <em>West Virginia Law Review, Forthcoming</em> abs/2005.05906. <a href="https://ssrn.com/abstract=3792772">https://ssrn.com/abstract=3792772</a>.
</div></div><div id="fn7"><p><sup>7</sup>&nbsp;<span class="citation" data-cites="FriedlerSV16">Friedler et al. (2016)</span></p><div id="ref-FriedlerSV16" class="csl-entry">
Friedler, Sorelle A., Carlos Scheidegger, and Suresh Venkatasubramanian. 2016. <span>“On the (Im)possibility of Fairness.”</span> <em>CoRR</em> abs/1609.07236. <a href="http://arxiv.org/abs/1609.07236">http://arxiv.org/abs/1609.07236</a>.
</div></div></div></section>
<section id="a-conclusion" class="level2">
<h2 class="anchored" data-anchor-id="a-conclusion">(A) Conclusion</h2>
<p>In line with its original goal – to provide some help in starting to think about AI fairness metrics – this article does not end with recommendations. It does, however, end with an observation. As the last section has shown, amidst all theorems and theories, all proofs and memes, it makes sense to not lose sight of the concrete: the data trained on, and the ML process as a whole. Fairness is not something to be evaluated post hoc; the <em>feasibility of fairness</em> is to be reflected on right from the beginning.</p>
<p>In that regard, assessing impact on fairness is not that different from that essential, but often toilsome and non-beloved, stage of modeling that precedes the modeling itself: exploratory data analysis.</p>
<p>Thanks for reading!</p>
<div class="photo-credit">
<p>Photo by <a href="https://unsplash.com/@andersjilden?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Anders Jildén</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p>
</div>



</section>


<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>AI Societal Impact</category>
  <category>Deep Learning</category>
  <guid>https://divergences.xyz/posts/ai-fairness/</guid>
  <pubDate>Thu, 15 Jul 2021 00:00:00 GMT</pubDate>
  <media:content url="https://divergences.xyz/posts/ai-fairness/preview.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>AI ethics is not an optimization problem</title>
  <dc:creator>Sigrid Keydana</dc:creator>
  <link>https://divergences.xyz/posts/ai_ethics_optimization_problem/</link>
  <description><![CDATA[ 






<section id="why-this-post-why-now" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="why-this-post-why-now">Why this post, why now</h3>
<p>When you work in a field as intellectually-satisfying, challenging and inspiring as software design for machine learning, it is easy to focus on the technical, keeping out of sight the broader context. Some would even say it is required. How else can you keep up the necessary level of concentration?</p>
<p>But even for someone who hasn’t been in the field that long, it is evident that with every year that passes, with deep-learning-based technologies<sup>1</sup> progressing faster and faster over ever-shorter time spans, misuse of these technologies has increased as well, not just in selected countries but all over the world.</p>
<div class="no-row-height column-margin column-container"><div id="fn1"><p><sup>1</sup>&nbsp;For brevity, I’ll be subsuming deep learning and other contemporary machine learning methods under <em>AI</em>, following common(-ish) usage.</p></div><div id="fn2"><p><sup>2</sup>&nbsp;&nbsp;I can’t hope to express this better than Maciej Cegłowski did <a href="https://idlewords.com/talks/superintelligence.htm">here</a>, so I won’t elaborate on that topic any further.</p></div></div><p>To eliminate one possible misunderstanding right from the start: When I’m talking about “faster and faster” progress, I’m not over-hyping things. I’m far from thinking that <em>AI</em> is close to “solving” problems like language understanding, concept learning and their likes — the kind of problems <a href="https://arxiv.org/abs/2002.06177">some would argue hybrid models were needed for</a>. The thing is that it doesn’t matter. It is exactly the kinds of things <em>AI</em> <em>does</em> do so well that lend themselves to misuse. It is people we should be afraid of, not machines<sup>2</sup>.</p>
<p>Back to the why. Over time, it increasingly appeared to me that writing regularly about <em>AI</em> in a technical way, but <em>not ever</em> writing about its misuse, was ethically questionable in itself. However, I also became increasingly conscious of the fact that with a topic like this, once you enter the political realm — and that we <em>have to</em> is the main point of this text –, likelihood rises that people will disagree, or worse, feel offended for reasons not anticipated by the writer. Some will find this too radical, some not radical (<em>explicit</em>) enough.</p>
<p>But when the alternative is to stay silent, it seems better to try and do one’s best.</p>
<p>Let’s start with two terms whose recent rise in popularity matches that of <em>AI</em> as a whole: bias and fairness.</p>
</section>
<section id="but-we-are-doing-a-lot-to-improve-fairness-and-remove-bias-arent-we" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="but-we-are-doing-a-lot-to-improve-fairness-and-remove-bias-arent-we">But we are doing a lot to improve fairness and remove bias, aren’t&nbsp;we?</h3>
<p>Search for “algorithmic fairness”, “deep learning fairness” or something similar, and you’ll find lots of papers, tools, guidelines&nbsp;… more than you have time to read. And bias: Haven’t we all heard about image recognition models failing on black people, women, and black women in particular; about machine translation incorporating gender stereotypes; about search engine results reflecting racism and discrimination? Given enough media attention, the respective algorithms get “fixed”; what’s more, we may also safely assume that overall, researchers developing new models will probe for these exact kinds of failures. So as a community, we <em>do</em> care about bias, don’t we?</p>
<p>Re: fairness. It’s true that there are many attempts to increase algorithmic fairness. But as Ben Green, who I’ll cite a lot in this text, <a href="https://dl.acm.org/doi/10.1145/3351095.3372840">points out</a>, most of this work does so via rigid formalization, as if fairness — its <a href="https://www.youtube.com/watch?v=jIXIuYdnyyk">conflicting definitions</a> notwithstanding — were an objective quantity, a metric that could be optimized just like the metrics we usually optimize in machine learning.</p>
<p>Assume we were willing to stay in the formalist frame. Even then there is no satisfying solution to this optimization problem. Take the perspective of <em>group fairness</em>, where a fair algorithm is one that results in equal outcomes between groups. <a href="https://doi.org/10.1089/big.2016.0047">Chouldechova</a> then shows that when an algorithm achieves predictive parity (a.k.a. precision), but prevalence differs between groups, it is not possible to also have <em>both</em> equal false positive <em>and</em> equal false negative rates.</p>
<p>That said, here I mainly want to focus on why pure formalism is not enough.</p>
<p>What with bias? That datasets can be (or rather: are) biased is hardly something anyone working in <em>AI</em> would object to. What amount of bias is being admitted to in other components/stages of the machine learning process varies between people.</p>
<p><a href="http://arxiv.org/abs/1901.10002">Harini and Guttag</a> map sources of bias to the model development and deployment process. Forms of bias they distinguish include representation (think: dataset), measurement (think: metrics<sup>3</sup>), aggregation (think: model<sup>4</sup>), and evaluation (similar to the two preceding ones, but at test time) bias. The paper is written in a technical style; in fact, there is even a diagram where the authors attempt to formalize the process in a mathematical way. (Personally, I find it hard to see what value is added by this diagram; its existence can probably best be explained by [perceived] requirements of the genre, namely, <em>research paper</em>.)</p>
<div class="no-row-height column-margin column-container"><div id="fn3"><p><sup>3</sup>&nbsp;More on that below. Metrics used in machine learning mostly are proxies for things we really care about; there are lots of ways this can go wrong.</p></div><div id="fn4"><p><sup>4</sup>&nbsp;Meaning, a one-model-fits-all approach puts some groups at a disadvantage.</p></div></div><p>Now, so far I’ve left out the remaining two sources of bias they name. Mapped to the end of the process is deployment bias, when a system “is used or interpreted in inappropriate ways”. That raises a question. Is this about the <em>end</em> of a process, or is what happens now a <em>completely different process</em> (or: processes)? For an in-house data scientist, it may well be the end of a process; for a scientist, or for a consultant, it is not. Once a scientist has developed and published a model, they have no control over who uses it and how. From the collection of humankind’s empirical truths: Once a technology exists, and it is useful, it <em>will be used</em>.</p>
<p>Things get further out of control at the other side of the timeline. Here we have <a href="http://arxiv.org/abs/1901.10002">historical bias</a>:</p>
<blockquote class="blockquote">
<p><em>Historical bias arises when there is a misalignment between the world as it is and the values or objectives to be encoded and propagated in a model. It is a normative concern with the state of the world, and exists even given perfect sampling and feature selection.</em></p>
</blockquote>
<p>I’ll get back to why this is called “historical bias” later; the definition is a lot broader though. Now definitely we’re beyond the realm of formalization: We’re entering the realm of normativity, of ways of viewing the world, of ethics.</p>
<p>Please don’t get me wrong. I’m not criticizing the paper; in fact, it provides a useful categorization that may be used as a “check list” by practitioners. But given the formalist style, a reader is likely to focus on the readily-formalizable parts. It is then easy to dismiss the two others as not really being relevant to one’s work, and certainly not something one could exert influence on. (I’ll get back to that later.)</p>
<p>One little aside before we leave formalism: I do believe that a lot of the formalist work on <em>AI</em> ethics is done in good intent; however, work in this area also benefits organizations that undertake it. Citing <a href="https://tomslee.github.io/publication/oup_private_sector_ai/">Tom Slee</a>,</p>
<blockquote class="blockquote">
<p><em>Standards set public benchmarks and provide protection from future accusations. Auditable criteria incorporated into product development and release processes can confirm compliance. There are also financial incentives to adopt a technical approach: standards that demand expertise and investment create barriers to entry by smaller firms, just as risk management regulations create barriers to entry in the financial and healthcare industries.</em></p>
</blockquote>
</section>
<section id="not-everything-in-life-is-an-optimization-problem" class="level3">
<h3 class="anchored" data-anchor-id="not-everything-in-life-is-an-optimization-problem">Not everything in life is an optimization problem</h3>
<p>Stephen Boyd, who teaches convex optimization at Stanford, is said to often start the<a href="https://www.youtube.com/watch?v=McLq1hEq3UY">introductory lecture</a> with the phrase “everything is an optimization problem”. It sounds intriguing at first; certainly a lot of things in my life can be thought of like that. It may become awkward once you start to compare, say, time spent with loved ones and time spent working; it becomes completely unfeasible when comparing <em>across people</em>.</p>
<p>We saw that even under formalist thinking, there is no impartial way to optimize for fairness. But it’s not just about choosing between different types of fairness. How do you weigh fairness against stakeholder interests? No algorithm will be deployed that does not serve an organization’s purpose.</p>
<p>There is thus an intimate link between <em>metrics</em>, <em>objectives</em> and <em>power</em>.</p>
</section>
<section id="metrics-and-power" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="metrics-and-power">Metrics and&nbsp;power</h3>
<p>Even though terminologically, in deep learning, we distinguish between optimization and metrics, the metrics really <a href="http://arxiv.org/abs/2002.08512">are what we are optimizing for</a>: Goodhart’s law — <em>When a measure becomes a target, it ceases to be a good measure</em><sup>5</sup>— does not seem to apply. Still, they deserve the same questioning and inspection as metrics in other contexts.</p>
<div class="no-row-height column-margin column-container"><div id="fn5"><p><sup>5</sup>&nbsp;cited after <a href="https://arxiv.org/abs/2002.08512">Thomas and Uminsky</a></p></div></div><p>In AI as elsewhere, optimization objectives are proxies; they “stand in” for the thing we’re really interested in. That proxying process could <a href="http://arxiv.org/abs/1803.04585">fail in many ways</a>, but failure is not the only applicable category to think in here.</p>
<p>For one, objectives are chosen according to the dominant paradigm. <a href="http://arxiv.org/abs/1912.01172">Dotan and Milli</a> show how a technology’s perceived success feeds back into the criteria used to evaluate other technologies (as well as future instances of itself). Imagine a world where models were ranked not just for classification accuracy, but also for, say, climate friendliness, robustness to adversarial attacks, or reliable quantification of uncertainty.</p>
<p>Objectives thus do not emerge out of nothing. That they reflect paradigms may still sound abstract; that they serve existing power structures less so. Power structures are complex; they reflect more than just who “has the say”. As pointed out in various “classics” of critical race theory, intersectionalist feminism and related areas<sup>6</sup>, we should ask ourselves: <em>Who profits?</em></p>
<div class="no-row-height column-margin column-container"><div id="fn6"><p><sup>6</sup>&nbsp;see e.g., <a href="https://data-feminism.mitpress.mit.edu/">DataFeminism</a> and <a href="https://www.ruhabenjamin.com/race-after-technology">RaceAfterTechnology</a>.</p></div></div><p>This is an all but simple question, comparable in difficulty, it seems to me, to the request that we question the unspoken premises that underlie our theories. The main point about such premises is that we aren’t aware of them: If we were, we could have stated them explicitly. Similarly, if I noticed I was profiting from someone, I would — hopefully — take some action. Hard as the task may be, though, we have to do our best.</p>
<p>If it’s hard to see how one is privileged, can’t we just be neutral? Objective? Isn’t this getting too <em>political</em>?</p>
</section>
<section id="there-is-no-objectivity-and-all-is-politics" class="level3">
<h3 class="anchored" data-anchor-id="there-is-no-objectivity-and-all-is-politics">There is no objectivity, and all is&nbsp;politics</h3>
<p>To some people, the assertion that objectivity cannot exist is too self-evident to require much dwelling on. Are numbers objective? Maybe in some formal way; but once I use them <em>in communication</em>, they convey a message, independently of my intention.&nbsp;</p>
<p>Let’s say I want to convey the fact, taken from <a href="https://www.ipcc.ch/sr15/chapter/spm/">the IPCC website</a>, that between 2030 and 2052, global warming is likely to reach 1.5°C. Let’s also assume that I look up the pre-industrial average for the place where I happen to live (15°C, say), and that I want to show off my impressive meteorological knowledge. Thus I say, “… so here, guys, temperature will rise from 288.15 Kelvin to 289.65 Kelvin, on average”. This surely is an objective statement. But what if the people I’m talking to don’t know that — even though the absolute values, when expressed in Kelvin, are so much higher than when expressed in degrees Celsius — the relative differences are the same? They might get the impression, totally unintended, that not much warming is going to happen.</p>
<p>If even numbers, once used in communication, lose their objectivity, this must hold even more for anything that involves more design choices: visualizations, APIs, and, of course, written text. For visualizations, this is nicely illustrated in d’Ignazio and Klein’s <em>Data Feminism</em>.</p>
<p>That book is also an exemplary exercise in what appears like the only way to “deal with” the fact that objectivity is impossible: Trying to be as clear as possible about where we stand, who we are, what are the circumstances that have influenced our way of thinking. Of course, like with the unspoken premises and assumptions discussed above, this is not easy; in fact, it’s impossible to do in perfection. But one can try.</p>
<p>In fact, the above “Trying to be as clear as possible&nbsp;…” is deliberately ambiguous. It refers to two things: For one, to <em>me</em> striving to analyze how I’m privileged, and secondly, to me giving information to <em>others</em>. The first alone is laudable but necessarily limited; the second, as exercised by d’Ignazio and Klein, opens the door not just for better mutual understanding, but also, for feedback and learning. The person I’m talking to might lead me to insights I wouldn’t have gotten otherwise.</p>
<p>Putting things slightly differently, there is no objectivity because there’s always a context. Focus on metrics and formalization detract from that context. Green <a href="https://dl.acm.org/doi/10.1145/3351095.3372840">relates</a> an interesting parallel from American law history. Until the early twentieth century, US law was dominated by a formalist ethos. Ideally, all rules should be traceable to a small number of universal principles, derived from natural rights. Autonomy being such a right, in a famous 1905 case, the U.S. Supreme Court concluded that a law limiting the working hours of employees represented “unreasonable, unnecessary and arbitrary interference with the right and liberty of the individual to contract”. <a href="https://dl.acm.org/doi/10.1145/3351095.3372840">However</a>,</p>
<blockquote class="blockquote">
<p><em>In his dissent, Justice Oliver Wendell Holmes argued that the Court failed to consider the context of the case, noting, “General propositions do not decide concrete cases”.</em></p>
</blockquote>
<p>Thus, the <em>context</em> matters. Autonomy is good; but it can’t be used as an excuse for exploitation.</p>
<p>The same context dependence holds in <em>AI</em>. It is always developed and deployed in a context, — a context shaped by <em>history</em>. History determines what datasets we work with; what we optimize for; <em>who</em> tells us what to optimize for. An daunting example is so-called “predictive policing”. Datasets used to train prediction algorithms incorporate a history of racial injustice: The very definition of “crime” they rely on was<a href="https://dl.acm.org/doi/10.1145/3351095.3372840">shaped by racist and classist practice</a>. The new method then perpetuates — more than that: exacerbates — the current system, creating a vicious cycle of positive feedback that makes it look like the algorithm was successful.</p>
<p>Summing up: When there is no neutrality, everything is politics. Not acting is acting. Citing <a href="https://www.benzevgreen.com/wp-content/uploads/2019/11/19-ai4sg.pdf">Green</a>,</p>
<blockquote class="blockquote">
<p><em>But efforts for reform are no more political than efforts to resist reform or even the choice simply to not act, both of which preserve existing systems.</em></p>
</blockquote>
</section>
<section id="but-im-just-an-engineer" class="level3">
<h3 class="anchored" data-anchor-id="but-im-just-an-engineer">But I’m just an&nbsp;engineer</h3>
<p>When machine learning people, or computer science people in general, are asked about their views on the societal impact of modern <em>AI</em>, an often-heard answer is: “But I’m just an engineer…”. This is completely understandable. Most of us are just tiny cogs in those big machines, wired together in a complex network, that run the world. We’re not in control; how could we be accountable?</p>
<p>For the <em>AI</em> scientist, though normally all but sitting in an “ivory tower”, it’s nevertheless the <em>ML engineers</em> who are responsible of how a model gets deployed, and to what consequences⁷. The ML engineer may delegate to the head of IT, who in turn had no choice but implement what was requested “by business”. And so on and so forth, ad infinitum.</p>
<p>That said, it is hard to come up with a moral imperative here. In the line of thinking exercised above: There is always a context. In some parts of the world, you have more choices than in others. Options vary based on race, gender, abledness, and more. Maybe you can just quit and get another job; maybe you can’t.</p>
<p>There is another — related — point though, on which I’d like to dwell a little longer.</p>
</section>
<section id="technology-optimism" class="level3">
<h3 class="anchored" data-anchor-id="technology-optimism">Technology optimism</h3>
<p>Sometimes, it’s not that the people working in AI are fully aware of, but don’t see how to counter, the harm that is being done in their field. On the contrary. They are convinced that they’re doing good. Just do a quick search for “AI for good”, and you’ll be presented with a great number of projects and initiatives. But how, actually, is decided what <em>is</em> good? Who decides? Who profits?</p>
<p>Ben Green, again, <a href="https://dl.acm.org/doi/10.1145/3351095.3372840">relates</a> an instructive example:</p>
<blockquote class="blockquote">
<p><em>USC’s Center for Artificial Intelligence in Society (CAIS) is emblematic of how computer science projects labeled as promoting “social good” can cause harm by wading into hotly contested political territory with a regressive perspective. One of the group’s projects involved deploying game theory and machine learning to predict and prevent behavior from “adversarial groups.” Although CAIS motivated the project by discussing “extremist organizations such as ISIS and Jabhat al-Nusra,” it quickly slipped into focusing on “criminal street gangs” [43]. In fact, the project’s only publication was a controversial paper that used neural networks to classify crimes in Los Angeles as gang-related [28, 41].</em></p>
</blockquote>
<p>Predictive policing, already mentioned above, can also be seen in this category. At first thought, isn’t it a good thing? Wouldn’t it be nice if we could make our world a bit more secure?</p>
<p>Phillip Rogaway, who I’ll mention again in the concluding section, talks a lot about <a href="https://eprint.iacr.org/2015/1162">how technology optimism dominates among his students</a>; he seems to be as intrigued by it as I am. Personally, I think that whether someone “intrinsically” tends to be a technology optimist or a pessimist is a persistent trait; it seems to be a matter of personality and socialization (or just call it <em>fate</em>: I don’t want to go into any nature-nurture debates here). That glass, is it half full or half empty?</p>
<p>All I could say to a hardcore technology optimist is that their utopia may be another person’s dystopia. Especially if that other person is poor, or black, or poor and a black woman&nbsp;… and so on.</p>
<p>Let me just end this section with a citation from a <a href="https://ali-alkhatib.com/blog/anthropological-intelligence">blog post</a> by Ali Alkhatib centered around the launch of the <a href="https://hai.stanford.edu/">Stanford institute for human-centered artificial intelligence (HAI)</a>. Referring to the <a href="https://hai.stanford.edu/blog/smart-interfaces-human-centered-ai">director’s accompanying blog post</a>, he writes</p>
<blockquote class="blockquote">
<p><em>James opens with a story of an office that senses you slouching, registers that you’re fatigued, intuits that your mood has shifted, and alters the ambiance accordingly to keep you alert throughout the day.</em></p>
</blockquote>
<p>You can head to Alkhatib’s post (very worth reading) and read the continuation, expanding on the scenario. But for some people, this single sentence may already be enough.</p>
</section>
<section id="and-now" class="level3">
<h3 class="anchored" data-anchor-id="and-now">And now?</h3>
<p>At some point, an author is expected to wrap up and present ideas for improvement. With most of the topics touched upon here, this is yet another intimidating task. I’ll give it a try anyway. The best synthesis I can come up with at the moment looks about like this.</p>
<p>First, some approaches filed by Green under “formalist” can still make for a good start, or rather, can constitute a set of default measures, to be taken routinely. Most prominently, these include <a href="https://ui.adsabs.harvard.edu/abs/2018arXiv180309010G">dataset</a> and <a href="https://ui.adsabs.harvard.edu/abs/2018arXiv181003993M">model</a> documentation.</p>
<p>Beyond the technical, I like the advice given in Baumer and Silberman’s <a href="https://doi.org/10.1145/1978942.1979275"><em>When the Implication is Not to Design</em></a>. If the consequences, especially on socially marginalized groups, of a technological approach are unforeseeable, think whether the problem can be solved in a “low-tech” way. By all means, do <em>not</em> start with the solution and then, go find a problem.</p>
<p>In some cases, even that may not be enough. With some goals, don’t look for alternative ways to achieve them. Sometimes the goal itself has to be questioned.</p>
<p>The same can be said for the other direction. With some technologies, there is no goal that could justify their application. This is because such a technology is <em>certain</em> to get misused. Facial recognition is one example.</p>
<p>Lastly, let me finish on a speculative note. <a href="https://eprint.iacr.org/2015/1162">Rogaway</a>, already referred to above for his comments on technology optimism, calls on his colleagues, fellow cryptographers, to devise protocols in such a way that private communication stays private, that breaches are, in plain terms, impossible. While I personally can’t think see how to port the analogy to <em>AI</em>, maybe others will be able to, drawing inspiration from his text. Until then, changes in politics and legislation seem to be the only recourse.</p>
<hr>


</section>


<a onclick="window.scrollTo(0, 0); return false;" id="quarto-back-to-top"><i class="bi bi-arrow-up"></i> Back to top</a> ]]></description>
  <category>AI Societal Impact</category>
  <guid>https://divergences.xyz/posts/ai_ethics_optimization_problem/</guid>
  <pubDate>Tue, 22 Sep 2020 00:00:00 GMT</pubDate>
  <media:content url="https://divergences.xyz/posts/ai_ethics_optimization_problem/raven.jpg" medium="image" type="image/jpeg"/>
</item>
</channel>
</rss>
