FAILURE MAP
← Case archive

FA-72101 / Error-correcting codes / Open access

Min-sum offset can flip the message sign · case 01

Weak messages flip sign after the offset is applied.

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

ROOT CAUSE

The offset is subtracted without clamping at zero.

VERIFIED REPAIR

Clamp the offset magnitude at zero: max(mag - beta, 0).

Unsuccessful approach: Taking the absolute value reflects small magnitudes back up instead of zeroing them.

Case contract

Offset min-sum check-node update for LDPC decoding with integer LLRs. For each edge i the outgoing message is the product of the signs of all OTHER incoming LLRs (0 counts as positive) times max(min |other LLR| - beta, 0). Fewer than two edges returns None. Return the outgoing messages in edge order.

Why this case matters

LDPC decoders in Wi-Fi, 5G and SSD controllers run this update billions of times per second.

1 / The failure

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

N = 1
observations = []
def solve(llrs, beta):
    if len(llrs) < 2:
        return None
    out = []
    for i in range(len(llrs)):
        others = llrs[:i] + llrs[i + 1:]
        sign = 1
        for v in others:
            if v < 0:
                sign = -sign
        mag = min(abs(v) for v in others)
        out.append(sign * (mag - beta))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]], ['control [[6, -11, 10, -5, 2, 8], 1]', [[6, -11, 10, -5, 2, 8], 1], [1, -1, 1, -1, 4, 1]], ['control [[1, 7, -2], 0]', [[1, 7, -2], 0], [-2, -1, 1]], ['control [[-3, 6], 3]', [[-3, 6], 3], [3, 0]], ['control [[-5, -9], 0]', [[-5, -9], 0], [-9, -5]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]]], [['regression [[0, -4, 6], 1]', [[0, -4, 6], 1], [-3, 0, 0]], ['regression [[2, 2, 2], 3]', [[2, 2, 2], 3], [0, 0, 0]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]], ['control [[5, -12, -9], 3]', [[5, -12, -9], 3], [6, -2, -2]], ['control [[4, -9, -7, -9, 6], 3]', [[4, -9, -7, -9, 6], 3], [-3, 1, 1, 1, -1]], ['control [[5, -3, -1, -4], 0]', [[5, -3, -1, -4], 0], [-1, 1, 3, 1]], ['control [[11, 8, 12, -10], 1]', [[11, 8, 12, -10], 1], [-7, -9, -7, 7]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]]], [['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]], ['control [[7, 2, 6, -11], 2]', [[7, 2, 6, -11], 2], [0, -4, 0, 0]], ['control [[-1, 2, -7], 1]', [[-1, 2, -7], 1], [-1, 0, 0]], ['control [[5, -3], 1]', [[5, -3], 1], [-2, 4]], ['control [[-1], 0]', [[-1], 0], None], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
regression [[12, 0, -10, 8], 1][1, -7, -1, 1][0, -7, 0, 0]Failed
regression [[-6, 10, 0], 1][-1, 1, -5][0, 0, -5]Failed
control [[3, 4], 0][4, 3][4, 3]Passed
control [[12, -11, -9, -2, 8, -3], 1][1, -1, -1, -2, 1, -1][1, -1, -1, -2, 1, -1]Passed
control [[1, -2, -3, -4], 1][-1, 0, 0, 0][-1, 0, 0, 0]Passed
control [[-2, -12, 2, -7, 10, 7], 2][0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]Passed
control [[-3, 6], 2][4, -1][4, -1]Passed
control [[3, -8], 3][-5, 0][-5, 0]Passed

SHA-256 / 26f2f28a59b6f3f0ed215512593f40fbc810368002d2ddb558d9a8c0ea1e683e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(llrs, beta):
    if len(llrs) < 2:
        return None
    out = []
    for i in range(len(llrs)):
        others = llrs[:i] + llrs[i + 1:]
        sign = 1
        for v in others:
            if v < 0:
                sign = -sign
        mag = min(abs(v) for v in others)
        out.append(sign * abs(mag - beta))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]], ['control [[6, -11, 10, -5, 2, 8], 1]', [[6, -11, 10, -5, 2, 8], 1], [1, -1, 1, -1, 4, 1]], ['control [[1, 7, -2], 0]', [[1, 7, -2], 0], [-2, -1, 1]], ['control [[-3, 6], 3]', [[-3, 6], 3], [3, 0]], ['control [[-5, -9], 0]', [[-5, -9], 0], [-9, -5]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]]], [['regression [[0, -4, 6], 1]', [[0, -4, 6], 1], [-3, 0, 0]], ['regression [[2, 2, 2], 3]', [[2, 2, 2], 3], [0, 0, 0]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]], ['control [[5, -12, -9], 3]', [[5, -12, -9], 3], [6, -2, -2]], ['control [[4, -9, -7, -9, 6], 3]', [[4, -9, -7, -9, 6], 3], [-3, 1, 1, 1, -1]], ['control [[5, -3, -1, -4], 0]', [[5, -3, -1, -4], 0], [-1, 1, 3, 1]], ['control [[11, 8, 12, -10], 1]', [[11, 8, 12, -10], 1], [-7, -9, -7, 7]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]]], [['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]], ['control [[7, 2, 6, -11], 2]', [[7, 2, 6, -11], 2], [0, -4, 0, 0]], ['control [[-1, 2, -7], 1]', [[-1, 2, -7], 1], [-1, 0, 0]], ['control [[5, -3], 1]', [[5, -3], 1], [-2, 4]], ['control [[-1], 0]', [[-1], 0], None], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
regression [[12, 0, -10, 8], 1][-1, -7, 1, -1][0, -7, 0, 0]Failed
regression [[-6, 10, 0], 1][1, -1, -5][0, 0, -5]Failed
control [[3, 4], 0][4, 3][4, 3]Passed
control [[12, -11, -9, -2, 8, -3], 1][1, -1, -1, -2, 1, -1][1, -1, -1, -2, 1, -1]Passed
control [[1, -2, -3, -4], 1][-1, 0, 0, 0][-1, 0, 0, 0]Passed
control [[-2, -12, 2, -7, 10, 7], 2][0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]Passed
control [[-3, 6], 2][4, -1][4, -1]Passed
control [[3, -8], 3][-5, 0][-5, 0]Passed

SHA-256 / 8d629f47dd0e065b1fd6861742e11a35aa5ee29b6b7a0c1cb77cf300400fb20e

3 / The verified repair

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

N = 1
observations = []
def solve(llrs, beta):
    if len(llrs) < 2:
        return None
    out = []
    for i in range(len(llrs)):
        others = llrs[:i] + llrs[i + 1:]
        sign = 1
        for v in others:
            if v < 0:
                sign = -sign
        mag = min(abs(v) for v in others)
        out.append(sign * max(mag - beta, 0))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[3, -8], 3]', [[3, -8], 3], [-5, 0]], ['control [[6, -11, 10, -5, 2, 8], 1]', [[6, -11, 10, -5, 2, 8], 1], [1, -1, 1, -1, 4, 1]], ['control [[1, 7, -2], 0]', [[1, 7, -2], 0], [-2, -1, 1]], ['control [[-3, 6], 3]', [[-3, 6], 3], [3, 0]], ['control [[-5, -9], 0]', [[-5, -9], 0], [-9, -5]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]]], [['regression [[0, -4, 6], 1]', [[0, -4, 6], 1], [-3, 0, 0]], ['regression [[2, 2, 2], 3]', [[2, 2, 2], 3], [0, 0, 0]], ['control [[-10, 12, 6, 2], 0]', [[-10, 12, 6, 2], 0], [2, -2, -2, -6]], ['control [[5, -12, -9], 3]', [[5, -12, -9], 3], [6, -2, -2]], ['control [[4, -9, -7, -9, 6], 3]', [[4, -9, -7, -9, 6], 3], [-3, 1, 1, 1, -1]], ['control [[5, -3, -1, -4], 0]', [[5, -3, -1, -4], 0], [-1, 1, 3, 1]], ['control [[11, 8, 12, -10], 1]', [[11, 8, 12, -10], 1], [-7, -9, -7, 7]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]]], [['regression [[12, 0, -10, 8], 1]', [[12, 0, -10, 8], 1], [0, -7, 0, 0]], ['regression [[-6, 10, 0], 1]', [[-6, 10, 0], 1], [0, 0, -5]], ['control [[11, -6, -1], 1]', [[11, -6, -1], 1], [0, 0, -5]], ['control [[7, 2, 6, -11], 2]', [[7, 2, 6, -11], 2], [0, -4, 0, 0]], ['control [[-1, 2, -7], 1]', [[-1, 2, -7], 1], [-1, 0, 0]], ['control [[5, -3], 1]', [[5, -3], 1], [-2, 4]], ['control [[-1], 0]', [[-1], 0], None], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]]], [['regression [[-12, 7, -1, 8, 11, -2], 3]', [[-12, 7, -1, 8, 11, -2], 3], [0, 0, 0, 0, 0, 0]], ['regression [[2, 4], 3]', [[2, 4], 3], [1, 0]], ['control [[-7, -7, 1, 9], 0]', [[-7, -7, 1, 9], 0], [-1, -1, 7, 1]], ['control [[3, 4], 0]', [[3, 4], 0], [4, 3]], ['control [[12, -11, -9, -2, 8, -3], 1]', [[12, -11, -9, -2, 8, -3], 1], [1, -1, -1, -2, 1, -1]], ['control [[1, -2, -3, -4], 1]', [[1, -2, -3, -4], 1], [-1, 0, 0, 0]], ['control [[-2, -12, 2, -7, 10, 7], 2]', [[-2, -12, 2, -7, 10, 7], 2], [0, 0, 0, 0, 0, 0]], ['control [[-3, 6], 2]', [[-3, 6], 2], [4, -1]]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
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
regression [[12, 0, -10, 8], 1][0, -7, 0, 0][0, -7, 0, 0]Passed
regression [[-6, 10, 0], 1][0, 0, -5][0, 0, -5]Passed
control [[3, 4], 0][4, 3][4, 3]Passed
control [[12, -11, -9, -2, 8, -3], 1][1, -1, -1, -2, 1, -1][1, -1, -1, -2, 1, -1]Passed
control [[1, -2, -3, -4], 1][-1, 0, 0, 0][-1, 0, 0, 0]Passed
control [[-2, -12, 2, -7, 10, 7], 2][0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]Passed
control [[-3, 6], 2][4, -1][4, -1]Passed
control [[3, -8], 3][-5, 0][-5, 0]Passed

SHA-256 / f56a88a279f2a9af01b0ba41e6522364785971a2cb807d9c4904c1609d939ab7

Verification & scope

A deterministic, bounded teaching model of the named code under the stated contract; not a production codec. 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:48:35.428928+00:00.

Case digest / 20103c96d8656553a33ea2f83e51195a84abbfd63c0786d87c1cd6bdac642f7b