The Non-IID Data Quagmire of Decentralized Machine Learning

Kevin Hsieh, Amar Phanishayee, Onur Mutlu, Phillip B. Gibbons

TL;DR

This paper reveals that non-IID (non-independently and identically distributed) data, specifically skewed label distributions across devices, is a fundamental and pervasive problem for decentralized machine learning, causing significant accuracy loss. The authors introduce SkewScout, a novel system that dynamically adjusts communication frequency to mitigate this issue, achieving substantial communication savings without sacrificing accuracy.

What Problem Does This Paper Address?

In many real-world machine learning applications, data is generated across numerous devices and locations (e.g., mobile phones, sensors). Due to privacy concerns, data sovereignty laws (like GDPR), and communication constraints, it's often impractical or impossible to centralize all this data for training. This necessitates decentralized learning, where models are trained collaboratively across these distributed data sources.

A major challenge in decentralized learning is that the data on each device is rarely representative of the global data distribution. This "non-IID" nature, particularly skewed label distributions (where certain devices have a disproportionate number of samples for specific classes), can severely degrade model performance. Existing decentralized learning algorithms often assume IID data or conduct limited studies on non-IID scenarios, leaving a critical gap in understanding and addressing this pervasive issue. This paper aims to fill that gap by systematically studying the impact of skewed label distributions and proposing a solution.

Methods

The authors conduct a comprehensive experimental study across various ML applications, DNN architectures, training datasets, and decentralized learning algorithms. They focus on a common type of non-IID data: skewed label distributions.

Key methodological contributions include:

  • Systematic Empirical Study: They evaluate three popular decentralized learning algorithms (Gaia, FederatedAveraging, and DeepGradientCompression) and compare them against Bulk Synchronous Parallel (BSP) training under both IID and non-IID settings.
  • Focus on Batch Normalization: They specifically investigate the vulnerability of DNNs with batch normalization (BatchNorm) to non-IID data, a common and critical component in modern deep learning.
  • Introduction of SkewScout: This is the paper's core technical contribution. SkewScout is a system-level approach that dynamically adapts the communication frequency of decentralized learning algorithms. It works by:
  • Estimating Skew: Periodically moving the model between partitions ("model traveling") to estimate the accuracy loss on remote data. This loss serves as an indicator of model divergence due to non-IID data.
  • Adaptive Communication Control: Using the estimated accuracy loss to tune the hyper-parameters of decentralized learning algorithms (e.g., communication thresholds). This process aims to minimize communication while keeping accuracy loss within a tolerable threshold.
  • Exploration of Normalization Alternatives: They investigate Group Normalization as a potential solution to the BatchNorm-induced issues in non-IID settings.

Datasets

  • CIFAR-10: A common image classification dataset used for initial experiments.
  • ImageNet: A larger-scale image classification dataset to validate findings.
  • Flickr-Mammal Dataset: A newly introduced real-world, geo-tagged dataset of mammal images. This dataset is designed to reflect natural geographical distributions of mammals, creating realistic skewed label partitions across continents and subcontinents.
  • CASIA-WebFace: Used for face recognition experiments.
  • LFW (Labeled Faces in the Wild): Used for evaluating face recognition model quality.

Key Insights and Ideas

  • Non-IID is Pervasive and Fundamental: Skewed label distributions are not a niche problem but a significant hurdle that causes substantial accuracy loss across diverse ML applications, DNNs, and decentralized learning algorithms, even with communication-heavy approaches like BSP.
  • Batch Normalization is Particularly Vulnerable: DNNs employing batch normalization suffer disproportionately under non-IID conditions. This is because BatchNorm relies on minibatch statistics, which become highly divergent across partitions in a non-IID setting, leading to poor validation performance.
  • Degree of Skew Matters: The severity of the non-IID problem is directly correlated with the degree of label skew. Higher skew leads to greater accuracy loss.
  • Group Normalization as a Solution: Group Normalization effectively mitigates the accuracy loss associated with BatchNorm in non-IID settings, recovering much of the performance degradation.
  • Model Divergence is Key: The accuracy loss in non-IID settings is driven by models in different partitions specializing too much on their local data, leading to significant divergence. This divergence can occur even with small percentage differences in model weights.
  • Communication vs. Accuracy Trade-off: While increased communication can help alleviate non-IID issues, it comes at the cost of training speed. SkewScout aims to find an optimal balance.

Key Results

  • Significant Accuracy Loss: Decentralized learning algorithms experienced accuracy losses ranging from 3% to 74% in non-IID settings compared to IID settings. Even BSP, with full communication, saw accuracy drops (e.g., 39% for ResNet20 on CIFAR-10).
  • BatchNorm Vulnerability: Models with BatchNorm showed particularly severe degradation, with accuracy losses up to 74% even under BSP.
  • GroupNorm Recovers Accuracy: Using Group Normalization instead of BatchNorm recovered much of the accuracy loss, achieving performance comparable to IID settings for BSP and significantly improving results for other algorithms.
  • SkewScout Efficiency: SkewScout achieved 9.6x to 34.1x communication savings over BSP across various non-IID settings while maintaining comparable accuracy. It performed close to an "Oracle" baseline, demonstrating its effectiveness and practicality.
  • Real-World Data Impact: Experiments on the Flickr-Mammal dataset confirmed that real-world skewed label distributions lead to significant accuracy losses for decentralized learning algorithms.
  • Larger Number of Partitions Exacerbates the Problem: Increasing the number of data partitions generally leads to more severe accuracy degradation in non-IID settings.

Limitations and Future Work

  • Focus on Label Skew: The study primarily focuses on label distribution skew. While this is a common and significant form of non-IID data, other regimes (e.g., feature skew, quantity skew, inter-partition correlation) are acknowledged but not deeply explored.
  • Generalizability of SkewScout: While SkewScout is designed to be general, its effectiveness across all possible non-IID regimes and complex DNN architectures warrants further investigation.
  • Hyper-parameter Sensitivity: While SkewScout aims to automate hyper-parameter tuning, the initial setup and the choice of thresholds (e.g., $\lambda_{AL}$, $\lambda_{C}$) might still require careful consideration.
  • Future Work: The authors suggest exploring other regimes of non-IID data, developing more sophisticated strategies for different non-IID scenarios, and investigating hybrid approaches that combine global and specialized local models. They also highlight the need for further study on replacing BatchNorm with alternatives like GroupNorm in various applications and DNN models.

Summary updated

BibTeX
@inproceedings{hsieh2020non,
  author = {Kevin Hsieh and Amar Phanishayee and Onur Mutlu and Phillip B. Gibbons},
  title = {{The Non-IID Data Quagmire of Decentralized Machine Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=SRzbClamG75},
}
Figure