# F3: Fair and Federated Face Attribute Classification with Heterogeneous Data

Samhita Kanaparthy, Manisha Padala, Sankarshan Damle
Machine Learning Lab, IIIT Hyderabad
Hyderabad, India
(s.v.samhita, manisha.padala<EMAIL_ADDRESS>
&Ravi Kiran Sarvadevabhatla
CVIT Lab, IIIT Hyderabad
Hyderabad, India
<EMAIL_ADDRESS>
&Sujit Gujar
Machine Learning Lab, IIIT Hyderabad
Hyderabad, India
<EMAIL_ADDRESS>

###### Abstract

Fairness across different demographic groups is an essential criterion for
face-related tasks, Face Attribute Classification (FAC) being a prominent
example. Apart from this trend, Federated Learning (FL) is increasingly
gaining traction as a scalable paradigm for distributed training. Existing FL
approaches require data homogeneity to ensure fairness. However, this
assumption is too restrictive in real-world settings. We propose F3, a novel
FL framework for fair FAC under data heterogeneity. F3 adopts multiple
heuristics to improve fairness across different demographic groups without
requiring data homogeneity assumption. We demonstrate the efficacy of F3 by
reporting empirically observed fairness measures and accuracy guarantees on
popular face datasets. Our results suggest that F3 strikes a practical balance
between accuracy and fairness for FAC.

_K_ eywords Fairness, Vision, Federated Learning, Data Heterogeneity

##  1 Introduction

Face Attribute Classification (FAC) finds prominence for tasks such as gender
classification [1], face verification [2], and face identification [3].
Recently, researchers highlight a critical issue in FAC: attribute prediction
may be biased towards specific demographic groups. For instance, [4] show that
for the gender classification task on the MSFT dataset, the error rate for
‘darker’ faces is approximately eighteen times greater than that on ‘lighter’
faces111“Facial Recognition is accurate, if you’re a white guy”, New York
Times, 2018.. Further, face recognition-based criminal detection systems are
prone to classify innocent people with ‘darker’ faces as suspects [5]. This
bias in predictions is _unfairness_. It is often associated with the
unavailability of balanced datasets [6]. To overcome this issue, researchers
have introduced balanced, large-scale datasets [7].

Of late, Federated Learning (FL) has emerged as a popular paradigm for
scalable distributed training involving large-scale data [8]. FL comprises (i)
independent clients that train local models on their private data and (ii) a
central aggregator which combines these local models, using heuristics, to
derive a generalisable global model [9]. Unfortunately, traditional FL models
typically focus on standard performance measures (e.g., accuracy) and inherit
the unfairness related drawbacks of non-FL approaches [10].

Figure 1: Our F3 framework considers FL with Data Heterogeneity for Fair Face
Attribute Classification. With age as a sensitive attribute, each client
($C_{1},\ldots,C_{m}$) has access to samples of only a single age group. The
difference in error rate (FPR) observed for the two age groups ($\leq 30$ and
$>30$) is high for the state-of-the-art approach, FedAvg-DH. In contrast, our
novel heuristic, 10-FairAccAvg, noticeably improves fairness (i.e., gap
between error rates across age groups) while maintaining reasonable accuracy.

To address the unfairness in FL many methods have been introduced (e.g., [11,
12, 13]). However, these methods inherently assume FL clients with homogeneous
data, i.e, they assume that FL clients’ data contains samples from all the
demographic groups of a particular _sensitive attribute_. E.g., with ‘age’ as
the sensitive attribute, the client’s local training data would have samples
from both ‘young’ and ‘adult’ demographic groups. However, clients’ data is
likely to be heterogeneous in most FL settings.

For instance, a smartphone belonging to a ‘young’ user may have content
comprising majorly to its peers [14], i.e., inter-client heterogeneity in
terms of age. Similarly, geographically separated clients may exhibit inter-
client heterogeneity in race. This data heterogeneity may, in turn reduce
fairness for tasks such as FAC. Consequently, one _cannot_ directly adopt the
existing approaches [15, 16, 17] to improve fairness.

Our Approach: To address the shortcomings mentioned above, we propose _F3_ , a
novel FL framework for Fair Face Attribute Classification – refer Fig. 1. F3
guarantees fairness by employing appropriate aggregation heuristics for the
extreme case of heterogeneous face data in the FL setting. In particular, the
following are our contributions:

  1. 1.

We are first to introduce and study fair Face Attribute Classification (FAC)
in FL under data heterogeneity (FL with DH). We prove that existing approaches
to ensure fairness are not applicable in this setting (Proposition 1).

  2. 2.

To incorporate fairness in FL with DH, we propose F3 (Sec. 4.2) – an FL
framework for Fair FAC. With F3, we introduce novel aggregation heuristics:
(i) FairBest, (ii) $\alpha$-FairAvg, and (iii) $\alpha$-FairAccAvg to improve
the accuracy and fairness trade-off (Sec. 4.3).

  3. 3.

Our heuristics outperform the state-of-the-art method, FedAvg-DH [18],
ensuring 25%-82% improvement in fairness on popular face datasets (FairFace
[7], FFHQ [19], and UTK [20] – Table 2).

  4. 4.

From our empirical results, we show that our heuristics achieve a practical
trade-off between accuracy and fairness, with accuracy drop of 0.4%-17%
compared to FedAvg-DH [18] (Fig. 6).

##  2 Related Work

Balanced Face Datasets: [21] show that face datasets such as VGGFace2 [22],
MS-Celeb-1M [23], MegaFace [24], LFW [25] are imbalanced w.r.t. demographic
groups such as gender and race. Research has also focused on constructing
attribute balanced face datasets that include FairFace [7], Balanced Faces in
the Wild [26], and Dive Face [27]. However, the paradigm of training models on
these data sets is typically centralized, unlike our FL setting, which assumes
data heterogeneity.

Fair Classification: Classical methods for fair classification [28, 29, 30,
31, 32, 33, 34] ensure fairness in credit scoring, predicting criminal
recidivism rates and individual incomes. A host of training methods
incorporate fairness violation as part of optimisation [16, 17, 35, 36]. The
most popular approach among these is _Lagrangian Multiplier Method_ (LMM)
[37]. However, computing the fairness violation required in LMM is impossible
in a heterogeneous data setting. A similar argument holds for [16], where the
authors consider knowledge distillation and use maximum-mean discrepancy based
regularisation to ensure fairness. Researchers also consider semi-supervised
[38] and unsupervised learning [39] for fairness. However, these approaches
implicitly assume data homogeneity across the sensitive attributes.

Federated Learning (FL): FL is employed in popular computer vision tasks such
as image classification [40, 41], landmark classification [42], and object
detection [43]. For most FL settings, the weighted-average (FedAvg [18]) is
used de facto. However, FedAvg is not designed to provide fairness. [44]
empirically show that models trained using FedAvg are more biased compared to
a centrally trained model. While they propose an aggregation technique to
improve fairness, it assumes data homogeneity which is at odds with our data
heterogeneity setting.

FL with non-i.i.d. Data: FL approaches typically consider data heterogeneity
for target labels where each client has access only to a specific set of
target labels, which is non-i.i.d. data. [45] propose a reinforcement
learning-based approach to improve accuracy in non-i.i.d. data. [46] use
contrastive learning to ensure better performance. In addition, such
aggregation heuristics for non-i.i.d. data [45, 41] do _not_ consider
fairness. Also, in all the above approaches, the heterogeneity is w.r.t.
labels and not w.r.t. sensitive attributes.

In summary, existing literature either considers fairness in a non-FL setting
or only with data homogeneity in FL. In contrast, our framework, F3,
holistically integrates fairness in FL setting with data heterogeneity. Also,
unlike prior work, we consider data heterogeneity w.r.t. the sensitive
attribute.

In the next section, we formally define our FL setting and provide the
fairness definitions.

##  3 Preliminaries

We consider Face Attribute Classification (FAC) task, where $\mathcal{X}$ is
the universal set of face images, with binary labels $\mathcal{Y}=\\{0,1\\}$
(e.g., male or female), and sensitive attribute $A\in\mathcal{A}$. Here, $A$
can be age, race, or gender. The sensitive attribute takes a finite set of
values, $A=\\{a_{1},\ldots,a_{s}\\}$. E.g., the sensitive attribute _age_ can
take values such as ‘young’ or ‘adult’. We next describe our FL setting for
FAC.

###  3.1 Federated Learning (FL) Setting

In FL, the data is distributed across multiple parties referred to as clients.
Let $\mathcal{C}=\\{C_{1},\ldots,C_{m}\\}$ represent the set of clients; each
$C_{i}$ owns a private and finite dataset
$D_{i}\subset\mathcal{X}\times\mathcal{Y}\times A$ containing $n_{i}$ samples.
Each $C_{i}$ trains its local model
$h_{\theta_{i,t}}:\mathcal{X}\rightarrow\mathcal{Y}$ parameterized by
$\theta_{i,t}$ at round $t$.

At each round $t$, a random subset of clients $S_{t}\subseteq\mathcal{C}$
communicate their locally updated model parameters
$\Theta_{t}=\\{\theta_{i,t}~{}|~{}C_{i}\in S_{t}\\}$ to the aggregator. The
aggregator combines all communicated model parameters to obtain the global
parameters at round $t$, $\phi_{t}$, using a heuristic choice function
$\mu:\Theta_{t}\rightarrow\phi_{t}$. The aggregator then communicates the
model parameters back to the clients. Then clients initialise their local
model with these parameters and train further. This back and forth process is
repeated multiple times till convergence. Fig. 2 provides an illustration of
FL setting for F3 framework.

We next present the fairness notions explored in this paper.

Figure 2: F3: Our FL Approach. The aggregator combines the client models
$\theta_{1},\ldots,\theta_{m}$ based on our proposed heuristics (Sec. 4.3) to
obtain the global model $\phi$. Our heuristics depend on the fairness and
accuracy scores computed on the aggregator set $D_{a}$.

###  3.2 Fairness Notions

The standard notions for fair classification depend on the error rates: False
negative rate (FNR), and False positive rate (FPR). For a face attribute
classifier $h$, given a face image $x$ with true label $y$ and sensitive
attribute $a\in A$, we have $FNR=\Pr(h(x)\neq y|y=1)$ and
$FNR_{a}=\Pr(h(x)\neq y|A=a,y=1),\forall a\in A$. Likewise, $FPR=\Pr(h(x)\neq
y|y=0)$, and $FPR_{a}=\Pr(h(x)\neq y|A=a,y=0),\forall a\in A$. $FNR_{a}$ and
$FPR_{a}$ are the error rates observed on the data samples belonging to a
particular demographic group with sensitive attribute $a\in A$. E.g., consider
a FAC task for ‘gender’ classification with ‘age’ as the sensitive attribute.
The attribute comprises {‘young’, ‘adult’} as the demographic groups. Now,
consider the following group-fairness notions.

Equality of Opportunity (EOpp) [47]: A classifier $h$ satisfies EOpp for a
distribution over $(\mathcal{X},\mathcal{Y},A)$ if: $FNR_{a}=FNR,\forall a$.
We denote the violation in EOpp as $\Delta_{EOpp}=\max(\\{FNR_{a}-FNR|\forall
a\in A\\})$. That is, $\Delta_{EOpp}$ is the maximum disparity in $FNR$ across
the demographic groups. Intuitively, EOpp ensures that the probability of
predicting a ‘male’ face as ‘female’ is the same across age groups.

Equalized Odds (EO) [48]: A classifier $h$ satisfies EO over
$(\mathcal{X},\mathcal{Y},A)$ if: $FNR_{a}=FNR$ and $FPR_{a}=FPR~{}\forall a$.
$\Delta_{EO}=\max(\max(\\{FPR_{a}-FPR|\forall a\in
A\\}),\max(\\{FNR_{a}-FNR|\forall a\in A\\}))$ denotes violation in EO. EO
states that the probability that the model predicts a ‘male’ face to be
‘female’ is independent of age.

Accuracy Parity (AP) [49]: A classifier $h$ satisfies AP for a distribution
over $(\mathcal{X},\mathcal{Y},A)$ if: $FPR+FNR=FPR_{a}+FNR_{a},\forall a$.
$\Delta_{AP}=\max(\\{FPR_{a}-FPR|\forall a\in
A\\})+\max(\\{FNR_{a}-FNR|\forall a\in A\\})$ denotes violation in AP. AP
states that the overall classification error must be equal across the age
groups.

To incorporate these fairness notions in FAC, the standard technique is to
train a model that maximises accuracy while minimising the violation in these
fairness notions. Towards this, the state-of-the-art approach, Lagrangian
Multiplier Method (LMM) [37], adopts a loss function that simultaneously
incorporates cross-entropy loss $l_{CE}$ and the violation in fairness
constraint $(\Delta_{EOpp},\Delta_{EO},\Delta_{AP})$, weighted by the
lagrangian multiplier $\lambda\in\mathbb{R}^{+}$.

Formally, in LMM, the loss $L_{LMM}(h(X),Y,A)$ for a classifier $h$, for
$k\in\\{EOpp,EO,AP\\}$ and $(X,Y)\subseteq\mathcal{X}\times\mathcal{Y}$, is as
follows.

$\displaystyle
L_{LMM}(\cdot)=\mathbb{E}_{(x,y)\sim(X,Y)}[l_{CE}(h(x),y)]+\lambda\Delta_{k}.$
(1)

LMM requires each client to possess data belonging to every demographic group.
Later in Proposition 1, we show that LMM will _not_ work in FL with DH,
necessitating the need for newer approaches. Motivated by this, we propose F3,
a framework for ensuring fairness in FL with DH.

##  4 Methodology

We begin by motivating the problem and formally show that existing FL
approaches for ensuring fairness cannot be applied in our setting.
Subsequently, we describe our framework F3, including the proposed heuristics.

###  4.1 Motivation

Existing approaches aggregate locally trained fair models to obtain a globally
fair model [37]. Typically, each FL client trains a local classifier imposing
fairness constraints. These methods assume data homogeneity w.r.t. sensitive
attributes across clients. However, this assumption is practically
restrictive.

In reality, each client might only possess samples from an individual
demographic group. E.g., samples belonging to ‘young’ age group when age is
sensitive attribute. We refer to this scenario as Federated Learning with Data
Heterogeneity (FL with DH). However, as we show next with Proposition 1, the
issue with DH is that the error rates for the demographic groups not present
in a particular client’s data are not defined. As a result, the client’s
fairness violation component (Sec. 3.2) cannot be computed.

######  Proposition 1.

In Lagrangian Multiplier Method (LMM), $L_{LMM}$ (Eq. 1) – the loss function
for training the classifier is not defined in FL with DH.

###### Proof.

W.l.o.g., let the $\Delta_{k}$ component of $L_{LMM}$ in Eq. 1 be
$\Delta_{EOpp}$. For $C_{i}$ with local data $D_{i}$,
$\Delta_{EOpp}=\left|\frac{\sum\limits_{j=1}^{|D_{i}|}(1-p_{j})y_{j}a_{j}}{\sum_{j=1}^{|D_{i}|}a_{j}}-\frac{\sum\limits_{j=1}^{|D_{i}|}(1-p_{j})y_{j}(1-a_{j})}{\sum_{j=1}^{|D_{i}|}(1-a_{j})}\right|$,
where $p_{j}=h_{i}(x_{j})\ \forall j\in\\{1,\ldots,|D_{i}|\\}$ and binary
sensitive attribute $a_{j}\in\\{0,1\\}$ [17]. Under DH, every sample in
$D_{i}$ will belong to only a single demographic group (e.g., $\leq$ 30 age
group), i.e., either $a_{j}=1,\forall j$ or $a_{j}=0,\forall j$. In both
cases, $\Delta_{EOpp}$ tends to $\infty$ as either
$\sum_{j=1}^{|D_{i}|}(1-a_{j})=0$ or $\sum_{j=1}^{|D_{i}|}a_{j}=0$;
consequently, $L_{LMM}\rightarrow\infty$. ∎∎

Proposition 1 holds for any fairness violation function (including
$\Delta_{EO},\Delta_{AP}$) that requires samples belonging to all the
demographic groups. E.g., the loss functions defined in [15, 29, 50]. Thus, we
cannot use these loss functions to train for fairness in FL with DH. Further,
training only for accuracy compromises fairness [51], implying that standard
approaches such as FedAvg cannot be adopted. As a result, we propose F3, a
novel FL framework for fair FAC that employs different aggregation heuristics
for achieving fairness.

|
---|---

Figure 3: An illustration of data heterogeneity across clients with age as the
sensitive attribute (FFHQ data set [19]). In the _heterogeneous_ setting
(right plot), each client has data belonging to only a specific age group
($\leq$ 30 or $>$ 30). In contrast, the _homogeneous_ setting (left plot)
shows that each client has data almost equally distributed across both the age
groups (See Section 4.1). Algorithm 1 F3 Framework

1:(1) Each client $C_{k}\in\mathcal{C}$ has its private dataset $D_{k}$ s.t.
$\theta_{k,0}\leftarrow\theta_{0}$. (2) Hyperparameters: maximum number of
communication rounds $T$, number of local epochs $E$, learning rate $\eta$,
accuracy tolerance $a$, threshold round $\tau$. (3) A heuristic choice
function $\mu_{\varsigma}(\Theta_{t})$ s.t. $\varsigma=\\{\textsf{FairBest},$
$\alpha\mbox{-}\textsf{FairAvg},\alpha\mbox{-}\textsf{FairAccAvg}\\}$ .

2:Aggregated model $\phi$

3:procedure LocalTraining$(k,\phi_{t})$

4: $\theta_{k,t}\leftarrow\phi_{t}$

5: for each local epoch $i=1,2,\ldots,E$ do

6:
$\theta_{k,t}\leftarrow\theta_{k,t}-\eta\cdot\nabla_{\theta_{k,t}}L_{k}(h_{\theta_{{k,t}}}(\cdot),D_{k})$

7: end for

8: return $\theta_{k,t}$ to the aggregator

9:end procedure

10:procedure Aggregation$(\mu_{\varsigma}(\cdot))$

11: for each round $t=1,2,\ldots,T-1$ do

12: for each client $k\in S_{t}$ (in parallel) do

13: $\theta_{k,{t}}\leftarrow\textsc{LocalTraining}(k,\phi_{t})$

14: end for

15: $\phi_{t+1}\leftarrow\mu_{\varsigma}(\Theta_{t})$ where
$\Theta_{t}=\\{\theta_{k,t}~{}|~{}k\in S_{t}\\}$

16: if $t>\tau$ then

17: $\Delta_{Acc}=|Acc(h(\phi_{t}))-$

18:$\qquad\qquad\qquad\qquad\max\left(Acc(h(\phi_{t-1})),\ldots,Acc(h(\phi_{t-\tau}))\right)|$

19: if $\Delta_{Acc}<a$ then

20: return $\phi_{best}$ $\triangleright$ Training stops; As $\Delta_{Acc}$,
across “$\tau$" communication rounds is less than tolerance “$a$"

21: else if $\Delta_{Acc}>a$ then

22: $\phi_{best}\leftarrow\phi_{t+1}$

23: else if $\Delta_{Acc}>0$ then

24: $\phi_{best}\leftarrow\textsf{FairCheck}(\phi_{best},\phi_{t+1})$
$\triangleright$ outputs the model parameters that produce lesser fairness
violation

25: end if

26: else

27: $\phi_{best}=\phi_{t+1}$

28: end if

29: end for

30: return $\phi_{best}$

31:end procedure

###  4.2 F3 Framework

The ingenuity of our framework, F3, is to adopt different aggregation
heuristics that prioritise the local client models, which perform desirably in
terms of fairness. We next briefly summarise F3 as follows.

  1. 1.

Local Training. Each $C_{i}$ trains its model $h_{\theta_{i}}$ only for
maximising accuracy (i.e., minimising cross-entropy loss $l_{CE}$),
$L_{i}(h_{\theta_{i}},D_{i})=\mathbb{E}_{(x,y)\sim
D_{i}}[l_{CE}(h_{\theta_{i}}(x),y)]$. A subset of clients $S_{t}$, at each
round $t$, communicate their model parameters to the aggregator.

  2. 2.

Model Aggregation. For aggregation, we propose novel heuristic choice
functions ($\mu$) to control the accuracy and fairness trade-off (Sec. 4.3).
We consider an aggregator set $D_{a}$ comprising samples belonging to each
demographic group to execute these heuristics [52]. Note that $D_{a}$ has a
limited number of samples to be used directly for training. Aggregator derives
a global model employing our heuristics (Sec. 4.3).

  3. 3.

Model Communication. The aggregator then communicates the global model
parameters to each client. The clients initialise their models with these
parameters and further train on it to maximise their accuracy.

Fig. 2 depicts F3 framework, and Algorithm 1 provides a procedural outline of
F3. Next, we introduce various heuristic choice functions used in Model
Aggregation step.

###  4.3 Heuristics for Fair FL

Recall that in FL with DH, firstly, we cannot train the local client models
for fairness. Thus, standard heuristics for ensuring fairness do not work in
our setting (Proposition 1). Next, as FedAvg aggregates a random (sub)set of
models at each round, it fails to ensure fairness as the models for
aggregation may potentially be biased. In turn, they may amplify the
unfairness in the global model.

Contrary to this, our key idea is to achieve fairness in FL with DH by
deliberately selecting the subset of local models for aggregation that perform
desirably w.r.t. to fairness and accuracy (Step 2 in Fig. 2). The aggregator
quantifies the performance of local client models based on their empirical
fairness violation and accuracy computed on the aggregator set $D_{a}$.
Specifically, let $\Delta_{loss}(h_{i}(\theta_{i,t}))$ denote any fairness
violation for $C_{i}$’s model on $D_{a}$ at any round $t$. Also,
$Acc(h_{i}(\theta_{i,t}))$ is the accuracy of $C_{i}$’s model over $D_{a}$ at
$t$. Based on this, we introduce the following heuristics that aim to strike a
practical balance between fairness and accuracy.

  * $\bullet$

FairBest: In this, aggregator selects a specific model from the set of local
models, which provide the least fairness violation on the aggregator set
$D_{a}$. That is, the global aggregation parameter at a round $t$, are,

${\mu_{\textsf{FairBest}}(\Theta_{t})\triangleq\phi_{t}=\theta_{i^{*},t}~{}\mbox{~{}s.t.~{}}i^{*}=\underset{i}{\operatorname*{arg\,min}}\left\\{\Delta_{loss}(h_{i}(\theta_{i,t}))\right\\}}$

  * $\bullet$

$\alpha$-FairAvg: This heuristic generalizes FairBest by selecting the top
$\alpha$% of local models and then take their weighted average. More formally,
consider the set $F_{t}$ which comprises the top-$\alpha$% of clients in
increasing order of $\Delta_{loss}(h_{i}(\theta_{i,t}))$. Now,

$\mu_{\alpha\mbox{-}\textsf{FairAvg}}(\Theta_{t})\triangleq\phi_{t}=\sum_{i\in
F_{t}}\frac{n_{i}}{\sum_{j\in F_{t}}n_{j}}\theta_{i,t}$ (2)

  * $\bullet$

$\alpha$-FairAccAvg: Aggregator selects the top-$\alpha$% of local model
parameters that give the best ratio of accuracy with fairness violation on
$D_{a}$ and take their weighted average. Consider the set $F_{t}$ which
comprises the top-$\alpha$% of clients in decreasing order of the ratio
$\frac{Acc(h_{i}(\theta_{i,t}))}{\Delta_{loss}(h_{i}(\theta_{i,t}))}$. Again,

$\displaystyle\mu_{\alpha\mbox{-}\textsf{FairAccAvg}}(\Theta_{t})\triangleq\phi_{t}=\sum_{i\in
F_{t}}\frac{n_{i}}{\sum_{j\in F_{t}}n_{j}}\theta_{i,t}$ (3)

Observe that as $\alpha$ increases, more and more local models are considered
for aggregation akin to FedAvg with heterogeneous data. That is, with an
increase in $\alpha$, Eq. 2 and Eq. 3 tend to
$\sum_{i\in\mathcal{C}}\frac{n_{i}}{\sum_{j}n_{j}}\theta_{i,t}$ (FedAvg
aggregation). That is, $\alpha$-FairAvg and $\alpha$-FairAccAvg tend to mimic
FedAvg (see Fig. 5).

Given these heuristics, we provide F3’s performance in terms of accuracy and
fairness violation on three real-world face datasets in the next section.

##  5 Experiments

Dataset Input Size # of faces Sensitive Attribute (Age) Face Attribute
Classification (FAC) FairFace [7] $128\times 128\times 3$ $\approx$98K $\leq
30$ years $>30$ years Gender ($\approx$53K) ($\approx$45K) Male ($\approx$51K)
Female ($\approx$45K) FFHQ [19] $128\times 128\times 3$ $\approx$70K $\leq 30$
years $>30$ years Gender ($\approx$35K) ($\approx$34K) Male ($\approx$32K)
Female ($\approx$37K) UTK [20] $48\times 48\times 1$ $\approx$23K $\leq 30$
years $>30$ years Gender ($\approx$12K) ($\approx$11K) Male ($\approx$6K)
Female ($\approx$4K)

Table 1: Summary Statistics of Face Datasets

We conduct our experiments on the following face datasets: FairFace [7], FFHQ
[19], and UTK [20]. In this section, we first define our baseline FedAvg-DH
for an appropriate comparison. Then, we provide our network architecture,
training details and the FL setup. Finally, we present our results and the key
takeaways.

Baseline: To validate our proposed heuristics, we compare their performance
with the baseline FedAvg-DH in terms of accuracy and violation of fairness
notions mentioned in Sec. 3.2. FedAvg-DH is simply FedAvg for our FL setting
with Data Heterogeneity.

FL Setup: In our FL setting, for the baseline and our heuristics, we consider
50 clients, i.e., $\mathcal{C}=\\{C_{1},\ldots,C_{50}\\}$. We randomly
distribute the training data such that each client has data samples of only a
particular demographic group to ensure data heterogeneity. Each client’s model
is locally trained on its private data. The global model aggregation is
performed periodically till convergence. The training details specific to each
dataset follow next. At each aggregation round $t$, we let
$S_{t}=\mathcal{C}$.

Training Details: We focus on three popular face datasets: FairFace [7], FFHQ
[19], and UTK [20]. For each of these, we consider ‘age’ as the sensitive
attribute and ‘gender’ as the predicting label. Further, we divide the samples
into two age groups, $\leq 30$ and $>30$ years. We distribute the data among
the clients such that 50% of the clients have access to data samples belonging
to the age group $\leq 30$ and others have access to samples belonging to age
group $>30$. For all three datasets, each client’s local data comprises
$\approx$ 1K training samples.

For FairFace [7] and FFHQ [19], we use a batch size of 256 and train the
models for $T=50$ communication rounds with clients training their models
locally for $E=4$ epochs (per round). We use learning rates of $\eta=0.05$ and
$\eta=0.01$ for FairFace and FFHQ, respectively. For UTK [20], we train using
batch size 64 for $T=80$ and $E=2$ rounds. We also set the learning rate as
$\eta=0.01$. For all three datasets, we set the accuracy tolerance at $a=1\%$
and the threshold round at $\tau=20$.

Model: We adopt PyTorch’s implementation of the standard ResNet-18
architecture for the base model [37]. We use SGD optimization in our training
process. We run our experiments on 8 NVIDIA GeForce GTX 1080 with $10$ GB RAM.

Stopping Criteria. Fig. 4 depicts the change in accuracy and $\Delta_{EO}$
values over communication rounds for 10-FairAvg and 10-FairAccAvg. We remark
that fairness guarantees often come at the cost of accuracy [53]. However, our
heuristics ensure that the fairness violation does not substantially increase
as the accuracy improves. Our fair model selection and stopping criteria (Line
13, Lines 16-17 in Algorithm 1) ensure a practical accuracy and fairness
trade-off.

Figure 4: Accuracy and Fairness values over communication rounds for
10-FairAvg and 10-FairAccAvg. Observe that as training progresses, the
fairness violation $(\Delta_{EO})$ does not significantly worsen while
accuracy gradually increases. The shaded region depicts the rounds where
training is stopped – i.e., the change in accuracy, $\Delta_{\text{Acc}}$,
(Algorithm 1, Line 15) is below 1%.

###  5.1 Results

We now compare accuracy and fairness violations across different heuristics
for each of the three datasets. We run every experiment 5 times and report the
average and the standard deviation of the measures. For each instance, we
randomly generate a aggregator set $D_{a}$ with the total number of samples
between 10%-20% of the overall dataset size. Table. 2 provides the accuracy
and fairness violation values of each of our proposed heuristics in comparison
to FedAvg-DH. The maximum Coefficient of Variation (CoV) [54] observed across
our experiments is 0.96 and less than 0.2 for almost 70% of the time. This
indicates the stability of our approach and the results presented in this
work. While we report our results for $\alpha$-FairAvg and $\alpha$-FairAccAvg
with $\alpha=10$ (10% of the total local models), Fig. 5 illustrates the
accuracy and fairness trade-off on FairFace w.r.t. $\alpha$.

Figure 5: Accuracy and Fairness Violation with varying $\alpha$. We compare
accuracy (left plot) and $\Delta_{EO}$ (right plot) of $\alpha$-FairAvg and
$\alpha$-FairAccAvg on FairFace for different $\alpha$ values. Note that for
smaller $\alpha$, we get improved fairness (50% reduction in $\Delta_{EO}$ for
$\alpha=10$) with marginal reduction in accuracy ($<8\%$ ).

FairFace [7] FFHQ [19] UTK [20] Heuristic Accuracy ($\uparrow$) Reduction in
Fairness Violation ($\downarrow$) Accuracy ($\uparrow$) Reduction in Fairness
Violation ($\downarrow$) Accuracy ($\uparrow$) Reduction in Fairness Violation
($\downarrow$) $\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$ $\Delta_{EOpp}$
$\Delta_{EO}$ $\Delta_{AP}$ $\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$
FedAvg-DH 79.7% $\pm$ 0.8 $1.0\pm 1.4$ $16.3\pm 3.3$ $17.3\pm 2.5$ 90.8% $\pm$
0.5 2.4 $\pm$ 1.3 $10.5\pm 1.3$ $13.0\pm 0.5$ 94.1% $\pm$ 0.5 $1.5\pm 1.2$
$11.9\pm 1.6$ $13.5\pm 2.7$ FairBest 72.0% $\pm$ 0.8 $0.6\pm 0.6$ $\;8.2\;\pm
1.1$ 8.8 $\pm$ 1.1 74.7% $\pm$ 2.0 1.8 $\pm$ 0.4 1.9 $\pm$ 0.3 3.2 $\pm$ 0.8
83.9% $\pm$ 0.5 $1.9\pm 4.6$ 6.0 $\pm$ 4.3 10.0 $\pm$ 6.9 $10$-FairAvg 74.2%
$\pm$ 1.1 3.3 $\pm$ 1.2 10.2 $\pm$ 1.6 13.5 $\pm$ 2.5 82.2% $\pm$ 0.5 2.7
$\pm$ 0.3 2.7 $\pm$ 0.3 4.3 $\pm$ 0.6 93.5% $\pm$ 2.9 0.9 $\pm$ 4.3 6.1 $\pm$
2.9 7.8 $\pm$ 4.1 $10$-FairAccAvg 73.3% $\pm$ 1.2 0.8 $\pm$ 0.7 9.6 $\pm$ 0.9
10.4 $\pm$ 1.6 82.7% $\pm$ 0.5 1.8 $\pm$ 1.0 2.0 $\pm$ 0.5 3.9 $\pm$ 1.1 93.7%
$\pm$ 1.1 3.1 $\pm$ 3.1 5.3 $\pm$ 1.0 6.8 $\pm$ 2.1

Table 2: Accuracy and Fairness Violations, $\Delta_{k}$, $k=\\{$EOpp, EO,
AP$\\}$ on FairFace, FFHQ, and UTK of our heuristics compared to the baseline
FedAvg-DH. Lower $\Delta_{k}$ ensures better fairness. The numbers in green
highlight represent least value of $\Delta_{k}$ obtained by one of our
heuristic, for each dataset. The values are significantly lesser than FedAvg-
DH. $10$-FairAccAvg and $10$-FairAvg (highlighted in magenta) provide the
highest accuracy out of our proposed heuristics.

Fairness Improvements: We now compare $\Delta_{k},\;k\in$ {EOpp, EO, AP}
across our novel heuristics with FedAvg-DH as our baseline. From Table. 2,
observe that, in general, each of our heuristics outperform FedAvg-DH in terms
of fairness. For FairFace, FairBest obtains fairness improvement of 40%
($\Delta_{EOpp}$), 50% ($\Delta_{EO}$), 50% ($\Delta_{AP}$). For FFHQ,
FairBest provides an improvement of 82% for $\Delta_{EO}$. Further, all our
proposed heuristics provide a minimum of 60% improvement in fairness for FFHQ.
For UTK, 10-FairAccAvg obtains a improved fairness of 50% in $\Delta_{EO}$ and
55% in $\Delta_{AP}$.

Accuracy and Fairness Trade-off: Fig. 6 illustrates the accuracy and fairness
trade-offs of our heuristics with the baseline FedAvg-DH. The heuristics in
the bottom-left corner of the plot assure the least fairness violation while
maintaining high accuracy. As expected, FedAvg-DH (red-cross, Fig. 6) mostly
guarantees the best accuracy but suffers from significant fairness violation.
However, most of our heuristics provide lower fairness violations, for a
marginal reduce in accuracy. We now elaborate on our results for each dataset,
from Table 2.

FairFace [7]: With our heuristic 10-FairAccAvg, we observe fairness
improvements up to 42% with an accuracy drop of only 7% compared to FedAvg-DH.
FairBest provides the least violation of fairness and 10-FairAvg provides the
highest accuracy with FairFace.

FFHQ [19]: On FFHQ, we observe a fairness improvement up to 82%. While
10-FairAccAvg guarantees the best accuracy, FairBest obtains 25%, 82% and 75%
reduction in $\Delta_{EOpp},\Delta_{EO}$ and $\Delta_{AP}$ respectively.
10-FairAccAvg provides a desirable trade-off between accuracy and fairness
compared to others.

UTK [20]: For UTK, both 10-FairAvg and 10-FairAccAvg outperform FedAvg-DH.
10-FairAvg provides improved fairness by 40% ($\Delta_{EOpp}$), 48%
($\Delta_{EO}$) and 42% ($\Delta_{AP}$) for an accuracy drop of only 0.6%.
Similarly, 10-FairAvg provides improved fairness by 55% in $\Delta_{EO}$ and
49% in $\Delta_{AP}$ for an accuracy drop of 0.4%.

Figure 6: Accuracy and fairness trade-off. Note that the optimum point is
bottom left, i.e., low %-Error and low fairness violation ($\Delta_{k}$).
FedAvg-DH (red cross marker) appears at the bottom right exhibiting low error
(higher accuracy) at the cost of fairness. Our heuristics consistently provide
a reduction in $\Delta_{k}$ – for only a marginal increase in % Error. The
highlighted “Pareto Inefficient" region is the area which is Pareto dominated
by FedAvg-DH. Observe that, our proposed heuristics mostly lie outside the
Pareto inefficient region.

To rank performance w.r.t. accuracy-fairness trade-off, we use _Mahalanobis_
distance [55] between our heuristics’ performance (Error and Fairness
violation) from the origin (see Fig. 6). The heuristic that achieves the least
distance achieves a better trade-off. We observe that 10-FairAccAvg performs
better than the other two heuristics for EOpp on FairFace, EO and AP on UTK,
and for all three fairness notions on FFHQ, indicating its desirability. We
provide the complete results in the Appendix. In summary, we see that our
heuristics perform remarkably well in terms of fairness while maintaining
competitive accuracy compared to FedAvg-DH.

Oracle to Achieve Data Homogeneity: Our approach is designed to operate under
Data Heterogeneity. We now demonstrate that even if we impose the relatively
more restrictive condition of data homogeneity222Each client’s local data
comprises samples of each demographic group., F3, along with the proposed
heuristics outperform the state-of-the-art methods for fairness.

To do so, we consider an oracle that makes the data homogeneous by
distributing the samples such that each agent has access to all the
demographic groups. Under the presence of such an oracle, we can locally train
models for fairness using LMM [37] at the client level. Further, we can also
aggregate these models to obtain a global model, referred to as FedAvg-LMM.
Likewise, under the presence of such an oracle, aggregating the local models
trained only for accuracy leads to FedAvg. Table 3 presents the accuracy and
fairness performance of our heuristics compared to FedAvg and FedAvg-LMM. The
accuracies observed for FedAvg and FedAvg-LMM on FairFace, FFHQ and UTK are
in-line with [37, 56].

Dataset | Heuristic | Accuracy | $\Delta_{EOpp}$ | $\Delta_{EO}$ | $\Delta_{AP}$
---|---|---|---|---|---
FairFace [7] |  FedAvg [18] | 79.5% | 2.1 | 15.1 | 17.2
FedAvg-LMM [37] | 76.3% | 8.4 | 3.0 | 11.4
10-FairAccAvg | 73.3% | 0.8 | 9.6 | 10.4
FFHQ [19] |  FedAvg [18] | 90.1% | 0.8 | 19.1 | 20.5
FedAvg-LMM [37] | 86.6% | 2.3 | 6.4 | 8.7
10-FairAccAvg | 82.7% | 1.8 | 2.0 | 3.8
UTK [20] |  FedAvg [18] | 94.1% | 1.8 | 11.3 | 13.1
FedAvg-LMM [37] | 93.3% | 3.4 | 6.4 | 9.8
10-FairAccAvg | 93.7% | 3.1 | 5.3 | 6.8
Table 3: Accuracy and Fairness Violation, $\Delta_{k}$, $k=\\{$EOpp, EO,
AP$\\}$: we show the performance of our heuristic 10-FairAccAvg in comparison
to FedAvg [18] and FedAvg-LMM [37], with oracle access to homogeneous data.
Notice that, 10-FairAccAvg outperforms FedAvg-LMM w.r.t. fairness on UTK [20]
while maintaining comparable accuracies with FedAvg.

Comparison of results with Oracle: From Table 3, observe that 10-FairAccAvg
ensures similar or significantly better fairness compared to FedAvg-LMM. For
instance, $\Delta_{AP}$ with 10-FairAccAvg has 8%, 56% and 30% improvement
compared to FedAvg-LMM. 10-FairAccAvg also has accuracy comparable to FedAvg,
the default approach for FL trained on homogeneous data. E.g., in UTK with
10-FairAccAvg, the accuracy only drops by 0.4% compared to FedAvg, while the
improvement in fairness for $\Delta_{EO}$ and $\Delta_{AP}$ is 53% and 48%,
respectively.

In the Appendix, we also provide results on additional experiments, including
(i) an ablation study for different hyper parameters ($\alpha$, $a$ and
$\tau$), (ii) different network architecture, and (ii) experiments on accuracy
and fairness trade-off for different FAC tasks and sensitive attributes.

Discussion: Overall, our results show that FairBest provides the lowest
fairness violation, while $\alpha$-FairAccAvg provides the most practical
accuracy and fairness trade-off. As $\alpha$ increases, we observe not only an
increase in accuracy but also an increase in fairness violation (Fig. 5). As a
result, a practitioner can select an appropriate $\alpha$ value for the
desired accuracy-fairness trade-off.

The key advantage of the proposed heuristics within the F3 framework is that
they ensure an appropriate selection of a _subset_ of clients’ local models,
balancing fairness violation and accuracy loss in the process. In contrast,
FedAvg-DH [18] selects local models _randomly_ leading to high fairness
violation.

##  6 Conclusion

In this paper, we focus on Fair Attribute Classification (FAC) in FL setting
with data heterogeneity. We observe that existing approaches to ensure
fairness in FL do not work in a heterogeneous setting due to the
unavailability of demographic-specific data samples across clients. To address
this, we propose F3, a novel FL framework to achieve fairness in FAC. With F3,
we introduce four aggregation heuristics that ensure fairness while
simultaneously maximizing the model’s accuracy. Experimentally, our heuristics
outperform the default counterpart in FL on challenging benchmark face
datasets. Our heuristics’ performance is competitive even with state-of-the-
art approaches designed for the homogeneous setting. Overall, the results
suggest that F3 helps strike a practical balance between fairness and accuracy
for FAC.

## References

  * [1] Juan Bekios-Calfa, José M Buenaposada, and Luis Baumela.  Robust gender recognition by exploiting facial attributes dependencies.  Pattern recognition letters, 36:228–234, 2014.
  * [2] Neeraj Kumar, Alexander C Berg, Peter N Belhumeur, and Shree K Nayar.  Attribute and simile classifiers for face verification.  In ICCV, pages 365–372. IEEE, 2009.
  * [3] Ohil K Manyam, Neeraj Kumar, Peter Belhumeur, and David Kriegman.  Two faces are better than one: Face recognition in group photographs.  In IJCB), pages 1–8. IEEE, 2011.
  * [4] Joy Buolamwini and Timnit Gebru.  Gender shades: Intersectional accuracy disparities in commercial gender classification.  In Conference on fairness, accountability and transparency, pages 77–91. PMLR, 2018.
  * [5] Alex Najibi.  Racial discrimination in face recognition technology.  Harvard University, 2020.
  * [6] Antonio Torralba and Alexei A Efros.  Unbiased look at dataset bias.  In CVPR, pages 1521–1528, 2011.
  * [7] Kimmo Karkkainen and Jungseock Joo.  Fairface: Face attribute dataset for balanced race, gender, and age for bias measurement and mitigation.  In CVPR, pages 1548–1558, 2021.
  * [8] Jakub Konečný, H. Brendan McMahan, Daniel Ramage, and Peter Richtárik.  Federated optimization: Distributed machine learning for on-device intelligence, 2016.
  * [9] Omar Wahab, Azzam Mourad, Hadi Otrok, and Tarik Taleb.  Federated machine learning: Survey, multi-level classification, desirable criteria and future directions in communication and networking systems.  IEEE Communications Surveys & Tutorials, 23, 02 2021.
  * [10] Chaoyang He, Alay Dilipbhai Shah, Zhenheng Tang, Di Fan1Adarshan Naiynar Sivashunmugam, Keerti Bhogaraju, Mita Shimpi, Li Shen, Xiaowen Chu, Mahdi Soltanolkotabi, and Salman Avestimehr.  Fedcv: A federated learning framework for diverse computer vision tasks.  arXiv preprint arXiv:2111.11066, 2021.
  * [11] Tian Li, Shengyuan Hu, Ahmad Beirami, and Virginia Smith.  Ditto: Fair and robust federated learning through personalization.  In ICML, pages 6357–6368. PMLR, 2021.
  * [12] Tian Li, Maziar Sanjabi, Ahmad Beirami, and Virginia Smith.  Fair resource allocation in federated learning.  In ICLR, 2020.
  * [13] Muhammad Habib ur Rehman, Ahmed Mukhtar Dirir, Khaled Salah, and Davor Svetinovic.  Fairfed: Cross-device fair federated learning.  In IEEE AIPR, pages 1–7, 2020.
  * [14] Yichen Ruan and Carlee Joe-Wong.  Fedsoft: Soft clustered federated learning with proximal local updating.  arXiv preprint arXiv:2112.06053, 2021.
  * [15] Alekh Agarwal, Alina Beygelzimer, Miroslav Dudik, John Langford, and Hanna Wallach.  A reductions approach to fair classification.  In ICML, pages 60–69, 10–15 Jul 2018.
  * [16] Sangwon Jung, Donggyu Lee, Taeeon Park, and Taesup Moon.  Fair feature distillation for visual recognition.  In CVPR, pages 12115–12124, June 2021.
  * [17] Manisha Padala and Sujit Gujar.  Fnnc: Achieving fairness through neural networks.  In IJCAI, 2020.
  * [18] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas.  Communication-efficient learning of deep networks from decentralized data.  In Artificial intelligence and statistics, pages 1273–1282. PMLR, 2017.
  * [19] Tero Karras, Samuli Laine, and Timo Aila.  A style-based generator architecture for generative adversarial networks.  In CVPR, pages 4401–4410, 2019.
  * [20] Zhifei Zhang, Yang Song, and Hairong Qi.  Age progression/regression by conditional adversarial autoencoder.  In CVPR, pages 5810–5818, 2017.
  * [21] Michele Merler, Nalini Ratha, Rogerio S Feris, and John R Smith.  Diversity in faces.  arXiv preprint arXiv:1901.10436, 2019.
  * [22] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman.  Vggface2: A dataset for recognising faces across pose and age.  In IEEE FG, pages 67–74. IEEE, 2018.
  * [23] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao.  Ms-celeb-1m: A dataset and benchmark for large-scale face recognition.  In ECCV, pages 87–102. Springer, 2016.
  * [24] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard.  The megaface benchmark: 1 million faces for recognition at scale.  In CVPR, pages 4873–4882, 2016.
  * [25] Erik Learned-Miller, Gary B Huang, Aruni RoyChowdhury, Haoxiang Li, and Gang Hua.  Labeled faces in the wild: A survey.  In Advances in face detection and facial image analysis, pages 189–248. Springer, 2016.
  * [26] Inioluwa Deborah Raji, Timnit Gebru, Margaret Mitchell, Joy Buolamwini, Joonseok Lee, and Emily Denton.  Saving face: Investigating the ethical concerns of facial recognition auditing.  In AAAI/ACM AIES, pages 145–151, 2020.
  * [27] Ruben Vera-Rodriguez and Ruben Tolosana.  Sensitivenets: Learning agnostic representations with application to face images.  IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 43(6), 2021.
  * [28] Yahav Bechavod and Katrina Ligett.  Learning fair classifiers: A regularization-inspired approach.  CoRR, abs/1707.00044, 2017.
  * [29] M. Bilal Zafar, I. Valera, M. Gomez Rodriguez, and K. P. Gummadi.  Fairness Constraints: Mechanisms for Fair Classification.  ArXiv e-prints, 2015.
  * [30] Toon Calders and Sicco Verwer.  Three naive bayes approaches for discrimination-free classification.  Data Mining and Knowledge Discovery, 21:277–292, 2010.
  * [31] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel.  Fairness through awareness.  In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, pages 214–226, 2012.
  * [32] Michael Feldman, Sorelle A. Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkatasubramanian.  Certifying and removing disparate impact.  In SIGKDD, 2015.
  * [33] F. Kamiran and T. Calders.  Classifying without discriminating.  In 2nd International Conference on Computer, Control and Communication, pages 1–6, 2009.
  * [34] T. Kamishima, S. Akaho, and J. Sakuma.  Fairness-aware learning through regularization approach.  In IEEE ICDM Workshops, pages 643–650, 2011.
  * [35] Cuong Tran, Ferdinando Fioretto, and Pascal Van Hentenryck.  Differentially private and fair deep learning: A lagrangian dual approach.  In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 9932–9939, 2021.
  * [36] Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rogriguez, and Krishna P Gummadi.  Fairness constraints: Mechanisms for fair classification.  In Artificial Intelligence and Statistics, pages 962–970. PMLR, 2017.
  * [37] Vishnu Suresh Lokhande, Aditya Kumar Akash, Sathya N Ravi, and Vikas Singh.  Fairalm: Augmented lagrangian method for training fair models with little regret.  In ECCV, pages 365–381. Springer, 2020.
  * [38] Sangwon Jung, Sanghyuk Chun, and Taesup Moon.  Learning fair classifiers with partially annotated group labels.  In CVPR, 2022.
  * [39] Priya Goyal, Quentin Duval, Isaac Seessel, Mathilde Caron, Mannat Singh, Ishan Misra, Levent Sagun, Armand Joulin, and Piotr Bojanowski.  Vision models are more robust and fair when pretrained on uncurated images without supervision.  arXiv preprint arXiv:2202.08360, 2022.
  * [40] Kewei Cheng, Tao Fan, Yilun Jin, Yang Liu, Tianjian Chen, Dimitrios Papadopoulos, and Qiang Yang.  Secureboost: A lossless federated learning framework.  IEEE Intelligent Systems, 2021.
  * [41] Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra.  Federated learning with non-iid data.  arXiv preprint arXiv:1806.00582, 2018.
  * [42] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown.  Federated visual classification with real-world data distribution.  In ECCV, pages 76–92. Springer, 2020.
  * [43] Yang Liu, Anbu Huang, Yun Luo, He Huang, Youzhi Liu, Yuanyuan Chen, Lican Feng, Tianjian Chen, Han Yu, and Qiang Yang.  Fedvision: An online visual object detection platform powered by federated learning.  In AAAI, volume 34, pages 13172–13179, 2020.
  * [44] Yuchen Zeng, Hongxu Chen, and Kangwook Lee.  Improving fairness via federated learning.  arXiv preprint arXiv:2110.15545, 2021.
  * [45] Hao Wang, Zakhary Kaplan, Di Niu, and Baochun Li.  Optimizing federated learning on non-iid data with reinforcement learning.  In IEEE INFOCOM, pages 1698–1707. IEEE, 2020.
  * [46] Qinbin Li, Bingsheng He, and Dawn Song.  Model-contrastive federated learning.  In CVPR, pages 10713–10722, 2021.
  * [47] Alexandra Chouldechova.  Fair prediction with disparate impact: A study of bias in recidivism prediction instruments.  IEEE Big data, 5(2):153–163, 2017.
  * [48] Moritz Hardt, Eric Price, and Nati Srebro.  Equality of opportunity in supervised learning.  NeurIPS, 29:3315–3323, 2016.
  * [49] Han Zhao and Geoff Gordon.  Inherent tradeoffs in learning fair representations.  NeurIPS, 32:15675–15685, 2019.
  * [50] Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell.  Mitigating unwanted biases with adversarial learning.  CoRR, abs/1801.07593, 2018.
  * [51] Alexandra Chouldechova.  Fair prediction with disparate impact: A study of bias in recidivism prediction instruments.  IEEE Big data, 5 2:153–163, 2017.
  * [52] Jingwen Zhang, Yuezhou Wu, and Rong Pan.  Incentive mechanism for horizontal federated learning based on reputation and reverse auction.  In WebConf, page 947–956, 2021.
  * [53] Ferdinando Fioretto, Pascal Van Hentenryck, Terrence WK Mak, Cuong Tran, Federico Baldo, and Michele Lombardi.  Lagrangian duality for constrained deep learning.  In ECML PKDD, pages 118–135, 2021.
  * [54] K Hima Bindu, M Raghava, Nilanjan Dey, and C Raghavendra Rao.  Coefficient of variation and machine learning applications.  CRC Press, 2019.
  * [55] Christopher M Bishop and Nasser M Nasrabadi.  Pattern recognition and machine learning, volume 4.  Springer, 2006.
  * [56] Prasanna Sattigeri, Samuel C Hoffman, Vijil Chenthamarakshan, and Kush R Varshney.  Fairness gan: Generating datasets with fairness properties using a generative adversarial network.  IBM Journal of Research and Development, 63(4/5):3–1, 2019.

##  Appendix A Training over Epochs

Figure 7: Accuracy and Fairness values over communication rounds for our
heuristics 10-FairAvg and 10-FairAccAvg in comparison with FedAvg-DH. The
shaded region depicts the rounds where training is stopped, i.e., the accuracy
has not improved above 1% over more than 10 rounds. Observe that in FedAvg-DH
(plot 3) randomness in violation of fairness is high.

##  Appendix B Effect of Changing Hyper Parameters

Figure 8 shows the effect of changing $\alpha$ in $\alpha$-FairAvg (Eq. 2) and
$\alpha$-FairAccAvg (Eq. 3)

Figure 8: Accuracy and Fairness performance varying $\alpha$ in
$\alpha$-FairAvg and $\alpha$-FairAccAvg (Fig. 5 in main paper)

In Fig. 8, we have seen that with increase in $\alpha$ our heuristics
$\alpha$-FairAvg and $\alpha$-FairAccAvg tend to increase accuracy at a cost
of fairness ($\Delta_{EO}$) mimicking standard method FedAvg-DH. We now give
the performance of our heuristics w.r.t. remaining fairness notions.

Heuristic $\alpha$ Accuracy ($\uparrow$) Reduction in Fairness Violation
($\downarrow$) $\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$ $\alpha$-FairAvg 2
71.9% 0.6 8.2 8.8 10 74.2% 3.3 10.1 13.5 20 74.1% 1.1 10.8 12 30 75.0% 2.1
11.5 17.2 40 76.1% 1.8 12.4 22.6 $\alpha$-FairAccRatio 2 70.9% 0.5 6.8 7.4 10
73.3% 0.8 9.6 10.4 20 74.6% 2.5 10.9 13.4 30 76.6% 2.7 11.4 14.1 40 77.4% 1.4
12.9 14.3

Table 4:  Accuracy and Fairness Violation, $\Delta_{k}$, $k=\\{$EOpp, EO,
AP$\\}$: we show the performance of our novel heuristics $\alpha$-FairAvg and
$\alpha$-FairAccRatio on FairFace dataset [7] while varying the percentage
($\alpha$) of models chosen for aggregation. The highlighted cell provides the
highest accuracy or least fairness. We notice that with increase in $\alpha$
the heuristics show improved accuracy at a cost of fairness.

##  Appendix C Effect of Varying accuracy tolerance ($a$%) and threshold
rounds ($\tau$)

Heuristic $a$% , $\tau$ Accuracy ($\uparrow$) Reduction in Fairness Violation
($\downarrow$) $\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$ 10-FairAvg 1%, 20
74.2% 3.3 10.2 13.5 1%, 10 73.9% 1.4 10.0 11.4 2%, 20 74.0% 1.6 11.1 12.7 2%,
10 72.5% 1.1 9.4 10.5 10-FairAccRatio 1%, 20 73.3% 0.8 9.6 10.4 1%, 10 73.0%
3.7 10.3 14.0 2%, 20 74.3% 3.3 9.0 12.3 2%, 10 73.1% 1.1 12.0 13.1

Table 5:  Accuracy and Fairness Violation, $\Delta_{k}$, $k=\\{$EOpp, EO,
AP$\\}$: we show the performance of our heuristics 10-FairAvg and
10-FairAccRatio on the FairFace dataset [7] varying the parameters accuracy
tolerance $a$ and threshold $\tau$ (Algorithm 1). We observe similar
performance in terms of the trade-off between accuracy and fairness violation,
irrespective of $a$ and $\tau$. In the main paper, we used $a=1$% and
$\tau=20$ for reporting the results.

##  Appendix D Varying the Architecture :Effect of Using VGG16 Architecture

Heuristic Accuracy ($\uparrow$) Reduction in Fairness Violation ($\downarrow$)
$\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$ ResNet18 FedAvg-DH 79.7% 1.0 16.3
17.3 FairBest 72.0% 0.6 8.2 8.8 10-FairAvg 74.2% 3.3 10.2 13.5 10-FairAccAvg
73.3% 0.8 9.6 10.4 VGG FedAvg-DH 76.0% 1.9 13.7 15.6 FairBest 68.5% 0.3 5.7
6.0 $10$-FairAvg 71.1% 1.6 9.8 11.4 $10$-FairAccAvg 72.9% 1.1 9.1 10.2

Table 6:  Accuracy and Fairness Violation, $\Delta_{k}$, $k=\\{$EOpp, EO,
AP$\\}$: we show the performance of our proposed heuristics with the baseline
FedAvg-DH [18] on the FaiFace dataset [7], employing ResNet18 and VGG16
architectures. Notice that, the performance of VGG16 in terms of accuracy is
significantly less than Resnet18’s. Also, ResNet18 training is faster compared
to VGG16. Hence, we use Resnet18 architecture for the rest of our experiments.

##  Appendix E Accuracy and Fairness Trade-off using Mahalanobis Distance

We observe the accuracy and fairness trade-off among our heuristics based on
the metric _Mahalanobis Distance_. We use the percentage loss in accuracy
(Error in %) and fairness violation ($\Delta_{k}$, $k=\\{EOpp,EO,AP\\}$) for
this calculation. We compute Mahalanobis distance (MD) as follows,

$MD(\overline{x})=\sqrt{(\overline{x}-\overline{\mu})^{T}S^{-1}(\overline{x}-\overline{\mu})}$

where, $\overline{x}=(Error,\Delta_{k})$ is vector with observed variables:
Error and Fairness Violation ($\Delta_{k}$), $\overline{\mu}$ is vector with
mean values of observed variables and $S$ is covariance matrix of observed
variables.

Table 7 shows the results using mahalanobis distance

FairFace [7] FFHQ [19] UTK [20] Heuristic Mahalanobis Distance (Error (in %),
$\Delta_{k}$) Mahalanobis Distance (Error (in %), $\Delta_{k}$) Mahalanobis
Distance (Error (in %), $\Delta_{k}$) $\Delta_{EOpp}$ $\Delta_{EO}$
$\Delta_{AP}$ $\Delta_{EOpp}$ $\Delta_{EO}$ $\Delta_{AP}$ $\Delta_{EOpp}$
$\Delta_{EO}$ $\Delta_{AP}$ FairBest 8.3 232.3 35.9 7.9 8.1 8.8 3.8 4.6 4.5
$10$-FairAvg 8.0 230.3 37.8 9.0 6.3 7.8 1.6 2.9 2.9 $10$-FairAccAvg 7.9 232.4
36.0 6.7 5.9 7.3 3.5 2.6 2.5

Table 7:  Mahalanobis distance calculated between
$\overline{x}=(\text{Error},\Delta_{k})$ and (0,0) for our heuristics on all
the three datasets from the Fig. 6 (main paper). Lower the distance better the
accuracy and fairness trade-off. The highlighted heuristic provides the better
accuracy and fairness trade-off out of our proposed heuristics. We observe
that 10-FairAccAvg performs better than the other two heuristics for EOpp on
FairFace, EO and AP on UTK, and for all three fairness notions on FFHQ
dataset.