FA-98486 / Beam search bookkeeping / Open access
Beam search: length penalty favors longer paths under a penalty contract · case 01
length penalty favors longer paths under a penalty contract.
ROOT CAUSE
A positive penalty multiplier is applied by increasing, rather than dividing by, length.
THE FAILURE
A positive penalty multiplier is applied by increasing, rather than dividing by, length.
Unsuccessful approach: Dividing by the square root changes the contract for linear length normalization.
Case contract
Return score divided by 1 + alpha*(length-1), for each [score,length]; alpha is nonnegative.
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(rows, alpha):
return [s*(1+alpha*(l-1)) for s,l in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('long path penalty',solve([[N,3]],1),[N/3])
check('unit path unchanged',solve([[N,1]],N),[float(N)])
check('zero alpha unchanged',solve([[2*N,4]],0),[float(2*N)])
check('empty rows',solve([],N),[])
check('two lengths',solve([[6,1],[6,3]],1),[6.0,2.0])
check('fractional alpha',solve([[8,3]],.5),[4.0])
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 |
|---|---|---|---|
| long path penalty | [3] | [0.3333333333333333] | Failed |
| unit path unchanged | [1] | [1.0] | Passed |
| zero alpha unchanged | [2] | [2.0] | Passed |
| empty rows | [] | [] | Passed |
| two lengths | [6, 18] | [6.0, 2.0] | Failed |
| fractional alpha | [16.0] | [4.0] | Failed |
SHA-256 / 0660671123822b86ed8070e5004594208602f6cd0ae561f4d2a5b1ab246733e4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, alpha):
return [s/(1+alpha*((l-1)**0.5)) for s,l in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('long path penalty',solve([[N,3]],1),[N/3])
check('unit path unchanged',solve([[N,1]],N),[float(N)])
check('zero alpha unchanged',solve([[2*N,4]],0),[float(2*N)])
check('empty rows',solve([],N),[])
check('two lengths',solve([[6,1],[6,3]],1),[6.0,2.0])
check('fractional alpha',solve([[8,3]],.5),[4.0])
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 |
|---|---|---|---|
| long path penalty | [0.4142135623730951] | [0.3333333333333333] | Failed |
| unit path unchanged | [1.0] | [1.0] | Passed |
| zero alpha unchanged | [2.0] | [2.0] | Passed |
| empty rows | [] | [] | Passed |
| two lengths | [6.0, 2.4852813742385704] | [6.0, 2.0] | Failed |
| fractional alpha | [4.68629150101524] | [4.0] | Failed |
SHA-256 / 924364d709ee81074f8595d1cc6eff2ce23f3ebaf979ace9d4e8fccb8133af7d
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.672203+00:00.
Case digest / c99addedb7d20556ccf412600a004e875ea1d7b74e6f44cdf15aef71fdb25665