Synthetic data shuffling accelerates the convergence of federated learning under data heterogeneity

Bo Li, Yasin Esfandiari, Mikkel N. Schmidt, Tommy S. Alstrøm, Sebastian U. Stich

Abstract

In federated learning, data heterogeneity is a critical challenge. A straightforward solution is to shuffle the clients' data to homogenize the distribution. However, this may violate data access rights, and how and when shuffling can accelerate the convergence of a federated optimization algorithm is not theoretically well understood. In this paper, we establish a precise and quantifiable correspondence between data heterogeneity and parameters in the convergence rate when a fraction of data is shuffled across clients. We prove that shuffling can quadratically reduce the gradient dissimilarity with respect to the shuffling percentage, accelerating convergence. Inspired by the theory, we propose a practical approach that addresses the data access rights issue by shuffling locally generated synthetic data. The experimental results show that shuffling synthetic data improves the performance of multiple existing federated learning algorithms by a large margin.

Introduction

Data heterogeneity, or the "Non-IID" (not identically and independently distributed) nature of client data, is often considered the primary obstacle in Federated Learning (FL). In real-world scenarios, one user might only possess data for a specific class (e.g., photos of cats), while another has a completely different subset (e.g., dogs). This imbalance leads to "client drift," where local model updates diverge significantly from the global objective, resulting in slow convergence and degraded final accuracy.

While the most direct solution would be to shuffle data across the network to create a uniform distribution, this is impossible in FL due to strict privacy requirements. This paper explores a middle ground: Can we achieve the convergence benefits of shuffling without compromising raw data privacy?

The Fedssyn Framework

The authors introduce Fedssyn, a framework designed to harness the benefits of data shuffling through synthetic proxies. Instead of sharing raw private data, clients train local generative models (such as Denoising Diffusion Probabilistic Models or Variational Autoencoders) to produce synthetic versions of their local datasets.

The Fedssyn framework (a, b) and its impact on convergence (c). Shuffling synthetic data achieves performance comparable to shuffling real data, significantly outperforming standard Non-IID training.

As shown in Figure 4, the Fedssyn workflow involves:

  1. Local Generation: Clients generate synthetic data locally.
  2. Synthetic Shuffling: These synthetic samples are sent to the server, which aggregates and shuffles them.
  3. Redistribution: The server sends a diverse "shuffled pack" of synthetic data back to each client.
  4. Augmented Training: Clients train their models on a combination of their private raw data and the received shuffled synthetic data.

Theoretical Foundation: The Quadratic Win

A core contribution of this work is the mathematical proof that shuffling a fraction $p$ of data across clients reduces gradient dissimilarity—a key metric for client drift—by a factor of $(1-p)^2$. This quadratic relationship is significant because it implies that shuffling even a small percentage of data (e.g., 10%) can lead to a disproportionately large reduction in heterogeneity and a corresponding boost in convergence speed.

Experimental Evaluation

The framework was tested on standard benchmarks including CIFAR-10, CIFAR-100, MNIST, and dSprites. The results consistently show that Fedssyn is algorithm-agnostic, improving the performance of various FL optimizers like FedAvg, SCAFFOLD, and FedProx.

Performance comparison across various FL algorithms and datasets. The table shows communication rounds to reach target accuracy and the speedup factor (in parentheses) achieved by Fedssyn (denoted as FedPVR).

As detailed in Figure 6, Fedssyn (implemented here as FedPVR) provides massive speedups, reducing the number of communication rounds required to reach target accuracy by 1.6x to over 23x. In highly heterogeneous settings (e.g., CIFAR-10 with $\alpha=0.01$), the framework allows vanilla FedAvg to outperform more complex algorithms specifically designed for Non-IID data.

Discussion and Limitations

While Fedssyn offers a powerful path toward faster FL convergence, it introduces new considerations:

  • Compute Overhead: Training generative models like Diffusion Models on-device can be computationally intensive for low-power hardware.
  • Privacy-Utility Trade-off: Although synthetic data is inherently more private than raw data, generative models can sometimes memorize training samples. The authors demonstrate that Differential Privacy (DP) can be integrated into the generator training to mitigate this, though it may impact the quality of the synthetic data.
  • Generator Quality: The effectiveness of the shuffling depends on the ability of the local generators to accurately represent the local data distribution. If the synthetic data is of poor quality, the convergence benefits may be diminished.

In conclusion, by establishing a theoretical link between shuffling and gradient dissimilarity, this work provides a robust foundation for using synthetic data to solve the "final boss" of federated learning: data heterogeneity.

Summary updated

BibTeX
@article{li2023synthetic,
  author = {Bo Li and Yasin Esfandiari and Mikkel N. Schmidt and Tommy S. Alstrøm and Sebastian U. Stich},
  title = {{Synthetic data shuffling accelerates the convergence of federated learning under data heterogeneity}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=c5o4HUypqm},
}
Figure