FA-99101 / Learning rate schedules / Open access
Cosine restarts are misaligned with the end of warmup · case 01
Cosine restarts are misaligned with the end of warmup.
ROOT CAUSE
The restart remainder is calculated from the global step, not elapsed post-warmup steps.
THE FAILURE
The restart remainder is calculated from the global step, not elapsed post-warmup steps.
Unsuccessful approach: Offsetting the corrected phase by one step creates a discontinuity at the warmup boundary.
Case contract
Warm up linearly, then apply a repeating cosine over a fixed post-warmup period.
Why this case matters
A deterministic scalar schedule makes step-to-rate mapping explicit for a small training loop.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(step, base, warmup, period):
import math
return base*step/warmup if step<warmup else base*(1+math.cos(2*math.pi*(step%period)/period))/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('warmup',solve(1,8,4,3),2); check('boundary',solve(4,8,4,3),8); check('midcycle',solve(6,8,4,4),0); check('quarter cycle',solve(5,8,4,4),4); check('restart',solve(8,8,4,4),8); check('next peak',solve(12,6,4,4),6)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| warmup | 2.0 | 2 | Passed |
| boundary | 2.000000000000001 | 8 | Failed |
| midcycle | 0.0 | 0 | Passed |
| quarter cycle | 4.0 | 4 | Passed |
| restart | 8.0 | 8 | Passed |
| next peak | 6.0 | 6 | Passed |
SHA-256 / 0066ea9891e121b4d5fc4de613090e907261bdcd768d9ed76c7331292220a82e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(step, base, warmup, period):
import math
phase=(step-warmup)%period
return base*(step/warmup) if step<warmup else base*(1+math.cos(2*math.pi*(phase+1)/period))/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('warmup',solve(1,8,4,3),2); check('boundary',solve(4,8,4,3),8); check('midcycle',solve(6,8,4,4),0); check('quarter cycle',solve(5,8,4,4),4); check('restart',solve(8,8,4,4),8); check('next peak',solve(12,6,4,4),6)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| warmup | 2.0 | 2 | Passed |
| boundary | 2.000000000000001 | 8 | Failed |
| midcycle | 3.999999999999999 | 0 | Failed |
| quarter cycle | 0.0 | 4 | Failed |
| restart | 4.0 | 8 | Failed |
| next peak | 3.0 | 6 | Failed |
SHA-256 / 8720ea168f61d87ba6e7634f3956ed75eee7cae12b1e5ad47b4e4dd6af60c08d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
These are toy scalar contracts with integer steps and finite parameters; they do not model framework defaults or optimizer state. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:20.351688+00:00.
Case digest / 8420f94bfe5961f462a11fbf4f3e4495dc2f2ca63247b7ed158121931b70e2ae