FAILURE MAP
← Case archive

FA-98166 / Attention mask construction / Open access

Bidirectional block attention is accidentally causal · case 01

Bidirectional block attention is accidentally causal.

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

ROOT CAUSE

A block-local mask retains causal ordering when each block is fully bidirectional.

THE FAILURE

A block-local mask retains causal ordering when each block is fully bidirectional.

Unsuccessful approach: A one-token radius omits valid distant keys in the same bidirectional block.

Case contract

Square matrix where each query sees every key with the same block ID.

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(blocks):
    return [[blocks[i]==blocks[j] and j<=i for j in range(len(blocks))] for i in range(len(blocks))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
b=[0]*N+[1,1]
check('future within block',solve(b),[[b[i]==b[j] for j in range(len(b))] for i in range(len(b))])
check('two-way pair',solve([8,8]),[[True,True],[True,True]])
check('isolated blocks',solve([1,2]),[[True,False],[False,True]])
check('empty',solve([]),[])
check('singleton',solve([3]),[[True]])
check('repeated separated ID',solve([1,2,1]),[[True,False,True],[False,True,False],[True,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
future within block[[True, False, False], [False, True, False], [False, True, True]][[True, False, False], [False, True, True], [False, True, True]]Failed
two-way pair[[True, False], [True, True]][[True, True], [True, True]]Failed
isolated blocks[[True, False], [False, True]][[True, False], [False, True]]Passed
empty[][]Passed
singleton[[True]][[True]]Passed
repeated separated ID[[True, False, False], [False, True, False], [True, False, True]][[True, False, True], [False, True, False], [True, False, True]]Failed

SHA-256 / 3dd12e9abc7f25bc84fdd54750feaf646c180166f1a8a33b686ae708bd581846

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(blocks):
    return [[blocks[i]==blocks[j] and abs(i-j)<=1 for j in range(len(blocks))] for i in range(len(blocks))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
b=[0]*N+[1,1]
check('future within block',solve(b),[[b[i]==b[j] for j in range(len(b))] for i in range(len(b))])
check('two-way pair',solve([8,8]),[[True,True],[True,True]])
check('isolated blocks',solve([1,2]),[[True,False],[False,True]])
check('empty',solve([]),[])
check('singleton',solve([3]),[[True]])
check('repeated separated ID',solve([1,2,1]),[[True,False,True],[False,True,False],[True,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
future within block[[True, False, False], [False, True, True], [False, True, True]][[True, False, False], [False, True, True], [False, True, True]]Passed
two-way pair[[True, True], [True, True]][[True, True], [True, True]]Passed
isolated blocks[[True, False], [False, True]][[True, False], [False, True]]Passed
empty[][]Passed
singleton[[True]][[True]]Passed
repeated separated ID[[True, False, False], [False, True, False], [False, False, True]][[True, False, True], [False, True, False], [True, False, True]]Failed

SHA-256 / 7c318ff42a739cdb985d6bd867b712c2f629f086c0cf23a6448789d21b8123f3

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

Case digest / cdba072670077abdc5d14f053d97d2ec6855fbd0076c78ddd7a162be65b7b836