FAILURE MAP
← Case archive

FA-98216 / Attention mask construction / Open access

Bidirectional local attention omits future neighbors · case 01

Bidirectional local attention omits future neighbors.

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

ROOT CAUSE

A causal predicate is retained in a symmetric neighborhood contract.

THE FAILURE

A causal predicate is retained in a symmetric neighborhood contract.

Unsuccessful approach: Using strict distance < radius omits keys exactly at the configured radius.

Case contract

For length L and radius R, query i sees keys j when |i-j|<=R, including both directions.

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, radius):
    return [[j<=i and i-j<=radius 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('symmetric neighborhood',solve(N+2,1),[[abs(i-j)<=1 for j in range(N+2)] for i in range(N+2)])
check('radius zero',solve(3,0),[[i==j for j in range(3)] for i in range(3)])
check('negative radius',solve(2,-1),[[False,False],[False,False]])
check('empty',solve(0,1),[])
check('singleton',solve(1,8),[[True]])
check('future neighbor',solve(4,2)[0],[True,True,True,False])
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
symmetric neighborhood[[True, False, False], [True, True, False], [False, True, True]][[True, True, False], [True, True, True], [False, True, True]]Failed
radius zero[[True, False, False], [False, True, False], [False, False, True]][[True, False, False], [False, True, False], [False, False, True]]Passed
negative radius[[False, False], [False, False]][[False, False], [False, False]]Passed
empty[][]Passed
singleton[[True]][[True]]Passed
future neighbor[True, False, False, False][True, True, True, False]Failed

SHA-256 / 957aa37b93743189e18033a13d22ab8b0a73e218d6a1ffc1e3b74a2ce9a60156

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(length, radius):
    return [[abs(i-j)<radius 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('symmetric neighborhood',solve(N+2,1),[[abs(i-j)<=1 for j in range(N+2)] for i in range(N+2)])
check('radius zero',solve(3,0),[[i==j for j in range(3)] for i in range(3)])
check('negative radius',solve(2,-1),[[False,False],[False,False]])
check('empty',solve(0,1),[])
check('singleton',solve(1,8),[[True]])
check('future neighbor',solve(4,2)[0],[True,True,True,False])
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
symmetric neighborhood[[True, False, False], [False, True, False], [False, False, True]][[True, True, False], [True, True, True], [False, True, True]]Failed
radius zero[[False, False, False], [False, False, False], [False, False, False]][[True, False, False], [False, True, False], [False, False, True]]Failed
negative radius[[False, False], [False, False]][[False, False], [False, False]]Passed
empty[][]Passed
singleton[[True]][[True]]Passed
future neighbor[True, True, False, False][True, True, True, False]Failed

SHA-256 / 32c69b8e76e3502d11fd4ba84266381836b9a9518ae7f741cb2b3e34d16b842a

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

Case digest / feb74acd9267952654b662897711cc1a9e5709a69236f3ea7d95d2c1915ff865