SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.09405 · NeurIPS · 2024

Why Warmup the Learning Rate? Underlying Mechanisms and Improvements

Dayal Singh Kalra, Maissam Barkeshli

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.09405.json · badge: /api/ran/2406.09405.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
dayal-kalra/why-warmup canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
cross_entropy_loss Ran
ran, violated the contract we drafted
dayal-kalra/why-warmup/vision/mechanisms/utils/loss_utils.py
code served (permissive licence) · get_code("26d13d6c867ba7fa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import jax
import jax.numpy as jnp
import optax

torch.manual_seed(0)

# For optax, we need jax arrays, not torch tensors
# logits: shape (batch_size, num_classes)
# labels: shape (batch_size, num_classes) - one-hot encoded for softmax_cross_entropy

batch_size = 2
num_classes = 4

# Create logits as a jax array
logits = jnp.array([
    [2.0, 1.0, 0.5, -1.0],
    [0.1, 0.2, 3.0, 0.5]
], dtype=jnp.float32)

# Create one-hot encoded labels
labels = jnp.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "logits": logits,
    "labels": labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, optax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cross_entropy_loss_integer_labels Ran
ran; our contract draft was wrong, not the code
dayal-kalra/why-warmup/vision/mechanisms/utils/loss_utils.py
code served (permissive licence) · get_code("b9ac929ad3f0fc94")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ArrayImpl, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import jax.numpy as jnp

torch.manual_seed(0)

# Create small batch of logits: batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# Create integer labels: batch_size=2, with class indices in range [0, 4)
labels = torch.tensor([0, 3])

# Convert to jax arrays for optax compatibility
logits_jax = jnp.array(logits.numpy())
labels_jax = jnp.array(labels.numpy())

ARGS = {
    "logits": logits_jax,
    "labels": labels_jax,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, optax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
linear_warmup Ran
ran, honoured the contract we drafted
dayal-kalra/why-warmup/vision/mechanisms/train_resnet_grads_adam_lobpcg.py
code served (permissive licence) · get_code("facc696d7f68e5d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "step": 5,
    "lr_init": 0.0001,
    "lr_trgt": 0.001,
    "warmup_steps": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mse_loss Ran
ran, honoured the contract we drafted
dayal-kalra/why-warmup/vision/mechanisms/utils/loss_utils.py
code served (permissive licence) · get_code("8294c2b79bb5a70f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function computes MSE loss between logits and labels
# Both are used in arithmetic operations: (logits - labels) ** 2
# So both need to be tensors of compatible shape

logits = torch.randn(2, 4)  # batch_size=2, dim=4
labels = torch.randn(2, 4)  # same shape as logits

ARGS = {
    "logits": logits,
    "labels": labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
count_parameters Not yet run
unverified (harvested, no recorded run)
dayal-kalra/why-warmup/vision/mechanisms/utils/model_utils.py
code served (permissive licence) · get_code("5cdd8100958da566")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

It is common in deep learning to warm up the learning rate η, often by a linear schedule between η init = 0 and a predetermined target η trgt . In this paper, we show through systematic experiments using SGD and Adam that the overwhelming benefit of warmup arises from allowing the network to tolerate larger η trgt by forcing the network to more well-conditioned areas of the loss landscape. The ability to handle larger η trgt makes hyperparameter tuning more robust while improving the final performance. We uncover different regimes of operation during the warmup period, depending on whether training starts off in a progressive sharpening or sharpness reduction phase, which in turn depends on the initialization and parameterization. Using these insights, we show how η init can be properly chosen by utilizing the loss catapult mechanism, which saves on the number of warmup steps, in some cases completely eliminating the need for warmup. We also suggest an initialization for the variance in Adam which provides benefits similar to warmup. 50 55 60 65 70 75 80 85 90 (d) 1 .8 e -0 3 3 .7 e -0 3 7 .3 e -0 3 1 .5 e -0 2 2 .9 e -0 2 5 .9 e -0 2 1 .2 e -0 1 2 .3 e -0 1 4 .7 e -0 1 9 .4 e -0 1 1 .9 e + 0 0 (a) 1 .4 e -0 3 2 .8 e -0 3 5 .6 e -0 3 1 .1 e -0 2 2 .2 e -0 2 4 .5 e -0 2 9 .0 e -0 2 1 .8 e -0 1 3 .6 e -0 1 7 .2 e -0 1 1 .4 e + 0 0 Treach 1000 2000 3000 4000 (b) 1 .4 e -0 3 2 .8 e -0 3 5 .6 e -0 3 1 .1 e -0 2 2 .2 e -0 2 4 .5 e -0 2 9 .0 e -0 2 1 .8 e -0 1 3 .6 e -0 1 7 .2 e -0 1 1 .4 e + 0 0 1 . 0 e -0 4

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.09405")
get_code_for_paper("2406.09405")
have("2406.09405")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.09405.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.09405.svg)](https://syntology.ai/paper/2406.09405)

Connect an agent — have() is free.