TL;DR
Standard error feedback methods (EFSGD) enable aggressive, biased gradient compression in distributed training, but they require storing full-model-sized error vectors on every worker—creating a severe memory bottleneck. This paper proposes Contractive Error Feedback (ConEF), which compresses the accumulated error vector itself using lightweight sketches or quantization. ConEF cuts 80%–90% of the auxiliary memory footprint of EFSGD with negligible impact on final accuracy while delivering 1.3× to 5× wall-clock speedups over vanilla SGD.
What Problem Does This Paper Address?
In large-scale distributed deep learning and edge-device federated learning, memory and bandwidth are dual bottlenecks:
- Bandwidth: Communicating multi-billion-parameter gradients across workers stalls training. Biased gradient compressors (e.g., PowerSGD, top-$k$, signSGD) compress aggressively and work well with AllReduce primitives, but require Error Feedback (EF) to guarantee convergence.
- Memory: Standard EFSGD keeps an uncompressed local error vector $e_t^i$ on each GPU to track compression residuals. This vector matches the model parameter size, consuming vital VRAM that could otherwise be used for activations or larger batch sizes.
While unbiased compression schemes (like vanilla QSGD) don’t store an error vector, their variance explodes under small-batch regimes, degrading convergence. The authors tackle this dilemma: Can we keep the convergence robustness of biased error feedback without paying the price of a model-sized error buffer?
Methods
The paper introduces Contractive Error Feedback (ConEF) and its variants:
-
ConEF (Alg. 2): Uses a primary, biased, contractive compressor $\mathcal{Q}$ for gradients (e.g., PowerSGD or unscaled random block-$k$) and introduces a secondary, lightweight, unbiased compressor $\mathcal{C}$ for the residual error vector: $$e_{t+1}^i = \mathcal{C}(p_t^i - \Delta_t^i)$$ Storing $e_t^i$ in compressed format drastically cuts worker-side memory.
-
Choice of Error Compressor $\mathcal{C}$:
- Count Sketch: Projects the $d$-dimensional error vector into a tiny $v \times w$ matrix ($w \ll d$) using hash and sign functions. Its linearity allows updating sketches without full decompressions and enables periodic Error Reset (ER) across workers via AllReduce.
- Stochastic Quantization: Uniformly discretizes residuals into fewer bits (e.g., 8-bit or 16-bit).
- Partial ConEF (Alg. 4): Incorporates a dampening parameter $\beta \in [0, 1)$ such that only $(1 - \beta)e_t^i$ is added to the gradient before compressing, while $\beta e_t^i$ remains in the compressed state. This induces a "broken power law" spectral decay on error magnitudes, significantly reducing hash collisions in Count Sketches.
- Improved ConEF (iConEF, Alg. 3): Applies nested compression passes ($\mathcal{C}$ or $\mathcal{Q}$ applied to residual errors) to theoretically tighten error dependencies from $\mathcal{O}(\delta \theta)$ to $\mathcal{O}(\delta \theta^2)$ or $\mathcal{O}(\delta^2 \theta)$.
Datasets
The authors evaluate ConEF across vision, language modeling, and machine translation benchmarks:
- CIFAR-10: Image classification evaluated with ResNet-18, MobileNetV2, and WideResNet-28-10.
- WikiText-2: Word-level language modeling using a 2-layer LSTM.
- Multi30k: English-to-German machine translation using an encoder-decoder Transformer.
(No new benchmarks were created; all tasks rely on existing standard datasets.)
Key Insights and Ideas
- Finding the Sweet Spot: Pure unbiased compression (QSGD) requires zero auxiliary memory but suffers high variance; standard EFSGD converges fast but wastes memory. ConEF strikes a formal theoretical middle ground: achieving linear speedup $\mathcal{O}(1/\sqrt{NT})$ while retaining a small error term.
- Unbiased Error Compression Preserves Generalization: In overparameterized regimes (e.g., least-squares), gradient iterates that lie close to the data range $\mathcal{R}(A^\top)$ converge toward maximum-margin solutions. The authors prove that keeping $\mathcal{C}$ unbiased preserves this property in expectation, whereas a biased error compressor degrades generalization.
- Count Sketches Pair Naturally with Partial EF: Vanilla EFSGD residuals do not follow power-law distributions. By retaining a fraction $\beta$ of the error locally (partial EF), residual magnitudes follow a broken power-law distribution, allowing Count Sketches with $v=1$ and small widths ($w = 0.1d$ to $0.4d$) to preserve accuracy.
Key Results
- Memory Footprint: ConEF saves 80% to 90% (and up to 98% in extreme configurations) of EFSGD's auxiliary memory buffer across tested architectures:
- ResNet-18: Saves 31.5 MB (60% setting) to 44.1 MB (90% setting) with minimal accuracy drops (92.53% and 92.02% vs. EFSGD’s 92.52% and SGD’s 93.20%).
- WideResNet-28-10: Saves up to 101.5 MB memory while matching EFSGD accuracy (95.23% vs. 95.28%) and running nearly 2× faster than standard SGD.
- MobileNetV2: Saves 8 MB on a 14 MB model with almost zero loss in test accuracy.
- Training Throughput:
- With PowerSGD (rank 4, 98.5% communication reduction) or random block-$k$ (90% reduction), ConEF delivers 1.3× to 5× speedup over SGD, closely matching EFSGD runtimes without incurring perceptible sketching computational overhead.
- Scalability to Large Models: On WideResNet and Transformers (Multi30k), ConEF-CS matched or slightly outperformed full-memory error feedback baselines (EF-Adam/EFSGD), suggesting larger models are inherently more resilient to contractive error compression.
Limitations and Future Work
- Small-Model Accuracy Gap: On smaller models like ResNet-18 under extreme sketch compression (e.g., 90%–98% memory reduction), a minor test accuracy degradation (0.5%–1.2%) was observed compared to vanilla SGD.
- Hyperparameter Sensitivity: Achieving strong convergence with Count Sketch requires tuning the decay parameter $\beta$ (typically $\beta \in [0.75, 0.995]$) and selecting the right sketch dimensions ($w$).
- ZeRO-3 Integration: Although the paper highlights the conceptual compatibility between ConEF and ZeRO-3 (sharded parameter/optimizer states), full systems integration and empirical evaluation on billion-parameter models are left for future work.
Summary updated