FAILURE MAP
← Case archive

FA-98731 / Model quantization arithmetic / Open access

Quantization: Symmetric minimum code is asymmetric · case 01

Symmetric minimum code is asymmetric.

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

ROOT CAUSE

Map by positive scale into the inclusive symmetric integer range [-qmax,qmax], with zero point zero.

THE FAILURE

Map by positive scale into the inclusive symmetric integer range [-qmax,qmax], with zero point zero.

Unsuccessful approach: The attempted code fixes lower saturation but truncates scaled values rather than using the declared midpoint rounding rule.

Case contract

Map by positive scale into the inclusive symmetric integer range [-qmax,qmax], with zero point zero. 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, scale, qmax):
    return [max(-qmax+1,min(qmax,round(x/scale))) for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lower endpoint',solve([-8],1,8),[-8])
check('upper endpoint',solve([8],1,8),[8])
check('below range',solve([-100],1,8),[-8])
check('above range',solve([100],1,8),[8])
check('empty',solve([],1,8),[])
check('interior',solve([N],1,8),[N])
check('fractional round',solve([3],2,8),[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
lower endpoint[-7][-8]Failed
upper endpoint[8][8]Passed
below range[-7][-8]Failed
above range[8][8]Passed
empty[][]Passed
interior[1][1]Passed
fractional round[2][2]Passed

SHA-256 / 966eeced159e73b5f40d41f01c6b184a4d4cbc90a29bc57572c3e6c12bff102d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(values, scale, qmax):
    return [max(-qmax,min(qmax,int(x/scale))) for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lower endpoint',solve([-8],1,8),[-8])
check('upper endpoint',solve([8],1,8),[8])
check('below range',solve([-100],1,8),[-8])
check('above range',solve([100],1,8),[8])
check('empty',solve([],1,8),[])
check('interior',solve([N],1,8),[N])
check('fractional round',solve([3],2,8),[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
lower endpoint[-8][-8]Passed
upper endpoint[8][8]Passed
below range[-8][-8]Passed
above range[8][8]Passed
empty[][]Passed
interior[1][1]Passed
fractional round[1][2]Failed

SHA-256 / 39d24d89420383ef976dc843df03441f6cc8bcfc8c8e39409a34e28e23e78b77

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:16.278439+00:00.

Case digest / 1ab2fc27c4116baeaf443141097985638055875b4f7b51638c11d3c6ce8f735a