GAIN: E NHANCING B YZANTINE R OBUSTNESS IN F EDERATED L EARNING WITH G RADIENT D ECOMPOSITION
Anonymous authors
Paper under double-blind review
A BSTRACT
Federated learning provides a privacy-aware learning framework by enabling participants to jointly train models without exposing their private data.
However, federated learning has exhibited vulnerabilities to Byzantine attacks, where the adversary aims to destroy the convergence and performance of the global model.
Meanwhile, we observe that most existing robust AGgregation Rules (AGRs) fail to stop the aggregated gradient deviating from the optimal gradient (the average of honest gradients) in the non-IID setting.
We attribute the reason of the failure of these AGRs to two newly proposed concepts: identification failure and integrity failure.
The identification failure mainly comes from the exacerbated curse of dimensionality in the non-IID setting.
The integrity failure is a combined result of conservative filtering strategy and gradient heterogeneity.
In order to address both failures, we propose GAIN, a gradient decomposition scheme that can help adapt existing robust algorithms to heterogeneous datasets.
We theoretically show that integrating exisiting robust AGRs into our GAIN can mitigate the deviation of aggregated gradient, thus improve the performance.
Experiments on various real-world datasets verify the efficacy of our proposed GAIN.
I NTRODUCTION
Federated Learning (FL) (McMahan et al., 2017) is a privacy-aware distributed machine learning paradigm.
It has recently attracted widespread attention as a result of emerging data silos and growing privacy awareness.
In this paradigm, data owners (clients) repeatedly use their private data to compute local gradients and send them to a central server for aggregation.
In this way, clients can collaborate to train a model without exposing their private data.
However, the distributed property of FL also makes it vulnerable to Byzantine attacks (Blanchard et al., 2017; Guerraoui et al., 2018).
During the training phase, Byzantine clients can send arbitrary messages to the central server to bias the global model.
Moreover, it is challenging for the central server to identify the Byzantine clients, since the server can neither access clients’ training data nor monitor local training processes.
In order to defend against Byzantine attacks, the community has proposed a wealth of defenses (Blanchard et al., 2017; Guerraoui et al., 2018;
Yin et al., 2018).
Most defenses abandon the averaging step adopted by conventional FL frameworks, e.g., FedAvg (McMahan et al., 2017).
Instead, they use robust AGgregation Rules (AGRs) to aggregate local gradients in order to defend against
Byzantine attacks.
Most existing robust AGRs assume that the data distribution on different clients is identically and independently distributed (IID) (Bernstein et al., 2018; Ghosh et al., 2019).
However, the data is usually non-independent and identically distributed (non-IID) in real-world FL applications (McMahan et al., 2017; Karimireddy et al., 2020; Kairouz et al., 2021).
As a result, in more realistic non-IID settings, most robust AGRs fail to defend against Byzantine attacks, and thus suffer from significant performance degradation (Karimireddy et al., 2022; Acharya et al., 2022).
To investigate the cause of the degradation, we perform a thorough experimental study on various robust AGRs.
Close inspection reveals that the reason behind the degradation is different for different
AGRs with different types of aggregation strategies.
For conservative AGRs that only aggregate few gradients to get rid of Byzantines, they suffer from integrity failure.
The integrity failure describes that an AGR can only identify few honest gradients for aggregation.
This failure will lead to an ag- gregated gradient with limited utility due to the gradient heterogeneity (Li et al., 2020; Karimireddy et al., 2020) in the non-IID setting.
For radical AGRs that aggregate as many gradients as possible to avoid such deviation, they suffer from another identification failure.
The identification failure means that an AGR fails to distinguish between honest and Byzantine gradients.
This failure is mainly due to the curse of dimensionality (Guerraoui et al., 2018; Diakonikolas et al., 2017) aggravated by the non-IIDness.
Both failures deviate the aggregated gradient from the optimal gradient (the average of honest gradients).
As a result, most existing AGRs fail to achieve a satisfactory performance in the non-IID setting.
Motivated by the above observations, we propose a GrAdient decomposItioN method called GAIN that can handle both failures in various non-IID settings.
In particular, to address the identification failure due to the curse of dimensionality, GAIN decomposes each high-dimensional gradient into low-dimensional groups for gradient identification.
Then, GAIN incorporates gradients with low identification scores into final aggregation to tackle the integrity failure.
Our contributions in this work are summarized below.
• We reveal the root reasons for the performance degradation of current robust AGRs in the non-IID setting by proposing two new concepts: integrity failure and identification failure.
Integrity failure origins from the gradient heterogeneity, and identification failure is a result of the aggravated curse of dimensionality in the non-IID setting.
• We propose a novel and compatible approach called GAIN, which applies robust AGRs on the decomposed gradients, followed by identification before aggregation, rather than directly operating on the original gradients as the existing defenses (Multi-Krum (Blanchard et al., 2017),
Bulyan (Guerraoui et al., 2018), etc) do.
• We provide theoretical analysis to show that integrating existing robust AGRs into GAIN can help alleviate the deviation of aggregated gradient form the optimal gradient.
• We also offer empirical experiments on three real-world datasets across various settings to validate the effectiveness and superiority of our GAIN.
R ELATED W ORKS
Byzantine robust learning is first introduced by Blanchard et al.
Subsequently, a range of works study the robustness against Byzantine attacks by proposing various robust AGgregation
Rules (AGRs) under the IID setting.
Generally, we can classify the current robust AGRs into two categories: conservative AGRs and radical AGRs.
Typical conservative AGRs, including Bulyan (Guerraoui et al., 2018), Median (Yin et al., 2018),
Trimmed Mean (Yin et al., 2018), etc., only aggregate few gradients to reduce the risk of the introduced Byzantine gradients.
Bulyan (Guerraoui et al., 2018) applies a variant of trimmed mean as a post-processing method to handle the curse of dimensionality.
Yin et al.
(2018) theoretically analyze the statistical optimality of Median and Trimmed Mean.
The radical AGRs, e.g., Multi-Krum (Blanchard et al., 2017), DnC (Shejwalkar & Houmansadr, 2021), incorporate as many gradients as possible to avoid such deviation.
Multi-Krum is a distance-based AGR proposed by Blanchard et al.
(Pillutla et al., 2019) discuss the Byzantine robustness of Geometric Median and propose a computationally efficient approximation.
Shejwalkar & Houmansadr (2021) propose to perform dimensionality reduction using random sampling, followed by spectral-based outlier removal.
Recently, a quantity of works (Allen-Zhu et al., 2020; Karimireddy et al., 2021; Farhadkhani et al., 2022) discuss the effect of distributed momentum to Byzantine robustness from different perspectives.
However, in more realistic FL applications where the data is non-IID, the efficacy of these defenses are quite limited.
They fail to obtain high-quality aggregated gradient in the non-IID setting, thus suffer from significant performance degradation.
Recently works have also explored defenses that can be applicable to the non-IID setting.
Park et al.
(2021) can only achieve Byzantine robustness when the server has a validation set, which compromises the privacy principle of the FL (McMahan et al., 2017).
Data & Diggavi (2021) adapt a robust mean estimation algorithm to FL to combat Byzantines in the non-IID setting.
However, it requires Ω( d 2 ) time ( d is the number of model parameters), which is unacceptable due to the high dimensionality of model parameters.
El-Mhamdi et al.
(2021) consider Byzantine robustness in the asyn- chronous communication and unconstrained topologies settings.
Acharya et al.
(2022) propose to apply geometric median only to the sparsified gradients to save computation cost.
Karimireddy et al.
(2022) perform a bucketing process before aggregation to reduce the gradient heterogeneity.
These methods guarantee convergence of SGD in the existence of Byzantines.
However, convergence is not enough in the context of non-convex, high dimensional case of neural networks (Guerraoui et al., 2018).
These methods lack of the guarantee that the aggregated gradient does not deviate from the optimal gradient (the average of honest gradients).
As a result, they may lead to convergence towards ineffectual models.
N OTATIONS AND P RELIMINARIES
Notations.
For any positive integer n ∈ N + , we denote the set { 1 , . . . , n } by [ n ] .
The cardinality of a set S is denoted by # S or |S| .
For a real number x ∈ R , we use | x | to denote the absolute value of number x .
We denote the ℓ 2 norm of vector x by ∥ x ∥ .
We use [ x ] j to represent the j -th component of vector x .
The sub-vector of vector x indexed by index set J is denoted by [ x ] J = ([ x ] j 1 , . . .
, [ x ] j k ) , where J = { j 1 , . . . , j k } , and k = |J | is the number of indices.
For a random variable X , we use E [ X ] and Var[ X ] to denote the expectation and variance of X , respectively.
Federated learning.
We consider the federated learning system with a center server and n clients following Blanchard et al.
; Yin et al.
; Guerraoui et al.
Then the objective is to minimize loss L ( w ) defined as follows.
[Equation]
where w is the model parameter, L i is the loss function on the i -th client, ξ i is the data distribution on the i -th client, and L ( w ; ξ ) is the loss function.
In the t -th communication round, the server distributes the parameter w t to the clients.
Each client i conducts several epochs of local training on local data to obtain the updated local parameter w ti .
Then, client i computes the local gradient g ti as follows and sends it to the server.
[Equation]
Finally, the server collects the local gradients and uses the average gradient to update the global model.
[Equation]
This process is repeated until the global model converges or the number of communication rounds reaches the set value T .
Byzantine threat model.
In real-world applications, not all clients in FL systems are honest.
In other words, there may exist Byzantine clients in FL systems (Blanchard et al., 2017).
Suppose that an adversary controls f Byzantines clients among the total n clients.
Let B ∈
[ n ] denote set of
Byzantine clients and H =
[ n ] \ B denote the set of honest clients.
In the presence of Byzantine clients, the uploaded message of client i in the t -th communication round is
[Equation]
where ∗ represents arbitrary value.
Robust AGRs.
Most solutions replace the averaging step by a robust alternative to defend against
Byzantine attacks.
More specifically, the server aggregates the gradients and updates the global model as follows.
[Equation]
where ˆ g t is the aggregated gradient, and A is a robust AGR, e.g., Multi-Krum (Blanchard et al., 2017), Bulyan (Guerraoui et al., 2018).
For notation simplicity, we omit the superscript t of the gradient symbols when there is no ambiguity in the rest
F AILURES OF EXISTING R OBUST AGR S IN THE N ON -IID S ETTING
Most robust AGRs focus on Byzantine robustness in the IID setting (Blanchard et al., 2017; Guerraoui et al., 2018).
When the data is non-IID, the performance of these robust AGRs drop drastically (Shejwalkar & Houmansadr, 2021; Karimireddy et al., 2022).
In order to understand the root cause of this performance drop, we perform an experimental study on various robust AGRs.
Particularly, we examine the behaviors of robust AGRs under the attack of 20% Byzantines in both IID and nonIID settings on CIFAR-10 (Krizhevsky et al., 2009) in Figure 1.
More detailed setups are covered in
Appendix A. A close inspection reveals that AGRs of different types demonstrate different failures in the non-IID setting.
As mentioned earlier in Sec. 2, most robust AGRs fall under the umbrella of either conservative AGRs or radical AGRs.
Next, we choose two representative AGRs (Bulyan and
Multi-Krum) from both types, and summarize how they fail in the non-IID setting.
[Figure] [Figure]
[Figure] [Figure]
Integrity failure of a conservative AGR.
We take a closer look at a representative conservative
AGR – Bulyan (Guerraoui et al., 2018).
Specifically, we consider an indicator called honest ratio – the ratio of selected honest client number to all selected client number (# selected honest clients / # selected clients) of a robust AGR in each communication round.
A higher honest ratio suggests a higher proportion of honest gradients among the gradients aggregated by AGR.
In particular, honest ratio 1 (0) suggests that all gradients that the AGR aggregates are honest (Byzantine).
In Figure 1(a), we report the honest ratio of the conservative AGR (Bulyan) in both IID and non-IID settings.
The results show that in both settings, all the gradients aggregated by the conservative AGR are honest, which demonstrates the strong Byzantine filtering ability of a conservative AGR.
Unfortunately, we find that Byzantine filtering is not enough in the non-IID setting.
The results in Figure 1(b) illustrate that the accuracy is significantly lower in the non-IID setting.
This performance degradation implies a sharp deviation of the aggregated gradient from the optimal gradient (the average of honest gradients) in the non-IID setting.
Honest gradients are heterogeneous when the data is non-IID
(Li et al., 2020; Wang et al., 2021;
Karimireddy et al., 2020).
As a result, aggregating only partial honest gradients will deviate the aggregated gradient from the optimal gradient, and eventually lead to ineffectual models.
Therefore, in addition to Byzantine filtering, it is also crucial to incorporate sufficient honest gradients into aggregation in the non-IID setting .
Identification failure of a radical AGR.
We closely examine a typical radical AGR – Multi-Krum (Blanchard et al., 2017).
In Figure 1(c), we demonstrate the honest ratio of the radical AGR in both
IID and non-IID settings.
As shown in the figure, the radical AGR succeeds in identifying honest gradients for aggregation in the IID setting but fails in the non-IID setting.
The critical reason behind is that while the curse of dimensionality (Guerraoui et al., 2018) can be provably addressed in the IID setting, it will be aggravated and intractable in the non-IID setting.
When the data is nonIID, Byzantines can easily exploit the curse of dimensionality to compromise radical AGRs, thus degrade the utility of global model as shown in Figure 1(d).
Therefore, it is critical to overcome the aggravated curse of dimensionality in the non-IID setting .
As analyzed above, most robust AGRs suffer from identification failure and integrity failure due to gradient heterogeneity and the aggravated curse of dimensionality in the non-IID setting.
As a result, they fail to stop the aggregated gradient deviating from the optimal gradient, which leads to unsatisfactory performance in the non-IID setting.
P ROPOSED M ETHOD
Our observations in Sec. 4 clearly motivate the need for a more robust defense to defeat Byzantine attacks in the non-IID setting.
Inspired by these observations, we propose a novel GrAdient decomposItioN method called GAIN, which consists of three stages as follows.
Decomposition.
First, GAIN decomposes the gradients for gradient identification.
The decomposition is specified by a partition of set [ d ] , where d is the dimension of gradients.
Let {J 1 , . . .
J p } denote the partition, where p is the number of groups.
Particularly, the partition satisfies:
[Equation]
where ∅ represents the empty set, (cid:83) respresents the union of sets, and (cid:84) respresents the intersection of sets.
Each gradient g i is correspondingly decomposed into p sub-vectors as follows.
[Equation]
where g ( q ) i is the q -th sub-vector of gradient g i .
Identification.
Then, GAIN applies any robust AGR A to each group of sub-vectors corresponding to J q :
[Equation]
where ˆ g ( q ) is the aggregation result of group q .
By performing aggregation on groups of lowdimensional sub-vectors, GAIN can circumvent the curse of dimensionality, thus avoid the identification failure discussed in Sec. 4.
In other words, ˆ g ( q ) can get rid of Byzantines.
Note that ˆ g ( q ) may still suffer from deviation due to the integrity failure of the AGR A as illustrated in Sec. 4.
Therefore, it is inappropriate to directly use the aggregation results { ˆ g ( q ) ,
q ∈
[ p ] } as the final output.
Instead, we use ˆ g ( q ) as an honest reference to compute identification scores for each client as follows.
[Equation]
Since the group-wise aggregation result ˆ g ( q ) can get rid of Byzantines, the identification score s ( q ) i can provably characterize the potential for the g ( q ) i being a sub-vector of an honest gradient.
Then,
GAIN collects the identification scores from all groups and computes the final aggregation result.
In particular, the final identification score s i of each client is composed of its identification scores received from all groups as follows.
[Equation]
Aggregation. To avoid integrity failure, GAIN selects total n − f gradients with the lowest identification scores for aggregation.
Let I denote the index set of selected gradients, then the average of selected gradients is output as the final aggregation result as follows:
[Equation]
Note that in the first stage (Decomposition) of GAIN, A could be any c -resilient AGR (Definition 1).
The key difference lies in that all the existing robust AGRs (Multi-Krum, Bulyan, etc) directly operate on the original gradients before aggregation; instead we propose to apply robust AGRs on the decomposed gradient, followed by identification before aggregation.
In this way, we can help enhance the identification ability and integrity of the current robust AGRs that satisfy the c -resilient property (Definition 1) in the non-IID setting.
Detailed theoretical analysis and empirical support can be referred to Sec. 6 and Sec. 7 respectively.
T HEORETICAL A NALYSIS
In Sec. 4, we discuss two root causes of the performance degradation of robust AGRs in the non-IID setting.
One is the integrity failure of conservative AGRs owing to the gradient heterogeneity in the non-IID setting.
The other is the identification failure of radical AGRs due to the aggravated curse of dimensionality in the non-IID setting.
Both failures result in an unacceptable deviation of aggregated gradients from the optimal gradient (the average of honest gradients).
In order to handle both failures and mitigate the deviation, we propose GAIN in Sec. 5.
In this section, we theoretically show that our GAIN can mitigate the deviation in the non-IID setting.
We analyze a popular FL model widely considered by Karimireddy et al.
; Acharya et al.
In particular, each local gradient is computed by SGD as follows.
[Equation]
where ξ ti represents a minibatch uniformly sampled from the local data distribution ξ i in the t -th communication round, and ∇L ( w t , ξ ti ) represents the gradient of loss over the minibatch ξ ti .
We make the following assumptions, which are standard in FL (Karimireddy et al., 2021; 2022;
Acharya et al., 2022).
Assumption 1 (Unbiased Estimator) .
The stochastic gradients sampled from any local data distribution are unbiased estimators of local gradients over R d for all clients, i.e.,
[Equation]
Assumption 2 (Bounded Variance) .
The variance of stochastic gradients sampled from any local data distribution is uniformly bounded over R d for all clients, i.e., there exists σ ≥ 0 such that
[Equation]
Assumption 3 (Gradient Dissimilarity) .
The difference between the local gradients and the global gradient is uniformly bounded over R d for all clients, i.e., there exists κ ≥ 0 such that
[Equation]
Assumption 1 establishes the unbiased property of stochastic gradient.
Assumption 2 bounds the variance of the stochastic gradients within a client.
And Assumption 3 is a common measure of the non-IID level in federated learning (Data & Diggavi, 2021; Karimireddy et al., 2020; 2022).
We further establish the Byzantine resilience of the base AGR A .
Definition 1 ( c -resilient AGR) .
Let A be an AGR.
If for any input { x 1 , . . .
, x n } such that there exists a set H ∈ [ n ] of size at least |H| > n/ 2 that satisfies:
[Equation]
the output of A satisfies:
[Equation]
then the AGR A is called c -resilient.
In fact, most popular AGRs (Blanchard et al., 2017; Guerraoui et al., 2018; Karimireddy et al., 2021; 2022) are shown to satisfy this c -resilient definition.
We show that given any c -resilient base AGR A , our GAIN can mitigate the deviation of the aggregated gradient from the optimal gradient ¯ g =
∇L ( w ) .
Proposition 1 (Estimation error) .
Suppose Assumptions 1 to 3 hold.
Given a c -resilient robust AGR
A , for any ε > 0 , with probability at least 1 − ε/p , where p is the number of sub-vectors in GAIN, the aggregated gradient ˆ g of GAIN is an unbiased estimator of the optimal gradient ¯ g =
∇L ( w ) with bounded variance.
[Equation]
when E ∥ g b − ¯ g ∥
=
Ω( κ · (1 + c + (cid:112) n/ε (1 + √ c ))
+ σ · (1 + c + 1 / √ n − f + (cid:112) n/ε (1 + √ c + 1 / √ n − f )) .
Please refer to Appendix B for the proof.
Proposition 1 implies that when the Byzantine gradients deviate from the optimal gradient, our GAIN results in an unbiased gradient estimator with high probability.
Furthermore, GAIN suggests that a larger p can provide a better probability bound, thus guaranteeing a better aggregated gradient.
E XPERIMENTS 7. E XPERIMENTAL S ETUPS
Datasets.
Our experiments are conducted on three real-world datasets: CIFAR-10 (Krizhevsky et al., 2009), CIFAR-100 (Krizhevsky et al., 2009), a subset of ImageNet (Russakovsky et al., 2015) refered as ImageNet-12 and FEMNIST (Caldas et al., 2018).
CIFAR-10 dataset consists of 60, 32 × 32 color images in 10 classes, with 6,000 images per class.
There are 50,000 training images and 10,000 test images in CIFAR-10 dataset.
CIFAR-100 dataset consists of 60,000 32 × 32 color images in 100 classes, with 600 images per class.
There are 50,000 training images and 10, test images in CIFAR-100 dataset.
ImageNet-12 consists of 15,600 color images in 12 classes, with 1,300 images per class.
There are 12,480 training images and 3,120 test images in this subset of ImageNet.
FEMNIST consists of 817,851 28 × 28 gray-scale images in 62 classes.
There are 772,066 training images and 857,85 test images in FEMNIST.
Data distribution.
For CIFAR-10, CIFAR-100 (Krizhevsky et al., 2009) and ImageNet-12, we use Dirichlet distribution to generate non-IID data by following Yurochkin et al.
; Li et al.
In particular, for each client i , we sample p yi ∼ Dir ( β ) and allocate a p yi proportion of the data of label y to client i , where Dir ( β ) represents the Dirichlet distribution with a concentration parameter β .
We follow Li et al.
and set the number of clients n = 50 and the concentration parameter β = 0 .
5 as default.
For FEMNIST, the data is naturally partitioned into 3,597 clients based on the writer of the digit/character.
For each client, we randomly sample a 0.9 portion of data as the training data and let the remaining 0.1 portion of data be the test data following Caldas et al.
Intuitively, the data distribution across different clients is non-IID.
Evaluated attacks.
We consider six representative attacks BitFlip (Allen-Zhu et al., 2020), LabelFlip (Allen-Zhu et al., 2020), LIE (Baruch et al., 2019), Min-Max (Shejwalkar & Houmansadr, 2021), Min-Sum (Shejwalkar & Houmansadr, 2021) and IPM (Xie et al., 2020).
The detailed hyperparameter setting of the attacks are shown in Table 5 in Appendix C.
Baselines.
We consider 6 robust AGRs: (Blanchard et al., 2017),
Bulyan (Guerraoui et al., 2018),
Median (Yin et al., 2018), RFA (Pillutla et al., 2019), DnC (Shejwalkar & Houmansadr, 2021),
RBTM (El-Mhamdi et al., 2021).
Among the above six defenses, Bulyan, Median, and RBTM are conservative, and Multi-Krum, RFA, and DnC are radical.
We compare each AGR with its variant with GAIN.
The detailed hyperparameter settings of the robust AGRs are listed in Table 6 in Appendix C.
Evaluation.
We use top-1 accuracy, i.e., the proportion of correctly predicted testing samples to total testing samples, to evaluate the performance of global models.
We run each experiment fortimes and report the mean and standard deviation of the highest accuracy during the training process.
Other settings.
We utilize AlexNet (Krizhevsky et al., 2017), SqueezeNet (Iandola et al., 2016), ResNet-18 (He et al., 2016) and a four-layer CNN (Caldas et al., 2018) for CIFAR-10, CIFAR-100, ImageNet-12 and FEMNIST, respectively.
The number of Byzantine clients of all datasets is set to f = 0 .
2 · n .
For the partition of set { 1 , ..., d } , we randomly partition { 1 , ..., d } into p disjoint subsets with equal size.
Please refer to Table 4 in Appendix C for more details.
7. E XPERIMENT R ESULTS
Main results.
Table 1 illustrates the results of different defenses against popular attacks on CIFAR10, CIFAR-100, ImageNet-12 and FEMNIST.
From these tables, we observe that:
(1) Integrating current defenses into our GAIN generally outperform all their original versions on all datasets, which verifies the efficacy of our proposed GAIN.
For example, GAIN improves the accuracy of Median by 15.93% under Min-Sum attack on CIFAR-10.
The improvement of DnC+GAIN to DnC is relatively mild on CIFAR-10.
Our interpretation is that when the dataset is relatively small and simple, DnC is capable of obtaining a rational gradient estimation.
Nevertheless, on larger and more complex datasets, i.e., FEMNIST and ImageNet-12, DnC fails to achieve satisfactory performance under Byzantine attacks.
(3) We find that although RFA collapses on FEMNIST, integrating into our GAIN can still improve it to satisfactory performance.
Our illustration is that although the aggregated gradient of RFA deviates from the optimal gradient, it can still assist in identifying honest gradients when combined with GAIN.
As a result, GAIN-RFA is still effective on FEMNIST.
(4) Note that the improvement of GAIN on conservative methods is greater.
We contribute this phenomenon to the gradient heterogeneity due to non-IID data.
Excluding honest gradients deviates the aggregated gradients from the average of honest gradients, thus degrading the performance of conservative methods.
When the non-IID degree increases, the gradient heterogeneity increases.
As a result, the impact of excluding honest gradients may even be larger than incorporating Byzantine gradients.
Therefore, the improvement on the conservative AGRs is greater. [Table] [Figure] [Table]
Number of sub-vectors.
We study the influence of sub-vector number p on the heterogeneous
CIFAR-10 dataset.
Figure 2 shows the performance and honest ratio of a conservative AGR (Bulyan) and a radical AGR (Multi-Krum) across p = { 100 , 1000 } .
The results show that for both conservative and radical AGRs, GAIN with a larger sub-vector number p can select a higher proportion of honest clients and achieve a better performance.
When the sub-vector number p increases, our
GAIN can better handle the identification failure and the integrity failure, which corresponds to our theoretical analysis in Sec. 6.
Results on different levels of non-IID.
We discuss the impact of non-IID level of data distributions.
We modify the concentration parameter β to change the non-IID level.
A smaller β implies a higher non-IID level.
Table 2 demonstrates the accuracy of different defenses under LIE attack on
CIFAR-10 dataset across β = { 0 . 3 , 0 . 7 } .
Other setups follow the default setup of the main experiments as illustrated in Sec.
7.1 and Appendix C. As shown in Table 2, all the existing AGRs that combined with GAIN achieve better performances than their original versions, which validates that integrating into our GAIN can effectively defend against Byzantine attacks under different non-IID levels.
Moreover, when the level of non-IID is higher, the improvement on robust AGRs is more [Figure] significant.
The results further confirm that our GAIN can overcome the failures aggravated under a higher non-IID level.
[Figure]
[Table]
[Figure] [Table] [Figure] [Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
Results on different number of Byzantine clients.
We also conduct experiments across different number of Byzantine clients.
Other setups follow the default setup of the main experiments in Sec.
7.1 and Appendix C. Table 3 demonstrates the results of different defenses under LIE attack across f = { 5 , 15 } Byzantine clients on CIFAR-10 dataset.
As shown in Table 3, our GAIN outperforms the corresponding baselines across all Byzantine client numbers
[Table] [Table]
Results on different number of clients.
We further analyze the efficacy of our GAIN under different number of clients.
Detailed setups can be found in Appendix E. And the experimental results are shown in Table 7 in Appendix E. All results demonstrate that AGRs that combine with our GAIN consistently outperform all their original versions, which validates that integrating with our GAIN can effectively defend against Byzantine across different number of clients.
C ONCLUSION
In this work, we identify two root causes of performance degradation of robust AGRs in the non-IID setting.
The first cause is the integrity failure of conservative AGRs.
Conservative AGRs aggregate only few honest gradients, which is unreliable due to the gradient heterogeneity in the non-IID setting.
The second cause is the identification failure of radical AGRs.
Radical AGRs inevitably introduce Byzantine gradients into aggregation due to the curse of dimensionality aggravated by the non-IIDness.
Both failures result in a sharp deviation of the aggregated gradient.
Motivated by the above discoveries, we propose a novel GrAdient decomposItioN (GAIN) method that can be combined with most existing defenses and overcome both failures.
We theoretically show that our GAIN can overcome both failures and alleviate the deviation of aggregated gradient.
Empirical studies on three real-world datasets justify the efficacy of our proposed GAIN.
E THICS S TATEMENT
In this paper, our studies are not related to human subjects, practices to dataset releases, discrimination/bias/fairness concerns, and also do not have legal compliance or research integrity issues.
Our work is proposed to achieve Byzantine robustness when applying federated learning to real-world applications.
In this case, if federated learning is applied for good, we believe our proposed method will not cause any ethical problems or pose any negative societal impacts.
R EPRODUCIBILITY S TATEMENT
The implementation code is provided in Supplementary Materials.
All datasets and the code platform (PyTorch) we use are public.
Detail experiment setups are provided in the Appendices A and C.
A S ETUPS FOR E XPERIMENTS IN S EC .
The experiments are conducted on CIFAR-10 (Krizhevsky et al., 2009).
For both IID and non-IID settings, the number of client is set to n = 50 .
For IID data distribution, all 50,000 samples are randomly partitioned into 50 clients each containing 1,000 samples.
For nonIID data distribution, the samples are partitioned in a Dirichlet manner with concentration parameter β = 0 .
Please refer to Sec.
7.1 for the details of Dirichlet partition.
The number of Byzantine clients is set to f = 10 .
LIE (Baruch et al., 2019) attack with z = 1 .considered.
We use AlexNet (Krizhevsky et al., 2017) as the model architecture.
The number of communication rounds is set to 500.
In each communication round, all client participate in the training.
For local training, the number of local epochs is set to 1, batch size is set to 64, the optimizer is set to SGD.
For SGD optimizer, learning rate is set to 0.1, momentum is set to 0.5, weight decay coeffecient is set to 0.0001.
We also adopt gradient clipping with clipping norm 2.
Two defenses are considered: a radical AGR Multi-Krum (Blanchard et al., 2017) and a conservative
AGR Bulyan (Guerraoui et al., 2018).
B P ROOF FOR P ROPOSITION
Here we restate the assumptions and the proposition for integrity of this section.
Assumption 1 (Unbiased Estimator) .
The stochastic gradients sampled from any local data distribution are unbiased estimators of local gradients over R d for all clients, i.e.,
[Equation] [Equation]
Assumption 2 (Bounded Variance) .
The variance of stochastic gradients sampled from any local data distribution is uniformly bounded over R d for all clients, i.e., there exists σ ≥ 0 such that
[Equation]
Assumption 3 (Gradient Dissimilarity) .
The difference between the local gradients and the global gradient is uniformly bounded over R d for all clients, i.e., there exists κ ≥ 0 such that
[Equation]
Definition 1 ( c -resilient AGR) .
Let A be an AGR.
If for any input { x 1 , . . .
, x n } such that there exists a set H ∈ [ n ] of size at least |H| > n/ 2 that satisfies:
[Equation]
the output of A satisfies:
[Equation]
then the AGR A is called c -resilient.
Proposition 1 (Estimation error) .
Suppose Assumptions 1 to 3 hold.
Given a c -resilient robust AGR
A , for any ε > 0 , with probability at least 1 − ε/p , where p is the number of sub-vectors in GAIN, the aggregated gradient ˆ g of GAIN is an unbiased estimator of the optimal gradient ¯ g =
∇L ( w ) with bounded variance.
[Equation]
[Equation]
when E ∥ g b − ¯ g ∥
=
Ω( κ · (1 + c + (cid:112) n/ε (1 + √ c ))
+ σ · (1 + c + 1 / √ n − f + (cid:112) n/ε (1 + √ c + 1 / √ n − f )) .
Before starting to prove Proposition 1, we first state and prove the following lemma.
Lemma 1.
For any random vector X , we have
[Equation]
Proof.
From the definition of variance, we have
[Equation]
The second inequality comes from triangular inequality.
Equipped with Lemma 1, we start the formal proof for Proposition 1.
Proof.
For all honest clients i, j ∈ H , parameter group q ∈ [ p ]
[Equation]
we have
[Equation]
Here the first inequality comes from the Cauchy inequality, and the second inequality follows Assumptions 2 and 3.
Then according to the Definition 1, we have
[Equation]
Then for honest client h
[Equation]
the expectation of abnormal score s ( q ) h from group q can be bounded as follows.
[Equation]
Here the first inequality is a result of triangular inequality, the second inequality comes from Cauchy inequality, and the third inequality is a combined result of Equation (28) and Assumptions 2 and 3.
The variance of s ( q ) h can also be bounded as follows.
[Equation]
Here the second inequality is a result of Cauchy inequality
[Equation]
We bound E ∥ ¯ g ( q ) − g ( q ) ∥ 2 as follows.
[Equation]
Here the second equality comes from the independence of minibatches sampling across different clients, and the first inequality is a result of Assumption 2.
Applying Assumptions 2 and 3 and Equations (28) and (41) to Equation (37), we have
[Equation]
According to Equations (33) and (43), we can bound the expectation and variance of total abnormal score s h of an honest client h .
[Equation]
Here the addictive property of variance is a result of the independence of group abnormal scores { s ( q ) h | q ∈
[ p ] } , which comes from the independence of components in a gradient (Yang & Schoenholz, 2017).
From Chebyshev’s inequality, for any ∆ h > 0 and honest client h ∈ [ n ] \ B , we have
[Equation]
Consider the expectation of abnormal score s ( q ) b from group q for Byzantine client b ∈ B
[Equation]
where δ b = E ∥ g ( q ) b − ¯ g ( q ) ∥ is the expected deviation of Byzantine client b from the average of honest gradients.
Here the first and second inequalities come from triangular inequality, the third inequality is based on Cauchy inequality, and the 4-th inequality is a combined result of Equations (28) and (41).
The variance of abnormal score s ( q ) b can be bounded as follows.
[Equation]
The first inequality results from Lemma 1, and the second inequality comes from Cauchy inequality.
We bound ∥
ˆ g ( q ) − E ˆ g ( q ) )
∥ as follows.
[Equation]
Apply Equation (62) to Equation (57), we have
[Equation]
where σ 2 b = E ∥
g ( q ) b − E g ( q ) b
∥ 2 is the variance.
Similar to Equations (44) and (45), we utilize Equations (52) and (63) to bound the expectation and variance of total abnormal score s b of a byzantine client b .
[Equation]
[Equation]
where δ b = E ∥
g b − ¯ g ∥
According to Shejwalkar & Houmansadr (2021), σ 2 b is bounded, i.e., σ 2 b ≤ const.
Similarly, we apply Chebyshev’s inequality to the abnormal score of a Byzantine client b ∈ B .
[Equation]
Combine Equations (44) to (46), and take ∆ h =
( C − A ) /
(1 + (cid:112) D/B ) , we have
[Equation] [Equation]
[Equation] [Equation]
[Equation] [Equation]
Combine Equations (64) to (66), and take ∆ b = ( C − A ) / (1 + (cid:112) B/D ) , we have
[Equation]
Then consider the probability all the Byzantines are filtered
[Equation]
Solve 1 − n · ( √ B + √ D ) 2 / ( C − A ) 2 ≥ 1 − ε/p , we have
[Equation]
[Equation]
84) that is,
[Equation]
C E XPERIMENT S ETUP C. S ETUP FOR M AIN E XPERIMENTS IN S ECTION
The setups for datasets FEMNIST (Caldas et al., 2018), CIFAR-10 (Krizhevsky et al., 2009), CIFR100 (Krizhevsky et al., 2009) and ImageNet-12 (Russakovsky et al., 2015) are listed in below Table 4.
[Table]
Three types of attacks based on the adversary’s knowledge are considered:
• Agnostic attack: the adversary knows neither honest gradients nor the AGR.
• Partial knowledge attack: the adversary only has the knowledge of honest gradients.
• Omniscient attack: the adversary knows both honest gradients and the AGR. Among the six attacks considered: BitFlip (Allen-Zhu et al., 2020), LabelFlip (Allen-Zhu et al., 2020) are agnostic attacks; LIE (Baruch et al., 2019), Min-Max (Shejwalkar & Houmansadr, 2021),
Min-Sum (Shejwalkar & Houmansadr, 2021) are partial knowledge attacks; and IPM (Xie et al., 2020) is an omniscient attack. The hyperparameters of six attacks: BitFlip (Allen-Zhu et al., 2020), LabelFlip (Allen-Zhu et al., 2020), LIE (Baruch et al., 2019), Min-Max (Shejwalkar & Houmansadr, 2021), Min-Sum (Shejwalkar & Houmansadr, 2021), IPM (Xie et al., 2020), are listed in below Table 5.
[Table]
The hyperparameters of six defenses: Multi-Krum (Blanchard et al., 2017), Bulyan (Guerraoui et al., 2018), Median (Yin et al., 2018), RFA (Pillutla et al., 2019), DnC (Shejwalkar & Houmansadr, 2021), RBTM (El-Mhamdi et al., 2021), are listed in below Table 5.
C. S ETUP FOR E XPERIMENTS ON THE N UMBER OF S UB - VECTORS IN S ECTION
The number of client is set to n = 50 .
The samples are partitioned in a Dirichlet manner with concentration parameter β = 0 .
Please refer to Sec.
7.1 for the details of Dirichlet partition.
The number of Byzantine clients is set to f = 10 .
LIE (Baruch et al., 2019) attack with z = 1 .considered.
We use AlexNet (Krizhevsky et al., 2017) as the model architecture.
The number of communication rounds is set to 500.
In each communication round, all client participate in the training.
[Table]
For local training, the number of local epochs is set to 1, batch size is set to 64, the optimizer is set to SGD.
For SGD optimizer, learning rate is set to 0.1, momentum is set to 0.5, weight decay coeffecient is set to 0.0001.
We also adopt gradient clipping with clipping norm 2.
Two defenses are considered: a radical AGR Multi-Krum (Blanchard et al., 2017) and a conservative
AGR Bulyan (Guerraoui et al., 2018).
D GAIN MITIGATES THE DEVIATION OF AGGREGATED GRADIENTS
In Sec. 6, we claim that our GAIN method can reduce the deviation of aggregated gradient ˆ g from the average of honest gradients g .
To verify this fact, we compare the deviation of the aggregated gradient of different defenses and their GAIN variants in Figure 3.
In particular, we use ∥ ˆ g − g ∥ , the distance between the aggregated gradient ˆ g and the average of honest gradients g to measure the deviation degree.
As shown in Figure 3, the gradient deviation degree of GAIN-enhanced defenses is much lower than their original versions as expected, which validates that our GAIN can mitigate the gradient deviation.
[Figure] E R ESULTS ON DIFFERENT NUMBER OF CLIENTS .
We also conduct experiments across different number of clients.
Table 7 demonstrates the results of different defenses under LIE attack across n = { 75 , 100 } clients on CIFAR-10 dataset.
Note that the number of Byzantine clients is set to f = 0 . 2 · n correspondingly.
Other setups follow the default setup of the main experiments in Sec. 3 and Appendix C. As evidenced by Table 7, integrating current robust AGRs into our GAIN outperforms their original versions across all client numbers.
[Table]