FAILURE MAP
← Case archive

FA-98466 / Beam search bookkeeping / Open access

Beam search: terminal score omits the end-marker contribution · case 01

terminal score omits the end-marker contribution.

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

ROOT CAUSE

The completion transition is recorded without its token log score.

THE FAILURE

The completion transition is recorded without its token log score.

Unsuccessful approach: Adding the end-marker score twice over-penalizes completed paths.

Case contract

Given parent score and token deltas, return cumulative scores for all transitions including EOS exactly once.

Why this case matters

Beam decoders rely on consistent hypothesis state while expanding and ranking candidates.

1 / The failure

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

N = 1
observations = []
def solve(parent, deltas):
    return [parent+d for d in deltas if d!=0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('terminal delta',solve(-N,[-1,-2]),[-N-1,-N-2])
check('zero delta',solve(0,[0]),[0])
check('positive toy delta',solve(N,[2]),[N+2])
check('no transitions',solve(N,[]),[])
check('mixed transitions',solve(-1,[-N,0]),[-N-1,-1])
check('repeated equal scores',solve(-N,[-N,-N]),[-2*N,-2*N])
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
terminal delta[-2, -3][-2, -3]Passed
zero delta[][0]Failed
positive toy delta[3][3]Passed
no transitions[][]Passed
mixed transitions[-2][-2, -1]Failed
repeated equal scores[-2, -2][-2, -2]Passed

SHA-256 / c59d32364a30c1273ab39f1c7a534ce90b15a26db34a658de92e74f48fd2310c

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(parent, deltas):
    return [parent+2*d for d in deltas]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('terminal delta',solve(-N,[-1,-2]),[-N-1,-N-2])
check('zero delta',solve(0,[0]),[0])
check('positive toy delta',solve(N,[2]),[N+2])
check('no transitions',solve(N,[]),[])
check('mixed transitions',solve(-1,[-N,0]),[-N-1,-1])
check('repeated equal scores',solve(-N,[-N,-N]),[-2*N,-2*N])
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
terminal delta[-3, -5][-2, -3]Failed
zero delta[0][0]Passed
positive toy delta[5][3]Failed
no transitions[][]Passed
mixed transitions[-3, -1][-2, -1]Failed
repeated equal scores[-3, -3][-2, -2]Failed

SHA-256 / 638deffdefc5ca4de43c956c7d67111ae8fe42b873c6ee381143e257caa0e727

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

This is a finite toy beam-state contract and makes no claim about neural model quality or production decoding. 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:13.239210+00:00.

Case digest / 24668cf40a2f80d9965be3429ce44207bc9169226816d46d8435801a66e308ec