Abstract
Federated Learning (FL) research often relies on synthetic data splits that fail to capture the complexities of real-world edge device data. This paper addresses the gap by introducing two large-scale benchmarks—iNaturalist-User-120k and Landmarks-User-160k—derived from actual user contributions. We propose two novel algorithmic enhancements, FedIR (Federated Importance Reweighting) and FedVC (Federated Virtual Clients), to handle non-identical class distributions and imbalanced client data sizes. Our results demonstrate that these methods significantly improve training stability and accuracy, nearly matching the performance of centralized training.
Introduction: The Reality of Edge Data
Most Federated Learning literature utilizes "synthetic" non-IID (Independent and Identically Distributed) splits, where standard datasets like CIFAR-10 are artificially partitioned. However, real-world data on end-user devices is inherently biased by geography and behavior:
- Non-Identical Class Distribution: A user's location dictates their data; for instance, a user in the Pacific Northwest captures Douglas-firs, while a user in the Southeast captures Red Maples.
- Imbalanced Client Sizes: "Power users" may contribute thousands of images, while others contribute only a handful. Standard algorithms like FedAvg struggle with this variance, often leading to "client drift" where the global model is pulled too far toward the local optima of large-scale clients.
Real-World Benchmarks
To move beyond toy datasets, we introduced two benchmarks based on natural user distributions:
- iNaturalist-User-120k: Contains ~120k images across 1,203 species, partitioned by the original "citizen scientist" authors. This captures the natural geographic silos of biological data.
- Landmarks-User-160k: Based on Google Landmarks Dataset V2, featuring ~164k images from 1,262 users, simulating the travel patterns of photographers.
Proposed Methods
We introduce two primary enhancements to the Federated Averaging (FedAvg) framework to mitigate these distribution issues:
FedIR (Federated Importance Reweighting)
FedIR addresses class distribution shifts by applying importance weights to the local loss function. If a client's local data differs significantly from the global target distribution, FedIR instructs the model to prioritize classes that are underrepresented locally but globally significant. Crucially, this is achieved by sharing only global class probabilities, preserving user privacy.
FedVC (Federated Virtual Clients)
To handle size imbalance, FedVC conceptually "splits" large clients into multiple smaller virtual ones. By fixing the number of local training steps ($N_{VC}$) for every client through resampling, we prevent large clients from over-influencing the global update or becoming computational bottlenecks.
Key Insights and Results
Our evaluation revealed several critical findings for practical FL deployment:
- The EMD Threshold: We found that model performance drops sharply once the Earthmover’s Distance (EMD)—a measure of how non-IID a dataset is—exceeds a threshold of approximately 1.7 to 2.0.
- Stability Gains: FedVC significantly reduced training volatility. Without it, accuracy curves on imbalanced data were jagged; with it, convergence was smooth and predictable.
- Closing the Centralization Gap: On the iNaturalist-User-120k dataset, the combination of Server Momentum (FedAvgM) and FedVC achieved 57.2% accuracy, remarkably close to the 57.9% accuracy of a centralized model trained on perfectly shuffled data.
Conclusion
By bridging the gap between theoretical FL and real-world data distributions, this work provides both the benchmarks and the algorithmic tools necessary for robust edge-device learning. While challenges remain in system heterogeneity and non-classification tasks, FedIR and FedVC offer a scalable path forward for training high-performance models on private, distributed data.
Summary updated