FA-100476 / Sparse tensor canonicalization / Open access
Sparse tensor: row reduction uses the global value array · case 01
row reduction uses the global value array.
ROOT CAUSE
The reduction ignores row boundaries or represents empty rows as missing values.
THE FAILURE
The reduction ignores row boundaries or represents empty rows as missing values.
Unsuccessful approach: Empty rows are rows with sum zero in this integer contract.
Case contract
Return one sum per CSR row using that row’s pointer interval, including zero for empty rows.
Why this case matters
A small offline sparse-array operation has explicit coordinate and storage semantics.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ptr,values):
return [sum(values)]*(len(ptr)-1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty middle',solve([0,2,2,3],[N,2,4]),[N+2,0,4])
check('all empty',solve([0,0,0],[]),[0,0])
check('one row',solve([0,2],[N,3]),[N+3])
check('negative values',solve([0,2,3],[-N,1,5]),[1-N,5])
check('trailing empty',solve([0,1,1,1],[7]),[7,0,0])
check('no rows',solve([0],[]),[])
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 |
|---|---|---|---|
| empty middle | [7, 7, 7] | [3, 0, 4] | Failed |
| all empty | [0, 0] | [0, 0] | Passed |
| one row | [4] | [4] | Passed |
| negative values | [5, 5] | [0, 5] | Failed |
| trailing empty | [7, 7, 7] | [7, 0, 0] | Failed |
| no rows | [] | [] | Passed |
SHA-256 / dc1e0fa9e21fee951c5ee2ca7c90526465e8a8281030ed164aea4f5398c229c3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ptr,values):
return [sum(values[ptr[r]:ptr[r+1]]) if ptr[r+1]>ptr[r] else None for r in range(len(ptr)-1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty middle',solve([0,2,2,3],[N,2,4]),[N+2,0,4])
check('all empty',solve([0,0,0],[]),[0,0])
check('one row',solve([0,2],[N,3]),[N+3])
check('negative values',solve([0,2,3],[-N,1,5]),[1-N,5])
check('trailing empty',solve([0,1,1,1],[7]),[7,0,0])
check('no rows',solve([0],[]),[])
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 |
|---|---|---|---|
| empty middle | [3, None, 4] | [3, 0, 4] | Failed |
| all empty | [None, None] | [0, 0] | Failed |
| one row | [4] | [4] | Passed |
| negative values | [0, 5] | [0, 5] | Passed |
| trailing empty | [7, None, None] | [7, 0, 0] | Failed |
| no rows | [] | [] | Passed |
SHA-256 / 985e330b81742eba385952cbce8de8b75b5e9b90fa063822e47b019cd4cb44cb
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 integer-valued COO or CSR contracts; they make no claim about a framework API, floating point policy, or large tensor performance. 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:35.815655+00:00.
Case digest / 8346ee2f7d244b4a58f13c23a73c84bb2d5f944d5f31bd00c8a163a80086520d