Training Dynamics of the Cooldown Stage in Warmup-Stable-Decay Learning Rate Scheduler

Aleksandr Dremov, Alexander Hägele, Atli Kosson, Martin Jaggi · DOI

TL;DR

This paper dives deep into the "cooldown" phase of the Warmup-Stable-Decay (WSD) learning rate scheduler, a critical but under-explored part of transformer training. They introduce a bias-variance framework to explain why different cooldown shapes impact performance and find that optimizing this phase can be as crucial as tuning other hyperparameters.

What Problem Does This Paper Address?

Transformer models, especially large language models (LLMs), rely heavily on learning rate schedulers to converge effectively. The Warmup-Stable-Decay (WSD) scheduler has gained traction due to its flexibility, but the dynamics of its final "cooldown" stage—where the learning rate rapidly decreases—are not well understood. While previous work has shown WSD's effectiveness, the specific impact of the cooldown's shape and its underlying mechanisms remain a mystery. This paper aims to demystify this crucial phase, providing insights into how its shape influences model performance and offering practical guidance for its optimization.

Methods

The authors propose a bias-variance framework to analyze the impact of different cooldown shapes. They train multiple models with the same pre-cooldown checkpoint but with varied data permutations during the cooldown. This allows them to measure:

  • Bias: The difference between the average model's performance and a reference model's performance (trained longer).
  • Variance: The variability in performance across different data permutations.

They also visualize the loss landscape during the cooldown stage using two directions: the global optimization direction (pre-cooldown to final model) and the Adam steps direction. Additionally, they investigate the impact of hyperparameters like batch size and AdamW's $\beta_1, \beta_2$ parameters, and analyze feature evolution across transformer layers during cooldown using linear probes.

Datasets

The primary dataset used is a subset of SlimPajama. For reproduction and validation, they also use fineweb-edu.

Key Insights and Ideas

  • Cooldown Shape Matters: The shape of the learning rate decay during cooldown significantly impacts final model performance, not just the speed of convergence.
  • Bias-Variance Trade-off: Different cooldown shapes create a fundamental bias-variance trade-off. Shapes that balance aggressive exploration (high variance, low bias) with exploitation (low variance, high bias) perform best.
  • "River Valley" Loss Landscape: Visualizations confirm the "river valley" hypothesis, showing optimization descending along a broad direction during the stable phase and then sharply into a narrow basin during cooldown.
  • Hyperparameter Sensitivity: While batch size has a minor impact, AdamW's $\beta_2$ parameter is surprisingly sensitive during cooldown, with larger values often yielding better results.
  • Model Averaging vs. Longer Training: Averaging models from multiple shorter runs with high-variance cooldown shapes can outperform individual runs, but a single, longer training run generally achieves the best performance.
  • Feature Refinement: Deeper transformer layers show more substantial feature refinement during the cooldown stage compared to earlier layers.

Key Results

  • The sqrt and lowered linear 0.7 cooldown shapes were identified as optimal for balancing bias and variance.
  • High-variance shapes like mirror cosine performed best when model averaging was employed.
  • Adjusting AdamW's $\beta_2$ parameter during cooldown yielded performance improvements comparable to optimizing the cooldown shape itself.
  • Loss landscape visualizations provided strong empirical evidence for the "river valley" concept.
  • A single longer training run (52.8k steps) outperformed averaged models from four shorter runs (33k steps each).

Limitations and Future Work

  • Model Size: The analysis was primarily conducted on moderate model sizes (210M parameters), and future work could explore these findings on larger models.
  • Downstream Tasks: The study focused on validation loss and optimization landscape. Future work should investigate the impact of cooldown dynamics on downstream task performance.
  • Mechanistic Understanding: The paper acknowledges that the precise mechanistic changes within the model during cooldown remain unclear, suggesting model diffing frameworks as a potential avenue for future research.

Summary updated

BibTeX
@article{dremov2025training,
  author = {Aleksandr Dremov and Alexander Hägele and Atli Kosson and Martin Jaggi},
  title = {{Training Dynamics of the Cooldown Stage in Warmup-Stable-Decay Learning Rate Scheduler}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=ZnSYEcZod3},
}
Figure