FAILURE MAP
← Case archive

FA-99011 / Optimizer update state / Open access

Maximize mode still performs minimization · case 01

Maximize mode still performs minimization.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The gradient sign is unchanged when the objective direction is maximize.

THE FAILURE

The gradient sign is unchanged when the objective direction is maximize.

Unsuccessful approach: Taking absolute gradient values cannot represent ascent for both signs.

Case contract

In maximize mode return p+lr*g.

Why this case matters

Optimizer implementations must associate each parameter with its own mathematically specified update state.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(p, g, lr):
    return p-lr*g
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive slope',solve(4,2,N),4+2*N)
check('negative slope',solve(4,-2,N),4-2*N)
check('zero slope',solve(N,0,1),N)
check('zero rate',solve(3,5,0),3)
check('fractional slope',solve(2,1,0.5),2.5)
check('negative parameter',solve(-N,-1,2),-N-2)
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 fixtureActualExpectedOutcome
positive slope26Failed
negative slope62Failed
zero slope11Passed
zero rate33Passed
fractional slope1.52.5Failed
negative parameter1-3Failed

SHA-256 / 4f3fd2067204f3155bc9fc75554f9d49e66840019d5de794516a9c3d2ae87eaf

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(p, g, lr):
    return p+lr*abs(g)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive slope',solve(4,2,N),4+2*N)
check('negative slope',solve(4,-2,N),4-2*N)
check('zero slope',solve(N,0,1),N)
check('zero rate',solve(3,5,0),3)
check('fractional slope',solve(2,1,0.5),2.5)
check('negative parameter',solve(-N,-1,2),-N-2)
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 fixtureActualExpectedOutcome
positive slope66Passed
negative slope62Failed
zero slope11Passed
zero rate33Passed
fractional slope2.52.5Passed
negative parameter1-3Failed

SHA-256 / b0da2933614d5c63f0ba2f1a0c6a88d0a6dea124d72cee37069b77276281cb62

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 deterministic scalar or short-vector toy contracts, not claims about production optimizer APIs or training quality. 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:19.455701+00:00.

Case digest / f2f105b5f41c0a481eed099549f85e59cce9941326a255ca8c46b22b35d729e2