Adaptive Braking for Mitigating Gradient Delay

Abhinav Venigalla, Atli Kosson, Vitaliy Chiley, Urs KösterarXiv 2020

Abstract

Neural network training is commonly accelerated by using multiple synchronized workers to compute gradient updates in parallel. Asynchronous methods remove synchronization overheads and improve hardware utilization at the cost of introducing gradient delay, which impedes optimization and can lead to lower final model performance. We introduce Adaptive Braking (AB), a modification for momentum-based optimizers that mitigates the effects of gradient delay. AB dynamically scales the gradient based on the alignment of the gradient and the velocity. This can dampen oscillations along high curvature directions of the loss surface, stabilizing and accelerating asynchronous training. We show that applying AB on top of SGD with momentum enables training ResNets on CIFAR-10 and ImageNet-1k with delays $D \geq$ 32 update steps with minimal drop in final test accuracy.

Introduction

Training massive neural networks is a race against time. To speed things up, researchers often use Asynchronous SGD (ASGD), where multiple workers compute gradients in parallel without waiting for one another. While this keeps hardware utilization high, it introduces a nasty side effect: gradient delay. By the time a worker’s gradient reaches the master model, the model weights have already moved on, making that gradient "stale." This staleness leads to unstable oscillations and poor final accuracy.

In standard distributed training (Synchronous SGD), every worker must finish its task before the model updates. This creates a "straggler" problem where the fastest workers sit idle waiting for the slowest. Asynchronous training solves this by letting workers update the model whenever they finish. However, this creates gradient delay ($D$). If a worker starts computing a gradient at step $t$ but doesn't finish until step $t+D$, that gradient is applied to a model that has already changed. This delay acts like a "hidden" increase in momentum, causing the optimizer to overshoot minima and oscillate wildly, especially in "narrow valleys" of the loss surface (areas of high curvature).

Methods: The Adaptive Braking Mechanism

The core of Adaptive Braking (AB) is a scaling factor, $\alpha_t$, applied to the gradient before it updates the optimizer's velocity.

  1. Alignment Scoring: AB calculates the cosine similarity (the angle) between the incoming gradient ($g_t$) and the current optimizer velocity ($v_t$).
  2. The Braking Logic:
    • If the gradient and velocity are aligned (pointing the same way), $\alpha_t$ decreases. This "brakes" the model to prevent it from gaining too much speed and overshooting.
  3. If they are misaligned (pointing opposite ways), $\alpha_t$ increases. This helps dampen oscillations by counteracting the current momentum more aggressively.
  4. The Formula: $\alpha_t \approx 1 - \rho \cos(\angle(g_t, v_t))$, where $\rho$ is the "braking coefficient."
  5. Granularity: Instead of one scale for the whole model, AB is typically applied filter-wise (grouping parameters by neurons or filters), allowing it to respond to different curvatures across the network.

Experimental Results

The authors evaluated AB using CIFAR-10 (ResNet-20), ImageNet-1k (ResNet-50), and a synthetic Noisy Quadratic Model (NQM).

Performance on ImageNet-1k

For ResNet-50 with a delay of $D=32$, AB achieved 76.81% accuracy. This outperformed the single-worker synchronous baseline (76.29%) and beat other state-of-the-art mitigation methods like DANA and Delay-Compensation.

Test accuracy on ImageNet-1k for ResNet-50 with delay D=32. AB (red line) shows superior performance and stability compared to other methods.

Robustness to Gradient Delay

On CIFAR-10, standard SGDM fails to converge when the delay $D$ exceeds 32. With AB, the model converges even with a delay of $D=128$, losing only ~2.4% accuracy compared to a zero-delay baseline. AB demonstrates significantly better robustness to increasing delays compared to existing techniques.

Final test accuracy vs. gradient delay on CIFAR-10. Adaptive Braking (AB) maintains high accuracy even as delay increases to 128 steps, significantly outperforming standard SGDM and other mitigation strategies.

Key Insights

  • Implicit Curvature Sensing: Even though AB only uses first-order information, it behaves like a higher-order optimizer. Because oscillations are most common in high-curvature directions, AB naturally spends most of its "braking power" on those specific components of the loss surface.
  • Velocity Stabilization: A major cause of failure in delayed training is a "velocity blowup" at the very start of training. AB prevents this initial explosion, allowing the model to stay on a stable trajectory.
  • Efficiency: AB adds negligible computational cost and requires no additional memory, making it highly practical for real-world production clusters.

Conclusion and Future Work

Adaptive Braking offers a remarkably simple "physics-inspired" fix to one of the most persistent problems in distributed deep learning. While this paper focuses primarily on SGDM, the authors suggest AB could be adapted for Adam or other adaptive optimizers. AB's ability to handle massive delays with minimal overhead makes it a promising tool for scaling asynchronous training on large-scale hardware.

Summary updated

BibTeX
@misc{venigalla2020adaptive,
  author = {Abhinav Venigalla and Atli Kosson and Vitaliy Chiley and Urs Köster},
  title = {{Adaptive Braking for Mitigating Gradient Delay}},
  year = {2020},
  eprint = {2007.01397},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.01397},
}
Figure