Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Weight Averaging in Parallel: Large-Batch Training that Generalizes Well

Vipul Gupta, Santiago Akle Serrano|arXiv (Cornell University)|Jan 7, 2020
Advanced Neural Network ApplicationsComputer Science26 references15 citations
TL;DR

This paper proposes Stochastic Weight Averaging in Parallel (SWAP), a method that accelerates large-batch training of deep neural networks by first training a model with large mini-batches for fast convergence and then refining it by averaging weights from multiple independently trained small-batch models. SWAP achieves generalization performance comparable to small-batch training but in significantly less time, reducing training time by up to 68% on CIFAR10 compared to state-of-the-art methods.

ABSTRACT

We propose Stochastic Weight Averaging in Parallel (SWAP), an algorithm to accelerate DNN training. Our algorithm uses large mini-batches to compute an approximate solution quickly and then refines it by averaging the weights of multiple models computed independently and in parallel. The resulting models generalize equally well as those trained with small mini-batches but are produced in a substantially shorter time. We demonstrate the reduction in training time and the good generalization performance of the resulting models on the computer vision datasets CIFAR10, CIFAR100, and ImageNet.

Motivation & Objective

  • To address the trade-off between training speed and generalization performance in large-batch deep learning training.
  • To enable faster training without sacrificing model generalization by leveraging parallel training of small-batch models after a large-batch initialization.
  • To develop a practical, low-tuning method that efficiently utilizes computational resources for large-scale DNN training.
  • To demonstrate that large-batch training followed by parallel small-batch refinement yields models with generalization performance matching small-batch training.

Proposed method

  • The method first trains a model using large mini-batches to quickly reach a region of low training loss.
  • It then trains multiple independent models in parallel using small mini-batches, starting from the large-batch model.
  • The final model is formed by averaging the trained weights of these independently trained small-batch models.
  • The approach uses a cyclic learning rate schedule in the small-batch phase to encourage convergence to flatter minima.
  • The transition from large-batch to small-batch training is controlled by a hyperparameter, chosen via grid search in experiments.
  • The method is compatible with various optimization schemes and can be combined with techniques like local SGD to reduce communication overhead.

Experimental results

Research questions

  • RQ1Can large-batch training be accelerated without compromising generalization performance?
  • RQ2Does averaging weights from multiple independently trained small-batch models improve generalization compared to standard large-batch training?
  • RQ3Can the combination of large-batch pre-training and parallel small-batch fine-tuning achieve generalization performance comparable to small-batch training?
  • RQ4How does the training time of the proposed method compare to standard small-batch and large-batch training strategies?
  • RQ5Is there a critical transition point between large-batch and small-batch phases that optimizes performance and efficiency?

Key findings

  • SWAP achieved a test accuracy of 79.11% on CIFAR100 in 241.54 seconds, matching the performance of small-batch SWA but in 3.5x less time.
  • On CIFAR10, SWAP reduced training time to 68% of the time taken by the winning entry of the DAWNBench competition while achieving comparable generalization performance.
  • Large-batch training followed by small-batch SWA required over three times longer than SWAP to achieve similar test accuracy (78.12% vs. 78.18% on CIFAR100).
  • SWAP with 40 small-batch epochs achieved 79.11% test accuracy on CIFAR100 in 241.54 seconds, outperforming large-batch SWA (76.00%) and large-batch followed by small-batch SWA (78.12%) in both speed and accuracy.
  • The final averaged model in SWAP was found to be closer to the center of a loss basin than standard SGD models, suggesting improved robustness.
  • Visualizations indicate that the large-batch model converges to a basin that overlaps with the region where refined small-batch models also converge, supporting the idea of a nearly convex basin.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.