FA-98496 / Beam search bookkeeping / Open access
Beam search: search stops before a live path can beat the finished set · case 01
search stops before a live path can beat the finished set.
ROOT CAUSE
Stopping compares current live scores directly with finished scores despite nonpositive future deltas.
THE FAILURE
Stopping compares current live scores directly with finished scores despite nonpositive future deltas.
Unsuccessful approach: Comparing against the worst finished score stops while the kth result is still improvable.
Case contract
Stop only if at least k finished scores exist and the best live score is no greater than the kth-best finished score; future deltas are nonpositive.
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(live_scores, finished_scores, k):
return bool(finished_scores) and max(live_scores,default=float("-inf"))<=max(finished_scores)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one result can stop',solve([-N],[0],1),True)
check('live still better',solve([1],[0],1),False)
check('need k results',solve([-N],[0],2),False)
check('kth threshold',solve([-N],[3,1],2),True)
check('below kth threshold',solve([2],[3,1],2),False)
check('first result still improvable',solve([2],[3,1],1),True)
check('no live paths',solve([],[3],1),True)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one result can stop | True | True | Passed |
| live still better | False | False | Passed |
| need k results | True | False | Failed |
| kth threshold | True | True | Passed |
| below kth threshold | True | False | Failed |
| first result still improvable | True | True | Passed |
| no live paths | True | True | Passed |
SHA-256 / d52f28465d9503389472b215a2e7180248abfb9b6f90df50911a318e07b7a0c7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(live_scores, finished_scores, k):
return len(finished_scores)>=k and max(live_scores,default=float("-inf"))<=min(finished_scores)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one result can stop',solve([-N],[0],1),True)
check('live still better',solve([1],[0],1),False)
check('need k results',solve([-N],[0],2),False)
check('kth threshold',solve([-N],[3,1],2),True)
check('below kth threshold',solve([2],[3,1],2),False)
check('first result still improvable',solve([2],[3,1],1),True)
check('no live paths',solve([],[3],1),True)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one result can stop | True | True | Passed |
| live still better | False | False | Passed |
| need k results | False | False | Passed |
| kth threshold | True | True | Passed |
| below kth threshold | False | False | Passed |
| first result still improvable | False | True | Failed |
| no live paths | True | True | Passed |
SHA-256 / b012378c59571446a76af47a647814913d60e9b6c4c07a5dd17c14bc8ec62f20
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
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.668747+00:00.
Case digest / 2f52c5fadff7d5c4c69354ee8b7fc64cfd3583d3ebefc283e1b38cdf1dbb8b9c