FAILURE MAP
← Case archive

FA-98446 / Beam search bookkeeping / Open access

Beam search: backtrace follows pre-prune beam slots · case 01

backtrace follows pre-prune beam slots.

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

ROOT CAUSE

Selected parent indices are interpreted against the newly compacted beam.

THE FAILURE

Selected parent indices are interpreted against the newly compacted beam.

Unsuccessful approach: Reversing the compacted order still associates children with the wrong histories.

Case contract

At each layer, parent_ids names prior hypotheses and selected contains indices into that array; return token paths by following indices from final nodes.

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(layers, final_indices):
    paths=[[] for _ in final_indices]
    for layer in reversed(layers):
        paths=[ [layer[t][1]]+p for t,p in zip([x[0] for x in layer],paths)]
    return paths
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
layers=[[[0,'a'],[0,'b']],[[1,'c'],[0,'d']]]
check('crossed ancestry',solve(layers,[0]),[['b','c']])
check('other final slot',solve(layers,[1]),[['a','d']])
check('first layer only',solve([[[0,'x']],[ [0,'y'] ]],[0]),[['x','y']])
check('single token path',solve([[[0,'q']]], [0]),[['q']])
check('two terminal paths',solve(layers,[0,1]),[['b','c'],['a','d']])
check('N-independent IDs',solve([[[0,N]],[[0,N+1]]],[0]),[[N,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
crossed ancestry[['a', 'd']][['b', 'c']]Failed
other final slot[['a', 'd']][['a', 'd']]Passed
first layer only[['x', 'y']][['x', 'y']]Passed
single token path[['q']][['q']]Passed
two terminal paths[['a', 'd'], ['a', 'c']][['b', 'c'], ['a', 'd']]Failed
N-independent IDs[[1, 2]][[1, 2]]Passed

SHA-256 / 3a7b713f5689034def90d792dad513e7ad6af4f6e0f55d74ae0cd34362c1b688

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(layers, final_indices):
    paths=[]
    for idx in final_indices:
        paths.append([layer[idx][1] for layer in layers])
    return paths
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
layers=[[[0,'a'],[0,'b']],[[1,'c'],[0,'d']]]
check('crossed ancestry',solve(layers,[0]),[['b','c']])
check('other final slot',solve(layers,[1]),[['a','d']])
check('first layer only',solve([[[0,'x']],[ [0,'y'] ]],[0]),[['x','y']])
check('single token path',solve([[[0,'q']]], [0]),[['q']])
check('two terminal paths',solve(layers,[0,1]),[['b','c'],['a','d']])
check('N-independent IDs',solve([[[0,N]],[[0,N+1]]],[0]),[[N,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
crossed ancestry[['a', 'c']][['b', 'c']]Failed
other final slot[['b', 'd']][['a', 'd']]Failed
first layer only[['x', 'y']][['x', 'y']]Passed
single token path[['q']][['q']]Passed
two terminal paths[['a', 'c'], ['b', 'd']][['b', 'c'], ['a', 'd']]Failed
N-independent IDs[[1, 2]][[1, 2]]Passed

SHA-256 / c1dc3e6ffafb97f5b2a3eaa1b6fb08ee043f340a1cc8222b2210902f181cd9d5

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

Case digest / 831b2d64cbf656926c957fc5896ad014691feb60cee1e82da04a9c4099b0f9f0