Deep Hierarchy Quantization Compression algorithm based on Dynamic Sampling

Wan Jiang, Gang Liu, Xiaofeng Chen, Yipeng ZhouarXiv 2022 · DOI

Abstract

Federated Learning (FL) offers a privacy-preserving framework for collaborative machine learning, yet it is frequently hampered by significant communication overhead. This paper introduces Deep Hierarchy Quantization Compression (DHQC), a dual-strategy approach designed to optimize communication efficiency. DHQC combines a hierarchical 4-bit quantization scheme with a dynamic client sampling strategy that utilizes exponential annealing. Our experimental results on MNIST and CIFAR-10 benchmarks demonstrate that DHQC achieves a massive 799x compression ratio with negligible impact on model accuracy, significantly outperforming existing sparsification and quantization methods.

Introduction

Federated Learning allows multiple decentralized devices, such as smartphones or IoT sensors, to train a global model without sharing raw, private data. Instead, devices transmit local model updates (gradients) to a central server for aggregation.

The primary bottleneck in this architecture is the communication cost. Modern deep learning models contain millions of parameters, and transmitting these updates over bandwidth-constrained mobile networks consumes excessive data and battery. While techniques like gradient sparsification (sending only top-k updates) and quantization (reducing bit-precision) mitigate this, they often introduce "lossy" noise that degrades final model accuracy or slows convergence. DHQC addresses these challenges by balancing aggressive compression with a strategy that prioritizes model stability during critical training phases.

Methodology

The authors propose a two-pronged solution to maximize efficiency without sacrificing performance:

1. Deep Hierarchy Quantization Compression (DHQC)

The DHQC algorithm operates in two stages:

  • Sparsification: The algorithm first identifies the top $k\%$ of gradients representing the most significant weight changes. Remaining gradients are stored locally and accumulated for future updates, ensuring that even small updates eventually contribute to the global model.
  • Hierarchical Encoding: Unlike standard 1-bit or 2-bit methods, DHQC employs a 4-bit hierarchical approach. One bit encodes the sign (+/-), while the remaining three bits represent the "interval number" between a calculated threshold and the maximum gradient value. This provides higher precision than binary methods while remaining significantly more compact than standard 32-bit floats.

2. Dynamic Sampling Strategy

Traditional FL typically selects a fixed percentage of clients per round. However, models are most sensitive to compression noise during the early stages of training. To counter this, the authors implement exponential annealing for client participation.

Dynamic client sampling strategy showing exponential annealing of client participation over training iterations for MNIST and CIFAR-10.

As shown in the figure above, the strategy starts with a high percentage of clients to provide a stable, high-quality gradient signal. As the model matures and becomes more robust, client participation is exponentially decreased. This "early-stage" prioritization speeds up convergence and compensates for the accuracy loss inherent in aggressive quantization.

Experimental Evaluation

The researchers evaluated DHQC using the ALL_CNN architecture on two standard benchmarks:

  • MNIST: 60,000 handwritten digits (10 classes).
  • CIFAR-10: 60,000 color images of objects like planes, cars, and birds (10 classes).

Key Insights

  • Sensitivity to Noise: The core insight is that models are highly sensitive to lossy compression when "undertrained." By flooding the model with high-quality information early via dynamic sampling, the system can afford to be much more aggressive with compression in later rounds.
  • The 4-bit Sweet Spot: While 1-bit quantization is theoretically smaller, it often destroys critical gradient information. The 4-bit hierarchical approach, paired with aggressive sparsification, yields a superior overall compression ratio compared to low-bit alternatives.

Results and Discussion

DHQC demonstrates significant improvements over baseline methods across multiple metrics:

  • Extreme Compression: DHQC achieved a compression ratio of 799x. In comparison, Deep Gradient Compression (DGC) reached 100x, and TernGrad reached only 16x.
  • Maintained Accuracy: On the CIFAR-10 dataset, the accuracy drop was only 1.21% compared to the uncompressed baseline (FedAvg), despite the massive reduction in transmitted data.
  • Faster Convergence: The dynamic sampling variant (D-DHQC) reached target accuracy significantly faster than static sampling versions.
Accuracy comparison of DHQC against FedAvg, DGC, and TernGrad on CIFAR-10 and MNIST datasets.

As illustrated in the accuracy plots, DHQC (purple line) tracks closely with the uncompressed FedAvg (red line) and outperforms other compressed methods like DGC (blue) and TernGrad (green) in terms of final accuracy and stability, particularly on the more complex CIFAR-10 dataset.

Conclusion

DHQC provides a robust framework for high-efficiency Federated Learning. By combining hierarchical quantization with an annealing-based sampling strategy, the method achieves state-of-the-art compression ratios while maintaining model performance. Future work will focus on scaling DHQC to "giant" models like VGG-16 and testing its resilience in real-world heterogeneous network environments with latent or "straggler" nodes.

Summary updated

BibTeX
@misc{jiang2022deep,
  author = {Wan Jiang and Gang Liu and Xiaofeng Chen and Yipeng Zhou},
  title = {{Deep Hierarchy Quantization Compression algorithm based on Dynamic Sampling}},
  year = {2022},
  eprint = {2212.14760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.14760},
}
Figure