FA-100486 / Sparse tensor canonicalization / Open access
Sparse tensor: COO matrix-vector product ignores row coordinates · case 01
COO matrix-vector product ignores row coordinates.
ROOT CAUSE
COO entries require both coordinates to select the output row and input-vector element.
THE FAILURE
COO entries require both coordinates to select the output row and input-vector element.
Unsuccessful approach: An inclusive row prefix still mixes contributions from multiple rows rather than computing each row’s own sum.
Case contract
Return rows-length integer product y where each [r,c,v] contributes v*vector[c] to y[r].
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(entries,vector,rows):
return [sum(v*vector[c] for r,c,v in entries)]*rows
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separate rows',solve([[0,1,N],[2,0,3]],[4,5],3),[5*N,0,12])
check('empty matrix',solve([],[1,2],N),[0]*N)
check('single row',solve([[0,0,7]],[N],1),[7*N])
check('same row add',solve([[1,0,2],[1,1,3]],[N,4],3),[0,2*N+12,0])
check('zero value',solve([[0,0,0]],[N],1),[0])
check('trailing empty rows',solve([[0,0,1]],[N],3),[N,0,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 |
|---|---|---|---|
| separate rows | [17, 17, 17] | [5, 0, 12] | Failed |
| empty matrix | [0] | [0] | Passed |
| single row | [7] | [7] | Passed |
| same row add | [14, 14, 14] | [0, 14, 0] | Failed |
| zero value | [0] | [0] | Passed |
| trailing empty rows | [1, 1, 1] | [1, 0, 0] | Failed |
SHA-256 / d6c553b55646a255816d3ee179ce29cf0d470b759702b6b2b2c2d7086dd9a163
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries,vector,rows):
return [sum(v*vector[c] for r,c,v in entries if r<=i) for i in range(rows)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separate rows',solve([[0,1,N],[2,0,3]],[4,5],3),[5*N,0,12])
check('empty matrix',solve([],[1,2],N),[0]*N)
check('single row',solve([[0,0,7]],[N],1),[7*N])
check('same row add',solve([[1,0,2],[1,1,3]],[N,4],3),[0,2*N+12,0])
check('zero value',solve([[0,0,0]],[N],1),[0])
check('trailing empty rows',solve([[0,0,1]],[N],3),[N,0,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 |
|---|---|---|---|
| separate rows | [5, 5, 17] | [5, 0, 12] | Failed |
| empty matrix | [0] | [0] | Passed |
| single row | [7] | [7] | Passed |
| same row add | [0, 14, 14] | [0, 14, 0] | Failed |
| zero value | [0] | [0] | Passed |
| trailing empty rows | [1, 1, 1] | [1, 0, 0] | Failed |
SHA-256 / cc50cc5ba7a066664e58c597adc9edb76eeb9286b0d5210fb8212576bacd082a
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:36.272465+00:00.
Case digest / f3b361cfb70b78e156be25c974f89f568e734d23f2d60367aa6df2385d5229a4