<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Is a Fairness Metric Score Enough to Assess Discrimination Biases in Machine Learning?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fanny Jourdan</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ronan Pons</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nicholas Asher</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jean Michel Loubes</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Laurent Risser</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CNRS, Université de Toulouse</institution>
          ,
          <addr-line>F-31062 Toulouse</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institut de Mathématiques de Toulouse (UMR 5219)</institution>
          ,
          <addr-line>CNRS</addr-line>
          ,
          <institution>Université de Toulouse</institution>
          ,
          <addr-line>F-31062 Toulouse</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present novel experiments shedding light on a potential limitation of common fairness metrics for assessing the undesirable biases made by machine learning algorithms. Our experiments are based on the Bios dataset, for which the learning task consists in predicting the occupation of individuals based on their LinkedIn biography. This dataset is then particularly suited to reproduce Natural Language Processing (NLP) solutions dedicated to automatic job recommendation, which was identified as a High-Risk application of A.I. in the A.I. act. We specifically address an important limitation of theoretical discussions dealing with group-wise fairness metrics in the machine learning literature: they focus on large datasets, although the norm in many commercial A.I. applications is to use reasonably small training and test sets. Data annotation, which is mandatory in supervised learning, is indeed a time consuming and costly task. It is therefore common practice to stop annotating the training data when they reach a suficiently large size to get a desired level of prediction accuracy. This is typically the case when using active learning procedures, which have become very popular recently. We then question how reliable are diferent measures of bias when the size of the training and the test set is simply suficient to learn reasonably accurate predictions. We conclude our study by emphasizing the crucial need to take into account the stability of the bias metrics for small variations of the test set when auditing high-risk A.I. systems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Potential biases introduced by Artificial Intelligence (AI) systems are now both an academic
concern and a critical issue for industry, as the European Commission plans to regulate AI
systems that could adversely afect individual users. The AI act1 will indeed require AI systems
sold in the European Union to have proper statistical properties with regard to any potential
discrimination they could engender. In particular, AI systems that exploit linguistic data for
automatic job recommendation fall into the category of high risks systems in the AI act and will
be tightly regulated. In this context, it will be necessary to define fairness metrics to quantify
the level of fairness of prediction models. We see two main problems with this: (1) Each fairness
metric measures the bias in a certain way and not all metrics are compatible with each other,
which was already discussed in [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1, 2, 3</xref>
        ], among others. (2) The state of the art of fairness focuses
on large datasets. However, the norm in many industrial applications, in particular in Natural
Langage Processing (NLP), is to use small linguistic datasets [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Experimental protocol</title>
      <p>
        To explore the second question of introduction, we used a new experimental protocol developed
hereafter: We fine-tuned the DistilBERT [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] neural-network model for automatic job predictions
on the biographies of the Bios dataset [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This dataset contains about 400K biographies (textual
data). For each biography, Bios specifies the gender and the occupation (28 classes) of its author.
Although our model was trained to predict the authors’ occupations out of the 28 possible
choices, we focus in our study, on the analysis of these biases on two specific occupations:
Surgeon (many less (15%) females than males) or Physician (well balanced between males and
females) versus the 27 remaining occupations. To measure the impact of the training set size, We
randomly sampled 50 diferent training sets containing 10K, 20K, 50K, and 120K biographies. We
trained a model on each of these 200 samples. Each of these models has the same architectures
and the same hyper-parameters. To guarantee the representativeness of the sample, we ensured
that each sample had the same percentage of each gender for each occupation as in the initial
data set. For the split between the train and test sets, we respectively used 70% and 30% of the
dataset.
      </p>
      <p>Let ˆ and  be the predicted and the true target occupations, respectively. Let  be a
random variable representing the binary gender of the biography’s subject. For each model, we
quantified the gender bias by using Group Parity , =  (ˆ = | = ), True Positive Rate
  , =  (ˆ = | = ,  = ) and Predictive parity  , =  ( = |ˆ = ,  = ).
To measure the gender gap with these metrics, we computed the diference between binary
genders  and ˜ — for each occupation :  _, = , − ˜,, where  is  ,   
or   .</p>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>
        All the models we trained reached a prediction accuracy ranging from 0.72 to 0.86, as in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
which we consider as good since 28 diferent occupations are distinguished.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Results on small data samples</title>
        <p>Although the model is trained to predict the occupations of bio authors from the 28 possible
choices, we focus, in our study, on the analysis of the biases on two specific occupations:
Surgeon versus the 27 remaining occupations, and Physician versus the other occupations. We
chose these professions so that we could compare an occupation with an imbalanced gender
distribution and one with balanced a gender distribution.</p>
        <p>Our experiments clearly show that the lower the amount of observations in the training set,
the more the fairness metrics vary on the test set. The samples with 10K and 20K observations
present particularly unstable biases. For example, most TPR (resp. GP) Gender Gaps are negative
(resp. positive) for surgeon (resp. physician) but some samples yield positive TPR (resp. negative
GP) Gender Gaps. This is problematic since we cannot not deduce a priori that a particular
sample should produce a discrimination one way or the other.</p>
        <p>In addition, the average biases also depend on the sample size. Again, we obtained unstable
average biases for small samples (10K, 20K). The bias indicators are estimated on the minority
class: an amount of 41, 115, 334 and 903 predicted surgeons were obtained in the test set for the
10K, 20K, 50K and 120K sampling sizes. Hence, their estimation is unstable for small samples.</p>
        <p>However, GP appears as more stable than the other metrics in our experiments, in particular
when there was little observations. Its variance was indeed close to 0.01, which is much lower
than the variances of 0.1 and 0.2 for GP and PP, respectively. We explain this because on
our dataset, for TPR and PP, they do not use all predicted surgeons (unlike GP), but only the
predicted surgeons who are also real surgeons (in 10k sampling, there are 41 predicted surgeons
vs. 30 real surgeons and predicted surgeons, which is an information loss of 26,8%).</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Bias analysis with diferent metrics</title>
        <p>
          Even for large samples with 120K observations, biases sometimes difered from what we expected.
For the occupation surgeon (15% of females) the gender gap was negative for all metrics, which
was expected. For physician (49,5% of females), we also expected to have negative or zero gender
gap (see [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]). However the gender gaps were positive for all metrics, which means that the
models discriminated against males. This example shows that intuitions of model-builders
about biases are not always correct and this awareness should influence model construction
and testing.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Results for all classes</title>
        <p>In this section, we confirm our analysis on the specific occupations of
from a global point of view on all the classes of the model.</p>
        <p>Surgeon and Physician
1. In the Figure 2, we have more and more important deviations on the variance of the
metrics as the size of the data set decreases. And that on most trades. As explained before,
the GP gender gap is more stable, because it has more data.
2. In the first table of Figure 3, the metrics give inconsistent results for several occupations:
depending on the metric bias in favor of men or women for the same profession and
the same model. This is particularly visible for the occupations: software engineer, poet,
architect, attorney, and nurse.</p>
        <p>These results give us guarantees on the generalization of our analysis carried out on the
two classes previously. We find the same problems on the metrics and the size of the sample,
regardless of the occupation being looked at.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Our paper used the Bios dataset to study the influence of the training set size on discriminatory
biases. Our results shed light on new phenomena: (1) fairness metrics did not converge to stable
results for small sample sizes, which precluded any conclusions about the nature of the biases;
(2) even on large training samples, the biases discovered were not always those expected and
varied according to the metrics for several occupations. These results give two clear messages
to data scientists who must design NLP applications with a potential social impact. They should
ifrst be particularly careful, as the decision rules they train may have unexpected discriminatory
biases. In addition, a bias metric not only returns a score but has a strong practical meaning
and may be unreliable, in particular when working with small training sets. So multiple metrics
should be considered. Also, statistical methods to obtain the variance of the observed metrics
are necessary to guarantee the fairness of a model.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This research was funded by the AI (Artificial Intelligence) Interdisciplinary Institute ANITI
(Artificial and Natural InTelligence Institute.), which is funded by the French ‘Investing for the
Future– PIA3’ program under the Grant agreement ANR-19-PI3A-0004.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Kleinberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mullainathan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Raghavan</surname>
          </string-name>
          ,
          <article-title>Inherent trade-ofs in the fair determination of risk scores</article-title>
          ,
          <source>arXiv preprint arXiv:1609.05807</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Chouldechova</surname>
          </string-name>
          ,
          <article-title>Fair prediction with disparate impact: A study of bias in recidivism prediction instruments</article-title>
          ,
          <source>Big data 5</source>
          (
          <year>2017</year>
          )
          <fpage>153</fpage>
          -
          <lpage>163</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Pleiss</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Raghavan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kleinberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. Q.</given-names>
            <surname>Weinberger</surname>
          </string-name>
          ,
          <article-title>On fairness and calibration</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ezen-Can</surname>
          </string-name>
          ,
          <article-title>A comparison of lstm and bert for small corpus</article-title>
          , arXiv preprint arXiv:
          <year>2009</year>
          .
          <volume>05451</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Sanh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Debut</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chaumond</surname>
          </string-name>
          , T. Wolf,
          <article-title>Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter</article-title>
          , arXiv preprint arXiv:
          <year>1910</year>
          .
          <volume>01108</volume>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>De-Arteaga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Romanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wallach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chayes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Borgs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chouldechova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Geyik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kenthapadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. T.</given-names>
            <surname>Kalai</surname>
          </string-name>
          ,
          <article-title>Bias in bios: A case study of semantic representation bias in a high-stakes setting</article-title>
          ,
          <source>in: proceedings of the Conference on Fairness, Accountability, and Transparency</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>120</fpage>
          -
          <lpage>128</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Bolukbasi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.-W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. Y.</given-names>
            <surname>Zou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Saligrama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. T.</given-names>
            <surname>Kalai</surname>
          </string-name>
          ,
          <article-title>Man is to computer programmer as woman is to homemaker? debiasing word embeddings</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>29</volume>
          (
          <year>2016</year>
          )
          <fpage>4349</fpage>
          -
          <lpage>4357</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>