F EDERATED LEARNING WITH GAN- BASED DATA SYNTHESIS FOR NON - IID CLIENTS
Anonymous authors
Paper under double-blind review
A BSTRACT
Federated learning (FL) has recently emerged as a popular privacy-preserving collaborative learning paradigm.
However, it suffers from the non-IID (independent and identically distributed) data among clients.
In this paper, we propose a novel framework, namely Synthetic Data Aided Federated Learning (SDA-FL), to resolve the non-IID issue by sharing differentially private synthetic data.
Speciﬁcally, each client pretrains a local generative adversarial network (GAN) to generate synthetic data, which are uploaded to the parameter server (PS) to construct a global shared synthetic dataset.
The PS is responsible for generating and updating high-quality labels for the global dataset via pseudo labeling with a conﬁdent threshold before each global aggregation.
A combination of the local private dataset and labeled synthetic dataset leads to nearly identical data distributions among clients, which improves the consistency among local models and beneﬁts the global aggregation.
To ensure privacy, the local GANs are trained with differential privacy by adding artiﬁcial noise to the local model gradients before being uploaded to the PS.
Extensive experiments evidence that the proposed framework outperforms the baseline methods by a large margin in several benchmark datasets under both the supervised and semi-supervised settings.
I NTRODUCTION
The recent development of deep learning technologies has led to major breakthroughs in various domains.
This results in a tremendous amount of valuable data that can facilitate the training of deep learning models for intelligent applications.
A traditional approach to exploit these distributed data samples is to upload them to a centralized server for model training.
However, directly ofﬂoading data raises severe privacy concerns as data collected by mobile clients may contain sensitive information.
By decoupling model training from the need of transferring private data to the cloud, federated learning (FL) offers a promising approach to collaboratively learn a global model without directly sharing the local data.
Particularly, McMahan et al.
(2017) introduced the Federated Averaging (FedAvg) algorithm that synchronously aggregates the updates of local models, while satisfying the basic requirements for privacy protection.
Later, FedProx was proposed by Li et al.
(2020) that adds a proximal term in the loss function to improve the statistical stability of the training process.
A key characteristic of federated learning is the non-IID (independent and identically distributed) data distribution among clients.
Consequently, different clients learn from different data distributions, which leads to high heterogeneity among local models and degrades the effectiveness of model aggregation (McMahan et al., 2017; Wang et al., 2020b).
For extreme cases with highly skewed data distribution, traditional federated learning methods even lack a theoretical guarantee of convergence (Yu et al., 2020; Rothchild et al., 2020).
Recent studies have attempted to address the non-IID issue by constructing a global shared dataset based on the local data to mitigate the data imbalance effect (Krizhevsky et al., 2009;
Zhao et al., 2018; Yoshida et al., 2020; Oh et al., 2020).
Particularly, several methods (Krizhevsky et al., 2009; Yoshida et al., 2020) proposed data sharing strategies to distribute a percentage of raw data among clients, but naive data sharing seriously violate the privacy requirement in FL.
Besides, data augmentation approaches (Zhang et al., 2021; Oh et al., 2020) generate synthetic samples without directly sharing private data. However, these methods are still susceptible to data leakage without a privacy-preserving mechanism.
Thus, it is important to investigate how to generate privacy-preserving synthetic samples, as well as how to effectively utilize the private dataset and synthetic dataset in the FL framework.
To alleviate the heterogeneity of the data distribution in FL without compromising privacy, we propose a novel framework, named Synthetic Data Aided Federated Learning (SDA-FL), which resolves the non-IID issue by sharing differentially private synthetic data.
Under this framework, each client pretrains a local generative adversarial network (GAN) (Goodfellow et al., 2020) to generate synthetic data, thus avoiding sharing the raw data directly.
A parameter server (PS) performs pseudo-labeling for the uploaded synthetic data and constructs a global shared dataset.
In each global aggregation, the PS updates the pseudo labels of the synthetic dataset based on the received models and updates the global model with the conﬁdent synthetic data.
This iterative labeling process constitutes a synthetic dataset with high-conﬁdence labels, which is fed back to the clients to construct their training samples, including the local private data and synthetic data, following an almost identical distribution.
Meanwhile, to provide a privacy guarantee for the generative models, we adopt the widely used differential privacy (Dwork, 2008) to ensure that the actual training samples can not be revealed by adversaries.
In particular, we use the Wasserstein GAN with gradient penalty (WGAN-GP)
(Gulrajani et al., 2017) as the backbone and introduce the privacy budget by adding artiﬁcial noise to the gradients in the training process.
The SDA-FL framework is mostly compatible with many existing FL methods and can be applied in both supervised and semi-supervised settings.
We evaluate the proposed framework on several standard datasets under both supervised learning and semi-supervised learning, which shows its effectiveness in resolving the non-IID distribution problem even in the extreme case (with only one class of real data at each client).
We also investigate the tradeoff between the privacy budget and the FL performance, which demonstrates that this framework is fully functional under the strict differential privacy protection requirement.
Our major contributions are summarized as follows:
• We develop a global shared synthetic dataset by the differentially private GAN models.
This data augmentation method effectively resolves the non-IID problem in FL and maintains the local data privacy.
• To utilize the global shared synthetic dataset efﬁciently, we propose a novel framework, SDA-FL, in which the PS provides and keeps updating high-conﬁdence pseudo labels for the synthetic dataset iteratively, thus improving the performance of the global model.
• We evaluate our framework on several benchmark datasets under the high heterogeneous data distribution, where our framework consistently outperforms other baselines under both supervised and semi-supervised learning.
Besides, our framework experiences a slight performance degradation with a stringent privacy budget.
R ELATED W ORK
Non-IID Challenges in Federated Learning The pioneering work in FL is FedAvg (McMahan et al., 2017), which simply averages model parameters trained by different clients in an elementwise manner, weighted proportionately by the clients’ data size.
However, this algorithm often leads to slow convergence and performance degradation when data is heterogeneous across local clients (Li et al., 2019).
To alleviate this issue, Wang et al. (2020a) leveraged the reinforcement learning to intelligently choose the client devices to participate in each round of federated learning to counterbalance the bias introduced by non-IID data. Besides, some studies proposed personalized layers to adjust the local model according to the private dataset (Arivazhagan et al., 2019; Liang et al., 2020).
For example, FedPer was introduced in Arivazhagan et al.
(2019) that captures personalization aspects in federated learning by only using the local data to train the personalized layers.
Knowledge distillation (Deng et al., 2020; Lin et al., 2020) is also a promising idea of personalized federated learning, which transfers information from other clients to a certain client.
Although the aforementioned methods outperform FedAvg on strongly non-IID data, the extra computational costs are not affordable by the resource-constrained IoT devices (Zhu et al., 2021).
Thus, client clustering has been proposed to construct a multi-center framework by grouping the clients into different clusters based on the model similarity (Ghosh et al., 2020; Kopparapu & Lin, 2020).
As clients avoid the negative knowledge transfer from the dissimilar models (Pan & Yang, 2009), clustering methods can alleviate the negative effect of the non-IID data distribution.
However, such methods are not scalable as the communication cost increases largely with the number of clients.
Data Augmentation and Privacy Preserving Recently, methods based on some form of data sharing have received increasing attentions and achieved prominent performance in FL (Zhu et al., 2021;
Zhao et al., 2018).
Particularly, data augmentation approaches showed the potential capability to address the non-IID issue by modifying the local distributions without sharing private data (Duan et al., 2019; Zhang et al., 2018;
Eaton-Rosen et al., 2020).
A vanilla data augmentation method was proposed by Duan et al.
(2019), in which each client performs local data augmentation to reach a balanced global distribution.
Besides, several methods (Oh et al., 2020; Shin et al., 2020; Yoon et al., 2021) leveraged the Mixup technique (Zhang et al., 2018) to conduct data augmentation, where the clients share the blended local data and collaboratively construct a new global dataset to tackle the non-IID issue.
However, frequent data exchange may be susceptible to privacy issues.
Recently, the GAN-based data augmentation framework (Bowles et al., 2018; Yoshida et al., 2020) was shown to be promising for reducing the degree of local data imbalance in FL.
The general idea is to train a good generative model in the presence of non-IID data.
Under this framework, each client sends its local seed samples to the server for the GAN training, and then a well-trained generator will be sent to all the clients for model updating.
However, directly sending local data samples to the server violates the data privacy requirement.
FedDPGAN (Zhang et al., 2021) suggested an alternative that all the clients train a global GAN together based on the FL framework to supplement the scarce local Covid-19 data.
Unfortunately, the white-box generators sent to the server are vulnerable to adversarial attacks (Chen et al., 2020).
P RELIMINARY
Federated Learning FedAvg (McMahan et al., 2017) is one of the representative training algorithms in federated learning, and it trains a shared neural network without disclosing the raw data of clients.
For every step t = 0 , . . .
, T − 1 , every client k ∈ S t downloads the global model w t and updates the local model with local dataset D k via stochastic gradient descent (SGD), i.e., w t +
k ← w tk − η t +1 ∇ (cid:96) .
The updated local models are then sent back to the PS for a weighted aggregation w t +1 ← 1 K (cid:80) k ∈ S t w kt
+1 .
These procedures repeat until convergence or all the T training steps are exhausted.
Differentially Private Generative Adversarial network
We utilize a differentially private generative adversarial network (DPGAN) for data augmentation while protecting local data privacy.
To avoid the gradients vanishing and mode collapse problems (Arjovsky & Bottou, 2017; Arjovsky et al., 2017) that are commonly encountered by many GAN models (Mirza & Osindero, 2014; Radford et al., 2015; Odena et al., 2017), we adopt the WGAN-GP (Gulrajani et al., 2017), which is upgraded based on the Wasserstein GAN (WGAN) (Arjovsky & Bottou, 2017; Arjovsky et al., 2017), as the backbone of the generative model for a stable training procedure.
Besides, we add noise to the gradient in the generator training process, which provides privacy control in terms of differential privacy (Torkzadehmahani et al., 2019).
The deﬁnition of differential privacy is as follows:
Deﬁnition 1.
(Differential privacy 1 ): A random mechanism A p satisﬁes ( (cid:15) , δ )-differential privacy if for any output’s subset ( S ) and for any two adjacent datasets D , D (cid:48) , the following probability inequality holds:
[Equation]
Particularly, δ is an optimal probability that guarantees the validity of the inequality, and (cid:15) is the privacy budget indicating the privacy level, i.e., a smaller value of (cid:15) implies stronger privacy protection.
To satisfy the ( (cid:15), δ ) -differential privacy, we follow the work (Xie et al., 2018) and add the Gaussian noise to the gradients updated in each discriminator training iteration.
The relationship between the noise variance and differential privacy is shown as follows:
[Equation]
where q and n d denote the sample probability and the number of discriminator training iterations in each training round, respectively.
Pseudo Labeling
Although GAN-based data augmentation can generate synthetic data, the labels of the synthetic data are unknown, which hinders the training of the model through backpropagation.
In semi-supervised learning, pseudo labeling is a widely used method in classiﬁcation tasks to generate conﬁdent pseudo labels (Sohn et al., 2020).
A hard pseudo label will be applied to the unlabeled data if the maximum class probability (MCP) of the inference result (Corbi`ere et al., 2019) exceeds a predeﬁned threshold τ .
In our experiments, the threshold is set to be 0 .
S YNTHETIC D ATA A IDED F EDERATED L EARNING (SDA-FL)
We now introduce the SDA-FL framework that adopts GAN-based data augmentation to alleviate the negative effect of the non-IID data.
The system diagram is shown in Fig.
1, and key algorithmic innovations built upon the classic FL framework are elaborated below.
Global Synthetic Dataset Construction
At the beginning of the federated training, each client pretrains a local GAN model to generate synthetic samples based on its private data.
Then, the synthetic samples are sent to the PS to construct a global shared synthetic dataset.
To effectively leverage the synthetic dataset for federated learning, we perform pseudo labeling for these samples, which is critical for the effectiveness of the proposed framework.
In federated learning, the local model is the most suitable network to predict the pseudo labels for the synthetic data generated by the corresponding local GAN, as they are both trained with the same data.
In our framework, to improve the conﬁdence level of the pseudo labels, we utilize the local models to perform the pseudo labeling for the unlabeled synthetic data.
Speciﬁcally, after receiving the local model w i t +1 in each aggregation step, the PS utilizes the model predictions to assign a pseudo label for each unlabeled synthetic instance if the maximum class probability is higher than a predeﬁned threshold τ .
In this way, we are gradually generating synthetic data samples with high-quality labels.
Synthetic Data Aided Model Training Augmented by the samples from the shared synthetic dataset that are with the conﬁdent labels, the data available for local training at different clients reach approximately homogeneous distribution.
To make good use of the synthetic data, we leverage the
Mixup method (Zhang et al., 2018), which utilizes linear interpolation between the real sample ( x i , y i ) and the synthetic sample (ˆ x i , ˆ y i ) to augment the real data: [Equation] where λ 1 follows the Beta distribution (cid:0) Beta ( α, α ) (cid:1) with α ∈ [0 , 1] . Combined with the crossentropy loss, the Mixup loss for local update becomes:
[Equation]
Input: Local dataset D k = { X k , Y k } ,
Pretrained generators G = { G k } k ∈ { 1 , . . .
, N }
Initialize w 0 , Synthetic dataset ˆ D s = { ˆ X s , ˆ Y s } for server, ˆ D k
= { ˆ X k , ˆ Y k } for clientsAllclients upload the synthetic data generated by G k to PS for t = 0 , . .
, T − 1 do S t ← K clients are selected at random
Send w t and updated pseudo labels to clients k ∈ S t
Clients Side: for k ∈ S t do
Updata local synthesis dataset ( ˆ X k , ˆ Y k ) w kt +1 ←
LocalUpdate ( k, w t ; X k , Y k , ˆ X k , ˆ Y k ) end
Parameter Server Side:
Pseudo Label Update w t +1 ← 1 K (cid:80) k ∈ S t w kt + w t +1 ← ServerUpdate ( w t +1 ; ˆ X s , ˆ Y s ) end
LocalUpdate ( k, w t ; X k , Y k , ˆ X k , ˆ Y k ) : w ← w t for e = 0 , . . .
, E − 1 do
Split D k into batches of size B for batch ( X , Y ) do
Sample batch ( ˆ X , ˆ Y ) from ( ˆ X k , ˆ Y k )[-(cid:96) 
-]
Use ( ˆ X , ˆ Y ) and ( X , Y ) to update w following (6) end endreturn w ServerUpdate ( w t +1 ; ˆ X s , ˆ Y s ) : w ← w t +1 for e = 0 , . . .
, E − 1 do
Sample batch ( ˆ X , ˆ Y ) from ( ˆ X s , ˆ Y s )
Evenly divide ( ˆ X , ˆ Y ) into ( ˆ X 1 , ˆ Y 1 ) and ( ˆ X 2 , ˆ Y 2 ) Use ( ˆ X 1 , ˆ Y 1 ) and ( ˆ X 2 , ˆ Y 2 ) to update w following (6) endreturn w
In addition, to keep more information of the local clients, another cross-entropy loss term is introduced for the real data as follows:
[Equation]
Then SGD is applied to update the local model:
[Equation]
where λ 2 is a hyperparameter to control the retention of the local information and will be set in different values in experiments.
More details about the local update are shown in Algorithm 2.
In contrast to the traditional federated learning where the PS does not have access to any data to update the global model, the PS in our framework can keep the entire global synthetic dataset ˆ D s and uses it to update the global model, thereby helping to enhance the performance.
Interplay between Model Training and Synthetic Dataset Updating Because of the non-IID problem, there is a distinct difference in the weights of the local models among clients in federated learning.
Furthermore, simply sharing the synthetic data with the PS and other clients will not result in the good training performance of the global model due to the lack of conﬁdent pseudo labels.
Our framework, SDA-FL, deeply integrates federated learning and synthetic data, which effectively alleviates the non-IID issue and helps to train a good global model.
As shown in Fig.
1, after creating the global synthetic dataset, it will be shared with all the clients so that the local data, including both the real and the synthetic data, approach an IID distribution.
Without a doubt, the supplement of synthetic data results in the improvement of the local models.
After being uploaded to the PS, the updated local models are used to perform the pseudo labeling and update the global synthetic dataset by the PS.
The stronger local models can boost the conﬁdence of the pseudo label.
With the improvement of labeling for the global synthetic dataset, the PS can utilize it to update the global model and all the clients can improve their local models subsequently at the next-round training.
Thus there is an interplay between the model update and the synthetic dataset at every training round: global synthetic dataset → global model update → local model update → labeling for global synthetic dataset, which results in a converged and well-perform model.
SDA-FL vs. Traditional FL
From the above descriptions, the proposed SDA-FL framework introduces two additional operations at the server side, namely, pseudo label update of the shared synthetic dataset and server-side model update, as shown in Fig.
These two main innovations contribute to the performance improvement with non-IID data.
In traditional FL algorithms (Li et al., 2020; Karimireddy et al., 2020), clients update their models based on local private data, which may lead to performance degradation when data are heterogeneous over clients.
In our framework, the local dataset is augmented by the GAN-based synthetic samples, which alleviates the non-IID problem.
Furthermore, the PS in the traditional FL system only performs model aggregation based on the uploaded local models.
In contrast, our framework generates high-conﬁdence synthetic data to update and improve the global model at the PS.
Overall, with a shared synthetic dataset and an effective mechanism for pseudo label update, SDA-FL can overcome the heterogeneous data distributions among clients and enhance the model update at the server.
We envision that this framework can be applied to develop other data augmentation-based methods for more efﬁcient federated learning.
E XPERIMENTS
In this section, we evaluate the proposed SDA-FL framework in the presence of non-IID data for both supervised learning and semi-supervised learning.
The experimental results on different benchmark datasets demonstrate the effectiveness of the proposed framework compared with baseline methods.
Besides, ablation studies are conducted to illustrate the impacts of key factors on the generated samples and the model convergence.
5. E XPERIMENTAL S ETUP
Datasets We implement the SDA-FL framework in the scenario where all the real data are stored in clients and the PS only has access to the synthetic data.
We use four benchmark datasets, including MNIST (LeCun et al., 1998), FashionMNIST (Xiao et al., 2017), Cifar-10 (Krizhevsky, 2009), and SVHN (Netzer et al., 2011) to test the proposed method.
The details about the datasets, models and experimental settings are deferred to Appendix A. To demonstrate the effectiveness of our framework in handling different non-IID scenarios, we provide extensive experiments in the following ﬁve tasks.
Tasks 1)
Federated supervised learning: We compare our framework with FedAvg (McMahan et al., 2017), Fedprox (Li et al., 2020), Scaffold (Karimireddy et al., 2020), Naivemix, and Fedmix (Yoon et al., 2021) on MNIST, FashionMNIST, Cifar-10, and SVHN datasets.
Federated semi-supervised learning: We extend our framework to the semi-supervised learning setting in MNIST, FashionMNIST, and Cifar-10 datasets by performing pseudo labeling for the unlabeled data.
To show the effectiveness of our SDA-FL method, we compare it with Local Fixmatch+Mixup
(Diao et al., 2021), Local Fixmatch (Sohn et al., 2020), and Local Mixup (Zhang et al., 2018).
The trade-off between the privacy budget and performance: To investigate the inﬂuence of the differential privacy mechanism on the quality of the synthetic data and the model convergence, we validate our framework under different privacy budgets.
In particular, we select the Fr´echet Inception Distance (FID) (Heusel et al., 2017) as a metric to quantify the quality (similarity) of the synthetic data. The effectiveness of updating pseudo labels and the server update: Compared with the traditional federated learning, SDA-FL leverages the pseudo labeling mechanism to generate highconﬁdence pseudo labels for the synthetic data, which are also used by the PS to further update the global model. To demonstrate the efﬁcacy of these two mechanisms, we conduct ablation studies on a varying number of rounds for updating the pseudo labels and a varying number of server update steps. 5)
Ablation studies of the computational cost and the number of samples for training the generators: To evaluate the performance of the generative models, we conduct ablation studies to investigate the inﬂuence of the training epochs and the number of samples the quality (similarity) of the synthetic data. [Table]
5. P ERFORMANCE OF SDA-FL ON N ON -IID F EDERATED L EARNING
Federated
Supervised Learning We compare the performance of various methods under the same federated setting.
With varying numbers of classes per client, the experimental results in Table 1 show that our framework outperforms other methods by a large margin, which is attributed to the GAN-based data augmentation that mitigates the detrimental effects of the data heterogeneity. Under the severe non-IID scenario (i.e., each client only has one class of data), our SDA-FL method maintains an accuracy of 88.46% in the SVHN classiﬁcation task, while other baselines suffer from great performance degradation.
In the Cifar-10 experiments, our framework outperforms the classic Naivemix and Fedmix algorithms at least by 5.0% with three classes of data at each client.
This indicates that augmentation via synthetic data is more effective than averaging real data samples, although Fedmix adds another derivative term when averaging real images to explicitly handle the non-IID problem. Recently, GANs have been widely used to solve the non-IID and data scarce issues based on the federated learning in the medical ﬁeld (Nguyen et al., 2021; Zhang et al., 2021), which can afford the additional computational cost for training the GANs. To further show the feasibility of SDA-FL, we include another comparison on a Covid-19 dataset (Chowdhury et al., 2020). See more details about the Covid-19 experiment in Appendix B.
[Figure] 2) Federated Semi-Supervised Learning The results in Fig.
2 show that our framework achieves faster convergence and better performance than other algorithms, indicating its robustness and generalizability.
Particularly, compared with Local Fixmatch+Local Mixup, our method improves the accuracy by nearly 10% in the FashionMNIST classiﬁcation task.
In the Cifar-10 dataset, the baseline methods are not able to train a usable global model (with a test accuracy below 40%), while our framework converges in this challenging scenario and improves the test accuracy by a signiﬁcant margin.
This is because the proposed pseudo labeling mechanism can provide high-quality labels for the synthetic and unlabeled samples, which beneﬁts the federated training process.
The trade-
off between the privacy budget and performance The privacy budget (cid:15) provides the privacy protection for the generation of the synthetic dataset, but a small value of (cid:15) affects the quality of the synthetic samples and thus degrades the training performance.
To investigate the impact of the privacy budget, we evaluate the performance of the proposed method under different [Figure] [Figure] values of (cid:15) .
As shown in Fig.3, the proposed framework suffers from performance degradation with a small privacy budget.
Compared with a protection-free scenario ( (cid:15) = ∞ ), setting a strict privacy budget ( (cid:15) = 5 ) (Xie et al., 2018) leads to around 0.61% and 2.59% accuracy drop in the MNIST and FashionMNIST datasets, respectively. Besides, we utilize the FID to measure the quality of the generated samples, where a smaller FID score denotes a better image quality.
As illustrated in Fig.3, decreasing the privacy budget (cid:15) increases the FID score, which implies the degradation of the quality of the generated samples.
Note that although our SDA-FL method is trained under the strict privacy requirement, compared with the results in Table 1, our framework still maintains desired performance over other methods.
In the Cifar-10 classiﬁcation task, as the generators are sensitive to the Gaussian noise added to the gradient, we adopt a large privacy budget ( (cid:15) = 50 ) when training the proposed method.
Fig.3(c) shows that our framework outperforms Fedmix and Fedprox in federated supervised learning.
To illustrate the privacy guarantee on the generators in our framework, we show some synthetic samples in Fig.4(a), which are extracted from the generators trained with (cid:15)
= 200 .
In comparison with the samples from the private datasets, the synthetic images are blurry and noisy, which means the GAN models are not memorizing the real data, and the local privacy is not undermined.
Besides, the performance improvements shown in Fig.3(c) and Table 1 indicate that the synthetic images with low perceptual quality can capture the necessary information for the model training.
In comparison to the traditional federated learning, our framework can update the global network with the synthetic data at the server, which has the potential to further improve the performance.
The results in Fig.5 show that the model performance on FashionMNIST will drop nearly 3% without any server update.
However, too many server updates also degrade the performance because too much involvement of the synthetic data will relieve the effects of the local update. The empirical results show that the model trained solely with the synthetic data (the ∞ steps) can only get 66.0% accuracy, which highlights the necessity to effectively utilize the synthetic data as well as the local data for model training.
Besides, keeping updating pseudo labels for the synthetic data improves the model performance. As illustrated in Fig.6, the accuracy gradually increases when continuously updating the pseudo labels, which demonstrates that our framework can improve the conﬁdence level of the pseudo labels in the training process.
Note that since our framework only updates the pseudo labels instead of the samples, the extra communication overhead is neglectable. The ablation studies of computational cost and the number of samples for training the generators We present the results in Fig.7 and Fig.8, which show that insufﬁcient training rounds and training samples for generators result in low-quality synthetic data and degraded performance. The generator only gets an FID score of 217.81 (23.17 for real data) and an accuracy of 83.76% when training the generators with 30 rounds.
In addition, as shown in Fig.8, under the ﬁxed 30round computational cost, using fewer samples for training the generators reduces the quality of the synthetic data and thus affects the performance. Nonetheless, despite the low computational cost ( rounds) and the small number of samples (1000 samples) used to train the generators individually, our framework still outperforms other baselines (82.41% in Fedmix), demonstrating the robustness of the proposed method. In addition to the inﬂuence of the quality of synthetic data on the performance, other factors, such as the threshold τ , λ 2 , and the size of the synthetic dataset, also affect the global model. More ablation studies about these factors are shown in Appendix C.
C ONCLUSIONS
We proposed a new data augmentation method to resolve the heterogeneous data distribution problem in federated learning, by introducing pretrained GANs to construct a differentially private global shared dataset.
To effectively utilize the synthetic data, a novel framework, named Synthetic Data
Aided Federated Learning (SDA-FL), was developed, which generates and updates conﬁdent pseudo labels for the synthetic data samples.
By supplementing the non-IID private datasets with highquality synthetic data samples, this framework effectively improves the consistency among local models.
Experiment results showed that SDA-FL outperforms many existing baselines by remarkable margins in various image classiﬁcation tasks and is still functional under strict differential privacy protection. A E XPERIMENTAL D ETAIL
Datasets To demonstrate the generalizability of our framework, we use ﬁve widely used datasets to test our frameworks, where the details of the datasets are summarized in Table 2.
In all the experiments, we equally divide the training samples and assign them to the clients based on the nonIID setting.
Speciﬁcally, given the number of classes per client as C and with K clients, the whole dataset will be split into K ∗ C subsets, and each subset only has a single class.
Then all the subsets of data will be randomly shufﬂed and distributed to clients.
For example, in the MNIST experiment, under the scenario that each client only accesses two classes of data, given K = 10 clients, each client keeps 60000 / 10 = 6000 samples, each class with 3000 samples.
The data distribution is kept the same in the comparison between our framework and other baselines.
Except for the Coviddataset, we set 10 clients for all the experiments, and all the clients participate in the training at every communication round.
Models For fair comparisons, we adopt a simple CNN model that consists of two convolution layers and two fully-connected layers for the MNIST and FashionMNIST classiﬁcation tasks.
Meanwhile, ResNet18 (He et al., 2016) is used for classifying the Cifar-10, SVHN, and Covid-19 image datasets.
To generate the qualiﬁed synthetic samples, we set a generator with four deconvolution layers and a discriminator with four layers convolution layers followed by a fully-connected layer
[Table]
[Table]
[Table]
[Figure]
[Table]
[Table]
Experimental settings of tasks 1)
Federated supervised learning: In the federated supervised and semi-supervised experiments, the parameters always are kept the same in our framework
[Table]
and they are shown in the Table 3.
In the baseline experiments, we set µ = 0 .
001 , 0 . 01 , 0 . 1 , 1 . 0 for
Fedprox, and λ = 0 .
5 for Naivemix as well as Fedmix.
The best performances of them are reported in the Table 1.
2) Federated semi-supervised learning: In this experiment, we compare our framework with other baselines in MNIST, FashionMNIST, and Cifar-10 datasets.
Every client only keeps two classes of data, containing 50 labeled instances, and the rest are unlabeled.
For fair comparisons, the total gradients steps of SDA-FL are the same as other methods.
The trade-off between the privacy budget and performance: We evaluate SDA-FL in MNIST and FashionMNIST with the privacy budget (cid:15)
= 5 , 10 , 20 , ∞ and 30 training rounds (each round with 90 steps) for GANs.
In the Cifar-10 experiment, we set
the privacy budget (cid:15) = 50 , 100 , 200 , ∞ to train the GANs with 400 training rounds (each round with 90 steps).
Every client keeps two classes of data in all experiments.
The effectiveness of updating pseudo labels and the server update: In this task, we test our
framework in the FashionMNIST dataset and distribute two classes of data to every client.
In our framework, the PS updates the pseudo labels for the synthetic dataset every communication step to maintain the conﬁdence of the synthetic data.
Compared with the federated supervised learning, we change to update the pseudo labels in the ﬁrst 2 , 10 , 20 communication steps instead of updating the pseudo labels at all the communication steps in our framework.
In the ablation study of the server update, we perform the experiments with different steps of server update ( 0 , 20 , 50 , 100 , ∞ ) and batch size B = 64 .
The ablation studies of computational cost and the number of samples for training the generators: The settings of all the ablation studies are the same as the federated supervised learning, and we test them in FashionMNIST with 2 classes of data at each client.
All the experimental settings of ablation studies are shown in Table 4.
[Table]
[Table]
B T HE APPLICATION IN THE C OVID -19 DATASET
Because of the scarcity of Pneumonia data, we only set up six clients in this experiment, each of which keeps two classes of data, and the data distribution is shown in Table 5.
We test SDA-FL with 30 local steps, 10 server steps, and 50 rounds for training the generators locally.
In addition to the baselines in the federated supervised learning task, we also add FedDPGAN (Zhang et al., 2021) for comparison, which trains a global GAN to solve the non-IID issue for medical applications, and the results are shown in Table 6.
Our framework outperforms the other baseline algorithms by a remarkable margin.
Particularly,
SDA-FL is superior to FedDPGAN by 1.68% in the test accuracy, which indicates that the GANs which are trained individually generate higher-quality synthetic data than the global GAN trained based on the federated learning framework.
Furthermore, in addition to addressing the non-IID issue, we also claim that the synthetic data can augment the data distribution, as SDA-FL is superior to FedAvg (IID) by 1.14% in the test accuracy.
As a result, we assert that SDA-FL is able to show its advantages of solving non-IID problems and generating high-value data in medical applications.
C A BLATION STUDIES
The size of the synthetic dataset Before the federated learning, all the clients constitute the synthetic dataset together.
Larger synthetic datasets can typically provide more qualiﬁed data to clients and PS, thus improving performance, but they require larger storage space for clients.
The results in
Fig.9 show that, although the test accuracy on FashionMNIST decreases as the size of the synthetic dataset declines, our framework achieves 85.44% test accuracy with each client only uploadingsamples, which is acceptable in exchange for less storage space requirement.
The hyper-parameter λλ 2 is the parameter to control the use of the local real data.
The results in Fig.10 show that compared with the normal settings of λ 2 , the test accuracy on FashionMNIST drops by nearly 5.0% with λ 2 = 0 .
25 , indicating that the training of the models is heavily reliant on the real data.
Besides, an excessive λ 2 also degrades the performance since it relieves the effects of the synthetic data and cannot mitigate the non-IID problem as much as possible.
In comparison, a moderate λ 2 is capable of combining the real data and the synthetic data intelligently and thus enhancing the models and solving the non-IID issue.
Threshold τ
Threshold τ sets the criterion for selecting the high-conﬁdence pseudo labels.
The results on FashionMNIST are shown in Fig.11, which indicates that a small threshold impairs the performance because some synthetic data with low-conﬁdence pseudo labels are still considered qualiﬁed and used to train the models.
An excessive threshold, on the other hand, ﬁlters out a lot of qualiﬁed data, which affects performance.
Therefore, τ = 0 .
95 is a reasonable value to achieve a balance between quality and the quantity of the pseudo labels.