FA-98431 / Token sampling filters / Open access
Token sampling: Tail-free pruning measures drops from the unsorted vocabulary · case 01
Tail-free pruning measures drops from the unsorted vocabulary.
ROOT CAUSE
The filter depends on rank adjacent probability drops, so arbitrary vocabulary order yields unrelated differences.
THE FAILURE
The filter depends on rank adjacent probability drops, so arbitrary vocabulary order yields unrelated differences.
Unsuccessful approach: The attempted repair cuts at the first-difference index instead of retaining through the corresponding ratio boundary.
Case contract
Sort positive probabilities descending with lexical ties. Normalize adjacent first differences by their sum and keep the shortest prefix through the first normalized second-difference ratio exceeding zeta; always keep the first token and keep all if no ratio exceeds it.
Why this case matters
A finite, deterministic token-selection contract isolates one decoding operation from model inference and runtime behavior.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(probabilities, zeta):
import math
ranked=list(probabilities)
diff=[probabilities[ranked[i]]-probabilities[ranked[i+1]] for i in range(len(ranked)-1)]
total=sum(diff) or 1
ratios=[abs(diff[i]-diff[i-1])/total for i in range(1,len(diff))]
cut=next((i+1 for i,r in enumerate(ratios) if r>zeta),len(ranked))
return ranked[:cut]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('large tail drop',solve({'a':.6,'b':.3,'c':.08,'d':.02},.2),['a','b'])
check('flat differences',solve({'a':.4,'b':.3,'c':.2,'d':.1},.01),['a','b','c','d'])
check('singleton',solve({'x':1.0},.1),['x'])
check('empty',solve({},.1),[])
check('zero token omitted',solve({'a':1.0,'z':0.0},.1),['a'])
check('tie order',solve({'b':.5,'a':.5,'c':0},.1),['a','b'])
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 |
|---|---|---|---|
| large tail drop | ['a', 'b'] | ['a', 'b'] | Passed |
| flat differences | ['a', 'b', 'c', 'd'] | ['a', 'b', 'c', 'd'] | Passed |
| singleton | ['x'] | ['x'] | Passed |
| empty | [] | [] | Passed |
| zero token omitted | ['a', 'z'] | ['a'] | Failed |
| tie order | ['b'] | ['a', 'b'] | Failed |
SHA-256 / 074e57b5cd0653b167818d346a2c9aec6163fe36892526adf86583af96a9d265
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(probabilities, zeta):
ranked=sorted((t for t,p in probabilities.items() if p>0),key=lambda t:(-probabilities[t],t))
diff=[probabilities[ranked[i]]-probabilities[ranked[i+1]] for i in range(len(ranked)-1)]
total=sum(diff) or 1
ratios=[abs(diff[i]-diff[i-1])/total for i in range(1,len(diff))]
cut=next((i for i,r in enumerate(ratios) if r>zeta),len(ranked))
return ranked[:max(1,cut)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('large tail drop',solve({'a':.6,'b':.3,'c':.08,'d':.02},.2),['a','b'])
check('flat differences',solve({'a':.4,'b':.3,'c':.2,'d':.1},.01),['a','b','c','d'])
check('singleton',solve({'x':1.0},.1),['x'])
check('empty',solve({},.1),[])
check('zero token omitted',solve({'a':1.0,'z':0.0},.1),['a'])
check('tie order',solve({'b':.5,'a':.5,'c':0},.1),['a','b'])
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 |
|---|---|---|---|
| large tail drop | ['a'] | ['a', 'b'] | Failed |
| flat differences | ['a', 'b', 'c', 'd'] | ['a', 'b', 'c', 'd'] | Passed |
| singleton | ['x'] | ['x'] | Passed |
| empty | [] | [] | Passed |
| zero token omitted | ['a'] | ['a'] | Passed |
| tie order | ['a', 'b'] | ['a', 'b'] | Passed |
SHA-256 / 55bb853135789171be11a806c8760a6c3565e1c16c066a09500ab884f1febdcb
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
These are toy finite-vocabulary contracts with supplied scores, histories, and draws; they do not claim production model quality or compatibility. 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:12.803749+00:00.
Case digest / c885f4604cf11c7ef3176825094410ed5ed2455f50fe2b2697fcc816b9588934