C OMBATING E XACERBATED H ETEROGENEITY FOR R OBUST M ODELS IN F EDERATED L EARNING
A BSTRACT
Privacy and security concerns in real-world applications have led to the development of adversarially robust federated models.
However, the straightforward combination between adversarial training and federated learning in one framework can lead to the undesired robustness deterioration.
We discover that the attribution behind this phenomenon is that the generated adversarial data could exacerbate the data heterogeneity among local clients, making the wrapped federated learning perform poorly.
To deal with this problem, we propose a novel framework called
Slack Federated Adversarial Training (SFAT), assigning the client-wise slack during aggregation to combat the intensified heterogeneity.
Theoretically, we analyze the convergence of the proposed method to properly relax the objective when combining federated learning and adversarial training.
Experimentally, we verify the rationality and effectiveness of SFAT on various benchmarked and real-world datasets with different adversarial training and federated optimization methods.
The code is publicly available at: https://github.com/ZFancy/SFAT .
I NTRODUCTION
Federated learning (McMahan et al., 2017) has gained increasing attention due to the concerns of data privacy and governance issues (Smith et al., 2017;
Li et al., 2018; Kairouz et al., 2019; Li et al., 2020; Karimireddy et al., 2020; Khodak et al., 2021)
However, training in local clients aggravates the vulnerability to adversarial attacks (Goodfellow et al., 2015; Kurakin et al., 2016;
Li et al., 2021c;
Sanyal et al., 2021), motivating the consideration of adversarial robustness for the federated system.
For this purpose, some recent studies explore to integrate the adversarial training into federated learning (Kairouz et al., 2019; Zizzo et al., 2020; Shah et al., 2021).
Federated adversarial training faces different challenges from perspectives of the distributed systems (Li et al., 2020) and the learning paradigm (Kairouz et al., 2019).
Previous works mainly target overcoming the constraints in the communication budget (Shah et al., 2021) and the hardware capacity (Hong et al., 2021).
However, one critical challenge in the algorithmic aspect is that the straightforward combination of two paradigms suffers from the unexpected robustness deterioration, impeding the progress towards adversarially robust federated systems.
As shown in the Figure 1(a), when considering the Federated
Adversarial Training (FAT) (Zizzo et al., 2020) that directly employs adversarial training (Madry et al., 2018) in federated learning based on FedAvg (McMahan et al., 2017), one typical phenomenon is that its robust accuracy dramatically decreases at the later stage of training compared with the centralized cases (Madry et al., 2018).
To the best of our knowledge, there is still a lack of in-depth understanding and algorithmic breakthroughs to overcome it, as almost all the previous explorations (Shah et al., 2021; Hong et al., 2021) still consistently adopt the conventional framework ( i.e. , FAT).
We dive into the issue of robustness deterioration and discover that it may attribute to the intensified heterogeneity induced by adversarial training in local clients (as Figure 2 in Section 4.1).
Compared

   
 &RPPXQLFDWLRQ5RXQGV      
  $ FF X U D F\  )$71DWXUDO$71DWXUDO )$75REXVW$75REXVW (
[Figure]
Centralized AT
[Figure]
FAT     
 &RPPXQLFDWLRQ5RXQGV     
    5 REX V W $ FF X U D F\  )$76)$7%HVW$FFRI)$
[Figure]
with the centralized adversarial training (Madry et al., 2018), the training data of FAT is distributed to each client, which leads to the adversarial training in each client independent from the data in the others.
Therefore, the adversarial examples generated by the inner-maximization of adversarial training tend to be highly biased to each local distribution.
Previous study (Li et al., 2018; 2019) indicated the local training in federated learning exhibits the optimization bias under the data heterogeneity among clients.
The adversarial data generated by the biased local model even exacerbate the heterogeneity in federated optimization, making it more difficult to converge to a robust optimum.
To deal with the above challenge in the combination of adversarial training and federated learning, we propose a novel learning framework based on an α -slack mechanism, namely, Slack Federated Adversarial Training (SFAT).
In the high level, we relax the inner-maximization objective of adversarial training (Madry et al., 2018) into a lower bound by an α -slack mechanism (as Eq.
(1) in Section 4.2).
By doing so, we construct a mediating function that asymptotically approaches the original goal while alleviating the intensified heterogeneity induced by the local adversarial generation.
In detail, our SFAT assigns the client-wise slack during aggregation to upweight the clients having the small adversarial training loss (simultaneously downweight the large-loss clients), which reduces the extra exacerbated heterogeneity and alleviates the robustness deterioration (as Figure 1(b)).
Theoretically, we analyze the property of our α -slack mechanism and its benefit to achieve a better convergence (as Theorem 4.2 in Section 4.3).
Empirically, we conduct extensive experiments (as Section 5 and
Appendix E) to provide a comprehensive understanding of the proposed SFAT, and the results of
SFAT in the context of different adversarial training and federated optimization methods demonstrate its superiority to improve the model performance.
We summarize our main contributions as follows,
• We study the critical, yet thus far overlooked robustness deterioration in FAT, and discover that the reason behind this phenomenon may attribute to the intensified data heterogeneity induced by the adversarial generation in local clients (Section 4.1).
• We derive an α -slack mechanism for adversarial training to relax the inner-maximization to a lower bound, which could asymptotically approach the original goal towards adversarial robustness and alleviate the intensified heterogeneity in federated learning (Section 4.2).
• We propose a novel framework, i.e., Slack Federated Adversarial Training (SFAT), to realize the mechanism in FAT via assigning client-wise slack during aggregation, which addresses the data heterogeneity and adversarial vulnerability in a proper manner (Section 4.3).
• We conduct extensive experiments to comprehensively understand the characteristics of the proposed SFAT (Section 5.1), as well as to verify its effectiveness on improving the model performance using several representative federated optimization methods (Section 5.2).
R ELATED W ORK
In this section, we briefly introduce the related work with the following aspects.
More comprehensive discussions with previous literature and detailed comparison are presented in our Appendix A.
Federated Learning.
The representative work in federated learning is FedAvg (McMahan et al., 2017), which has been proved effective during the distributed training to maintain the data privacy.
To further address the heterogeneous issues, several optimization approaches have been proposed e.g., FedProx (Li et al., 2018), FedNova (Wang et al., 2020b) and Scaffold (Karimireddy et al., 2020).
FedProx introduced a proximal term for FedAvg to constrain the model drift cause by heterogeneity;
Scaffold utilized the control variates to reduce the gradient variance in the local updates and accelerate the convergence.
Mansour et al.
(2022) provides an extended theoretical framework to analyze the aggregation methods and utilize the reweighting to enhance the learning stability and convergence.
Note that, the intensified heterogeneity is different from the natural data heterogeneity (Li et al., 2019) that previous methods targeted, and our proposed method is orthogonal to and compatible with them.
Adversarial Training.
As one of the defensive methods (Papernot et al., 2016), adversarial training (Madry et al., 2018) is to improve the robustness of machine learning models.
The classical
AT (Madry et al., 2018) is built upon on a min-max formula to optimize the worst case, e.g., the adversarial example near the natural example (Goodfellow et al., 2015).
Zhang et al.
(2019) decomposed the prediction error for adversarial examples as the sum of the natural error and the boundary error, and proposed TRADES to balance the classification performance between the natural and adversarial examples.
Wang et al.
(2020c) further explored the influence of the misclassified examples on the robustness, and proposed MART that emphasizes the misclassified examples to boost the classic AT.
Federated Adversarial Training.
Recently, several works have made the exploration on the adversarial training in the context of federated learning.
To our best knowledge, Zizzo et al.
(2020) takes the first trial to study the feasibility of extending federated learning (McMahan et al., 2017) with the standard AT on both IID and Non-IID settings.
Considering the practical situations (Kairouz et al., 2019), the challenges of federated adversarial training are mainly from the distributed learning paradigm or the system constraints.
From the learning aspect, Zizzo et al.
(2020) found that there was a large performance gap existing between the federated and the centralized adversarial training, especially on the Non-IID data.
From the system aspect, Shah et al.
(2021) designed a dynamic schedule for local training to pursue higher robustness under the communication budget.
Hong et al.
(2021) explored how to effectively propagate the adversarial robustness when only limited clients in federated learning have the sufficient computational budget to afford AT.
Different from above works, we are to solve the robustness deterioration issue induced by the intensified heterogeneity.
P RELIMINARIES 3. A DVERSARIAL T RAINING
Let ( X , d ∞ ) denote the input feature space X with the infinity distance metric d ∞ ( x, ˜ x ) =
∥ x − ˜ x ∥ ∞ , and B ϵ [ x ] = { ˜ x ∈ X | d ∞ ( x, ˜ x ) ≤ ϵ } be the closed ball of radius ϵ > 0 centered at x in
X .
Given a dataset S
= { ( x n , y n ) } Nn =1 , where x n ∈ X and y n ∈ Y = { 0 , 1 , ..., C − 1 } , the objective function of Adversarial Training (AT) (Madry et al., 2018) is a min-max formula defined as follows, min f θ ∈F 1 N (cid:80) Nn =1 max ˜ x n ∈B ϵ [ x n ] ℓ ( f θ (˜ x n ) , y n ) , where F is the hypothesis space, ˜ x n is the most adversarial data within the ϵ -ball centered at x n , f θ ( · ) :
X → R C is a score function, ℓ : R C
×
Y
→ R is a composition of a base loss ℓ B : ∆ C − 1 × Y → R ( e.g., the Cross-Entropy loss) and an inverse link function ℓ L : R C → ∆ C − 1 ( e.g., the Softmax).
Here, ∆ C − 1 is the corresponding probability simplex that yields ℓ ( f θ ( · ) , y ) =
ℓ B ( ℓ L ( f θ ( · )) , y ) .
For the inner-maximization, the multistep projected gradient descent (PGD) (Madry et al., 2018) is usually employed to generate the adversarial samples.
Given the natural data x (0) ∈ X and a step size α > 0 , PGD works as follows, x ( t +1)
=
Π B ϵ [ x (0) ] (cid:0) x ( t ) + α sign ( ∇ x ( t ) ℓ ( f θ ( x ( t ) ) , y )) (cid:1) , where t ∈ N , x ( t ) is the adversarial data at step t , sign ( · ) is the function that extracts the sign of tensor elements, and Π B ϵ
[ x (0) ] ( · ) is the projection function that projects the adversarial data back into the ϵ -ball centered at x (0) if necessary.
3. F EDERATED L EARNING
Let D k denote a finite set of samples from the k -th client, and in each round, a set of datasets {D k } Kk =1 from K clients are involved into the training.
The objective of federated learning is to learn a machine learning model without any exchange of the training data between the clients and the
[Figure]
generation
[Figure]
w/ adv.
generation natural data adversarial data true decision boundary biased decision boundary
FAT
SFAT before aggregation
Client A w/o & w/ AT
Client B w/o & w/ AT true opt.
direction aggregated server original & exacerbated bias ℓ 𝐚𝐝𝐯 𝐁 : large ℓ 𝐚𝐝𝐯 𝐀 : small server.
The current popular strategy, namely FedAvg, is introduced by McMahan et al.
(2017), where the clients collaboratively send the locally trained model parameters θ k to the server for the global average aggregation.
Concretely, each client runs on a local copy of the global model (parameterized by θ t in the t -th round) with its local data to optimize the learning objective.
Then, the server receives their updated model parameters { θ tk } Kk =1 of all clients and performs the following aggregation, θ t +1 = 1 N (cid:80)
Kk =1 N k θ tk , where N k denotes the number of samples in D k and N = (cid:80)
Kk =1 N k .
Then, the parameters θ t +1 for the global model will be sent back to each client for another round of training.
After sufficient rounds of such a periodic aggregation, we expect the stationary point of federated learning will approximately approach to or have a small gap with that from the centralized case.
S LACK F EDERATED A DVERSARIAL T RAINING
In this section, we first discuss the motivation of the problem when directly applying adversarial training into federated learning.
Then, we propose α -slack mechanism and show some theoretical insights.
Finally, we propose our Slack Federated Adversarial Training (SFAT) to realize the α -slack mechanism and provide its corresponding convergence analysis and insights.
4. M OTIVATION
Considering federated learning, one of the primary difficulties is the biased optimization caused by the local training with heterogeneous data (Zhao et al., 2018; Li et al., 2018; 2020).
As for adversarial training, the key distinction from standard training is the use of inner-maximization to generate adversarial data, which pursues the better adversarial robustness.
When combining the two learning paradigms, we conjecture that the following issue may arise especially under the Non-IID case, the inner-maximization for pursuing adversarial robustness would exacerbate the data heterogeneity among local clients in federated learning.
Intuitively, the adversarial data inherits the optimization bias since its generation is on the basis of the biased local model.
As the adversarial strength increases, i.e., when adversarial training trying to gain more robustness via stronger adversarial generation, the heterogeneity are observed to be exacerbated (indicated by the client drift in the left of Figure 2).
In the right of Figure 2, we illustrate the aggregation procedure with two clients (i.e., Clients A and B).
With adversarial generation on local data, the optimization bias of each client is exacerbated, which may result in more severe heterogeneity and the poor convergence.
Therefore, a new mechanism is required to prevent the intensified heterogeneity that shows detrimental to convergence in FAT (refer to Figures 9 and 10).
4. α -S LACK M ECHANISM
As previous analysis, the inner-maximization of adversarial training is incompatible with federated learning due to the intensification of data heterogeneity.
To deal with that, one possible way is to build a mediating function that can alleviate the intensified heterogeneity effect and simultaneously approach the goal of the original objective asymptotically to pursue adversarial robustness.
To this intuition, we consider a slack of the inner-maximization to prevent the intensification of the optimization bias as illustrated in the right panel of Figure 2.
Formally, we decompose the innermaximization in adversarial training into the independent K populations that correspond to the K clients in federated learning, and relax it into a lower bound by α as follows 1 ,
[Equation]
where ϕ ( · ) is a function which maps the index to the original population sorted by { N k N L k } in an ascending order.
Note that, ϕ ( · ) is an auxiliary operation that is non-parametric and does not affect the gradient back-propagation.
The intuition is to relax the original objective to alleviate the heterogeneity exacerbation, like the classical continuous relaxation (e.g., Gumbel-SoftMax (Jang et al., 2017)) in the discrete optimization.
We have also discuss the reverse operation of α -slack in experiments (refer to Section 5.1 and Appendix E.3), which pursues an upper bound but it further exacerbates the heterogeneity.
The following Theorems 4.1 and 4.2 will provide more analysis about the characteristics of this slack mechanism and their complete proofs are given in Appendix B.
Theorem 4.1.
L α ( (cid:98) K ) is monotonically decreasing w.r.t.
both α and (cid:98) K , i.e., L α 1 ( (cid:98) K ) <
L α 2 ( (cid:98) K )
if α 1 > α 2 and L α ( (cid:98) K 1 ) <
L α ( (cid:98) K 2 ) if (cid:98) K 1 > (cid:98) K 2 .
Specifically, L α ( (cid:98) K ) recovers L of adversarial training when α achieves 0, and L α ( (cid:98) K ) relaxes L to a lower bound objective by increasing (cid:98) K and α .
Based on the above theorem, we can flexibly emphasize the importance of partial populations by setting the proper hyperparameters (i.e., (cid:98) K and α ), to alleviate the evenly averaging of the harsh heterogeneous updates in FAT as illustrated by the right-most panel of Figure 2.
Theorem 4.2.
Assume the loss function ℓ ( · , · ) in Eq.
(1) satisfies the Lipschitzian smoothness condition w.r.t.
the model parameter θ
and the training sample x , and is λ -strongly concave for all x , and E (cid:104) ||∇
θ L α ( (cid:98) K ) − ∇ θ ℓ ( f θ (˜ x ) , y ) || 22 (cid:105) ≤
δ 2 , where ˜ x is the adversarial example.
Then, after the sufficient T -step optimization i.e., T ≥ L ∆ δ 2 , for the α -slack mechanism of decomposed Adversarial
Training with the constant stepsize (cid:113) ∆ LTσ 2 in PGD, we have the following convergence property,
[Equation]
(cid:12) ∇L α
( (cid:98) K ) (cid:12)(cid:12)
θ t (cid:12)(cid:12)(cid:12) (cid:12) (cid:12)(cid:12)(cid:12) (cid:12)  (cid:35) ≤ (cid:32)
+ α 1 T (cid:80)
Tt =1 ξ ( t )
N (cid:33) (cid:32)
L 2 θx ϵ λ + 4 δ (cid:114)
L ∆
T (cid:33) , (2)
where
L = L θθ + L θx L xθ λ defined by the Lipschitzian constraints, ∆ ≥ L α ( (cid:98) K ) | θ 0 − inf θ L α ( (cid:98) K ) and ξ ( t ) =
(cid:80) (cid:98)
Kk =1 N ( t ) ϕ
( k ) − (cid:80) K (cid:98)
K +1 N ( t ) ϕ
( k ) meaning the accumulative counting difference of the t -th step.
The complete notation explanation can be found in Appendix B.2.
Note that, when α = 0 , Eq.
(1) recovers the original loss of Adversarial Training, and the first part in the RHS of Eq.
(2) goes tothat recovers the convergence rate of Adversarial Training (Sinha et al., 2018).
When α → 1 , Eq.
(1) becomes more biased, while simultaneously the straightforward benefit is that we can achieve a faster convergence in Eq.
(2) if 1 T (cid:80) Tt =1 ξ ( t ) < 0 , i.e., (cid:16) 1 + α 1 T (cid:80) Tt =1 ξ ( t ) N (cid:17) < 1 .
Actually, this is possible when the sample number is approximately similar among all clients and the top-1 choice easily has − N < ξ ( t ) =
N ( t ) ϕ
(1) − (cid:80)
Kk =2 N ( t ) ϕ
( k ) < 0 in each optimization step.
In this case, a larger α has a faster convergence.
Therefore, the proposed α -slack mechanism of adversarial training provides us a way to acquire the optimization benefits in FAT by introducing the small relaxation to the objective.
4. R EALIZATION OF S LACK F EDERATED A DVERSARIAL T RAINING
Based on the previous analysis of the α -slack mechanism, we propose a Slack Federated Adversarial
Training to combine adversarial training and federated learning.
The intuition is applying the α -slack mechanism into the inner-maximization in FAT, which can be formalized as follows,
[Equation]
where P k denotes the weight assigned to the k -th client based on the ascending sort of weighted client losses compared with the (cid:98) K -th one, which can be (1+ α ) · 1 ( N k N L k ≤ L sorted [ (cid:98) K ])
+(1 − α ) · 1 ( N k N L k >
L sorted [ (cid:98) K ]) that corresponds to the relaxed loss in Eq.
For simplicity without loss of generality, we can transform the slack mechanism as the weight adjustment of those selected clients with smaller adversarial training losses, and assign P k
= ((1+ α ) / (1 − α )
· 1 ( N k N L k ≤ L sorted [ (cid:98) K ])+1 · 1 ( N k N L k >
L sorted [ (cid:98) K ])) /
(( (cid:80) K k =1 P k ) + 2 α/ (1 − α )) to ensure the lower bound derivation.
For more details, we summarize the procedure of SFAT in Algorithm 1 of Appendix D, which consists of multi-round iterations between the local training on the client side and the global aggregation on the server side.
Concretely, on the client side, after downloading the global model parameter from the server, each client will perform the adversarial training on its local data.
At the same time, the client loss on the adversarial examples is also recorded, which acts as the soft-indicator of the local bias induced by the radical adversarial generation.
Then, when the training steps reach to the condition, the client will upload its model parameter and the loss to the server.
On the server side, after collecting the model parameters { θ k } Kk =1 and the losses {L k } Kk =1 of all clients, it will first sort { N k N L k } Kk = in an ascending order to find the top- (cid:98) K clients.
Based on that, the global model parameters will be aggregated by the α -slack mechanism in which the model parameters of the top- (cid:98) K clients are upweighted with (1 + α ) / (1 − α ) and the remaining is downweighted.
For atypical layers
(Li et al., 2021b)
e.g., BN, it is outside the scope of this paper and we keep the aggregation same as FedAvg.
[Figure]
In Figure 3, we empirically justify the rationality of our SFAT as illustrated by Figure 2.
We employ the averaged client drift (Li et al., 2018;
Karimireddy et al., 2020), i.e., || θ k − θ s || 2 (the parameter difference between local model and averaged global model), to approximately reflect the effect of data heterogeneity (illustrated as the diverse optimization directions in the right panel of Figure 2).
From Figure 3, we can see the client drift of SFAT is smaller than that of FAT in the later stages.
This indicates the optimization directions of clients are less diverse, contributing to the alleviation of the intensified heterogeneity.
In
Figure 7, we trace the index of the top-weighted client in one experiment and find it dynamically routes among different clients instead of a fixed one.
In the following, we provide the theoretical analysis of our SFAT on the convergence in the context of federated learning (Li et al., 2019), which is slightly different from the centralized counterpart.
Theorem 4.3.
Assume the loss function ℓ ( · , · ) in Eq.
(3) is L -smooth and λ -strongly convex w.r.t.
the model parameter θ , and the expected norm and the variance of the stochastic gradient in each client respectively satisfy E (cid:2) ||∇ θ ℓ ( f θ (˜ x k ) , y k )
|| 22 (cid:3) ≤ ς 2 and E (cid:2)
||∇ θ ℓ ( f θ (˜ x k ) , y k ) − ∇ θ L k
|| 22 (cid:3) ≤ δ 2 k .
Let κ =
Lλ , γ = max { 8 κ, E } where E is the iteration number of the local adversarial training with the learning rate η t = 2 λ ( γ + t ) .
Then, after the sufficient T -step communication rounds for SFAT, we have the following asymptotics to the optimal,
[Equation]
where L ∗ is the minimum value of L SFAT , θ ∗ is the optimal model parameter, and
[Equation]
When α = 0 , we have P ( T ) k / (1+ α ξ ( T ) N ) = 1 and Eq.
(4) becomes the convergence rate of FedAvg on
Non-IID data (Li et al., 2019).
Different from Theorem 4.2 that concludes in the centralized training setting, when α → 1 , the convergence is indefinite compared to the standard FAT, since the emerging terms in B , i.e., (cid:16) P ( T ) k / (1 + α ξ ( T ) N ) (cid:17) 2 and P ( T ) k / (1 + α ξ ( T ) N ) , are acted as the scalar timing by the personalized variance bound δ 2 k and the local optimum L ∗ k of each client.
One possible case is when the optimization approaches to the optimal parameter θ ∗ , δ 2 k can be in a smaller scale relative to the scale of L ∗ k .
In this case, the increment of the first term of B can be totally counteracted by the loss of the second term of B so that in sum B becomes smaller.
Then, we can have a tighter upper bound for SFAT in Eq.
(4) to achieve a faster convergence than FAT.
The completed proof of Theorem 4.3 is given in Appendix B.3 and the empirical verification is presented in Appendix E.7.
The following section will comprehensively confirm that SFAT can reach to a more robust optimum.
Note that, the theorem we deduce here follows the same assupmitions (Li et al., 2019) and is mainly to compare the difference with the early convergence analysis in federated learning.
However, some relaxation on the assumptions could be further improved by considering more practical SGD theories (Nguyen et al., 2018), which is beyond the scope of this paper and we leave in the future works.
E XPERIMENTS
In this section, we provide a comprehensive analysis of SFAT and empirically verify its effectiveness compared with the current methods on a range of benchmarked datasets and a real-world dataset.
The source code is publicly available at: https://github.com/ZFancy/SFAT .
Setups.
We conduct the experiments on three benchmark datasets, i.e., CIFAR-10 , CIFAR100 (Krizhevsky, 2009), SVHN (Netzer et al., 2011) as well as a real-world dataset CelebA (Caldas et al., 2018) for federated adversarial training.
For the IID scenario, we just randomly and evenly distribute the samples to each client.
For the Non-IID scenario, we follow McMahan et al.
Shah et al.
(2021) to partition the training data based on their labels.
To be specific, a skew parameter s is utilized in the data partition introduced by Shah et al.
(2021), which enables K clients to get a majority of the data samples from a subset of classes.
We denote the set of all classes in a dataset as Y and create Y k by dividing all the class labels equally among K clients.
Accordingly, we split the data across K clients that each client has (100 − ( K − 1) × s )% of data for the class in Y k and s % of data in other split sets.
In the test phase, we evaluate the model’s standard performance using natural test data and its robust performance using adversarial test data generated by FGSM (Goodfellow et al., 2015), PGD-20, CW ∞ (Carlini & Wagner, 2017) and AutoAttack (Croce & Hein, 2020) (termed as
AA) to evaluate its robust performance.
More detailed settings are provided in Appendix E.
5. A BLATION S TUDY
In this subsection, we conduct various experiments on CIFAR-10 with the Non-IID setting to visualize the characteristics of our proposed SFAT.
More comprehensive results are provided in Appendix E.
Non-AT vs. AT.
In the left two panels of Figure 4, we respectively apply our α -slack mechanism to Federated Standard Training (SFST) and Federated Adversarial Training (SFAT) under (cid:98) K = 1 .
We also consider both FedAvg and FedProx in this experiment to guarantee the universality.
From the curves, we can see that SFST has the negative effect on the natural accuracy, while SFAT consistently improves the robust accuracy based on FedAvg and FedProx.
This indicates our α -slack mechanism is tailored for the inner-maximization of Federated Adversarial Training instead of the outer-minimization considered by other federated optimization methods.
In addition, we also verify the orthogonal effects of SFAT with FedProx on reducing client drift in Appendix E.8 and strengthen the hyper-parameter of FedProx to demonstrate the consistent effectiveness of our SFAT.
Re-SFAT vs. SFAT.
In the middle panel of Figure 4, we conversely apply our α -slack mechanism in Federated Adversarial Training (Re-SFAT) where we upweight the client with large adversarial

   
 &RPPXQLFDWLRQ5RXQGV          1 D W X U D O  $ FF X U D F\  )HG$YJ)HG$YJ6)67)HG3UR[)HG3UR[6)6 
   
 &RPPXQLFDWLRQ5RXQGV       5 REX V W $ FF X U D F\  )HG$YJ)HG$YJ6)$7)HG3UR[)HG3UR[6)$ 5H6)$ )$ 6)$7 0HWKRG        $ FF X U D F\  1DWXUDO$FF5REXVW$FF              $ FF X U D
F\  1DWXUDO$FFRI6)$75REXVW$FFRI6)$71DWXUDO$FFRI)$75REXVW$FFRI)$     K / K           $ FF X U D F\  1DWXUDO$FF5REXVW$FF
[Figure]
[Table]
[Table]
training loss.
Note that the Re-SFAT share a similar spirit with the Agnostic Federated Learning (AFL) (Mohri et al., 2019), which seeks to improve the generalization in standard federated learning through a loss-maximization reweighting.
Through its comparison with FAT and SFAT [Table]
we can see enlarging the inner-maximization during aggregation could severely exacerbate heterogeneity which results in the worse performance, while our SFAT improves the performance through relaxing it into a lower bound.
We also confirm the rationality of SFAT on other datasets in Appendix E.3.
Impact of α and (cid:98) K .
To study the effect of hyperparameters in SFAT, we conduct several ablation experiments to verify the model performance.
Regarding the experiments of α , we set the client number K = 5 and (cid:98) K = 1 to upweight/downweight the client models in each communication round.
The right middle panel of Figure 4 shows that α ∈ (0 , 1 / 6] can significantly improve the robust accuracy and the natural accuracy, while a larger α might be inappropriate to the natural accuracy.
We also conduct a comprehensive ablation to show the effects of α during training in Appendix E.4.
Regarding the choice of (cid:98) K , we specially set K = 8 in this experiment to span the range of (cid:98) K due to the constraint (cid:98) K < = K/ 2 .
The right panel of Figure 4 tracks the accuracy of SFAT with increasing (cid:98) K .
As can be seen, both natural accuracy and robust accuracy are improved even with larger (cid:98) K , which shows the effect of (cid:98) K on the slack of inner-maximization.
For other basic experimental setting, e.g., the local epochs, we explore the effectiveness under different setups in Appendix E.2.
Different client numbers.
In Table 1, we validate our SFAT on training with different client numbers, where we set α = 1 / 11 (i.e., 1+ α 1 − α = 1 . 2 ) and (cid:98) K
= K/ 5 .
The results show that with the client number varying from 10 to 50, our SFAT can consistently gain better natural and robust performance than FAT.
We also confirm the scalability of using other datasets (in Appendix E.9), the performance on unequal data splits in the different clients (in Appendix E.10), as well as the effectiveness in a practical situation where only a subset of clients participate in the aggregation (in Appendix E.11).
Different adversarial training methods.
In Table 2, we validate the combination of α -slack mechanism and different adversarial training methods ( i.e., AT (Madry et al., 2018), TRADES (Zhang et al., 2019) and MART (Wang et al., 2020c)), where we switch different local adversarial training methods on the client side.
Through the comparison with FAT, the results show that SFAT can consistently boost both the natural performance and the robust performance, and is applicable to other state-of-the-art adversarial training methods under the federated learning scenarios.
[Table]
5. P ERFORMANCE E VALUATION
Next, we compare SFAT with FAT on various benchmark datasets to verify its effectiveness.
Specifically, we validate it with three representative federated optimization methods, i.e., FedAvg, FedProx and Scalffold.
Considering the sensitivity of data selection in Non-IID setting, we report the results with Mean ± Std values in Table 3 after running multiple times.
For the completeness of experiments, we also demonstrate the efficacy of SFAT on the IID setting and a real-world dataset.
The overall results for comparison (with the centralized counterparts) are presented in Appendixs E.11 and E.12.
According to Table 3 on CIFAR-10 , we can find that our SFAT significantly outperforms FAT on the Non-IID data in terms of both the natural accuracy ( ∼ 2%-6%) and the robust accuracy ( ∼ 2%- 5%).
As for FedProx and Scaffold which are specifically designed to handle the heterogeneous issues in federated learning, employing them in FAT can indeed improve the model performance compared with that based on FedAvg.
Our SFAT further boosts the performance by alleviating the extra heterogeneity from adversarial training.
On CIFAR-100 and SVHN , we can find the similar improvement in Table 3 as that of CIFAR-10 under three types of federated optimization methods.
C ONCLUSION
In this work, we investigated the issue of robustness deterioration when combining adversarial training with federated learning, and revealed that it may attribute to the intensified heterogeneity induced by local adversarial generation.
To alleviate it, we introduce an α -slack decomposed mechanism into adversarial training to relax the overall inner-maximization.
Based on this, we propose a new framework, i.e., Slack Federated Adversarial Training (SFAT).
We provide both the theoretical analysis and empirical evidences to understand the proposed method.
The experimental results under various settings confirm the consistent effectiveness of our proposed SFAT.
Nevertheless, we only move a small step on the intensified heterogeneous issue in the combination of two learning paradigms, federated adversarial training still suffers from the other challenges of systems or algorithms.
Beyond the empirical conjecture in the problem focused on this work, more theoretical understanding on the dynamical heterogeneous issue under federated learning is worthwhile to explore in the future.
A CKNOWLEDGEMENT
JNZ and BH were supported by NSFC Young Scientists Fund No. 62006202, Guangdong Basic and Applied Basic Research Foundation No. 2022A1515011652, RGC Early Career Scheme No.
22200720, RGC Research Matching Grant Scheme No.
RMGS20221102, No. RMGS
and
No. RMGS20221309.
BH was also supported by CAAI-Huawei MindSpore Open Fund and HKBU
CSD Departmental Incentive Grant.
TLL was partially supported by Australian Research Council
Projects IC-190100031, LP-220100527, DP-220102121, and FT-220100318.
JLX was partially supported by Hong Kong RGC Grants 12202221 and C2004-21GF.
E THICS S TATEMENT
This paper does not raise any ethics concerns.
This study does not involve any human subjects, practices to data set releases, potentially harmful insights, methodologies and applications, potential conflicts of interest and sponsorship, discrimination/bias/fairness concerns, privacy and security issues, legal compliance, and research integrity issues
A PPENDIX
The Appendix is organized as follows.
In Appendix A, we detailedly discuss the related work and highlighted our distinguishable point compared with previous work.
In Appendix B, we formally prove the aforementioned Equations and Theorems.
In Appendix C, we demonstrate the issue of bias exacerbation (as illustrated in Figure 2) using a binary classification experiment.
In Appendix D, we provide illustration of the learning framework for our SFAT.
In Appendix E, we present our experimental details and more quantitative results about understanding our proposed SFAT.
A D ETAILED D ISCUSSION AND C OMPARISON ABOUT R ELATED WORK
In this section, we detailedly discuss the related work in federated learning, adversarial training as well as the federated adversarial training.
At the end of each part, we also highlight our distinguishable points compared with the previous work, either from conceptual or technical perspectives.
Federated Learning.
The representative work in federated learning is FedAvg (McMahan et al., 2017), which has been proved effective during the distributed training to maintain the data privacy.
To further address the heterogeneous issues, several optimization approaches have been proposed e.g., FedProx (Li et al., 2018), FedNova (Wang et al., 2020b) and Scaffold (Karimireddy et al., 2020).
FedProx introduced a proximal term for FedAvg to constrain the model drift cause by heterogeneity;
FedNova proposed a general framework that eliminated the objective inconsistency and preserved the fast convergence; Scaffold utilized the control variates to reduce the gradient variance in the local updates and accelerate the convergence.
MOON (Li et al., 2021a) alleviated the heterogeneity by maximizing the agreement between the representations of the local and global models, which helps the local training of individual parties.
Reisizadeh et al.
(2020) developed a robust federated learning algorithm to against distribution shifts in client samples.
Mohri et al.
(2019) proposed
Agnostic Federated Learning (AFL) to improve the fairness and generalization to different data distribution through a loss-maximization reweighting.
However, it is not suitable to the problem of FAT and actually opposite to our relaxation.
We show AFL performs even worse than FAT in
Appendix E.3.
Our SFAT introduces the α -slack mechanism to combat intensified heterogeneity in federated adversarial training, which is orthogonal to and compatible with the most previous methods.
One concurrent work (Mansour et al., 2022) recently provide an extended theoretical framework to analyze the general aggregation methods in federated learning, it also utilizes the reweighting mechanism and propose the FedSoftBetter.
However, our proposed SFAT and FedSoftBetter have both different motivations and underlying principles.
On the one hand, we introduce α -slack mechanism to alleviate the exacerbated heterogeneity, while Mansour et al.
(2022) employs reweighting to enhance the stability and convergence of original FedAvg.
On the other hand, SFAT focuses on federated adversarial training and origins from our α -slack mechanism, while FedSoftBetter focuses on ordinary federated learning and originates as a specific strategy for federated aggregation from the theoretical analysis on convergence bound.
Different from FedSoftBetter, as empirically verified in "Non-AT v.s. AT" of Section 5.1, our SFAT is not for ordinary federated learning but tailored for federated adversarial training.
In practice, the technical forms of two weighting mechanisms are also different.
SFAT directly ranks the losses of all clients and constructs the weights, while the weights of
FedSoftbetter build upon the gap between the client loss and the client optimal loss.
We also provide an empirical comparison of the two methods in our Appendix E.5.
Adversarial Training.
As one of the defensive methods (Papernot et al., 2016), adversarial training (Madry et al., 2018; Zhang et al., 2019; Jiang et al., 2020; Chen et al., 2021; Zhang et al., 2021) is to improve the robustness of machine learning models.
The classical AT (Madry et al., 2018) is built upon on a min-max formula to optimize the worst case, e.g., the adversarial example near the natural example (Goodfellow et al., 2015).
Zhang et al.
(2019) decomposed the prediction error for adversarial examples as the sum of the natural error and the boundary error, and proposed TRADES to balance the classification performance between the natural and adversarial examples.
Wang et al.
(2020c) further explored the influence of the misclassified examples on the robustness, and proposed
MART that emphasizes the minimization of the misclassified examples to boost the AT.
Zhang et al.
(2020b); Sanyal et al.
(2021) investigated the instance-level difficulties in AT and designed different training strategies to improve the model performance.
Different from their instance-level granular- ity, our SFAT framework leverages the client-level measure to alleviate the heterogeneous issue in the straightforward combination of adversarial training and federated learning.
It is compatible to incorporate those centralized adversarial training methods (as shown in Table 2 of Section 5.1) in the updates of local clients to further improve the model performance or address some special issues.
Federated Adversarial Training.
Recently, several works have made the exploration on the adversarial training in the context of federated learning, which consider the data privacy and the robustness in one framework.
To our best knowledge, Zizzo et al.
(2020) takes the first trial to study the feasibility of extending federated learning (McMahan et al., 2017) with the standard AT on both
IID and Non-IID settings.
Empirically, they found that there was a large performance gap existing between the distributed and the centralized adversarial training, especially on the Non-IID data.
Shah et al.
(2021) designed a dynamic schedule for the local training to pursue a larger robustness under the constrained communication budget of federated learning.
Hong et al.
(2021) explored how to effectively propagate the adversarial robustness when only limited clients in federated learning have the sufficient computational budget to afford AT.
Zhang et al.
(2020a)
; Zizzo et al.
(2021) studied to defend the malicious clients that poison the global model in federated learning, which also discuss the robustness but actually another research topic compared with the federated adversarial training in this work.
Different from previous works (in Table 4), we explore to solve the robustness deterioration issue (as shown in Figure 1(a)) induced by the intensified heterogeneity (as illustrated in Figure 2) of the direct combination of federated learning and adversarial training.
[Table]
Considering the practical requirement in the real-world applications (Kairouz et al., 2019), federated adversarial training still faces various challenges.
In general, these challenges mainly come from perspectives of the distributed systems (Li et al., 2020) and the unique learning paradigm (Kairouz et al., 2019).
From the perspective of distributed systems, the major issue for federated adversarial training is its characteristic of high computational-cost (Madry et al., 2018).
It is well known in conventional adversarial training as the local adversarial generation always require multiple times of optimization to better optimize the inner-maximization, which is to pursue the better empirical adversarial robustness (Goodfellow et al., 2015).
In federated setting, we also need to consider the heterogeneous devices (Kairouz et al., 2019) in practical situation like the previous work (Hong et al., 2021) focused on.
The clients with low computational capacity not only affect the synchronous aggregation but also may not affordable for the local adversarial training.
Such issues in hardware also results in severe problem for the distributed learning.
From the perspective of the learning paradigm, the issues is more about the training data and inference threaten for federated adversarial training.
Except for the intensified heterogeneity discussed in our work, the heterogeneity data itself is also a severe problem for federated adversarial training.
More conventional issues about learning data like the class-imbalanced data (Kovashka et al., 2016), label noised data (Natarajan et al., 2013) or out-of-distributed data (Hendrycks & Gimpel, 2017) need further investigated in federated adversarial training.
As for the inference threaten, one practical scenario is that different client may face different kinds of adversarial attacks (Carlini & Wagner, 2017; Xiao et al., 2018), whether federated adversarial training can help for gaining various type of robustness on different clients is still under explored.
B P ROOF B. P ROOF OF E Q . (1) AND
T HEOREM 4.
We proof the Eq.
(1) and Theorem 4.1 in this section.
Recall the α -slack mechanism for the inner-maximization objective decomposition with K independent populations as follows,
[Equation]
where ϕ ( · ) is a function which maps the index to the original population group sorted by { N k N L k } in an ascending order.
Here ϕ ( · ) is to bind the terms before and after the sort and does not affect the normal gradient back-propagation, since each gradient path of samples is traceable..
proof of Eq.
The deduction of the inequality in Eq.
(5) can be formulated in the following.
Given α ∈ [0 , 1) and (cid:98) K ≤ K 2 with the population sorted by { N k N L k } in an ascending order, we have (cid:80)
[Equation]
Kk =1 N ϕ ( k ) N L ϕ ( k ) ≤ (cid:80)
Kk = (cid:98) K +1 N ϕ ( k ) N L ϕ ( k ) .
Then, we have the following relationship by subtraction,
[Equation]
proof of Theorem 4.1.
It can be naturally proved by Eq.
If α 1 > α 2 , then we have,
[Equation]
N
[Equation]


[Equation]
Similarly, we can prove L α ( (cid:98) K 1 ) <
L α ( (cid:98) K 2 ) if (cid:98) K 1 > (cid:98) K 2 .
B. P ROOF OF T HEOREM 4.
Based on the convergence of Adversarial Training (Sinha et al., 2018), we proof Theorem 4.2 in this section.
Following (Sinha et al., 2018), we firstly make some required Assumptions B.1and B.2 and provide the corresponding Lemma B.3 that defines the Lipschitzan condition in Theorem 4.2.
Assumption B.1.
The function c : X × X
→ R + is continuous.
For each x 0 ∈ X , c ( · , x 0 ) is l -strongly convex with respect to the norm ||
· || .
Assumption B.2.
Let ||·|| ∗ is the dual norm to ||·|| , the loss ℓ : Θ ×X → R satisfies the Lipschitzian smoothness conditions
[Equation]
Lemma B.3.
Let f : Θ × X
→
R be differentiable and λ -strongly concave in x with respect to the norm ||
· || , and define ¯ f ( θ ) =
sup x ∈X f ( θ, x ) .
Let g θ ( θ, x ) = ∇ θ
f
( θ, x ) and g x ( θ, x ) = ∇ x f ( θ, x ) and assume g θ and g x satisfy Assumption B.2 with ℓ ( θ, x ) replaced with f ( θ, x ) .
Then ¯ f is differentiable, and letting x ∗ ( θ ) =
arg max x ∈X f ( θ, x ) , we have ∇ ¯ f ( θ ) =
g θ ( θ, x ∗ ( θ )) .
Moreover, || x ∗ ( θ 1 ) − x ∗ ( θ 2 ) ||
≤ L xθ λ || θ 1 − θ 2 || and ||∇ ¯ f ( θ ) − ∇ ¯ f ( θ ′ )
|| ∗ ≤ ( L θθ + L θx L xθ λ || θ − θ ′ || ) .
proof of Theorem 4.2.
Let c : X × X
→ R + ∪ {∞} , where c ( x, x 0 ) is the “cost” for an adversary to perturb x 0 to x .
Let f ( θ, x ; x 0 ) =
ℓ ( θ ; x ) − γc ( x, x 0 ) , noting that the gradient steps is preformed as g t = ∇ θ f ( θ t , ˆ x ; x t ) , where ˆ x is an approximate maximizer of f ( θ, x ; x t ) in x , and θ t +
=
θ t − µ t g t .
We assume µ t ≤ 1 L ψ in the rest of the proof, which is satisfied for the constant step size µ = (cid:113) ∆ L L ψ Tδand T ≥ L ψ ∆ L δ 2 .
By a Taylor expansion using the L ψ -smoothness of the objective L k for k -th client, we have
[Equation]
Consider the function ϕ γ ( θ ; x 0 )
=
sup x ∈ Z f ( θ, x ; x 0 )
[Equation]
we define the potentially biased errors ζ t =
g t − ∇ θ ϕ γ ( θ t ; x t )
[Equation]
Then we have the following relationship,
[Equation]
θ t
[Equation]
ζ t (cid:11)(cid:1) .
Since ±⟨ a, b ⟩ ≤ 12 (cid:0) ||
a ||
+ ||
b
|| 22 (cid:1) , we have
L k (cid:12)(cid:12) θ t +1 ≤L k (cid:12)(cid:12) θ t − µ
[Equation]
||
[Equation]
t || 22 + µ t
[Equation]
(1 − L ψ α ))
(cid:10) ∇L k (cid:12)(cid:12) θ t
[Equation]
k
[Equation]
θ t − ∇ θ ϕ γ ( θ t ; x t ) (cid:11) (10) + µ t ((1 + L ψ µ )) ||
[Equation]
Then, letting x t ∗ = arg max x f ( θ t , x ; x t ) , the error ζ t satisfies,
[Equation]
where the final inequality utilize the λ = γ − L xx strong-concavity of x (cid:55)→ f
( θ, x ; x 0 ) .
For convenience, let ˆ ϵ =
L 2 θx γ − L xx ϵ .
Taking conditional expectations in Eq.
(10) and using E [ ∇ θ ϕ γ ( θ t ; x t )
| θ t ] =
[Equation]
we have
[Equation]
Since µ t ≤ 1 L ψ , taking a fixed step size µ
[Equation]
we have,
[Equation]
Because E (cid:2) ||∇ θ ϕ γ ( θ ; Z ) − ∇L k
[Equation]
θ || 22 (cid:3) ≤ δ 2 , summing over t
[Equation]
we have,
[Equation]
[Equation]
Since µ = (cid:113) DeltaL
ψ Tδ 2 , and λ = γ − L xx , we can get the following result,
[Equation] Adopting our α -slack mechanism
[Equation]
we have,
[Equation]
T
[Equation]
N E (cid:34)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)
∇L ϕ ( k ) (cid:12)(cid:12)
θ t (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)  (cid:35)
+ (1 − α )
K (cid:88) k
= (cid:98) K +
N ( t ) ϕ
( k )
N E (cid:34)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)
∇L ϕ ( k ) (cid:12)(cid:12)
θ t (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)  (cid:35)  ≤
T
T (cid:88) t =   (1 + α ) (cid:98) K (cid:88) k
=
N ( t ) ϕ
( k )
N + (1 − α )
K (cid:88) k
= (cid:98) K +
N ( t ) ϕ
( k )
N 
 (cid:32) 4 L 2 θx ϵ λ + 4 δ (cid:114)
L ∆
T (cid:33) =
T
T (cid:88) t =   1 + α (cid:80) (cid:98) K k
=1 N ( t ) ϕ ( k ) − (cid:80)
Kk = (cid:98)
K +1 N ( t ) ϕ
( k )
N 
 (cid:32) 4 L 2 θx ϵ λ + 4 δ (cid:114)
L ∆
T (cid:33) =
(cid:32)
[Equation]
where ξ ( t ) =
(cid:80) (cid:98)
Kk =1 N ( t ) ϕ
( k ) − (cid:80)
Kk = (cid:98)
K +1 N ( t ) ϕ
( k ) to simplify the notations.
B. P ROOF OF T HEOREM 4.
Based on the convergence of FedAvg (Li et al., 2019), we proof Theorem 4.3 in this section.
First, we make the following assumptions and present some useful lemmas.
Specifically, we make the following assumptions.
Assumption B.4 and B.5 are standard (typical examples are the ℓ 2 -norm regularized linear regression, logistic regression, or softmax classifier).
Assumption B.6 and B.7 have been made by the previous works (Zhang et al., 2013; Li et al., 2019).
Assumption B.4.
L 1 , . .
, L K are all L-smooth: for all v and w , L k ( v ) ≤ L k ( w )
+ ( v − w ) T ∇L k ( w ) + L 2 || v − w ||
Assumption B.5.
L 1 , . .
, L K are all λ -strongly convex: for all v and w , L k ( v ) ≥ L k ( w )
+ ( v − w ) T ∇L k ( w ) + λ 2 || v − w ||
Assumption B.6.
Let ξ kt be sampled from the k -th device’s local data uniformly at random.
The variance of stochastic gradients in each device is bounded: E ||∇L k ( w kt , ξ kt ) − ∇L k ( w kt )
|| 2 ≤ δ 2 k for k = 1 , · · · , K .
Assumption B.7.
The expected squared norm of stochastic gradients is uniformly bounded, i.e., E ||∇L k ( w kt , ξ kt )
||
2 ≤ ς 2 for all k = 1 , · · · , K and t = 1 , · · · , T − 1 .
We use the following lemmas proved by Li et al.
Let θ kt denotes the model parameter maintained in the k -th client at t -th step, Θ represents an immediate result of one step SGD update from θ kt .
For convenience, we define ¯Θ t =
(cid:80) Kk =1 N k N Θ t , ¯ θ t ==
(cid:80)
Kk =
N k N θ t , ¯ g t =
(cid:80)
Kk =
N k N ∇L k
( θ kt ) and g t = (cid:80)
Kk =
N k N ∇L k
( θ kt , ξ kt ) .
Therefore, E g t = ¯ g t .
Lemma B.8 (Results of one step SGD) .
Assume Assumption B.4 and B.5.
If η t ≤ 14 L , we have
E
|| ¯ Θ t +1 − θ ∗ ||
[Equation]
where
Γ =
L ∗ − (cid:80) Kk E t N k N L ∗ k ≥
Lemma B.9 (Bounding the variance) .
Assume Assumption B.6.
It follows that
[Equation]
Lemma B.10 (Bounding the divergence of θ kt ) .
Assume Assumption B.7, that η t is non-increasing and η ≤ 2 η t + E for all t > 0 .
It follows that
[Equation]
proof of Theorem 4.3.
Let ∆ t =
E ||
θ t − θ ∗ || 2 .
From Lemma B.8, Lemma B.9 and Lemma B.10, it follows that
[Equation]
where,
B =
K
[Equation]
and (cid:18) P
[Equation]
N (cid:19)and
P ( T ) k 1+ α ξ ( T ) N , are acted as the scalar timing by the personalized variance bound δ 2 k and the local optimum L ∗ k of each client.
For a diminishing stepsize, η t = βγ + t for some β > 1 λ and γ > 0 such that η 1 ≤ min { 1 λ , 14 L } = 14 L and η t ≤ 2 η t + E .
We will prove that ∆ t ≤ νγ + t , where ν = max { β 2 B βλ − 1 , ( γ + 1)∆ 1 } .
The above can be proved by induction.
Firstly, the definition of ν ensures that it holds for t = 1 .
Assume the conclusion holds for some t , it follows that,
[Equation]
Then by the L-smoothness of L ( · ),
[Equation]
Specifically, if we choose β = 2 λ , γ = max { 8 Lλ , E } − 1 and denote κ =
Lλ , then η t = 2 λ 1 γ + t .
One can verify that the choice of η t satisfies η t ≤ 2 η t + E for t ≥ 1 .
Then we have
[Equation]
and
[Equation]
C F URTHER DISCUSSION ABOUT F IGURE
[Figure]
red squares and circles indicate the generated adversarial data.
It serves as a potential explanation for the bias exacerbation caused by local adversarial generation.
Note that, (b)-(c) are obtained by training the neural networks.
In this section, we provide a verification about intensified heterogeneity using the real dataset, i.e.,
SVHN (Netzer et al., 2011) (in Figure 5(a)), and provide a two-dimensional result (in Figures 5(b) and 5(c)) to explain the exacerbated optimization bias induced by the local adversarial generation.
First, we conduct the experiments under Non-IID setting to verify the relationship of intensified heterogeneity with adversarial generation in the SVHN dataset, which is for the multi-classification task.
To be specific, we compare the FAT on 5 clients using different adversarial strength to show the effect of adversarial generation on local clients.
Other setups keep the same with that of Table 3.
In Figure 5(a), we conduct FAT using the adversarial generation of different ϵ -ball (from weak 1 /to strong 4 / 255 ) and check the client drift, which has been formally defined in Karimireddy et al.
(2020) to show the optimization bias in federated learning.
The client drift is widely adopted in federated learning literature (Smith et al., 2017; Li et al., 2018; 2021b;
Karimireddy et al., 2020)] to reflect the degree of heterogeneity (Zhao et al., 2018; Li et al., 2019).
The statics of client drift with different adversarial generation can indicate the relationship between inner-maximization with the intensified heterogeneity.
Through the results, we can find that as adversarial strength increases, the heterogeneity is also exacerbated along with training.
The similar trend can be also found in the experiments with other dataset in Figure 10 of Appendix E.4, where we also present the corresponding robust accuracy.
This verifies the issue discussed in our motivation part (in Section 4.1) using the real classification task, and it is also consistent with our binary illustration.
Second, we conduct the experiments on a synthetic dataset to present the potential explanation about the heterogeneity exacerbation.
To be specific, we conduct basic federated learning and FAT using two clients on the synthetic dataset and check the decision boundary in a two-dimensional plane.
It shows how the adversarial generation on local clients can exacerbate the heterogeneity.
As for the experiments on the synthetic dataset, we create its training data randomly using Numpy and train using a neural network with one hidden layer and one Relu activation layer for each clients.
In Figures 5(b) and 5(c), we plot the decision boundary of the training results on a synthetic dataset for FAT using two clients.
The Figure 5(b) shows standard training (using the natural data) on the client’s local data while the Figure 5(c) shows adversarial training (generating the adversarial data) on the client’s local data.
Note that, without the training data of other clients, the adversarial generation on the current biased model is highly biased to the local distribution, which even exacerbated the optimization bias and would result in a large client drift or variance, e.g., δ 2 in our theorems.
More empirical evidence on CIFAR-10 dataset can also refer to Appendixes E.4 and E.6 which show the statics corresponding the accuracy during the training process.
[Table]
To better support our conjecture, we compare and robust deterioration in FAT with different adversarial training strength (using the same robust evaluation strength) and summarized the results in Table 5.
The results show that more stronger adversarial generation (i.e., the larger inner-maximization) lead to severe robustness deterioration (indicated by the large accuracy gap between the best and last stage).
It confirms the rationality of our derived lower bound by α -slack mechanism to pursue the adversarial robustness and alleviate the heterogeneity exacerbation.
In our Appendix E.4, we also provide more empirical verification that quantitatively measure the intensified heterogeneity, which show that
our
SFAT indeed alleviate the intensified heterogeneity and achieve the better robust accuracy.
D D ETAILED A LGORITHM AND L EARNING F RAMEWORK
[Figure]
In this section, we provide the detailed algorithm (i.e., Algorithm 1) for our Slack Federated Adversarial Training (SFAT) and an intuitive illustration of our proposed SFAT in Figure 6.
Input do 2:
Clients do 4: θ
AT
E for 6:
Server: [ performs slacked aggregation] 7:
L all ← [ N 1 N L 1 , N 2 N L 2 , . . .
, N K N L K ] ,
L sorted ← Ascending_Sort all ); 8: ∀ k
P k
=
( 1+ α 1 − α ·
N k N L k ≤ L sorted [
K ]) + 1 ·
N k N k > sorted [
K ]
(cid:80)
Kk
=1 P k
+ 2 α 1 − α ) ; 9: θ
= 1 (cid:80)
Kk =1 N k (cid:80)
Kk =1 P
N θ tk ; 10: end for
For simplifying the practical use and adaptation, we can mainly assign higher weights for the client having smaller adversarial training losses to realize the relative weighting illustrated in Figure 6.
To be specific, we can set the normalized P k
= ((1 + α ) / (1 − α )
· 1 ( N k N L k ≤ L sorted [ (cid:98) K ]) + 1 · 1 ( N k N L k >
L sorted [ (cid:98) K ])) /
(( (cid:80) Kk =1 P k ) + 2 α/ (1 − α )) in the aggregation to ensure the expected lower bound.
Based on the α -slack mechanism, we provide a new framework for the combination of adversarial training with federated learning.
It is orthogonal to a variety of different adversarial training (Zhang et al., 2019;
Alayrac et al., 2019; Wang et al., 2020a; Jiang et al., 2020; Chen et al., 2021; Carmon et al., 2019; Madry et al., 2018;
Chen et al., 2020; Ding et al., 2020;
Li et al., 2021c; Chen et al., 2021; 2022) methods and federated optimization algorithms (McMahan et al., 2017; Li et al., 2018; 2021b;
Kairouz et al., 2019) which pursue the adversarial robustness or alleviate the data heterogeneity as well as other specific issues on the client side, and for the specific practical challenge for federated settings (Shah et al., 2021; Hong et al., 2021).
Those all can be flexibly adopted into our framework or extend to fit other training constraints (Kairouz et al., 2019) of federated learning.
E E XPERIMENTAL D ETAILS AND M ORE C OMPREHENSIVE R ESULTS
In this section, we first provide the details about our experimental setups for dataset, training and evaluation.
Then we provide more comprehensive results for better understanding the characteristics of our SFAT and the performance verification in different settings.
In Appendix E.1, we tracing and discuss the dynamics of our SFAT on choosing the upweighted clients.
In Appendix E.2, we present the results of training with different local epochs.
In Appendix E.3, we present and discuss the comparison of Re-SFAT v.s. SFAT.
In Appendixes E.4 and E.6, we report the client drift and variance with the corresponding robust accuracy during training.
In Appendix E.8, we discuss the orthogonal effects of SFAT on intensified heterogeneity.
In Appendix E.9, we verify SFAT using more clients.
In Appendix E.10, we verify SFAT using unequal data splits under Non-IID setting.
In
Appendix E.11, we verify SFAT in a more practical real-world situation.
In Appendix E.12, we report the performance results on both Non-IID and IID setting across the three benchmarked datasets.
Dataset.
We conduct the experiments on three benchmark datasets, i.e., SVHN (Netzer et al., 2011),
CIFAR-10 and CIFAR-100 (Krizhevsky, 2009) as well as a real-world dataset CelebA (Caldas et al., 2018) for federated adversarial training.
For the IID scenario, we randomly distribute these datasets to each client.
For simulating the Non-IID scenario, we follow McMahan et al.
; Shah et al.
(2021) to distribute the training data based on their labels.
To be specific, a skew parameter s is utilized in the data partition introduced by Shah et al.
(2021), which enables K clients to get a majority of the data samples from a subset of classes.
We denote the set of all classes in a dataset as
Y and create Y k by dividing all the class labels equally among K clients.
Accordingly, we split the data across K clients that each client has (100 − ( K − 1) × s )% of data for the class in Y k and s % of data in other split sets.
In most experiments, we set s = 2 for simulating the Non-IID partition with 5 clients as Shah et al.
(2021) recommended.
[Table]
Training and evaluation.
In the experiments, we follow the previous works (Zhang et al., 2019;
Shah et al., 2021) to leverage the same architectures, i.e., NIN (Lin et al., 2014) for CIFAR-10 ,
ResNet-18 (He et al., 2016) for CIFAR-100 and Small CNN (Zhang et al., 2019) for SVHN .
For the local training batch size, we set 32 for CIFAR-10 , 128 for CIFAR-100 and SVHN .
For the training schedule, SGD is adopted with 0.9 momentum for 100 communication rounds underclients as in (Hong et al., 2021; Shah et al., 2021), and the weight decay = 0 . 0001 .
For adversarial training, we set the configurations of PGD respectively (Madry et al., 2018) for different datasets.
On
CIFAR-10/CIFAR-100 , we set the perturbation bound ϵ = 8 / 255 , the PGD step size 2 / 255 and set the PGD step number 10 .
On SVHN , we set the perturbation bound ϵ = 4 / 255 , the PGD step size 1 / 255 .
The PGD generation for all the datasets keep the same step number 10 .
Regarding the evaluation, the accuracy for the natural test data and that for the adversarial test data are computed following Madry et al.
; Zhang et al.
Note that, the adversarial test data are generated by FGSM, PGD-20, C&W (Carlini & Wagner, 2017) attack with the same perturbation bound and step size as the training.
All the adversarial generations have a random start, i.e, the uniformly random perturbation of [ − ϵ, ϵ ] added to the natural data before attacking iterations.
Besides, we also report the robustness under a stronger AutoAttack, termed as AA for simplicity.
All the experiments are conducted for multiple times using NVIDIA Tesla V100-SXM2.
As for our SFAT, different training tasks adopt different α -slack mechanism considering different characteristic of local training data, specifically, we set α = 1 / 6 ( i.e., 1+ α 1 − α = 1 . 4 ) for the experiments on CIFAR-10 , and α = 1 / 11 ( i.e., 1+ α 1 − α = 1 . 2 ) for the experiments on CIFAR-100 and α = 1 /( i.e., 1+ α 1 − α = 1 . 2 ) for the experiments on SVHN .
As for FedProx, we set its original hyper-parameter µ = 0 .
01 for each dataset and the α for our α -slack mechanism are 1 / 11 , 1 / 11 , and 1 / 11 .
As for
Scaffold, the α adopted for previous datasets are 1 / 11 , 3 / 23 and 1 / 11 correspondingly.
As for the choice of the hyper-parameter α , one useful way to set it might be progressively probing its effect in a value-growth manner.
When the α is very small, the objective will approximately degenerate the original objective of FAT, so does the performance with no harm.
Slightly enlarging α can improve the performance due to the benefit on alleviating the intensified heterogeneity during aggregation, and then make a stop in one point where the performance becomes drop.
E. T HE D YNAMIC OF SFAT
In this part, we present the dynamics of our SFAT about the critical α -slack mechanism.
To be specific, we visualize the selected clients in each communication rounds for our slack aggregation.
In one experiment on CIFAR-10 (Non-IID), we trace the index of top client (i.e., the selected client that is upweighted in our mechanism) and find the top weight dynamically routes among different clients instead of the single or a subset of 5 clients.
The empirical results confirmed there is no dominant client exists during the training.
To further check whether our SFAT will result in unfair attention to different clients, we investigate the difference of client’s training accuracy, the accuracy gap ( 32 . 40% ) of the best client with the worst client is comparable with that ( 32 . 23% ) in SFAT.
Intuitively, since the large adversarial training loss can automatically balance the client-wise aggregation weight, there is no unfair attention to exacerbate the performance difference among clients in our experiments, which are verified by the above gap and the similar assignments for the weighting index.

   
 &RPPXQLFDWLRQ       & OL HQ W     & RXQ W
Robust performance on each client.
In Figure 7, we can find there is no dominant client exists, which means that all clients are ever chose to be up-weighted/down-weighted during the training.
Thus, our SFAT explores to help all clients to be better.
Besides, the global model is redistributed to each client in each communication round of federated learning, which can also avoid the bias accumulation for each single client.
To verify each client performance in our experiments, we report the robust training accuracy of each client in our experiments and summarize in Table 7.
The results show the training performance of each client is not worse than the original FAT.
[Table]
To further check the generalization performance on each client, we also conduct an extra experiment where we split a small part of local data in each client to serve as the local test data and evaluate their training and test performance using FAT and the proposed SFAT on SVHN dataset.
According to the summarized results in Table 8, the generalization performance (indicated by the gap of robust training and test accuracy) of our SFAT are also generally better than FAT in SVHN dataset.
[Table]
E. E XPERIMENTS WITH D IFFERENT L OCAL T RAINING E POCHS
In this part, we first report the robust test curve on CIFAR-10 dataset to compare the FAT and SFAT using different local training epoch in each client.
Then we focus on a extreme setup, i.e., 1 local epoch for each client in both CIFAR-10 and SVHN datasets and report the performance comparison, although using 1 local epoch is not practical considering the heavy communication cost it introduced in real-world application (McMahan et al., 2017).
In Figure 8, we conduct the experiments on CIFAR-10 with different local training epochs.
We find
FAT exhibits robust deterioration across different settings that impedes further progress towards adversarial robustness of the federated system, and simply changing the local training epoch can not

   
[Figure]
    
     REX V W $ FF
[Figure]
U D F\  )$
[Figure]

[Figure]

[Figure]

[Figure]
 
[Figure]

[Figure]
 
[Figure]
       
[Figure]
achieve the significantly higher robust accuracy as the dashed black line denoted.
In comparison, our SFAT can consistently achieve a higher robust accuracy than FAT by alleviating the deterioration.
Even on the extreme setup, i.e., using 1 local epoch for each client, we can find the intensified heterogeneity also exist since the adversarial generation will be conducted in each optimization step, and can be further mitigate by our SFAT.
Reducing the local epoch indeed can alleviate the robustness deterioration since it can reducing the original client drift (McMahan et al., 2017; Li et al., 2018).
As the original client drift is alleviated, the adversarial generation will inherit and exacerbate less heterogeneity.
However, it does not achieve the nature of this issue and this experimental setup adjustment has similar essence with those federated optimization methods (Li et al., 2018;
Karimireddy et al., 2020).
The results help us to better understand the effects of the proposed SFAT on combating the intensified heterogeneity via relaxing the inner-maximization to a lower bound.
[Table]
In Table
[Table]
we report and compare the results under the 1-epoch local training compared with our previous results under multiple epochs used in Table 3.
The results verify the consistent effectiveness of SFAT.
Reducing the local epochs to 1 indeed can improve the performance ( 0.5%) of the baseline
FAT, but might not be very practical due to the resulting large cost of the communication in federated learning (McMahan et al., 2017).
Even on the 1-epoch setting, as shown in Figure 8, the FAT still suffer from the robust deterioration.
The results in Table 9 demonstrate that the intensified heterogeneity could be better alleviated by our SFAT.
It is similar to our discussion (in Appendix E.8) about the orthogonal effects with federated optimization methods (Li et al., 2018).
E. SFAT VS . R E -SFAT
[Table]
Re-SFAT: 1+ α 1 − α = 0 .de-emphasize 90.03% 86.12% 64.35% 64.32%
Re-SFAT: 1+ α 1 − α = 0 .de-emphasize 89.46% 84.80% 58.64% 58.96%       
  &RPPXQLFDWLRQ5RXQGV          5 REX V W
$ FF X U D F\  (a) Robust accuracy       
  &RPPXQLFDWLRQ5RXQGV      
 

  ||
k s ||
2  (b) Client drift          &RPPXQLFDWLRQ5RXQGV         

|| k s || 2  5H6)$7 1+1 =0.8  )$ 6)$7 1+1 =1.4  (
[Figure]
Zoom
[Figure]
in
[Figure]
intensified robustness deterioration via emphasizing the client with larger adversarial loss which is reversed the operation of our SFAT
This verifies the rationality
SFAT that slack objective
In this part, we start with the experiments about comparing the performance of oppositely using the α -slack mechanism, i.e., Re-SFAT, with our original SFAT.
Then we discuss its underlying reason as well as the relationship of loss and the intensified heterogeneity.
In Table 10, we conduct an empirical comparison between FAT, SFAT (which emphasizes the client model with the smallest adversarial training loss) and Re-SFAT (which is a contrary variant of SFAT that de-emphasizes the client model with the smallest adversarial training loss).
Here the Re-SFAT share the same spirit with the AFL (Mohri et al., 2019), which seeks to improve the fairness and generalization through a loss-maximization reweighting.
The experimental setups keep the same as
Table 3 using 5 clients.
Both SFAT and Re-SFAT keep the (cid:98) K = 1 in all the trails.
Through the results across two benchmarked datasets (i.e., CIFAR-10 and SVHN ), We find that de-emphasizing the client with smallest adversarial loss (relatively emphasize those with larger adversarial loss) consistently harm the model performance across these evaluations, which shows the spirit of loss-maximization in Re-SFAT and AFL is contrary to the correct way.
In contrast, emphasizing the client with smallest adversarial loss indeed improve the model performance in terms of both natural and robust accuracies.
It confirms the rationality of SFAT to alleviating intensified heterogeneity by relaxing the inner-maximization of adversarial generation during aggregation.
Note that the generalization focus by AFL is under the standard federated learning instead of federated adversarial training, and the empirical results also confirm the loss-maximization actually trigger the intensified heterogeneity and lead to lower accuracies (in Table 10).
Since it is out of the scope of this work on handling the intensified heterogeneity, we leave it to our future work.
With respect to the experiments with standard training (in the left of Figure 4), there is no innermaximization in Eq.(3).
Thus, there is no intensified heterogeneity to handle but only positive training signals from the standard training.
In this case, adding the inequality with slack in Eq.(3) only induces the extra objective bias to the standard federated learning.
Correspondingly, as shown in the left-most panel of Figure 4, such an operation instead degenerates the model performance.
Discussion about the loss and the intensified heterogeneity.
It is the learning dynamic of Eq.that upweights the client model with the smaller losses and downweights the client model with the larger losses to slack the overall objective.
Possibly, the optimization bias (or termed as client drift more rigorously) may result in a smaller loss and sometimes the smaller loss may not absolutely indicate the smaller optimization bias.
We have verified that when the opposite does not hold and the larger loss is preferred in the selection in the middle panel of Figure 4 (see Re-SFAT v.s. SFAT) and the above Table 10 (see Re-SFAT v.s. SFAT).
The Re-SFAT is actually construct an upper bound of the FAT objective, which is different from SFAT that relax to the lower bound of the FAT objective.
The results empirically verify the failure of this case that prefers the larger loss.
Here we discuss the connection between the slack mechanism and the intensified heterogeneity (or roughly call intensified optimization bias).
To alleviate the intensified heterogeneity, our slack mechanism naturally relaxes the overall objective and constructs a mediating function that asymptotically approaches the original goal and reducing the negative impact of the intensified heterogeneity on the training.
Our reasonable analysis and comprehensive evidence from both theoretical (e.g., Theorems 4.2 and 4.3) and empirical (e.g., Figures 3, 10, and 11) views have demonstrated its rationality.
In Tables 3 and 19, the multiple experimental results with random non-iid data distribution as well as the real-world datasets demonstrates the empirical superiority of our proposed SFAT over the original FAT.
E. SFAT C ORRESPONDING TO C LIENT D RIFT
[Figure]
In this part
[Figure]
we present more results about the client drift during training using FAT and our SFAT than Figure 3.
The corresponding curve during training can be more clearly to show how SFAT alleviate the intensified heterogeneity and achieve the higher robust accuracy.
We conduct more experiments about the client drift of FAT and our SFAT on CIFAR-10 (Non-IID) in
Figure 10.
As the α increasing, our SFAT can further alleviate the intensified heterogeneity (having smaller client drift value as shown in Figure 10(a)) of FAT at the later stage which corresponds to the robustness deterioration (exhibiting less obvious deterioration while achieving higher robust accuracy as shown in Figure 10(b)).
Unlike FAT that hindered by the intensified heterogeneity, our SFAT can improve the robust accuracy by combating the issue of intensified heterogeneity.
E. A DDITIONAL DISCUSSION ON THE α - SLACK MECHANISM
Here, we first empirically verify the difference between FedSoftBetter and our SFAT, we conduct the experiments on CIFAR-10 and SVHN to compare their performance in the following table.
The results show that its empirical performance is slightly better than FedAvg but not better than SFAT.
[Table]
In the following
[Table]
we present the experiments that progressively anneal the coefficient to vanilla federated adversarial training during the training and compare with SFAT on CIFAR-10 and SVHN.
According to the results in Table
[Table]
gradually annealing- α SFAT achieves slightly lower robust accuracy than the constant- α SFAT and sometimes may introduces the large drop of natural accuracy (e.g., on CIFAR-10).
It indicates that keeping a consistent α for the α -slack maybe a better choice.
On the other hand
[Table]
it also confirms the intuition that using a gradually decreased alpha is empirically contrary to the observation of robustness deterioration (or the heterogeneity exacerbation as shown in
Figure 10) at the later stage of training.
[Table]
58% 30.52% 1+ α 1 − α : 1 .
SFAT 63.44% 45.13% 37.17% 33.99% 1+ α 1 − α : 1 . 4 → 1 .
SFAT 60.63% 43.53% 36.23% 33.22%
SVHNFAT 91.24% 87.95% 68.87% 67.39% 1+ α 1 − α : 1 .
SFAT 91.25% 88.28% 71.72% 69.79% 1+ α 1 − α : 1 . 2 → 1 .
SFAT 91.68% 88.55% 71.44% 69.76%
E. SFAT C ORRESPONDING TO G RADIENT V ARIANCE
[Figure]
       
[Figure]

[Figure]
To further factorize how the inner maximization affects the intensified heterogeneity of the local data, we add the experiments about the variance of the client’s gradients (calculated by parameters difference).
We find the similar trend with the empirical results about client drift in Figure 11, i.e.,
SFAT prevents exacerbated gradients variance in FAT, and results in better performance on robustness.
E. E MPIRICAL VERIFICATION ABOUT OUR THEORETICAL ANALYSIS .

   
 &RPPXQLFDWLRQ5RXQGV     
  E | L |  2ULJLQDO VODFN 
   
 &RPPXQLFDWLRQ5RXQGV       E | L |
L *  )HG$YJ 6)$
The overall results confirm the benefit on convergence from our proposed α -slack mechanism.
Here, we provide the empirical verification about the theoretical claim in Theorem 4.2 and Theorem 4.3 via tracing the training loss on CIFAR-10 and SVHN datasets.
In Figure 12, we present the empirical estimation of the RHS of Eq.
(2) and Eq.
(4) via tracing the training loss.
The results show that our our α -slack mechanism can achieve a faster convergence compared with the original objective for the convergence of adversarial training in Theorem 4.2 and the federated case in Theorem 4.3.
E. E XPERIMENTS ABOUT THE O RTHOGONAL E FFECTS OF SFAT ON C LIENT D IRFT .
In this part, we start with the discussion about the orthogonal effects of SFAT from the conceptual perspective, and then present the orthogonal effects of SFAT on combating the intensified heterogeneity via tracing the client drift from the experimental perspective.
From the problem view, our slack mechanism is targeted for the intensified heterogeneity.
However, similar to other techniques in federated learning literature, FedProx (Li et al., 2018) is designed for the original heterogeneous data instead of considering the intensified process.
The two problems are discussed in our Appendix A.
Although intensified heterogeneity and the ordinary heterogeneity (i.e., without the inner-maximization) both induce the client drift, the effects and extent are different.
To be specific, the intensified heterogeneity will result in more diverged models and exacerbate the difference among client models compared with the ordinary heterogeneity.
This intensification process is not considered in FedProx or other related work (McMahan et al., 2017; Karimireddy et al., 2020), and SFAT is orthogonal to them further incorporates a slack mechanism to avoid its influence.
[Table]
From the experimental view, we also provide the comparison between SFAT and FedProx (actually they are orthogonal and combinable).
We show the results of client drift w.r.t different methods in the Tables 13 and 14.
According to the results, FAT under the backbone FedProx can indeed catch up with our SFAT on basis of FedAvg since the FedProx is designed for reducing the client drift.
However, when adopting FedProx as the backbone of SFAT, the intensified client drift can be further reduced, which verified the orthogonal effects (as stated in our Appendix A) on reducing intensified heterogeneity in the critical issue of federated adversarial training.
Note that, we are not focus on the relationship of normal heterogeneity (Li et al., 2018)
(e.g., the value of client drift) with the robust
[Table]
performance in federated adversarial training.
Instead, our proposed SFAT actually focus on the robust deterioration caused by the intensified heterogeneity (e
[Table]
g., the increasing trend of client drift).
It is orthogonal and compatible to those previous federated optimization methods.
[Table]
Except the previous results
[Table]
we further strength the hyper-parameter µ of the proposed proximal term i.e., µ 2 || w − w t
|| 2 in FedProx to verify the improvement of using our SFAT on SVHN dataset.
We summarize the results in Table 15.
The results show that increasing the µ from 0.01 (adopted in our experiments and following the recommendation of FedProx) to 0.1, the robust performance even worse while our SFAT can still reach the better performance.
The reason may be that too large µ also has the potentially negative influence on the convergence of the training by forcing the updates to be close to the starting point, which has been discussed in previous literature (Karimireddy et al., 2020).
E. E XPERIMENTS WITH M ORE C LIENTS
[Table]
In this part, we verify SFAT using more clients under the Non-IID data partition with the three benchmarked datasets, i.e., CIFAR-10 , SVHN and CIFAR-100 .
In Table 16, we change the client number from 10 to 50 to investigate the scalability of our SFAT.
For each client setting, we conduct FAT and SFAT to compare their performance on both natural test data and adversarial test data.
In the experiments, we set (cid:98) K
= K/ 5 and α = 1 / 11 for our SFAT and keep the other basic setups as the same with previous experiments.
We can find that the results further confirm the effectiveness of SFAT on improving both natural and robust performance when training with different client numbers.
[Table]
[Table]
[Table]
[Table]
[Table]
To complete our experimental verification on those unequal data splits
[Table]
we conduct the experiments on CIFAR-10 and SVHN datasets with different client numbers.
We summarize the results in Table
[Table]
In addition [Table]
we also add Table 18 to explore the more severe unequal splits in different clients. In such setups
[Table]
the sample numbers of different client are also a critical factor to the optimization.
More samples the client has, larger weights the local model has in the aggregation phase.
In comparison with our α , it follows the support of the statistical sample proportion while our α utilizes the clues of the local loss related to the adversarial training.
According to the results, we can see that
SFAT is approximately orthogonal to the sample number effect and still more effective than FAT.
From the algorithm level, our algorithm (refer to Algorithm 1) and the framework (refer to Figure 6) has taken the numbers of local data into consideration.
To be specific, when we conduct the slack selection, all the adversarial training loss are normalized by the local data number.
E. E XPERIMENTS ON T HE R EAL - WORLD S CENARIOS
To verify the effectiveness of our SFAT in more practical situation, we conduct the experiments using a real-world dataset CelebA in the benchmark of federated learning, i.e., LEAF (Caldas et al., 2018),
[Table]
with hundreds (455) of clients in Table 19.
We follow the most settings in LEAF to perform our experiments using different federated optimization methods
[Table]
and we set (cid:98) K = 2 ∗ K/ 5 and α = 1 /for
all the experiments of our SFAT.
In Table
[Table]
we confirm the effectiveness of our SFAT using a real-world large-scale dataset CelebA with 455 clients.
Except Scaffold that fails to converge in FAT and thus is not reported, our SFAT again gains significantly better natural and robust accuracies than FAT under FedAvg and FedProx.
[Table]
In addition
[Table]
we also consider the practical situation where only a subset of clients participates in each round.
Following the same settings as previous section
[Table]
we add the experiments on SVHN dataset in
Table 20 with 20 clients.
The results show that the lower participation ratio leads to lower natural and
PGD-20 accuracy while our SFAT can consistently outperform FAT on the robustness.
E. O VERALL R ESULTS ON B OTH N ON -IID AND IID S ETTINGS
Here we provide the overall results for comparison on both Non-IID and IID settings in Table 21.
For the Non-IID data, our SFAT gain consistently improvement across the various of evaluation metrics and datasets.
For the IID data, our method acquires a similar improvement on the robust accuracy without the deterioration of the natural accuracy.
The reason might be that even the data is IID, adversarial training can still drive the independently-initialized overparameterized network (Allen-Zhu & Li, 2020) on each client side towards at the robust overfitting of different directions, yielding the model heterogeneity.
Thus, the proper slack to the inner-maximization makes adversarial training more compatible with federated learning.
Another interesting observation is that Federated Adversarial Training shows better performance than centralized adversarial training in the IID setting.
This gain could be from the distributed training paradigm that helps adversarial training converge to the more robust optimum by the divide-and-conquer mechanism.
This might enlighten the more explore in adversarial training to improve the robustness via federated learning.
[Table]
F F URTHER D ISCUSSION
Adversarial robustness is an important topic in the centralized machine learning.
The adversarial training are confirmed to be one of the most effective empirical defenses against the adversarial attack, which is critical especially for those safety-critical areas like medicine and finance.
In federated settings, how to train an adversarially robust model is a challenging but practical task for the increasing concern about data privacy.
In this work, we observe and explore to combat the intensified heterogeneity in federated adversarial training.
Different from the conventional FAT adopted by previous works, we propose a new learning framework, i.e., SFAT, which relaxes the exacerbated heterogeneous effect and is compatible with the various adversarial training (Madry et al., 2018;
Zhang et al., 2019) and federated optimization methods (Li et al., 2018; Karimireddy et al., 2020).
Although we take a step forward in FAT, it is not the end of this direction since there are still many problems to be addressed to further enhance the practicality of federated adversarial training.
From the perspective of adversarial robustness, adversarial attacks can be very complex, especially in a decentralized environment, while the adversarial robustness discussed in this paper mainly focuses on common adversarial attacks (e.g., L ∞ -bounded attack) (Goodfellow et al., 2015).
More practical situation which contains different kind of adversarial attack (e.g., mixed types of attack with L ∞ - bounded attack, Spatially transformed attack (Xiao et al., 2018)), even only considering the inference phase, may also happened since there are different clients may meet different threaten (Kairouz et al., 2019; Yao et al., 2022).
Besides, the federated adversarial training that requires multiple local runs (Madry et al., 2018; Zhang et al., 2019) also introduces the extra computation to the low-capacity devices, which is computational bottleneck and requires some lightweight techniques.
Except for the empirical defense strategy focused by our work, the certifiable robustness (Cohen et al., 2019; Zizzo et al., 2021; Alfarra et al., 2022) which can give the theoretical guarantees is also important.
From the perspective of federated learning, our SFAT shares the similar spirit of the conventional federated adversarial training.
The first part of challenges comes from the distributed learning paradigm (McMahan et al., 2017; Kairouz et al., 2019; Li et al., 2020) of federated setting, which brings the hardware constraint that considers the computational capacity of local clients and communication cost between clients and server (Hong et al., 2021).
Once these conditions do not satisfy, both FAT and SFAT would not work well.
The second may from the algorithm design for some special training or inference issues, like dealing with heterogeneous data (Li et al., 2018; Zhao et al., 2018), class-imbalance data or even some out-of-distribution data at inference time.
On the other hand, the decentralized structure of the learning paradigm also introduces various issues on information transferring for server and clients.
The current federated adversarial training still needs large improvement considering the practical cases that may happened in the federated setting.
For the intensified heterogeneity, it can also be recognized as an dynamical heterogeneous issue existing in federated learning, which may result from the special learning algorithm adapted in the distributed framework or other data manipulation scenarios.
More robust issues, like robust distillation (Goldblum et al., 2020; Zhu et al., 2022), train-test distribution shift (Jiang & Lin, 2023), out-of-distribution detection (Yu et al., 2023), under the federated framework can be further explored in the future.