FAILURE MAP
← Case archive

FA-98471 / Beam search bookkeeping / Open access

Beam search: finished hypotheses are discarded at the next timestep · case 01

finished hypotheses are discarded at the next timestep.

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

ROOT CAUSE

The update replaces the finished pool with completions from only the latest step.

THE FAILURE

The update replaces the finished pool with completions from only the latest step.

Unsuccessful approach: Appending only the highest-scoring new completion can still discard a better earlier result.

Case contract

Return prior finished rows followed by new completion rows, retaining all hypotheses.

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(finished, newly_finished):
    return list(newly_finished)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('preserve earlier completion',solve([['old',N]],[['new',N+1]]),[['old',N],['new',N+1]])
check('no new completion',solve([['old',N]],[]),[['old',N]])
check('empty pools',solve([],[]),[])
check('two prior paths',solve([['a',1],['b',2]],[['c',3]]),[['a',1],['b',2],['c',3]])
check('two new paths',solve([],[['c',3],['d',4]]),[['c',3],['d',4]])
check('scores do not replace identity',solve([[str(N),N]],[[str(N+1),N+1]]),[[str(N),N],[str(N+1),N+1]])
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
preserve earlier completion[['new', 2]][['old', 1], ['new', 2]]Failed
no new completion[][['old', 1]]Failed
empty pools[][]Passed
two prior paths[['c', 3]][['a', 1], ['b', 2], ['c', 3]]Failed
two new paths[['c', 3], ['d', 4]][['c', 3], ['d', 4]]Passed
scores do not replace identity[['2', 2]][['1', 1], ['2', 2]]Failed

SHA-256 / ade2ea79839aa2b4c56b66af5e8c481a2c0de1041d6121374cba09dcde906537

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(finished, newly_finished):
    return list(finished)+sorted(newly_finished,key=lambda r:-r[1])[:1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('preserve earlier completion',solve([['old',N]],[['new',N+1]]),[['old',N],['new',N+1]])
check('no new completion',solve([['old',N]],[]),[['old',N]])
check('empty pools',solve([],[]),[])
check('two prior paths',solve([['a',1],['b',2]],[['c',3]]),[['a',1],['b',2],['c',3]])
check('two new paths',solve([],[['c',3],['d',4]]),[['c',3],['d',4]])
check('scores do not replace identity',solve([[str(N),N]],[[str(N+1),N+1]]),[[str(N),N],[str(N+1),N+1]])
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
preserve earlier completion[['old', 1], ['new', 2]][['old', 1], ['new', 2]]Passed
no new completion[['old', 1]][['old', 1]]Passed
empty pools[][]Passed
two prior paths[['a', 1], ['b', 2], ['c', 3]][['a', 1], ['b', 2], ['c', 3]]Passed
two new paths[['d', 4]][['c', 3], ['d', 4]]Failed
scores do not replace identity[['1', 1], ['2', 2]][['1', 1], ['2', 2]]Passed

SHA-256 / 753c94ff81b6cca9d17c302747d065ee086b9f1e78211af05ba67c4f9cf9542a

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.239141+00:00.

Case digest / f38fa42fb996f5ceda090aed6496e4c09de90225654ceed878d793dd54233e74