<!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>Breaking Bias: How Optimal Transport Can Help to Tackle Gender Biases in NLP Based Job Recommendation Systems?</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>Titon Tshiongo-Kaninku</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</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>AKKODIS Group-Hauts de France</institution>
          ,
          <addr-line>F-59700 Lille</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>Automatic recommendation systems based on complex machine learning models, such as deep neural networks, have become popular during the last decade. Some of these systems, for instance those dedicated to online advertising, have a relatively limited impact on the users' life. However, such systems can also be used for applications which are ranked as High Risk by the European Commission in the A.I. act. Our contribution focuses on automatic job recommendation systems, which fall into this category of applications. We specifically work on the Bios dataset, for which the learning task consists in predicting the occupation of female and male individuals, based on their LinkedIn biography. This dataset therefore allows us to study the properties of NLP based job recommendation strategies in terms of gender biases. We first extend with a state-of-the-art Deep Neural-Network model existing experiments showing that the accuracy of trained decision rules may be significantly diferent for females and males looking for job opportunities in specific fields. Our main contribution is then to adapt a mathematically-grounded optimal transport strategy to ensure that the gender gaps are reasonable for all job categories which can be recommended. We finally show the efectiveness of our strategy on the Bios dataset.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>surgeon
photographer</p>
      <p>
        professor
software_engineer
teacher
poet
physician
journalist
architect
attorney
nurse
painter
model
filmmaker
dentist
psychologist
0.3
0.2
0.1
0.0
0.1
0.2
0.3
0.4
have a much higher performance than their predecessors for NLP applications, in particular the
LSTM models [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], but they are even less explainable, because of their complexity. A corollary of
this gain of complexity, is that ensuring that these models learn decision rules that are free of
discrimination biases requires the use of more and more advanced technical solutions.
      </p>
      <p>
        In order to study the eficiency of bias discrimination techniques in NLP applications, the
authors of [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] released the Bios dataset, which contains about 400K biographies (textual data), as
well as the gender and the occupation (among 28 occupations) of its authors. The authors of [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
also show that training simple prediction models on this dataset leads to large True Positive Rate
gender gap (TPRgp) when predicting some occupations. This means that for these occupations,
an automatic job candidate recommendation system will clearly favor male (e.g. for Surgeon) or
female (e.g. for Model) candidates. They also show that removing the impact of explicit gender
indicators (e.g. he, she, her, ...) when making the predictions reduces the discrimination biases,
but this efect is limited.
      </p>
      <p>
        In the present work, we first reproduce these experiments using the RoBERTa base model
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This model was pretrained on a massive dataset (see [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]), and we specialized its predictions
on the Bios dataset. To do so, we used 5 epochs with a batch size of 32 observations and a
sequence length of 512 words. The optimizer was Adam with a learning rate of 1e-5,  1 = 0.9,
 2 = 0.98, and  = 16. We performed five runs to evaluate the training proceedure stability,
and we split the dataset in 70% for train, 10% for validation and 20% for test. In order to
assess whether removing the impact of explicit gender indicators with RoBERTa would have
an impact, we reproduced the same protocol with a neutral Bios dataset. Note that we did
not remove explicit gender indicators as in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] because BERT models are sensitive to sentence
structures. Our key contribution was finally to extend the bias mitigation method of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ],
dedicated to binary classification on image, to multi-class classification based on NLP data.
      </p>
      <p>
        The mathematical contribution of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] was to show how to compute pseudo-gradients of the
Wasserstein-2 distance optimal transport metric in a mini-batch context, making it possible to
mitigate undesirable algorithmic biases. This strategy was however not dedicated to multi-class
classification. We then extended this solution by not only modifying the loss definition, but
also by solving diferent technical locks related to (1) the fact it requires to solve a multivariate
optimal transport problem, and (2) that the Bios dataset contains biographies related to extremely
unbalanced occupations. After having extended the regularization strategy of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], we used
it to mitigate the gender biases considered as unacceptable (occupations with &gt; 10% gender
gap). Results are shown in Figures 1 and fig2. They first confirm that removing the gender
information only slightly reduced the gender gaps for the occupations where it was particularly
discriminatory. Using our optimal transport strategy has however made these biases much
more reasonable. Importantly, the confusion matrices of Figure 1 also shed light on the fact that
this bias reduction strategy additionally did not generate unacceptable gender gaps for other
occupations. Our strategy is therefore likely to make the trained model certifiable following the
A.I. act principles. More details about the multi-class extension of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and its application to NLP
data can be found in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Our regularization method is also freely available at the following
address https://github.com/lrisser/W2reg.
      </p>
      <p>Acknowledgements
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. Titon Tshiongo
Kaninku was funded by plan France Relance under Grant Agreement ANR-21-PRRD-0018.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vaswani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shazeer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Parmar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Uszkoreit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Gomez</surname>
          </string-name>
          , Ł. Kaiser,
          <string-name>
            <surname>I. Polosukhin</surname>
          </string-name>
          ,
          <article-title>Attention is all you need</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , Bert:
          <article-title>Pre-training of deep bidirectional transformers for language understanding</article-title>
          , arXiv preprint arXiv:
          <year>1810</year>
          .
          <volume>04805</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Radford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Narasimhan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Salimans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Sutskever</surname>
          </string-name>
          , et al.,
          <article-title>Improving language understanding by generative pre-training (</article-title>
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>I.</given-names>
            <surname>Sutskever</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Vinyals</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q. V.</given-names>
            <surname>Le</surname>
          </string-name>
          ,
          <article-title>Sequence to sequence learning with neural networks</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>27</volume>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <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="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ott</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Goyal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Du</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Joshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Levy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zettlemoyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Stoyanov</surname>
          </string-name>
          ,
          <article-title>Roberta: A robustly optimized BERT pretraining approach</article-title>
          , CoRR abs/
          <year>1907</year>
          .11692 (
          <year>2019</year>
          ). URL: http://arxiv.org/abs/
          <year>1907</year>
          .11692. arXiv:
          <year>1907</year>
          .11692.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>F.</given-names>
            <surname>Jourdan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. Tshiongo</given-names>
            <surname>Kaninku</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Asher</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.-M. Loubes</surname>
          </string-name>
          , L. Risser,
          <article-title>How optimal transport can tackle gender biases in multi-class neural-network classifiers for job recommendations?</article-title>
          ,
          <source>Algorithms</source>
          <volume>16</volume>
          (
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>L.</given-names>
            <surname>Risser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Sanz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Vincenot</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.-M. Loubes</surname>
          </string-name>
          ,
          <article-title>Tackling algorithmic bias in neural-network classifiers using wasserstein-2 regularization</article-title>
          ,
          <source>Journal of Mathematical Imaging and Vision</source>
          (
          <year>2022</year>
          )
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>