FAILURE MAP
← Case archive

FA-98236 / Attention mask construction / Open access

Cross-attention mask omits the source interval limit · case 01

Cross-attention mask omits the source interval limit.

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

ROOT CAUSE

Every source key is enabled, regardless of its distance from the aligned source interval.

THE FAILURE

Every source key is enabled, regardless of its distance from the aligned source interval.

Unsuccessful approach: Using one source interval for every query misses the query-dependent alignment shift.

Case contract

Query q sees source indices in [q+offset-left, q+offset+right], clipped to source bounds; left and right are nonnegative.

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(source_count, query_count, offset, left, right):
    return [[True for _ in range(source_count)] for _ in range(query_count)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('moving source window',solve(N+3,3,1,1,0),[[max(0,q+1-1)<=s<min(N+3,q+2) for s in range(N+3)] for q in range(3)])
check('one-to-one',solve(3,3,0,0,0),[[s==q for s in range(3)] for q in range(3)])
check('empty source',solve(0,2,0,1,1),[[],[]])
check('empty queries',solve(3,0,0,1,1),[])
check('window clipped left',solve(3,1,0,2,0),[[True,False,False]])
check('window clipped right',solve(3,3,0,0,1)[2],[False,False,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
moving source window[[True, True, True, True], [True, True, True, True], [True, True, True, True]][[True, True, False, False], [False, True, True, False], [False, False, True, True]]Failed
one-to-one[[True, True, True], [True, True, True], [True, True, True]][[True, False, False], [False, True, False], [False, False, True]]Failed
empty source[[], []][[], []]Passed
empty queries[][]Passed
window clipped left[[True, True, True]][[True, False, False]]Failed
window clipped right[True, True, True][False, False, True]Failed

SHA-256 / 3eb4104b50656a4d8fafb789fb3009c99c066e3cdffe5f61126c949c5bf1d31a

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(source_count, query_count, offset, left, right):
    return [[max(0,offset-left)<=s<min(source_count,offset+right+1) for s in range(source_count)] for q in range(query_count)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('moving source window',solve(N+3,3,1,1,0),[[max(0,q+1-1)<=s<min(N+3,q+2) for s in range(N+3)] for q in range(3)])
check('one-to-one',solve(3,3,0,0,0),[[s==q for s in range(3)] for q in range(3)])
check('empty source',solve(0,2,0,1,1),[[],[]])
check('empty queries',solve(3,0,0,1,1),[])
check('window clipped left',solve(3,1,0,2,0),[[True,False,False]])
check('window clipped right',solve(3,3,0,0,1)[2],[False,False,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
moving source window[[True, True, False, False], [True, True, False, False], [True, True, False, False]][[True, True, False, False], [False, True, True, False], [False, False, True, True]]Failed
one-to-one[[True, False, False], [True, False, False], [True, False, False]][[True, False, False], [False, True, False], [False, False, True]]Failed
empty source[[], []][[], []]Passed
empty queries[][]Passed
window clipped left[[True, False, False]][[True, False, False]]Passed
window clipped right[True, True, False][False, False, True]Failed

SHA-256 / b6fbc03bcf39dd231a41429b1cfe133127e3d998fcebd0ba68ea7ce99580d481

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

Case digest / 2b45e2fa66a3a0ca91a64da5008634230423be576ef159922d74c89560bbc44d