FA-12031 / Optimization solver contracts / Open access
Coordinate descent sweep reads stale coordinates · case 01
Coordinate descent sweep reads stale coordinates.
ROOT CAUSE
Both exact coordinate minimizers read the initial state.
VERIFIED REPAIR
Update y from the newly updated x during the ordered sweep.
Unsuccessful approach: Reversing the update order changes the specified sweep.
Case contract
For f=(x-a)^2+(y-b)^2+(x-y)^2 perform one exact x-then-y sweep; return [x,y].
Why this case matters
This deterministic solver-step model isolates an algorithmic invariant used by iterative optimization implementations.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y, a, b):
return [(a+y)/2,(b+x)/2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('coupling', solve(0, 0, 4*N, 0), [2*N,N])
check('shifted target', solve(0, 0, 0, 4*N), [0,2*N])
check('initial x discarded', solve(9*N, 0, 0, 0), [0,0])
check('initial y retained', solve(0, 4*N, 0, 0), [2*N,N])
check('fixed point', solve(N,N,N,N), [N,N])
check('signed targets', solve(0,0,-4*N,4*N), [-2*N,N])
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 |
|---|---|---|---|
| coupling | [2.0, 0.0] | [2, 1] | Failed |
| shifted target | [0.0, 2.0] | [0, 2] | Passed |
| initial x discarded | [0.0, 4.5] | [0, 0] | Failed |
| initial y retained | [2.0, 0.0] | [2, 1] | Failed |
| fixed point | [1.0, 1.0] | [1, 1] | Passed |
| signed targets | [-2.0, 2.0] | [-2, 1] | Failed |
SHA-256 / 552b0e088276c7d0a00c46e424490b3bf3917825842a2140895f3dc10996ede9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y, a, b):
new_y=(b+x)/2
return [(a+new_y)/2,new_y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('coupling', solve(0, 0, 4*N, 0), [2*N,N])
check('shifted target', solve(0, 0, 0, 4*N), [0,2*N])
check('initial x discarded', solve(9*N, 0, 0, 0), [0,0])
check('initial y retained', solve(0, 4*N, 0, 0), [2*N,N])
check('fixed point', solve(N,N,N,N), [N,N])
check('signed targets', solve(0,0,-4*N,4*N), [-2*N,N])
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 |
|---|---|---|---|
| coupling | [2.0, 0.0] | [2, 1] | Failed |
| shifted target | [1.0, 2.0] | [0, 2] | Failed |
| initial x discarded | [2.25, 4.5] | [0, 0] | Failed |
| initial y retained | [0.0, 0.0] | [2, 1] | Failed |
| fixed point | [1.0, 1.0] | [1, 1] | Passed |
| signed targets | [-1.0, 2.0] | [-2, 1] | Failed |
SHA-256 / e2f011039b898982ea51129b2318cea8eb143ccafc6bac7a519c9d9a188d748e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y, a, b):
new_x=(a+y)/2
return [new_x,(b+new_x)/2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('coupling', solve(0, 0, 4*N, 0), [2*N,N])
check('shifted target', solve(0, 0, 0, 4*N), [0,2*N])
check('initial x discarded', solve(9*N, 0, 0, 0), [0,0])
check('initial y retained', solve(0, 4*N, 0, 0), [2*N,N])
check('fixed point', solve(N,N,N,N), [N,N])
check('signed targets', solve(0,0,-4*N,4*N), [-2*N,N])
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 |
|---|---|---|---|
| coupling | [2.0, 1.0] | [2, 1] | Passed |
| shifted target | [0.0, 2.0] | [0, 2] | Passed |
| initial x discarded | [0.0, 0.0] | [0, 0] | Passed |
| initial y retained | [2.0, 1.0] | [2, 1] | Passed |
| fixed point | [1.0, 1.0] | [1, 1] | Passed |
| signed targets | [-2.0, 1.0] | [-2, 1] | Passed |
SHA-256 / b011e08488b1ed651ebae0c65737d3733e7cfd766b0af92c6d506a0751d6decf
Verification & scope
Controlled finite inputs and explicit one-step contracts; this is not a production solver or a numerical stability benchmark. 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-29T14:38:53.109790+00:00.
Case digest / 0784e4b83b86506465576003713b5b7621ac7be49a78160ed0e5be82ce0079be