Clustered Sampling: Low-Variance and Improved Representativity for Clients Selection in Federated Learning

Yann Fraboni, Richard Vidal, Laetitia Kameni, Marco Lorenzi

Abstract

Federated Learning (FL) often suffers from training instability due to the high variance and poor representativity of standard client sampling methods, particularly in non-IID environments. This paper introduces Clustered Sampling, a novel framework that groups clients into clusters based on sample size or model similarity to ensure a diverse subset is selected in every training round. Our results demonstrate that Clustered Sampling significantly reduces sampling variance, leading to faster convergence and improved stability across various levels of data heterogeneity compared to standard Multinomial Distribution (MD) sampling.

Introduction

In Federated Learning, a central server coordinates training across a vast number of edge devices. Due to bandwidth and power constraints, the server must select a small subset of clients for each training round. Existing methods like Uniform Sampling (FedAvg) can be biased, while unbiased methods like Multinomial Distribution (MD) sampling often suffer from high variance. In non-IID scenarios—where data distributions vary wildly across clients—this variance causes the global model's performance to fluctuate, slowing convergence.

Methodology

The proposed Clustered Sampling framework generalizes MD sampling by creating $m$ independent clusters and drawing one client from each. This ensures that every round sees a representative "cross-section" of the global data. Two implementations are explored:

  • Algorithm 1 (Sample Size): Groups clients by the number of local data points to balance the "weight" of sampled clients.
  • Algorithm 2 (Model Similarity): Uses "representative gradients" (the difference between local and global models) to cluster clients via hierarchical clustering. This groups clients with similar data distributions without requiring raw data access, maintaining privacy.

Crucially, these methods remain unbiased and require zero additional computation from the clients, as clustering occurs entirely on the server side.

Experimental Results

The researchers evaluated the approach using MNIST (extreme non-IID) and CIFAR-10 (varying heterogeneity controlled by a Dirichlet distribution $\alpha$).

Performance metrics on MNIST comparing MD, Target, and Clustered Sampling algorithms.

As shown in the MNIST experiments, Algorithm 2 reaches the "ideal" target performance almost immediately. While standard MD sampling exhibits high variability in accuracy and loss, Clustered Sampling provides significantly smoother training curves and lower standard deviation across rounds.

Global loss on CIFAR-10 under varying degrees of data heterogeneity.

The benefits are most pronounced in highly heterogeneous settings. In the CIFAR-10 tests with $\alpha=0.001$ (highly non-IID), Clustered Sampling shows a dramatic reduction in global loss and improved stability compared to the MD baseline. By reducing sampling variance, the global model avoids the "wrong turns" typically caused by unrepresentative client subsets.

Discussion and Limitations

While effective, Algorithm 2 introduces a computational bottleneck at the server level ($O(n^2d)$) due to the similarity matrix calculation. This can be mitigated by estimating the matrix using recently sampled clients. Additionally, the method faces a "cold start" problem for new clients, who are grouped together until they provide their first model update.

Conclusion

Clustered Sampling addresses a critical bottleneck in Federated Learning by prioritizing representativity in every training round. By shifting the focus from mere unbiasedness to variance reduction, the framework enables faster, more stable convergence in the challenging non-IID environments typical of real-world edge deployments.

Summary updated

BibTeX
@inproceedings{fraboni2021clustered,
  author = {Yann Fraboni and Richard Vidal and Laetitia Kameni and Marco Lorenzi},
  title = {{Clustered Sampling: Low-Variance and Improved Representativity for Clients Selection in Federated Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure