FA-99096 / Learning rate schedules / Open access
Cosine decay fails to restart at each cycle boundary · case 01
Cosine decay fails to restart at each cycle boundary.
ROOT CAUSE
The schedule uses a half cosine over absolute time and never resets its phase.
THE FAILURE
The schedule uses a half cosine over absolute time and never resets its phase.
Unsuccessful approach: A one-step phase shift misses the specified rates at cycle starts and interior points.
Case contract
With fixed period, cosine restarts at zero every period; each cycle begins at base.
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, period):
import math
return base*(1+math.cos(math.pi*step/period))/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial',solve(0,10,4),10); check('quarter',solve(1,8,4),4); check('half',solve(2,12,4),0); check('restart',solve(4,7,4),7); check('next quarter',solve(5,8,4),4); check('negative clamp',solve(-1,6,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 |
|---|---|---|---|
| initial | 10.0 | 10 | Passed |
| quarter | 6.82842712474619 | 4 | Failed |
| half | 6.0 | 0 | Failed |
| restart | 0.0 | 7 | Failed |
| next quarter | 1.1715728752538093 | 4 | Failed |
| negative clamp | 5.121320343559642 | 6 | Failed |
SHA-256 / 0be8f398c7aab920c1064c42d11713e8d7767b40be86c9ba7933c6fbb77e47fc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(step, base, period):
import math
phase=step%period
return base*(1+math.cos(math.pi*(phase+1)/period))/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial',solve(0,10,4),10); check('quarter',solve(1,8,4),4); check('half',solve(2,12,4),0); check('restart',solve(4,7,4),7); check('next quarter',solve(5,8,4),4); check('negative clamp',solve(-1,6,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 |
|---|---|---|---|
| initial | 8.535533905932738 | 10 | Failed |
| quarter | 4.0 | 4 | Passed |
| half | 1.7573593128807152 | 0 | Failed |
| restart | 5.974873734152916 | 7 | Failed |
| next quarter | 4.0 | 4 | Passed |
| negative clamp | 0.0 | 6 | Failed |
SHA-256 / ce7cc66518e9157793e269a29911d7081d5146715322f8e2a92c5791a286ac58
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.352075+00:00.
Case digest / 78eb1e9084f5d867333182f1af4ee7e0769b9122299753b69e9cd9a306753363