FAILURE MAP
← Case archive

FA-98156 / Attention mask construction / Open access

Sliding window omits the oldest key within its span · case 01

Sliding window omits the oldest key within its span.

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

ROOT CAUSE

The lower bound is shifted one position too far.

THE FAILURE

The lower bound is shifted one position too far.

Unsuccessful approach: Using i-window as the inclusive lower bound admits one extra older key.

Case contract

Return square causal visibility with window W counting the current position; W<=0 yields no visible keys.

Why this case matters

A small explicit visibility matrix makes sequence-attention boundary behavior reviewable.

1 / The failure

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

N = 1
observations = []
def solve(length, window):
    return [[0<=i-j<window-1 for j in range(length)] for i in range(length)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('window edge',solve(N+2,N),[[N>0 and max(0,i-N+1)<=j<=i for j in range(N+2)] for i in range(N+2)])
check('window one',solve(3,1),[[True,False,False],[False,True,False],[False,False,True]])
check('window zero',solve(3,0),[[False]*3 for _ in range(3)])
check('window exceeds length',solve(2,5),[[True,False],[True,True]])
check('empty',solve(0,2),[])
check('last query',solve(4,2)[3],[False,False,True,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 fixtureActualExpectedOutcome
window edge[[False, False, False], [False, False, False], [False, False, False]][[True, False, False], [False, True, False], [False, False, True]]Failed
window one[[False, False, False], [False, False, False], [False, False, False]][[True, False, False], [False, True, False], [False, False, True]]Failed
window zero[[False, False, False], [False, False, False], [False, False, False]][[False, False, False], [False, False, False], [False, False, False]]Passed
window exceeds length[[True, False], [True, True]][[True, False], [True, True]]Passed
empty[][]Passed
last query[False, False, False, True][False, False, True, True]Failed

SHA-256 / 6c32f1f69c1ab08ee7a6807f1d175bbec8644421402688f68e260d4a44373578

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(length, window):
    return [[max(0,i-window)<=j<=i for j in range(length)] for i in range(length)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('window edge',solve(N+2,N),[[N>0 and max(0,i-N+1)<=j<=i for j in range(N+2)] for i in range(N+2)])
check('window one',solve(3,1),[[True,False,False],[False,True,False],[False,False,True]])
check('window zero',solve(3,0),[[False]*3 for _ in range(3)])
check('window exceeds length',solve(2,5),[[True,False],[True,True]])
check('empty',solve(0,2),[])
check('last query',solve(4,2)[3],[False,False,True,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 fixtureActualExpectedOutcome
window edge[[True, False, False], [True, True, False], [False, True, True]][[True, False, False], [False, True, False], [False, False, True]]Failed
window one[[True, False, False], [True, True, False], [False, True, True]][[True, False, False], [False, True, False], [False, False, True]]Failed
window zero[[True, False, False], [False, True, False], [False, False, True]][[False, False, False], [False, False, False], [False, False, False]]Failed
window exceeds length[[True, False], [True, True]][[True, False], [True, True]]Passed
empty[][]Passed
last query[False, True, True, True][False, False, True, True]Failed

SHA-256 / 5fee6f8d96fe86deed7e8dcc2b5123fc869fd7f741b675c7b93cef68a8cb81fe

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 Boolean matrix contracts; they do not define a production model architecture or tensor library behavior. 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:09.758468+00:00.

Case digest / ca2f49020e6e87c5bd7ac409bda38e050c69b88777a107a522e4b975b817cc8c