Training trajectories, mini-batch losses and the curious role of the learning rate

Mark Sandler, Andrey Zhmoginov, Max Vladymyrov, Nolan Miller
1/5/2023
cs.LG

No confident code implementation found for this paper.

Abstract

Stochastic gradient descent plays a fundamental role in nearly all applications of deep learning. However its ability to converge to a global minimum remains shrouded in mystery.

Show full abstract

In this paper we propose to study the behavior of the loss function on fixed mini-batches along SGD trajectories. We show that the loss function on a fixed batch appears to be remarkably convex-like. In particular for ResNet the loss for any fixed mini-batch can be accurately modeled by a quadratic function and a very low loss value can be reached in just one step of gradient descent with sufficiently large learning rate. We propose a simple model that allows to analyze the relationship between the gradients of stochastic mini-batches and the full batch. Our analysis allows us to discover the equivalency between iterate aggregates and specific learning rate schedules. In particular, for Exponential Moving Average (EMA) and Stochastic Weight Averaging we show that our proposed model matches the observed training trajectories on ImageNet. Our theoretical model predicts that an even simpler averaging technique, averaging just two points a many steps apart, significantly improves accuracy compared to the baseline. We validated our findings on ImageNet and other datasets using ResNet architecture.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sandler2023training,
  title  = {Training trajectories, mini-batch losses and the curious role of the learning rate},
  author = {Mark Sandler and Andrey Zhmoginov and Max Vladymyrov and Nolan Miller},
  year   = {2023},
  eprint = {2301.02312},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.02312v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.02312.svg)](https://codeofpaper.com/paper/2301.02312)

Discussion