<!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>Approximate Inference for the Bayesian Fairness Framework</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andreas Athanasopoulos</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amanda Belfrage</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Berg Marklund</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christos Dimitrakakis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Chalmers University</institution>
          ,
          <addr-line>Gothenburg</addr-line>
          ,
          <country country="SE">Sweden</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Neuchatel</institution>
          ,
          <addr-line>Neuchatel</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Oslo</institution>
          ,
          <addr-line>Oslo</addr-line>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>As the impact of Artificial Intelligence systems and applications on everyday life increases, algorithmic fairness undoubtedly constitutes one of the major problems in our modern society. In the current paper, we extend the work of Dimitrakakis et al. on Bayesian fairness [1] that incorporates models uncertainty to achieve fairness, proposing a practical algorithm with the aim to scale the framework for a broader range of applications. We begin by applying the bootstrap technique as a scalable alternative to approximate the posterior distribution of parameters of the fully Bayesian viewpoint. To make the Bayesian fairness framework applicable to more general data settings, we define an empirical formulation suitable for the continuous case. We experimentally demonstrate the potential of the framework from an extensive evaluation study on a real dataset and diferent decision settings.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Bayesian Fairness</kwd>
        <kwd>Algorithmic Fairness</kwd>
        <kwd>Machine Learning</kwd>
        <kwd>Decision Making</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Background</title>
      <p>(,  ) = E [ ] −  E [ ] =</p>
      <p>E [ ] ( ) −
 E [ ] ( )</p>
      <p>This idea was used in [1], which focused on fairness constraints related to balance [3], that
states that the actions  should be independent of the sensitive variable  if conditioned to the
true outcome  i.e  ⊥  | . The resulting deviation from fairness can be formalized as follows:
∫︁
Θ
∫︁
Θ</p>
      <p>Since the DM does not know the true parameter  * , they have a belief  ∈  over a family of
distribution  = { |  ∈ Θ} that it may contain the actual law, i.e.  for some  . The belief
 expresses the uncertainty of the decision maker about the word. In the Bayesian case, the
belief  is a posterior formed through his prior distribution  ( ) and the available data.</p>
      <p>The DM wishes to find a policy</p>
      <p>
        maximizing expected utility  [], where (, ) is a
utility function dependent on the DM’s action and the unknown outcome. At the same time,
though they must take into account fairness constraints  . In particular, the optimal policy for
a given belief  will maximize the following utility-fairness tradeof:
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
E [ ] = ∑︁
‖
      </p>
      <p>∑︁  (|)[ (, |) −  (|) (|)] ‖
while on the other hand, replacing the unknown  with the marginal model P = ∫︀
results in the Marginal Balance Rule, which in practice can be very unfair for high-probability
Θ
  ( ),
models. This approximates the expected fairness violation as:</p>
      <p>EP [ ] = ∑︁

‖</p>
      <p>∑︁  (|)[P (|, ) − P (|)] P (|) ‖
the Marginal balanced rule on the COMPAS [8] dataset.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Algorithm for Bayesian Fairness</title>
      <p>In the context of the Bayesian fairness framework, the decision maker has a belief  that is
expressed through a distribution  = { |</p>
      <p>∈ Θ} over diferent  parameters. Instead of
using the posterior distribution, as in Bayesian inference, one can use the sampling distribution
of an estimator ^ obtained by sub-sampling data  from the original dataset . The idea of the
bootstrapping method is to get diferent datasets  by sampling  diferent datasets of size
where   = ^(), and our optimisation problem becomes
|| with replacement, called bootstrap datasets. We then obtain a set of  samples  1, . . . ,  ,
 B*ootstrap = arg max ∑︁ E  [ −  ].</p>
      <p>=1</p>
      <p>
        In addition to the bootstrapping method, we need an empirical estimate of the fairness
violation 2 when our observations  are continuous variables. In particular, for infinite  finite
,  and  the equation 2 becomes:
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
E [ ] ≈
∑︁
1 ∑︁  (|)[ (|, ) −  (|)]
 (|) 
 ()
‖
      </p>
      <p>For the above equation we need to estimate  (),  (|),  (|),  (|, ). In the case
where  ,  is finite it’s easy to estimate</p>
      <p>(),  (|) with discrete models, whereas for
optimal policy of 1 we can make use of a gradient descent algorithm.
 (|),  (|, ) we can use continuous predictive models to estimate them. To find the</p>
    </sec>
    <sec id="sec-3">
      <title>3. Experiments</title>
      <p>We empirically evaluate our approach by comparing the policies obtained from the diferent
balance rules on the COMPAS dataset. We performed two diferent experiments to study the
efects of our algorithmic solution using discrete and continuous versions of the dataset. More
specifically, in the discrete case, we can compare the bootstrap and the marginal methods to
the closed-form Bayesian approach by employing a fully discrete Bayesian network model
as described in [1]. In the second experiment, we only compare the policies obtained from
Bootstrap and the marginal rules using the empirical formulation 5. To evaluate our policies, we
calculate the fairness  and utility  with respect to the empirical model from a hold-out dataset,
performing the experiments 50 times, each time shufling our dataset and using 6000 ( 70%) data
points for training and the rest 1214 (30%) for testing, reporting the average and the variance of
the aforementioned metrics. Our code https://github.com/a-athanasopoulos/Bayesian-fairness
reproduces all presented experiments.</p>
      <p>Experimental Setup. To study how DM uncertainty afects fairness we consider the
following experimental setting which is operating over multiple steps , each time increasing
the amount of training data. Intuitively, in the early steps of the process, the DM is more
uncertain about the model parameters as he has assessed fess data compared to the later steps,
so we expect the Bayesian methods to perform better regarding fairness  as we account for
uncertainty. We use 12 steps each time considering  =  * 500 data points.</p>
      <p>Models and Policies. The graphical model is fully connected, so the model uses the
factorization (,,)=(|,)(|)() from which we can calculate all the relevant models to optimize our
policy. To form the posterior distribution for the discrete case we use the Dirichlet-Multinomial
model with a non-informative initial Dirichlet parameter of 1/2 from which we can sample
diferent model parameters, while we can also calculate the marginal model in closed form. We
use parameterized policies of the form  (|) = . For the continuous case, we calculate
the marginal models of  (),  (|) as in the discrete case, while for the models  (|),
 (|, ) and the policy  (|) that contains the continuous observations we use logistic
regression models. The sampling distribution of the bootstrap method uses the marginal model
using diferent bootstrap datasets for both continuous and discrete cases as described in section
2.</p>
      <p>The Algorithm. We use gradient descent to optimize the policies by minimizing the negative
total expected utility  as in 1. In particular, for the Bayesian approaches we sample a model
from the  distribution and then take a step in the gradient direction in each iteration. More
specifically for both bootstrapping and the fully Bayesian approach, we use 16 models to form
the , obtained either by using a diferent bootstrap dataset or directly sampling from the true
posterior accordingly. The marginal policies simply perform the steepest gradient descent for
the marginal model. We make 1500 gradient decent iterations in each policy update, with a
learning rate of 0.01.</p>
      <p>Results. In Figure 1 we illustrate the diferent trade-ofs between utility  and fairness 
for both discrete and continuous experiment versions in each step of the process using  = 1.
Both experiments indicate that the policies obtained from the Bayesian approaches outperform
the marginal one in both fairness  and total utility  . In particular, for the continuous version,
the efect is more evident in the early steps of the algorithm where we have a limited amount of
data and thus greater model uncertainty. For the discrete data, we observe a constant advantage
of the Bayesian approach over the marginal one. In addition, we can say that the bootstrap
method is a good approximation of the Bayesian posterior. Finally, the policies obtained from
the Bayesian approaches result in less variance in both continuous and discrete experiments.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and Future Directions</title>
      <p>In this work, we ofer an algorithm solution to scale the concept of Bayesian fairness [ 1]. We
propose the use of bootstrapping as an alternative to the posterior distribution of the parameters,
along with an empirical formulation of the balance fairness metric suitable for continuous data
scenarios. The results of our empirical study emphasize the significant role of accounting
for uncertainty in the context of algorithmic fairness. Interesting research directions include
the consideration of alternative fairness metrics, the incorporation of Bayesian fairness in
reinforcement learning, and the application of the framework in modern deep learning models
to investigate the advantages of Bayesian fairness in huge and complex datasets with higher
degrees of uncertainty.
as a form of transparency: Measuring, communicating, and using uncertainty, in:
Proceedings of the 2021 AAAI/ACM Conference on AI, Ethics, and Society, AIES ’21, Association
for Computing Machinery, 2021, p. 401–413. doi:10.1145/3461702.3462571.
[8] J. Angwin, J. Larson, S. Mattu, L. Kirchner, Machine bias, in: Ethics of data and analytics,
Auerbach Publications, 2016, pp. 254–264.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Dimitrakakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. C.</given-names>
            <surname>Parkes</surname>
          </string-name>
          , G. Radanovic,
          <article-title>Bayesian fairness</article-title>
          ,
          <source>Proceedings of the AAAI Conference on Artificial Intelligence</source>
          <volume>33</volume>
          (
          <year>2019</year>
          ). doi:
          <volume>10</volume>
          .1609/aaai.v33i01.
          <fpage>3301509</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>N.</given-names>
            <surname>Mehrabi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Morstatter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Saxena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lerman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Galstyan</surname>
          </string-name>
          ,
          <article-title>A survey on bias and fairness in machine learning</article-title>
          ,
          <source>ACM Computing Surveys (CSUR) 54</source>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>35</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. M.</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>CoRR abs/1609</source>
          .05807 (
          <year>2016</year>
          ). URL: http://arxiv.org/abs/1609.05807. arXiv:
          <volume>1609</volume>
          .
          <fpage>05807</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Russell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Kusner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Loftus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Silva</surname>
          </string-name>
          ,
          <article-title>When worlds collide: integrating diferent counterfactual assumptions in fairness</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Lahoti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. P.</given-names>
            <surname>Gummadi</surname>
          </string-name>
          ,
          <article-title>Accounting for model uncertainty in algorithmic discrimination</article-title>
          ,
          <source>in: Proceedings of the 2021 AAAI/ACM Conference on AI</source>
          ,
          <string-name>
            <surname>Ethics</surname>
          </string-name>
          , and Society, AIES '21,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2021</year>
          , p.
          <fpage>336</fpage>
          -
          <lpage>345</lpage>
          . URL: https://doi.org/10.1145/3461702.3462630. doi:
          <volume>10</volume>
          .1145/3461702.3462630.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kempe</surname>
          </string-name>
          , T. Joachims,
          <article-title>Fairness in ranking under uncertainty</article-title>
          , in: M.
          <string-name>
            <surname>Ranzato</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Beygelzimer</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Dauphin</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Liang</surname>
            ,
            <given-names>J. W.</given-names>
          </string-name>
          <string-name>
            <surname>Vaughan</surname>
          </string-name>
          (Eds.),
          <source>Advances in Neural Information Processing Systems</source>
          , volume
          <volume>34</volume>
          ,
          <string-name>
            <surname>Curran</surname>
            <given-names>Associates</given-names>
          </string-name>
          , Inc.,
          <year>2021</year>
          , pp.
          <fpage>11896</fpage>
          -
          <lpage>11908</lpage>
          . URL: https://proceedings.neurips.cc/paper_files/paper/2021/file/ 63c3ddcc7b23daa1e42dc41f9a44a873-Paper.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>U.</given-names>
            <surname>Bhatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Antorán</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q. V.</given-names>
            <surname>Liao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Sattigeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fogliato</surname>
          </string-name>
          , G. Melançon,
          <string-name>
            <given-names>R.</given-names>
            <surname>Krishnan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Stanley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Tickoo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Nachman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Chunara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Srikumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Weller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Xiang</surname>
          </string-name>
          , Uncertainty
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>