[Paper Review] Dynamic Mini-batch SGD for Elastic Distributed Training: Learning in the Limbo of Resources
This paper proposes Dynamic SGD, a method that smoothly adjusts the learning rate during elastic distributed training to stabilize optimization when the number of GPUs dynamically changes. By compensating for noise in stochastic momentum estimation due to varying mini-batch sizes, Dynamic SGD achieves training stability and model accuracy comparable to static training across image classification, object detection, and semantic segmentation tasks, even with scale changes from 8 to 128 GPUs.
With an increasing demand for training powers for deep learning algorithms and the rapid growth of computation resources in data centers, it is desirable to dynamically schedule different distributed deep learning tasks to maximize resource utilization and reduce cost. In this process, different tasks may receive varying numbers of machines at different time, a setting we call elastic distributed training. Despite the recent successes in large mini-batch distributed training, these methods are rarely tested in elastic distributed training environments and suffer degraded performance in our experiments, when we adjust the learning rate linearly immediately with respect to the batch size. One difficulty we observe is that the noise in the stochastic momentum estimation is accumulated over time and will have delayed effects when the batch size changes. We therefore propose to smoothly adjust the learning rate over time to alleviate the influence of the noisy momentum estimation. Our experiments on image classification, object detection and semantic segmentation have demonstrated that our proposed Dynamic SGD method achieves stabilized performance when varying the number of GPUs from 8 to 128. We also provide theoretical understanding on the optimality of linear learning rate scheduling and the effects of stochastic momentum.
Motivation & Objective
- To address the instability in deep learning optimization when training resources (GPUs) are dynamically allocated or released during training.
- To identify that linear learning rate scaling fails in elastic environments due to unaccounted noise in stochastic momentum estimation.
- To develop a method that stabilizes training under dynamic resource allocation by adapting the learning rate more smoothly over time.
- To empirically validate the proposed method across diverse computer vision tasks, including image classification, object detection, and semantic segmentation.
- To provide theoretical insight into the optimality of linear learning rate scheduling and the impact of stochastic momentum in dynamic training settings.
Proposed method
- Proposes Dynamic SGD, a learning rate adaptation strategy that gradually adjusts the learning rate over time to counteract noise accumulation in momentum estimation during dynamic batch size changes.
- Introduces a smooth, non-linear learning rate schedule that accounts for the inverse scaling of momentum noise with mini-batch size, unlike standard linear scaling.
- Employs synchronized stochastic gradient descent with momentum, where the learning rate is modulated based on the current number of GPUs and the history of batch size changes.
- Uses a dynamic scheduling policy that varies the number of GPUs every few epochs (e.g., every 5 epochs) to simulate real-world elastic training environments.
- Applies the method to standard deep learning models including ResNet-50, MobileNet, InceptionV3, SSD, and FCN, with synchronized batch normalization and cosine learning rate decay.
- Theoretical analysis supports the optimality of linear learning rate scheduling and explains the destabilizing effect of momentum noise in dynamic settings.
Experimental results
Research questions
- RQ1Why does linear learning rate scaling fail in elastic distributed training when the number of GPUs changes dynamically?
- RQ2How does noise in stochastic momentum estimation affect model convergence during dynamic batch size adaptation?
- RQ3Can a smooth, time-dependent learning rate adjustment stabilize training in elastic distributed environments?
- RQ4To what extent can Dynamic SGD match the performance of static training in terms of model accuracy across diverse vision tasks?
- RQ5How does the proposed method compare to linear scaling and static baselines under varying GPU scales (e.g., 8 to 128 GPUs)?
Key findings
- Dynamic SGD achieves comparable model accuracy to static training with a 1× mini-batch size (e.g., 1K) across all evaluated tasks, even when scaling to 128 GPUs.
- On ImageNet, Dynamic SGD maintains top-1 accuracy within 0.1% of the static baseline (30.1% mAP) when scaling from 8 to 128 GPUs, while linear scaling degrades significantly.
- On MS-COCO, Dynamic SGD achieves 30.1 mAP with 12× scale and 29.6 mAP with 16× scale, outperforming linear scaling (20.2 mAP at 16× scale).
- On ADE20K for semantic segmentation, Dynamic SGD achieves 79.07% pixAcc and 39.34% mIoU at 12× scale, matching the static baseline (78.99% pixAcc, 39.48% mIoU) and outperforming linear scaling.
- The method stabilizes training even when batch normalization statistics are not compensated for large mini-batches, particularly in FCN-based models with synchronized batch normalization.
- Theoretical analysis confirms that momentum noise scales inversely with mini-batch size, justifying the need for non-linear learning rate adaptation in dynamic settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.