Skip to main content
QUICK REVIEW

[Paper Review] SWALP : Stochastic Weight Averaging in Low-Precision Training

Guandao Yang, Tianyi Zhang|arXiv (Cornell University)|Apr 26, 2019
Machine Learning and AlgorithmsComputer Science23 citations
TL;DR

SWALP proposes stochastic weight averaging (SWA) with a modified learning rate schedule for low-precision training, enabling all model weights, gradients, and optimizer states to be quantized to 8-bit fixed-point precision. The method achieves full-precision SGD performance on CIFAR-10 and CIFAR-100 with VGG-16 and PreResNet-164, while theoretically converging to the optimal solution for quadratic objectives and a smaller noise ball than low-precision SGD in strongly convex settings.

ABSTRACT

Low precision operations can provide scalability, memory savings, portability, and energy efficiency. This paper proposes SWALP, an approach to low precision training that averages low-precision SGD iterates with a modified learning rate schedule. SWALP is easy to implement and can match the performance of full-precision SGD even with all numbers quantized down to 8 bits, including the gradient accumulators. Additionally, we show that SWALP converges arbitrarily close to the optimal solution for quadratic objectives, and to a noise ball asymptotically smaller than low precision SGD in strongly convex settings.

Motivation & Objective

  • To close the performance gap between low-precision and full-precision training in deep learning.
  • To enable end-to-end 8-bit quantization of all training components, including gradient accumulators and optimizer states.
  • To leverage stochastic weight averaging (SWA) to improve generalization and robustness in low-precision training.
  • To theoretically analyze convergence properties of low-precision training with SWA under quadratic and strongly convex objectives.
  • To empirically validate that 8-bit SWALP matches full-precision SGD performance on standard vision benchmarks.

Proposed method

  • SWALP applies stochastic weight averaging (SWA) to low-precision stochastic gradient descent (SGD) with a modified learning rate schedule.
  • All model parameters, gradients, and optimizer states (e.g., momentum) are quantized to 8-bit fixed-point precision.
  • The method uses a two-phase training schedule: initial training with a decreasing learning rate, followed by SWA averaging with a constant, lower learning rate.
  • Averaging is performed every epoch (frequency c=1) starting after a predefined number of training epochs.
  • The final model is the average of the last few model weights collected during the SWA phase.
  • Theoretical analysis proves that SWALP converges to the optimal solution for quadratic objectives and to a smaller asymptotic noise ball than low-precision SGD in strongly convex settings.

Experimental results

Research questions

  • RQ1Can stochastic weight averaging (SWA) effectively mitigate the performance degradation in low-precision training when all components are quantized to 8 bits?
  • RQ2Does SWALP converge to the optimal solution for quadratic objectives under 8-bit quantization?
  • RQ3Can SWALP achieve a smaller asymptotic noise ball than standard low-precision SGD in strongly convex optimization problems?
  • RQ4Does SWALP match the generalization performance of full-precision SGD on standard vision benchmarks like CIFAR-10 and CIFAR-100?
  • RQ5How does the choice of learning rate schedule and averaging frequency affect the performance of SWALP in low-precision settings?

Key findings

  • SWALP achieves test error of 27.11% on CIFAR-100 with PreResNet-164, matching the full-precision SGD baseline.
  • For VGG-16 on CIFAR-10, SWALP achieves 2.83% test error, matching the full-precision baseline.
  • In logistic regression on MNIST, 8-bit SWALP achieves 7.34% test error, comparable to full-precision SGD (7.35%).
  • Theoretical analysis shows SWALP converges to the optimal solution for quadratic objectives under 8-bit quantization.
  • For strongly convex objectives, SWALP converges to a noise ball asymptotically smaller than that of low-precision SGD.
  • SWALP maintains performance even when the average is quantized to 8-bit block floating point, with only a 0.2% increase in test error.

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.