Fairness in Federated Learning via Core-Stability
Abstract
Federated learning provides an effective paradigm to jointly optimize a model benefited from rich distributed data while protecting data privacy.
Nonetheless, the heterogeneity nature of distributed data, especially in the non-IID setting, makes it challenging to define and ensure fairness among local agents.
For instance, it is intuitively “unfair" for agents with data of high quality to sacrifice their performance due to other agents with low quality data.
Currently popular egalitarian and weighted equity-based fairness measures suffer from the aforementioned pitfall.
In this work, we aim to formally represent this problem and address these fairness issues using concepts from co-operative game theory and social choice theory.
We model the task of learning a shared predictor in the federated setting as a fair public decision making problem, and then define the notion of core-stable fairness : Given
N agents, there is no subset of agents S that can benefit significantly by forming a coalition among themselves based on their utilities U N and U S (i.e., | S | N U S ≥ U N ).
Core-stable predictors are robust to low quality local data from some agents, and additionally they satisfy Proportionality (each agent gets at least 1 /n fraction of the best utility that she can get from any predictor) and Pareto-optimality (there exists no model that can increase the utility of an agent without decreasing the utility of another), two well sought-after fairness and efficiency notions within social choice.
We then propose an efficient federated learning protocol CoreFed to optimize a core stable predictor.
CoreFed determines a core-stable predictor when the loss functions of the agents are convex.
CoreFed also determines approximate core-stable predictors when the loss functions are not convex, like smooth neural networks.
We further show the existence of core-stable predictors in more general settings using Kakutani’s fixed point theorem.
Finally, we empirically validate our analysis on two real-world datasets, and we show that CoreFed achieves higher core-stable fairness than FedAvg while maintaining similar accuracy.
Introduction
The success of many deployed machine learning (ML) systems crucially hinges on the availability of high-quality data.
However, a single entity might not own all the data it needs to train the ML model it wants; instead, valuable data instances or features might be scattered in different organizations or entities.
Distributed learning schemes such as federated learning (FL) [15] provide a training scheme that focuses on training a single ML model using all the data available in a cooperative way without moving the training data across the organizational or personal boundaries to protect data privacy.
On the other hand, given the heterogeneity in the local data distributions of different clients participating in FL, it has become quite challenging to design a classifier that performs reasonably across all of them. In fact, such an objective directly transfers to ensuring a fair performance of the classifier across all local data distributions. Therefore, fairness in FL has attracted substantial interest in the recent past [32, 22, 19, 13, 35].
In this work, we ask: Is it possible to jointly optimize a centralized model with fairness guarantees regarding the heterogeneity of local agents?
How to define such fairness such that no agents would intend to form an alternative coalition with a subset of agents?
What could be the federated learning protocol that is able to ensure such fairness?
To address the above research questions, we bring to bear notions from game theory and social choice theory.
We first observe that federated learning can be cast into public decision making , where all agents derive their respective utilities from a common global decision, namely the globally learned model.
Now the goal is to make this global decision fairly.
One of the fundamental fairness measures in public decision making is that of core-stability [24].
Intuitively, we say that a set of agents can form a “blocking coalition” if each one of them can gain utility significantly (proportional to the size of their coalition) by training a unified model amongst themselves than the globally trained model.
A globally trained model is core stable if there are no blocking coalitions.
We briefly justify the advantages of core-stability (a.k.a.
core-stable fairness) over some of the existing notions of fairness in federated learning.
Two commonly used fairness notions in federated learning are the egalitarian fairness [32, 22, 7, 35, 36, 25, 22] and proportional fairness [6, 5].
The egalitarian fairness aims to maximize the utility of the least happy agent 1 .
In a proportional fairness, we want the ratios of the losses of any pair of the agents to be (super/ sub) proportional to the size of their respective datasets (this incentivizes the agents to share more of their data with the server).
To avoid naming conflicts with our notion of proportionality , from here on, we refer to the proportional fairness introduced in [6] as weighted equity based fairness as this fairness compares the losses of every pair of agents.
Usually, fairness notions that compare the utilities/ losses of agents with each other are called equity based fairness in social choice theory.
We remark that both the notions are vulnerable if some agents have poor quality datasets.
In particular, if one of the agents have high levels of noise in their data, call them noisy-agent, then their loss values will tend to be higher for most learnt predictors.
The egalitarian fairness and the weighted equity based fairness may be unfair to the other agents as both may make decisions aiming to reduce the large loss incurred by the noisy-agent, thereby biasing the learning towards the data of the noisy-agent.
A more desirable fairness property in this scenario maybe to compare the loss percentage of agents, i.e., the ratio of the loss incurred to the maximum loss that can be incurred, or equivalently utility percentage of agents, i.e., the ratio of the utility incurred to the maximum utility that can be incurred.
Core-stability achieves this, together with other desirable properties (elaborated in Section 3).
Our Contribution.
We formally define the core-stable fairness in federated learning by appropriately modeling agent’s utility functions to capture their learning loss error.
In particular, given a group of N local agents, an aggregation protocol P , and an aggregated model f , we say that the model f achieves core-stability if there are no coalition S of agents that could benefit significantly by training a model with only their data (see Definition 1).
Intuitively, this means that under a core-stable FL model, no agent has the incentive to deviate from current group and thereby obtain proportionally better aggregate utility from the final trained model.
Additionally, we note that such a model f will ensure sought-after guarantees of Proportionality (each agent gets 1 /n times their best possible utility)[30] and Pareto-optimality (there is no predictor that can increase the utility of any agent without decreasing the utility of another agent) that equal-treatment based models [6, 32] may fail to.
Core-stability is a well-sought-after but a rare-to exist notion.
In case of public goods that resembles
FL,
existence of core- stable outcome was known only when agent’s utility functions are linear [8].
While the utility functions that capture learning errors are inherently non-linear and highly complex making existing results inapplicable.
We summarize our contributions as below.
• We formally extend core-stability from co-operative game theory to fairness in federated learning.
We show that core-stability exists (in Section 4.1) as long as agent’s utility functions are continuous with respect to the model parameters, and their non-negative conical combinations have a convex set of (local) optima.
We prove this result using a fixed point formulation.
In particular, we define a
correspondence ϕ : P → P on the set of all feasible predictors P , and ensure that any predictor θ ∗ ∈ P such that θ ∗ ∈
ϕ
( θ ∗ ) is core-stable.
Thereafter we show that ϕ satisfies nice continuity like properties and therefore must admit a fixed point by Kakutani’s fixed-point theorem [14]. • Next, we design an effective federated learning protocol CoreFed, which optimizes the final model by maximizing the protocol of agent’s utilities.
We prove that this protocol efficiently finds the core-stable model whenever the underlying utility functions are concave (see Section 4.2).
Our protocol only needs gradient information from agents in each round.
• We prove that above method directly applies to learning through linear regression or logistic regression, since their resulting utility functions are convex (see Section 4.3).
For Smooth Neural Nets (DNN) , although the utility functions are (highly) non-convex, we manage to show that an approximate core-stable model can be learned within a local neighborhood (see Section 4.4). • To capture cases where agents may have varying importance, we extend core-stability to weighted core-stability (in Section 4.5).
We show that a weighted core-stable model is weighted proportional and Pareto-optimal, and that CoreFed protocol can be generalized to Weighted CoreFed to get the desired weighted guarantees.
• We conduct experiments on three datasets, and show that CoreFed achieves the core-stable fairness, while maintaining similar utility with the standard FedAvg protocol (see Section 5).
Related Work
Fairness in Social Choice.
Fairness is one of the fundamental goals in many multi-agent settings.
Over the years, motivated by applications, several notions of fairness have been proposed and investigated.
Two fairness notions that are studied in many applications are that of proportionality [30] and envy-freeness [9].
Proportionality requires every agent to receive their proportional share of the best outcome, i.e., at least 1 /n times their best possible utility.
The notion of envy-freeness is defined in the context of resource allocation, where one aims to divide a set of items among agents fairly.
In an envy-free allocation, no agent prefers the bundle of the other agent to her own.
However, in public decision making , where all agents derive utility from a common global decision, this notion is not applicable!
In public decision making, one of the most sought out fairness notion is that of core-stability [24].
Core-stability generalizes the notion of proportionality alongside other desirable properties like Pareto-optimality.
The concepts of Core-stability find applications in many other settings in social choice and game theory and is well known to exist in some special settings [31]
Another popular fairness notion is equitability which states that every agent should be equally happy, i.e., the utilities/ losses of all the agents should be the same.
However, as explained in 1, using relaxations of equitability, may lead to undesirable outcomes if some agents have poor data quality.
Over the last seven decades, several relaxations of envy-freeness [20, 26], proportionality [4, 23] and equitability [10] have been studied in computational social choice.
Fairness in Federated Learning.
There have been several results on fairness in federated learning, each focusing on a particular aspect of the entire paradigm.
For instance some work [12, 33] aim to establish fairness at the agent selection phase, where the server requests for updates from a selected subset of the agents.
There are studies that aim to study fairness while training the global model such that it does not discriminate against protected groups [34] or that the model does not overfit the data of some agents at the expense of others [19, 22].
Earlier mentioned egalitarian fairness will fall under this category.
Then, there are studies that consider fairness by evaluating the contribution of the agents towards training the joint model– for instance weighted equity fairness [6] does this based on the size of the data shared by the agents.
Other studies assign significance to the agents based on Shapley values [29].
For a full taxanomy of fairness in federated learning, we urge the reader to check [28].
At large, most of the fairness notions are incomparable.
As remarked in [6], “no one set of definitions is going to resolve the complex questions it raises”.
Core-Stability in Federated Learning
Problem Setup.
In any predictive modelling task, one would like to learn a function mapping from
X ⊆ R d to Y ⊆ R .
This includes both regression and binary classification where extension to multiclass classification is also feasible.
We denote the space of such mappings as F = { f θ | θ ∈ P ⊆
R d } , where each f θ : R d → R is a mapping function parameterized by the model weights vector θ .
Our goal is to determine f θ ∈ F , such that for data sample ( x, y ) drawn from the distribution P , f θ ( x ) ≈ y , i.e., f θ ( x ) learns y well.
Since we identify a mapping function with each θ ∈ P , we refer to θ as a predictor for the model 2 .
Utility Functions of the Agents.
The quality of a predictor θ is usually measured by the expected loss over the data distribution P , i.e., E ( x,y ) ∼P ℓ ( f θ ( x ) , y ) , where ℓ ( · , · ) is a prede- fined loss function.
Ideally, the training process would minimize this expected loss, i.e., attain θ ⋆ = arg min θ [Equation] P E ( x,y ) ∼P ℓ ( f θ ( x ) , y ) .
Since we are trying to determine a single predictor for several heterogeneous agents/ groups, we may not be able to give every group its best predictor.
However, we want to choose the predictor that achieves fairness across all the groups.
To define any notion of fairness from the classical economics literature, we need to define the utility function of a group for a predictor θ .
Intuitively, the utility is a measure of how good the predictor is for the group and its data.
We define,
[Equation]
where M is a constant more than (1 + ε ) times the loss incurred from the worst predictor for agent i , i.e., M ≥ (1 + ε ) sup θ ∈ P, ( x,y )
∈X×Y ℓ ( f θ ( x ) , y ) .
The scaling by (1 + ε ) is to avoid unnecessary degeneracies resulting from zero utilities, and we choose ε ≪ 10 − 5 .
Observe that the range of the utility function is from 0 <
Mε to M (1 + ε ) .
Federated Learning and Fairness.
In the federated learning setting, we are given n groups.
Each group i has their loss function ℓ i () and correspondingly a utility function u i () for each choice of a predictor θ ∈ P .
We now define the fairness criterion.
Recall that given n groups, our goal is to choose a θ ∈ P , such that we are fair to all the involved agents.
The fairness notion here is core-stability.
Definition 1 (Core-Stability) .
A predictor θ ∈ P , is called core stable if there exists no other θ ′ ∈ P , and no subset S of agents, such that | S | n u i ( θ ′ )
≥ u i ( θ ) for all i ∈ S , with at least one strict inequality.
Intuitively, core-stability implies that there is no subset of agents that can benefit “significantly” by forming a coalition among themselves, i.e., if we were to choose any other θ ′ ∈ P only considering the utility functions of the agents in S ⊆ n , then there is some agent who’s (multiplicative) gain in utility will be strictly less than a factor n/ | S | , i.e., there is no substantial benefit for this agent if she chooses to belong to the set S .
Furthermore, core-stability gives some classical fairness and welfare guarantees.
In particular, note that every agent i gets at least 1 /n times her best utility, i.e., the utility derived from the best possible mapping for agent i .
Mathematically u i ( θ ) ≥ 1 /n · u i ( θ ′ ) for all θ ′ ∈ P (setting S
= { i } in Definition 1).
This fairness is called Proportionality [30].
Formally,
Definition 2 (Proportionality) .
A predictor θ ∈ P is proportional if and only if for all θ ′ ∈ P , we have u
i ( θ ) ≥ u i ( θ ′ )
n for all i ∈ [ n ] .
Similarly, observe that there exists no predictor θ ′ ∈ P where (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ) > n (setting S =
[ n ] in Definition 1).
This implies that there is no predictor that can increase the utility of some agent without decreasing the utility of another.
We call this property Pareto-optimality .
Formally,
Definition 3 (Pareto-optimality) .
A predictor θ ∈ P is Pareto-optimal if and only if there exists no other θ ′ ∈ P ,
such that u i ( θ ′ ) ≥ u i ( θ ) for all i ∈ [ n ] with at least one strict inequality.
Core is a central concept within cooperative game theory, defined to capture “no deviating sub-group” property and is considered very strong.
However, it is well known to exist only in special cases [31].
We now elaborate the advantages of core-stability over some of the existing fairness concepts in federated learning.
3.1 Advantages of Core-Stability
As briefly mentioned in the introduction, core-stability is robust to low local data qualities of some agents, unlike the FedAvg or federated learning based on egalitarian or weighted equity based fairness.
We elaborate this with a small example: consider three agents that contribute equal amount of data, and say agent 3 has poor data quality, i.e., there exists no proper predictor for agent 3’s data, or equivalently for all predictors θ ∈ P , the loss function of this agent is very high (and utility is very low).
Concretely, consider two predictors θ 1 and θ 2 .
Under θ 1 , agents 1 and 2 incur a loss of a and agent 3 incurs a loss of M · a (think of M as a very large integer).
Now, under θ 2 , agentsand 2 have a loss of 10 a and agent 3 has a loss of 0 .
9 Ma .
Observe that θ 2 is preferable over θunder egalitarian fairness (as 0 .
9 Ma ≫ 10 a ) and also by FedAvg as it has a lower total average loss ( 0 .
1 Ma ≫ 9 a ).
Similarly, a learning algorithm based on weighted equity fairness would prefer θ 2 , as ratio of the losses between agents 1 (or 2) and 3 is significantly high in both θ 1 and θ 2 and is lesser in θ 2 .
However, intuitively, θ 1 seems fairer, as agent 3 is not substantially worse off in θ 1 than it is in θ 2 (by a factor 1 . 1 ), while agents 1 and 2 are significantly better off in θ 1 (by a factor 10 ).
Note that in this example θ 2 is not a core-stable predictor, as agents 1 and 2 have an incentive to break off and improve substantially (intuitively θ 2 is very unfair to them).
We say that core-stable predictors are robust to low data quality of specific agents, as we never compare the losses of two agents with each other; rather our comparison is more along the lines of loss percentages , i.e., the ratio of the loss to the maximum possible loss incurred by the agent.
The robustness to poor local data quality of agents of core-stable predictors is a parallel to the property of scale-invariance that core-stable allocations exhibit in social choice theory.
In particular, scaling the utility of any single agent does not alter the core-stable allocation.
Similarly, Egalitarian, utilitarian 3 and equity based fairness suffer from being responsive to scaling [3].
Core-Stability in Federated Learning
In this section, we prove the existence of core-stability under certain assumptions on the loss functions of the individual agents/ groups (Section 4.1).
Then, in Section 4.2, we give a distributive training protocol CoreFed to determine a core-stable predictor when the loss functions are convex 4 .
Finally, by applying the theory developed in Sections 4.1 and 4.2, we show that CoreFed determines a core stable predictor in Linear Regression, and in Classification with Logistic Regression (Section 4.3).
Finally, in Section 4.4 we show that CoreFed determines an approximate core stable predictor in
Deep Neural Networks.
4.1 Existence of Core-Stability in Federated Learning
We show that core stable predictors exist in the federated setting if the utility functions of the agents satisfy the following conditions:
The utility function of each agent is continuous.
The set of maximizers of any conical combination of the utility functions is convex i.e., for all ⟨ α 1 , α 2 , . .
, α n ⟩ ∈ R n ≥ 0 , the set C
= { θ | (cid:80) i ∈ [ n ] α
i u
i ( θ ) is maximum } is convex
To the best of our knowledge, prior to this work, the existence of core-stability in public fair division was shown only for linear utility functions by [8].
Utility functions that satisfy the above two conditions cover several other utility functions and is therefore a strict generalization of linear utility functions.
We show the existence of core-stability for instances satisfying conditions 1 and 2 above using Kakutani’s fixed point theorem.
For completeness, we state the Kakutani’s fixed point theorem.
Definition 4.
[Kakutani’s Fixed Point Theorem] A correspondence or equivalently a set valued function ϕ : D → 2 D admits a fixed point, .i.e.
, there exists a point d ∈ D , such that d ∈ ϕ ( d ) , if
D is non-empty, compact, and convex.
For all d ∈ D , ϕ ( d ) is non-empty, convex and compact.
ϕ () has a closed graph,
i
e., for all sequences ( d i ) i ∈ N converging to d ∗ and ( e i ) i ∈ N converging to e ∗ , such that d i ∈ D and e i ∈ ϕ
( d i ) , we have e ∗ ∈
ϕ
( d ∗ ) .
We define a correspondence or a set valued function ϕ : P → 2 P where P is the set of all feasible predictors.
In particular, for all θ ∈ P , we set
[Equation]
We first observe that any fixed point of ϕ corresponds to a core stable classifier.
Lemma 4.1.
Let θ ∈ P be such that θ ∈ ϕ
( θ ) .
Then, θ is a core-stable predictor.
The proof of Lemma 4.1 can be found in the Appendix.
Now, it suffices to show that ϕ admits a fixed point.
In particular, note that the domain of ϕ , P is non-empty, compact, and convex.
Similarly, for every θ ∈ P , ϕ ( θ ) is non-empty, compact, and convex.
By Kakutani’s fixed point theorem, it only remains to show that ϕ () has a closed graph, to ensure that ϕ () admits a fixed point.
Lemma 4.2.
The correspondence ϕ () has a closed graph.
The detailed proof can be found in the Appendix.
Intuitively, since the utility functions are continuous and non-zero, the optima of (cid:80) i ∈ [ n ] u i ( d ) u
i ( θ ) over d ∈ P , also changes continuously with θ .
We are ready to prove the main result of this section.
Theorem 1.
In any federated learning setting, where the agent’s utilities are continuous and the set of maximizers of any conical combination of the agents utilities is convex, a core-stable predictor exists.
Proof Sketch.
Any fixed point of ϕ () corresponds to core stable predictor (Lemma 4.1).
It suffices to show that ϕ () admits a fixed point under assumptions in Theorem 1.
To this end, note that domain P of ϕ () is non-empty, compact, and convex.
For all θ ∈ P , ϕ ( θ ) is convex by assumption in Theorem 1.
Finally ϕ () has a closed graph by Lemma 4.2, and thus ϕ () admits a fixed point.
Implications.
Theorem 1 describes the conditions under which core-stable predictors exist.
We briefly state how to adapt the proofs to show the existence of locally core-stable predictors for more general utility functions.
Lemmas 4.1 4.2, and Theorem 1 are valid even if we change the definition of ϕ ( θ ) to the set of maximizers of (cid:80) i ∈ [ n ] u i ( d ) /u i ( θ ) over d ∈ B ( θ, r ) (instead of d ∈ P ), i.e., we define ϕ ( θ ) to be the set of maximizers in the local neighbourhood of θ (within distance r to θ ).
In such a case, we only need conditions 1 and 2 to be true within a radius of r of every point, i.e., within
B ( θ, r ) for all θ ∈ P .
These guarantees typically tend to be true for small values of r in Deep Neural
Networks.
Thus, the predictor corresponding to the fixed point of ϕ will satisfy core-stability when restricted to predictors within distance r to it, i.e., it is a locally core-stable predictor.
4.2 Computation of a Core-Stable Predictor When Utility Functions are Concave
In this section, we show that under certain assumptions on the utility functions, we can describe an efficient distributed protocol that computes the core-stable predictor.
In particular, we look into the scenario, where the utility function of each agent is concave.
Note that this would automatically satisfy the conditions in Theorem 1, as any conical combination of concave functions is also concave and will admit a convex set of maximizers.
We first show that a core stable predictor can be expressed as an optima of a convex program.
In particular, any predictor that maximizes the product of utilities of the agents, i.e., argmax θ ∈ P (cid:81) i ∈ [ n ] u i ( θ ) (or equivalently the sum of logarithms of the utilities of the agents), is core stable.
[Equation]
Observe that if the utility of each agent is concave, then the above program is convex.
Since the logarithm is a concave increasing function, each log( u i ()) is a concave in θ and the sum of concave functions is concave.
Thus, 2 is a concave maximization subject to convex constraints.
Theorem 2.
If u i () is concave for all i ∈ [ n ] , then any predictor θ ∗ that maximizes the convex program 2 is core-stable.
Proof Sketch.
We defer a formal proof to Appendix C.
The main technical ingredient of our proof is to show that if θ ∗ is a solution to the convex program 2, then, for any other predictor θ ′ ∈ P , we have (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ∗ ) ≤ n .
Now if θ ∗ is not core-stable, then there exists an S ⊆
[ n ] and θ ′ ∈ P , such that u i ( θ ′ ) ≥ n/ | S | u
i ( θ ∗ ) for all i ∈ S with at least one strict inequality, then we have (cid:80) i ∈ [ n ] u i ( θ ) u i ( θ ≥ (cid:80) i ∈
S u i ( θ ) u i ( θ
> n/ | S | · | S | = n , which is a contradiction.
Implications.
The proof of Theorem 2 shows that the strong utilitarian property of (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ∗ ) ≤ n for any θ ′ ∈
P implies core-stability of θ ∗ under any (non-negative) utility functions.
Clearly, such a θ ∗ must be Pareto-optimal, and furthermore, the inequality implies that at θ ′ computed by any other classical method, if some agents gain, then some other agents must be loosing by a lot.
Secondly, under concave utilities optima of convex program equation 2 satisfies this property, and hence can be computed in efficiently.
Below we discuss a distributed protocol for the same.
Tightness of Our Guarantees.
We make a remark that there are instances, where the guarantees provided by core-stability is tight.
These instances typically exhibit large heterogeneous behaviour in their training data.
Our guarantees work under the assumption that the utility functions are concave and the domain of predictor is a convex set.
Consider the following scenario:
Our goal is to choose a {+predictor θ ∈ C , where C = { c ∈ R n ≥ 
 | (cid:80) i ∈ [ n ] c i = 1 } (so C is a convex set). Now, let there be n agents, and u i ( c ) =+}
c i for all i ∈ [ n ] , and c ∈ C (utility functions are linear and therefore concave).
Intuitively, each agent has their ideal predictor to be a distinct axis aligned hyperplane (capturing the heterogeneity in data).
Observe that for each agent , the best possible utility is 1 , as there exists a predictor c ∗ such that c ∗ i = 1 and c ∗ k = 0 for all k ̸
= i .
Now, note that, for any predictor c ∈ C , we have (cid:80) i ∈ [ n ] c i = 1 .
Thus, for any classifier c chosen, there exists an agent i , such that u i ( c )
=
c i ≤ 1 /n .
Thus, for each predictor c , there exists a set S
= { i } and a another predictor c ∗ ∈ C such that (cid:80) i ∈
S u
i ( c ∗ ) /u i ( c ) > n . Observe that even our guarantees of proportionality are tight in this example.
This example shows that the scaling factor of | S | /n is unavoidable.
We now propose a distributed SGD framework to determine a core stable predictor.
We call our Algorithm as CoreFed (Fully outlined in Algorithm 1 in the appendix).
CoreFed.
Observe that for convex losses, we can directly solve this maximization to the optimal to achieve core-stability.
For non-convex losses such as those for DNNs, we apply gradient descent to maximize the objective.
Suppose we are training on n finite samples { ( x i , y i ) } i ∈ [ n ] drawn from the data distribution P , which constitute empirical distribution ˆ P n .
We observe that, the gradient can be expressed as an conical combination of the gradients of each group:
[Equation]
Therefore, for each group, we reweight its gradients or weight updates by ( M i − E [Equation] x [Equation]
∼
[Equation] P [Equation] i
[Equation]
n ℓ ( f θ ( x ) , y )) − 1 and then sum up to get the final weight update in each iteration, which leads to a distributed training protocol shown in Algorithm 1.
This protocol is similar to standard FedAvg.
However, in CoreFed the model weight updates are weighted then aggregated at each iteration, while in FedAvg, model weights are directly averaged and aggregated at each iteration.
In the limit that each local update uses single step with entire dataset, ∆ θ s = − η
1 |D s | (cid:80) |D s |
i =1 ∇ θ t ℓ ( f θ t ( x ( i ) s ) , y ( i ) s ) , where D s = { ( x ( i ) s , y ( i ) s ) : 1 ≤ i ≤ |D s |} is the training dataset on device s .
Therefore, the global update is a unbias gradient descent step of the objective (cid:80) s log( M s − 1 |D s | (cid:80) |D
s |
i =1 ℓ ( f θ t ( x ( i ) s ) , y ( i ) s ))
=
L ( θ t ) where L ( · ) is defined in 2.
4.3 Core-Stability in Linear Regression and Classification with Logistic Regression
We now discuss some of the predictive models, where the concavity requirements of the utility function is satisifed.
Note that a necessary and sufficient condition for u i () to be concave is that the loss function ℓ () should be convex in c .
Here we elaborate few scenarios where this is true.
Suppose we are training on n finite samples { ( x i , y i ) } i ∈ [ n ] drawn from the data distribution P , which constitute empirical distribution ˆ P n .
Linear Regression.
These are the scenarios where we map our input variables to a real number (not discrete class labels).
In this case, we have f θ ( x ) =
θ T x .
Observe that the regression loss , then E ( x,y ) ∼ ˆ P n ℓ ( f θ ( x ) , y )
=
E ( x,y ) ∼ ˆ P n ( θ T x − y ) 2 would be convex in θ .
Lemma 4.3.
CoreFed determines a core-stable predictor in a federated learning setting training linear regression.
Classification with Logistic Regression.
In classification tasks we map the input variables to discrete class labels.
A commonly used loss function in classification is logistic regression.
Given a classifier θ and a scalar c ∈ R , an agent i ’s loss is given by ℓ i ( θ, c ) =
||
θ ||
+ α · (cid:80) i ∈ [ n ] log( e − y
i ( θ T x i + c ) + 1) [27, 1, 11].
It is well known that ℓ i ( θ, c ) is convex (see, e.g., [11]).
Thus, u i ( θ, c ) =
M i − ℓ i ( θ, c ) where M i = arg max θ ∈ P,c ∈ R ( ℓ i ( θ, c )) , is concave.
Lemma 4.4.
CoreFed determines a core-stable predictor in a federated learning setting training classification with logistic regression.
4.4 Approximate Core-Stability in Deep Neural Networks
Theorem 2 requires that u i ( θ ) is concave in terms of θ and global optimality for the objective
L ( θ ) = (cid:81) i ∈ [ n ] u i ( θ ) to achieve core-stability.
However, these two conditions are challenging to be satisfied for DNNs, where the training loss is non-convex and common training methods, which are based on first-order gradients, are not guaranteed to absolutely converge.
In this more general scenario, the following theorem shows the relaxed local core-stability that we can attain for approximately first-order converged predictor (i.e., predictor with small local gradient ||∇ θ
L ( θ ) || 2 ≤ ϵ ).
Definition 5.
A predictor θ ∈ P , is called ( d, k ) -pseudo core stable, where d > 0 , k > 1 if there exists no other θ ′ ∈ P such that || θ ′ − θ || 2 < d , and no subset S of agents, such that | S | kn u i ( θ ′ )
≥ u i ( θ ) for all i ∈ S , with at least one strict inequality.
Theorem 3.
For all i ∈ [ n ] , if u i ( θ ) is β -smooth in terms of θ within { θ ′ :
|| θ − θ ′
|| 2 ≤ d } , and ||∇ θ L ( θ ) || 2 ≤ ϵ , then θ is a ( d, k ) -pseudo core stable predictor, where
[Equation]
Implications.
We defer the proof to Appendix E. Theorem 3 states that, for smooth neural networks, there exists no predictor θ ′ in the neighborhood with ℓ 2 radius d , that any subset of agents prefer “significantly”.
Although our guarantees are local guarantees, we remark that global fairness guarantees are unlikely for DNNs.
Most of the fairness guarantees in computational social choice and game theory crucially require the agents to have convex preferences, i.e., the level sets of the utility functions need to be convex.
There are impossibility results for fairness when the agent’s preferences are non-convex.
However, while non-convex consumer preferences are not interesting from an economic standpoint, our current work finds an application for these preferences in fairness in federated learning with DNNs.
4.5 Weighted Core-Stability
In this section, we show how to generalize all of our results (Theorems 1, 2, and 3) when we want to train the joint predictor to fit the data of certain agents more than some others.
In particular, for each agent i , if we assign weight w i , indicating the desired bias of the final trained model towards agent i 5 , then with subtle modifications, we can show the existence of a weighted core stable predictor, when the utility functions of the agents satisfy the conditions in Theorem 1.
Formally,
Definition 6 (Weighted Core-Stability) .
Given the weight vector w = ⟨ w 1 , w 2 , . . .
, w n ⟩ , a predictor θ ∈ P , is weighted core-stable if and only if there exists no other predictor θ ′ ∈ P and a subset of agents S ⊆
[ n ] such that [Equation] [Figure] [Equation]
[Figure] [Equation] [Figure]
[Equation] ≥ u i ( θ ) for all i ∈ S with at least one strict inequality.
Note that, when all the agents have the same weight, e.g., w i = 1 , ∀ i ∈ [ n ] , then weighted corestability matches core-stability.
At a high-level the concept is the same, no group of agents can significantly benefit by forming a coalition within themselves.
However “significantly” means a multiplicative increase by (cid:80) j ∈ [ n ] w j (cid:80) j ∈ S w j (instead of | S | /n for the unweighted case), i.e., it is dependent on the total weight of the set S .
We make the aforementioned guarantee more intuitive by considering special cases of S .
When S = { i } , our guarantees say that agent i gets a utility of w i / ( (cid:80) j ∈ [ n ] w j ) fraction of her maximum utility, i.e., the utility of agents with higher weights are prioritized.
We call this weighted proportionality .
Also note that by setting S =
[ n ] , we get Pareto-optimality (similar to the unweighted case).
Furthermore, by changing the convex program 2 to maximizing (cid:80) j ∈ [ n ] w j log( u j ( θ )) instead of (cid:80) j ∈ [ n ] log( u j ( θ )) , we can get the weighted version of Theorem 2.
This also suggests a simple generalization of CoreFed to Weighted-CoreFed and all our extensions in Sections 4.3 and 4.4 will also generalize to the weighted setting.
Empirical Evaluation
We evaluate our fair ML method CoreFed and baseline FedAvg [21] on three datasets (Adult, MNIST and CIFAR-10) on linear model and deep neural networks.
We show that the model trained with
CoreFed is able to achieve core-stable fairness, while maintaining similar utility with the standard
FedAvg protocol, which cannot guarantee to achieve core-stable fairness.
5.1 Experiment Setup
Dataset.
We evaluate our algorithm CoreFed on Adult [2], MNIST [17] and CIFAR-10 [16] datasets.
To perform federated learning on heterogeneous data, we construct the non-IID data by sampling the proportion of each label from Dirichlet distribution for every agent, following the literature [18].
Models.
We train a logistic regression classifier on Adult data.
We use a CNN, which has two 5x convolution layers followed by 2x2 max pooling and two fully connected layer with ReLU activation for MNIST and CIFAR-10. We also evaluate with a more complex network VGG-11 on CIFAR-10.
For Adult dataset, the utitility is selected as M − ℓ log where ℓ log is the logistic loss.
For CIFARand MNIST, we use cross entropy loss ℓ ce as the training loss with utility U becomes M − ℓ ce .
M is set to be 3 . 0 , 1 . 0 and 3 . 0 for Adult, MNIST, and CIFAR-10, respectively, based on statistical analysis during training.
All experiments are conducted on a 1080 Ti GPU. [Table] [Table]
5.2 Evaluation Results
We demonstrate that our CoreFed distributed training protocol in Algorithm 1 achieves the core-stable fairness through comparison with FedAvg on different datasets and settings.
Concretely, we perform training with FedAvg and our proposed CoreFed [Table] and then validate whether the utility inequality (cid:80)
[Table]
) < n (see Implications after Theorem 2) holds under different settings.
Here we treat the [Table] model trained by FedAvg parameterized by θ ′ , while the model trained by our CoreFed parameterized by θ ∗ .
That is to say, since the model trained by CoreFed achieves core-stable fairness, we expect the model parameterized by θ would have pareto-optimality.
Indeed, results in Section 5.1 suggest that CoreFed achieves core-stable fairness compared with FedAvg while maintaining similar utility.
We also report the average and multiplicative utility of the trained global model in “U(Average)" and “U(Multi)" columns.
We can see that CoreFed achieves higher overall utilities, especially for the multiplicative case since FedAvg favors the average case in general.
We validate the conclusion on more complex DNN VGG-11 on CIFAR-10 in Table 2.
In addition, we explicitly consider agents with low quality data by adding Gaussian noises to some agents as shown in Table 3, demonstrating the optimality of CoreFed.
We also perform the evaluation with more agents as shown in Table 4.
[Table]
Conclusion
In this work, we introduce a new notion of fairness in federated learning, inspired from a fundamental concept in social choice theory. We show that the new fairness notion is more resilient to noisy data from certain clients, in comparison to FedAvg or egalitarian fair federated learning methods.
We believe this work would open up new research directions on connecting game theoretic analysis and statistical machine learning under different learning paradigms, objective, and utilities. Acknowledgements This work is partially supported by the NSF grant No.1910100, NSF CNS No.2046726, C3 AI, and the Alfred P. Sloan Foundation.
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] We clearly specify the assumptions and application scopes, if exists, of all our results.
(c) Did you discuss any potential negative societal impacts of your work?
[Yes] We discuss broader impacts in Appendix A. (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] We include complete proofs for all results in the appendix.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We include them in Section 5.
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] Indeed, we rigorously compute the confidence intervals due to the finite sampling (see Section 5.2), and guarantee that all fairness certificates reported in the paper holds with probability ≥ 90% .
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] We provide them in Section 5. 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] (b) Did you mention the license of the assets?
[Yes] (c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[No] We only use public data.
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[No] We only use public data.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N
A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
A Broader Impact
This paper aims to provide a fair federated learning algorithm to guarantee that the utilities of the trained agents are core-stable fair.
We do not expect the work to have any ethics issues or negative social impact if it is correctly used.
On the other hand, if our evaluation and theory is misused, there could be potential negative social impact.
For instance, our fairness metrics cannot indicate other accuracy or loss utilities and people need to evaluate federated learning algorithms with different utility metrics, rather than only using our metrics.
We expect that our work will provide a way to measure and achieve fairness for different federated learning paradigms.
B Missing proofs from Section 4. B.1 Proof of Lemma 4.
Proof.
We prove by contradiction.
Assume that there exists a θ ′ ∈ P , and a S ⊆
[ n ] , such that ( | S | /n ) · u i ( θ ′ ) ≥ u i ( θ ) for all i ∈ S with at least one strict inequality.
Then, we have u i ( θ ′ )
u i ( θ ) ≥ n/ | S | for all i ∈ S with at least one strict inequality, implying (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ) ≥ (cid:80) i ∈
S u i ( θ ′ )
u i ( θ ) > n .
However, since θ ∈ ϕ ( θ ) , we have (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ) ≤ (cid:80) i ∈ [ n ] u i ( θ ) u i ( θ ) = n , which is a contradiction.
B.2 Proof of Lemma 4.
Proof.
We need to show that for every sequence ( θ ) i converging to θ , and ( γ ) i converging to γ ,
such that γ i ∈ ϕ
( θ i ) for all i , we have γ ∈ ϕ ( θ ) .
We prove this by contradiction.
Let us assume otherwise,
γ / ∈ ϕ
( θ ) .
Let γ ′ ∈
ϕ
( θ ) and let δ = (cid:80) i ∈
[ n ] u i ( γ ′ )
/u i ( θ ) (cid:80) i ∈ [ n ] u i ( γ ) /u
i ( θ ) > 1 .
We now make a technical claim about the utility functions of the agents.
Claim B.1.
For all i ∈ [ n ] , and x, y such that || x − y || 2 ≤ β , we have
| u
i ( x ) − u
{+i ( y ) | ≤ h ( β ) where h : R ≥ 
+}
→ R ≥ 0 is continuous increasing function with h (0) = 0 , and 2.
for each i ∈ [ n ] , we have u
i
( y ) · h ′ ( β ) − 1 ≤ u i ( x ) ≤ u i ( y ) · h ′ ( β ) , where h ′ ( β ) =
(1+ h ( β ) Mε ) and M = min i ∈ [ n ] M i .
Proof.
Claim (1) follows immediately from the continuity of the utility functions.
For claim (2), we have
[Equation]
In a similar way, we can prove that u i ( y ) ≤ u i ( x ) · h ′ ( β ) , which would then imply that u i ( x ) ≥ u i ( y ) · ( h ′ ( β )) − 1 .
{+We choose a δ ′ such that h ′ ( δ ′ ) 
+}
= (1 + h ( δ ′ )
{+Mε ) 
+}
≪ δ .
Such a δ ′ exists as h () is a continuous increasing function with h (0)
= 0 , and δ > 1 .
Since the sequences ( θ ) i and ( γ ) i converges to θ and γ respectively, there exists a n ′ ∈ N such that for all ℓ ≥ n ′ , we have || γ ℓ − γ || 2 < δ ′ and
|| θ ℓ − θ || 2 < δ ′ .
Now observe that (cid:88)
[Equation]
∈ [ n ]
[Equation]
definition of δ
[Equation]
This shows that γ ℓ / ∈ ϕ ( θ ℓ ) , which is a contradiction.
C Missing Proofs from Section 4. C.1 Proof of Theorem
Proof.
We first show that for any other predictor θ ′ ∈ P , we have (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ∗ ) ≤ n . Consider any other predictor θ ′ ∈ P .
Since P is convex, we have ( ∇ θ L ( θ ∗ ))
T ( θ ′ − θ ∗ ) < 0 .
Now, observe that (cid:88) i ∈
[Equation]
n ]
[Equation]
u
[Equation]
(from concavity of u i () ) =
[Equation]
i
[Equation]
n
[Equation]
j ∈ [ d ] (cid:16) ∂u i ( θ ∗ )
∂θ j · ( θ ′ j − θ ∗ j ) · u i ( θ ∗ ) (cid:17)
= (cid:88) i ∈ [ n ] u i ( θ ∗ ) · (cid:88)
j ∈ [ d ] (cid:16) ∂u i ( θ ∗ )
∂θ j · ( θ ′ j − θ ∗ j ) (cid:17) =
(cid:88)
j ∈ [ d ] ( θ ′ j − θ ∗ j ) · (cid:88) i ∈ [ n ] (cid:16) u
i ( θ ∗ ) · ∂u i ( θ ∗ )
∂θ j (cid:17)
=
( ∇ θ L ( θ ∗ ))
T ( θ ′ − θ ∗ ) < 0 .
Now if θ ∗ is not core-stable, then there exists an S ⊆
[ n ] and θ ′ ∈ P , such that u i ( θ ′ ) ≥ n/ | S | u
i ( θ ∗ ) for all i ∈ S with at least one strict inequality, then we have (cid:80) i ∈ [ n ] u i ( θ ) u i ( θ ′ ) ≥ (cid:80)
i ∈
S u i ( θ ) u
i ( θ ′ ) > n/ | S | · | S | = n , which is a contradiction.
D Algorithm CoreFed
Here we present the full description of CoreFed in Algorithm 1.
E Missing Proofs from Section 4. E.1 Proof of Theorem
Proof.
For any θ ′ such that ||
θ − θ ′
|| 2 ≤ d , according to the definition of β -smooth, we have u
[Equation]
[Equation]
[Equation]
Then we observe that (cid:88) i ∈ [ n ] u i ( θ ′ )
u i ( θ ) − kn =
(cid:88) i ∈ [ n ] u i ( θ ′ )
− u i ( θ ) u
i ( θ ) − ( k − 1) n ≤ (cid:88) i ∈ [ n ] ∇ θ u
i ( θ ) T ( θ ′ − θ ) + β 2 || θ ′ − θ ||u i ( θ ) − ( k − 1) n =( ∇L ( θ ))
T ( θ ′ − θ )
+ (cid:88) i ∈
[ n ] β 2 u i ( θ )
|| θ ′ − θ || 22 − ( k − 1) n ≤ ϵ || θ ′ − θ ||
2 + (cid:88) i ∈
[ n ] β 2 u i ( θ )
|| θ ′ − θ ||
[Equation]
By plugging in the RHS of Equation (4), we observe that when || θ ′ − θ || 2 < d , (cid:80) i ∈ [ n ] u i ( θ ′ )
u i ( θ ) − kn < 0 .
On the other hand, suppose for any S ⊆ [ n ] , if for all i ∈ S we have | S | kn u i ( θ ′ )
≥ u i ( θ ) , then (cid:88) i ∈ [ n ]
[Equation]
which contradicts the above result and concludes the proof.