ResFed: Communication Efficient Federated Learning by Transmitting Deep Compressed Residuals

Rui Song, Liguo Zhou, Lingjuan Lyu, Andreas Festag, Alois Knoll

TL;DR

ResFed is a novel federated learning framework that slashes communication costs by transmitting highly compressed "model residuals" instead of full weights or gradients. By using shared predictors to forecast model updates, ResFed achieves up to 99% communication savings while maintaining—and sometimes even improving—model accuracy.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple devices (clients) to train a shared model without ever sharing their raw data. While great for privacy, FL is a bandwidth hog. As machine learning models grow into the billions of parameters, the cost of sending model updates back and forth between clients and a central server becomes a massive bottleneck, especially in wireless or resource-constrained environments like vehicle-to-everything (V2X) networks.

Existing solutions often focus on compressing the "upload" from client to server but ignore the "download" from server to client. Furthermore, most methods treat each communication round in isolation, failing to exploit the fact that model updates often follow predictable trajectories over time.

Methods

The authors introduce ResFed, which draws inspiration from video compression techniques (like H.264). Just as video codecs only transmit the difference between frames rather than every full image, ResFed only transmits the "residual"—the difference between the actual updated model and a predicted version of it.

Key components include:

  • Shared Predictors: Both the server and the clients run identical "predictors" that forecast what the next model state will look like based on historical training trajectories.
  • Residual Generation: Instead of sending a full model $w$, the sender calculates a residual $r = w - \tilde{w}$ (where $\tilde{w}$ is the prediction). Because these residuals represent small "quasi-updates," they have lower entropy and are much easier to compress.
  • Deep Compression Pipeline: The residuals undergo a three-step compression process: Sparsification (dropping unimportant values), Quantization (reducing the precision of remaining values to 1-bit), and Huffman Encoding (efficient bit-level representation).
  • Trajectory Synchronization: To prevent "drift" caused by lossy compression, the sender simulates the receiver's recovery process to ensure both sides stay perfectly aligned for the next round of prediction.
The shift from standard FL to the residual-based ResFed system.

Datasets

The framework was evaluated on several standard computer vision benchmarks:

  • MNIST & Fashion-MNIST: Simple digit and clothing classification.
  • CIFAR-10 & CIFAR-100: More complex object recognition tasks.
  • SVHN: Street View House Numbers.

The researchers tested these across both IID (Independent and Identically Distributed) and Non-IID settings to simulate real-world data heterogeneity where different clients have very different data distributions.

Key Insights and Ideas

  • Residuals are "Denser" Information: The authors demonstrate that residuals contain more concentrated information than raw weights or gradients. Because they are smaller in magnitude and more predictable, they can survive aggressive lossy compression much better than standard parameters.
  • Temporal Redundancy: By looking at the "trajectory" of model updates across rounds, ResFed captures sequential patterns that standard FL ignores.
  • Linear vs. Stationary Predictors: The paper finds that a "Linear Predictor" (which looks at the last two states to guess the next move) significantly outperforms a "Stationary Predictor" (which just assumes the next state is the same as the last).
Figure 2: ResFed system model with a lossy deep compression pipeline for efficiently transmit- ting encoded model residuals. The following steps should be implemented for one communication: (a) Share the predictor for both sender and receiver before the federated learning starts; (b) Execute the same model prediction before communicating any model information; (c) Generate the model residuals; (d) Compress residuals using deep compression; (e) Communicate residual bits with en- coding and decoding; (f) Recover the model from received residuals; (g) Synchronize the model trajectory by simulation, recovering the model locally with consideration of lossy compression.

Key Results

ResFed demonstrates remarkable efficiency gains across the board:

  • Massive Data Savings: To reach 70% accuracy on CIFAR-10, ResFed reduced the total upstream data from 587.61 Mb to just 6.79 Mb—a 98.8% saving. Downstream savings were even higher at 99.2%.
  • High Compression Ratios: The system achieved compression ratios of over 700x per communication round with minimal impact on final accuracy.
  • Superior Performance: In head-to-head tests, compressing residuals consistently yielded higher accuracy and faster convergence than compressing raw weights or gradients.
Figure 3: Comparison of compressing weights, gradients, residuals with stationary (Res-0) and linear (Res-1) predictors. The sparsities are 0.2 and 0.01 for training on MNIST and CIFAR-100 distributed in 10 clients, respectively. We quantize the non-zero parameters and use 1 bit to represent each of them. For Non-IID setting, each client owns only the data with half classes.

Limitations and Future Work

The primary trade-off in ResFed is memory overhead. To maintain the predictors, both the server and the clients must cache historical model trajectories. For a client training a large model, this means storing additional copies of the parameters, which might be difficult for extremely memory-constrained IoT devices.

The authors suggest that future work could explore caching compressed versions of these trajectories to save space, though this might introduce a new trade-off between memory usage and prediction accuracy.

Summary updated

BibTeX
@misc{song2022resfed,
  author = {Rui Song and Liguo Zhou and Lingjuan Lyu and Andreas Festag and Alois Knoll},
  title = {{ResFed: Communication Efficient Federated Learning by Transmitting Deep Compressed Residuals}},
  year = {2022},
  eprint = {2212.05602},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.05602},
}
Figure