Intrinsic Gradient Compression for Scalable and Efficient Federated Learning

Luke Melas-Kyriazi, Franklyn WangFL4NLP @ ACL 2022

TL;DR

This paper introduces "intrinsic gradient compression," a novel approach to drastically reduce communication costs in federated learning by leveraging the concept of "intrinsic dimension." By projecting gradients onto a low-dimensional subspace, their method achieves state-of-the-art compression rates while maintaining high model accuracy, making federated learning more practical for bandwidth-constrained devices.

What Problem Does This Paper Address?

Federated learning (FL) promises privacy-preserving training by keeping raw data on user devices. However, a major bottleneck is the communication overhead required to send model updates (gradients or weights) between clients and the central server. This is particularly problematic for edge devices with limited bandwidth, such as mobile phones. Existing methods for reducing this communication cost either compress standard gradients (e.g., quantization) or use specialized, less bandwidth-intensive model architectures. This paper tackles the challenge of achieving significant communication reduction without sacrificing model performance, especially for large, modern neural networks.

Methods

The core innovation is the connection between intrinsic dimension and gradient compressibility. Intrinsic dimension, in optimization, refers to the smallest dimensional subspace where a problem can be solved effectively. The authors propose that if a model's optimization problem has a low intrinsic dimension, its gradients can be compressed by projecting them onto this low-dimensional subspace.

They introduce a family of intrinsic gradient compression algorithms based on this idea. These algorithms essentially perform gradient descent within a learned or predefined low-dimensional subspace. The paper details three specific instantiations:

  • Static Intrinsic Gradient Compression: Uses a fixed projection matrix.
  • Time-Varying Intrinsic Gradient Compression: The projection matrix changes over time (epochs).
  • K-Varying Intrinsic Gradient Compression: Uses a set of K projection matrices, randomly selecting one at each step.

These methods are designed to be model-agnostic and scalable. The paper also discusses the practical implementation of these algorithms, including how to efficiently compute the necessary matrix-vector products using techniques like the Fastfood transform.

Datasets

The paper evaluates its methods on several standard benchmarks:

  • Image Classification: CIFAR-10 dataset using a ResNet-9 architecture.
  • Text Classification: Stanford Sentiment Treebank v2 (SST-2) dataset using a BERT model (109M parameters).
  • Language Modeling: PersonaChat dataset using a GPT-2 model (124M parameters).

The experiments simulate federated learning scenarios with a large number of clients (up to 10,000) and explore both non-IID and IID data distributions.

Key Insights and Ideas

  • Intrinsic Dimension as a Compression Lever: The paper establishes a direct link between the theoretical concept of intrinsic dimension in optimization and the practical problem of gradient compression in federated learning. This provides a principled way to design compression algorithms.
  • Low-Dimensional Subspaces for Efficient Updates: By projecting gradients onto a low-dimensional subspace, the amount of information that needs to be transmitted is drastically reduced, leading to significant bandwidth savings.
  • Scalability to Large Models: The proposed methods are shown to be effective even for very large transformer models like BERT and GPT-2, which are common in NLP.
  • Time-Varying vs. Static Compression: The experiments suggest that time-varying compression can offer better performance than static compression, especially when many training epochs are involved.
  • Privacy Benefit: The paper demonstrates that compressing gradients can also improve privacy by making it harder to reconstruct client data from the transmitted gradients, as shown through image reconstruction experiments.

Key Results

  • Significant Compression Rates: The proposed intrinsic gradient compression algorithms achieve compression rates of up to 1000x (and even higher in some language modeling experiments) while maintaining performance comparable to uncompressed methods.
  • Outperforms State-of-the-Art: The methods significantly outperform existing gradient compression techniques like FetchSGD and FedAvg across various tasks.
  • Strong Performance on NLP Models: Experiments with BERT and GPT-2 show that the intrinsic gradient compression methods achieve high accuracy and perplexity scores, even at very high compression levels. For instance, they achieve near-full performance on PersonaChat with a compression rate of 1898x.
  • Time-Varying Advantage: For text classification (SST-2), time-varying intrinsic compression consistently outperformed static compression at the same intrinsic dimension.

Limitations and Future Work

  • Reconstruction Privacy: While the paper shows improved privacy against gradient reconstruction, it acknowledges that the method does not entirely solve the problem and that differential privacy might still be necessary for complete privacy guarantees.
  • Momentum in FL: The paper notes that while momentum can be used, it's often not beneficial in federated learning due to the non-IID nature of data, and they don't consider it in their primary algorithms.
  • Future Work: The authors express a desire to deploy their system in a real-world federated learning setting with a large number of physical devices, moving beyond simulations. They also suggest further exploration of adaptive optimizers within their framework.

Summary updated

BibTeX
@inproceedings{melaskyriazi2022intrinsic,
  author = {Luke Melas-Kyriazi and Franklyn Wang},
  title = {{Intrinsic Gradient Compression for Scalable and Efficient Federated Learning}},
  booktitle = {FL4NLP @ ACL},
  year = {2022},
  url = {https://openreview.net/forum?id=H3NUh9Kft-c},
}
Figure