A learning rate schedule specifies how the learning rate changes during an iterative learning procedure. Its rule can depend on the update count, a training epoch count or another declared event. The rule and the clock must both be stated: changing a rate every parameter update is different from changing it after a complete pass through the training data.
A simple step-decay example is
where counts completed schedule advances from zero. The values at are , those at are , and the value at is . The StepLR implementation documents periodic multiplication by a specified factor; its example advances the scheduler after the training and validation operations.[ref]
A different schedule admits an exact convergence calculation. For gradient descent on , take . With no other update terms,
Multiplying the successive ratios gives a telescoping product:
Starting at gives . This proves convergence for the stated deterministic quadratic, rather than for every objective or noisy learning procedure.
The underlying stochastic gradient descent update also depends on its gradient estimate and any additional terms, not just the scheduled scalar.[ref] Report the initial index, update order and any external changes to the rate. The StepLR documentation explicitly permits other changes alongside its own, so the isolated step formula above assumes that no competing rule intervenes.[ref]
A cosine learning rate schedule varies the learning rate along a segment of a cosine curve. For a single decreasing segment, declare to count completed schedule advances and choose a duration . With no competing rate updates, set
It starts at , reaches the midpoint of the two bounds at , and ends at . This is the cosine segment used in SGDR; repeating such segments with restarts is an additional policy, not part of the single-segment formula.[ref]
For an original example, let , and . At the rates are approximately . Differentiating the continuous interpolation gives
Thus the rate decreases throughout the interior when the upper bound exceeds the lower bound, and its interpolation has zero slope at both ends. A smooth rate curve does not by itself prove convergence of the learning procedure.
The clock must be declared: advancing once per training epoch differs from advancing after every parameter update. The PyTorch CosineAnnealingLR documentation explicitly distinguishes its implementation without restarts from SGDR. Its example advances the scheduler after the training and validation operations. To stop at the lower bound, stop or hold the schedule at the declared endpoint; indefinitely extending the cosine formula is not a permanently decreasing rule.[ref]

Articles by others on the same topic (0)

There are currently no matching articles.