Datasets:

ArXiv:
Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    TypeError
Message:      Couldn't cast array of type
struct<task: string, condition: string, episodes: int64, resumed_from_mirror: bool, tail: string, push: struct<fixed_path: string, stamped_path: string, destinations: struct<Frame17/attention-closes-repro: list<item: string>, Neurips-2026-MLIntern-Repro/attention-closes-repro: list<item: string>>>>
to
{'task': Value('string'), 'condition': Value('string'), 'episodes': Value('int64'), 'resumed_from_mirror': Value('bool'), 'result': Value('string'), 'output': Value('string')}
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 150, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 130, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 579, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2328, in cast_table_to_schema
                  cast_array_to_feature(
                  ~~~~~~~~~~~~~~~~~~~~~^
                      table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      feature,
                      ^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1870, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                                           ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2130, in cast_array_to_feature
                  casted_array_values = _c(array.values, feature.feature)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1872, in wrapper
                  return func(array, *args, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2170, in cast_array_to_feature
                  raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
              TypeError: Couldn't cast array of type
              struct<task: string, condition: string, episodes: int64, resumed_from_mirror: bool, tail: string, push: struct<fixed_path: string, stamped_path: string, destinations: struct<Frame17/attention-closes-repro: list<item: string>, Neurips-2026-MLIntern-Repro/attention-closes-repro: list<item: string>>>>
              to
              {'task': Value('string'), 'condition': Value('string'), 'episodes': Value('int64'), 'resumed_from_mirror': Value('bool'), 'result': Value('string'), 'output': Value('string')}

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

attention-closes-repro — reproduction of the Mistral-7B Table 1 cells of arXiv:2605.12922v2

Reproduction of the claim in "When Attention Closes: How LLMs Lose the Thread in Multi-Turn Interaction" (NeurIPS 2026, arXiv:2605.12922v2, Table 1 Mistral row, trajectories in Figure 5):

On Mistral-7B-Instruct-v0.3, forcing a 4096-token sliding-window attention mask (which removes all attention to the system-prompt facts from turn 23 on) drops recall at the final T=50 grouped probe from 1.000 under default attention to 0.112 on the 20-fact task (tier-4 facts F16–F20) and to 0.452 on the 5-fact task, while default-attention recall stays at 1.000 throughout.

Verdict: the mechanism verifies, the Table-1 magnitudes falsify. Default-attention recall reproduces the paper exactly (1.000 at every probe, both tasks); the sliding-window collapse reproduces qualitatively (onset at the geometrically predicted crossover; task-2 crossover turn 23 = the paper's); but all four closed-channel point estimates fall outside our 95% Wilson CIs — retained recall at T=50 is ~3× the paper's 20-fact value (0.344 vs 0.112) and ~1.6× the 5-fact value (0.708 vs 0.452).

Results

100 episodes per default cell, 50 per SW cell (paper: 100–200 default, 50 SW), Mistral-7B-Instruct-v0.3, temperature 0.7 multinomial, ≤256 tokens/turn, 50-turn conversations, substring evaluator on canonical forms + paraphrases. Rates are fact-level labels at the stated probes; Wilson 95% CIs.

Cell paper r≥35 / r≥25 ours r≥35 / r≥25 [95% CI] paper r50 ours r50 [95% CI] τcross paper / ours
T1 5-fact, default 1.000 / 1.000 1.000 [0.987, 1.0] / 1.000 [0.992, 1.0] 1.000 1.000 [0.992, 1.0] —
T1 5-fact, SW=4096 0.706 / — 0.980 [0.943, 0.993] 0.452 0.708 [0.649, 0.761] 23 / 27
T2 20-fact, default 1.000 / 1.000 — / 1.000 [0.997, 1.0] 1.000 1.000 [0.992, 1.0] —
T2 20-fact, SW=4096 — / 0.802 0.275 [0.242, 0.311] 0.112 0.344 [0.288, 0.405] 23 / 23

(r≥35 = mean recall over single-fact probes at turns ≥35 for task 1; r≥25 = same over odd turns 25–49 for task 2; both exclude the T=50 grouped probe, which is r50. τcross = first turn with Rmin(τ) − Gmax ≥ W, measured per episode; min across episodes.)

Task-2 SW per-tier recall (ours): tier-1 0.300, tier-2 0.267, tier-3 0.367, tier-4 0.160 — the paper's tier ordering (simpler facts survive better; failure rises monotonically with tier, 9.9% → 54.0%) reproduces in ordering (tier-4 worst) but not in level.

What reproduces

  • Default attention = 1.000 at every probe on both tasks (500/500 fact labels at the grouped probes; 1300/1300 post-crossover task-2 labels). Exactly the paper's open-channel row.
  • SW=4096 closes the attention channel at the predicted turn (task 2: first episode closes at turn 23, the paper's exact τc) and recall collapses after closure — task-2 trajectory: 1.000 pre-crossover → 0.70 at T=25 → 0.03–0.12 by T=43–49.
  • Tier-4 (longest, most complex) facts are the least recoverable under closure.
  • The open-vs-closed gap remains large (0.656 on the 20-fact grouped probe), so the paper's causal claim — removing attention to the goal tokens is sufficient to disrupt retention — is supported.

What does not reproduce

  • T1 SW r50: 0.708 vs paper 0.452 (paper outside CI); T1 SW r≥35: 0.980 vs 0.706.
  • T2 SW r50: 0.344 vs paper 0.112 (paper far outside CI); T2 SW r≥25: 0.275 vs paper 0.802 — our mid-regime decays steadily from T=25 while the paper's holds ~0.8 before a late collapse.
  • T1 crossover is later in our scripts (27 vs 23), consistent with our filler turns consuming fewer tokens; this alone does not explain the T2 gaps (τcross matched at 23).

Deviations from the paper

  1. User/filler scripts re-authored — the paper's pre-authored JSONL scripts are not published. Fillers follow the paper's description (generic history/science/hobby questions, no goal references, identical across episodes); task-2 probes query fact IDs ("What is the exact value of fact F07 …"). This is the most likely cause of the quantitative gaps.
  2. τcross is measured, not assumed; it depends on the scripts' token counts.
  3. transformers 5.25.1 (paper does not state its version); SDPA attention backend; bf16; batch 8. SW mask = paper's Definition 2.6 exactly (i−j<W, every layer/head, applied before softmax), enforced by config.sliding_window=4096 on the full-attention checkpoint (verified by a unit check: a fact stated >4096 tokens back is retrievable under default attention and unretrievable under the mask).
  4. Out of scope here (paper's other instruments): GAR trajectories, residual-stream linear probes, persona/policy tasks.

Files

  • runner.py — conversation engine + SW intervention + evaluator; tasks.json — scripts; aggregate.py — rates + Wilson CIs; run_config.json — smoke stages.
  • logs/summary.json — full aggregated results; logs/payload_*.json — per-stage logs.
  • Full per-turn records (every response + recall label, all 4 cells, ~12 MB with per-stage stamped partials): Frame17/attention-closes-repro (logs/out_task1_default.jsonl, logs/out_task2_default.jsonl, logs/out_task1_sw4096.jsonl, logs/out_task2_sw4096.jsonl).
  • Executors: private Gradio Space on A100 (compute) + org Docker mirror; stage flow smoke → run-default → run-sw → aggregate, each triggered by a stage.txt push + Space restart, resumable from the mirror.

Cost

~7.5 h on a single A100 (run-default 2h28m + run-sw 2h13m + smoke/aggregation), plus ~4 h of an L40S stuck in the hardware queue (replaced by the A100 duplicate).

Downloads last month
-

Spaces using Neurips-2026-MLIntern-Repro/attention-closes-repro 2

Paper for Neurips-2026-MLIntern-Repro/attention-closes-repro