FA-98666 / Model quantization arithmetic / Open access
Quantization: Negative midpoint rounding is asymmetric · case 01
Negative midpoint rounding is asymmetric.
ROOT CAUSE
Round each signed scalar to nearest integer with ties to even; values may be positive or negative.
THE FAILURE
Round each signed scalar to nearest integer with ties to even; values may be positive or negative.
Unsuccessful approach: The attempted code adds a positive half before truncating, which shifts negative midpoints toward zero.
Case contract
Round each signed scalar to nearest integer with ties to even; values may be positive or negative. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.
Why this case matters
This deterministic model isolates one quantization arithmetic contract from tensor storage and runtime kernels.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values):
return [int(x) for x in values]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('negative odd tie',solve([-2.5]),[-2])
check('negative even tie',solve([-3.5]),[-4])
check('positive tie',solve([2.5]),[2])
check('empty',solve([]),[])
check('negative near tie',solve([-2.4]),[-2])
check('negative below',solve([-2.6]),[-3])
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 |
|---|---|---|---|
| negative odd tie | [-2] | [-2] | Passed |
| negative even tie | [-3] | [-4] | Failed |
| positive tie | [2] | [2] | Passed |
| empty | [] | [] | Passed |
| negative near tie | [-2] | [-2] | Passed |
| negative below | [-2] | [-3] | Failed |
SHA-256 / 29661310fed926104e7829ae26f44852f1cbaa065edc7ec69d808d347718ae35
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values):
return [int(x+0.5) for x in values]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('negative odd tie',solve([-2.5]),[-2])
check('negative even tie',solve([-3.5]),[-4])
check('positive tie',solve([2.5]),[2])
check('empty',solve([]),[])
check('negative near tie',solve([-2.4]),[-2])
check('negative below',solve([-2.6]),[-3])
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 |
|---|---|---|---|
| negative odd tie | [-2] | [-2] | Passed |
| negative even tie | [-3] | [-4] | Failed |
| positive tie | [3] | [2] | Failed |
| empty | [] | [] | Passed |
| negative near tie | [-1] | [-2] | Failed |
| negative below | [-2] | [-3] | Failed |
SHA-256 / d63375e772ccbc5f4a11a619e3c4f69832abfacd9e85446dec4c7068ec353875
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
Toy scalar/list arithmetic only; it does not model a production quantizer, hardware instruction, or accuracy/performance gain. 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:15.404403+00:00.
Case digest / ebb796e7f218a0c4b3617cbff8ec5427a8dbd26449836e9d29899d30ec08437a