Datasets:
experiment_name stringclasses 1
value | heads_per_layer int64 1 32 | n_heads int64 20 640 | pct_of_query_heads float64 0.02 0.56 | recovered_fit float64 0.04 1.14 |
|---|---|---|---|---|
qkv_r0_uptake_circuit | 1 | 20 | 0.017361 | 0.044923 |
qkv_r0_uptake_circuit | 2 | 40 | 0.034722 | 0.071697 |
qkv_r0_uptake_circuit | 4 | 80 | 0.069444 | 0.116326 |
qkv_r0_uptake_circuit | 8 | 160 | 0.138889 | 0.603235 |
qkv_r0_uptake_circuit | 16 | 320 | 0.277778 | 0.600231 |
qkv_r0_uptake_circuit | 32 | 640 | 0.555556 | 1.136554 |
2026.RA.QKV-Attention-Interface
Tables behind the Q/K/V attention-interface ladder: a four-rung preregistered study asking whether you can make a language-model negotiator more rational by changing what its attention reads rather than what its prompt says. Base model Qwen/Qwen3-8B (frozen, bf16, thinking off) playing one seat in a six-party, five-issue negotiation.
Headline: the interface level was the whole story. The same fair-and-efficient candidate deal — the Nash bargaining solution — delivered as trained input embeddings does nothing (−0.0006 [−0.0321, +0.0300] normalized Nash welfare); delivered as trained per-layer, per-head keys and values it is worth +0.1882 [+0.1497, +0.2266], or 69% of the prompt-text ceiling (+0.2741 on the same panel). Meanwhile re-weighting attention toward decision-relevant text the model already has does nothing a mis-targeted control does not also do. Adding information through a deeper interface works; re-allocating existing information does not.
Full narrative, every caveat, and a twelve-entry controls-catches ledger: raw/note_0029.md (research note 0029). Preregistration: raw/preregistration.md.
What is in here
| table | rows | contents |
|---|---|---|
r1_episodes |
960 | one row per R1 campaign episode: arm, instance, seed, outcome metrics |
r1_contrasts |
12 | R1's eight paired contrasts with instance-clustered CIs, plus each gate's verdict as a 0/1 row |
r1_arms |
4 | per-arm descriptives incl. the opening-offer uptake audit |
r0_layer_scan |
6 | six-layer-window ablation recoveries (localizes the circuit to layers 12–23) |
r0_concentration |
6 | top-k-per-layer concentration curve (how many query heads are needed) |
r0_group_control |
13 | the KV-group-structure-matched random control, the selection, the complement, and the superseded size-matched control |
r0_salience |
5 | the five-condition uptake-head attention-mass table, incl. the bare-placeholder floor |
r0_validate |
80 | per-episode generation rows for the ablated-vs-intact tabling endpoint |
r2_sweep |
13 | the 13-cell sweep with eligibility flags (one row per cell) |
r2_screen_robustness |
7 | the viability screen's sensitivity ladder — which cell wins at which tolerance |
r2_dose |
3 | the exogenous diverted share per span set, measured on unbiased prompts |
r2_eval |
11 | R2's held-out contrasts and gate verdicts |
r2_manipulation_check |
8 | attention mass on the targeted spans per beta, for both the treatment and the mis-targeted control — necessary but preregistered as NOT sufficient; no gate reads it |
raw/ ships the interpreting prose verbatim: note_0029.md, preregistration.md, r0_RESULTS.md, r1_RESULTS.md, r2_SWEEP.md, r2_EVAL.md, r2_EVAL_notes.md.
Experiment names
experiment_name |
what it is |
|---|---|
qkv_r0_uptake_circuit |
R0 — activation/attention patching on the committed note-0027 episodes (no new rollouts) to find what carries advice from prompt to proposal. Ablating the identified heads' attention onto the advice span cuts real candidate-tabling 47.5% → 2.5% with JSON-parse and propose rates at 1.00 in both conditions. The circuit is redundant: best single query head removes 0.015, ~160 of 1,152 heads needed to cross half, and against KV-group-structure-matched random sets the selection recovers 0.846 [0.760, 0.929] vs 0.635. |
qkv_r1_kv_prefix |
R1 — the candidate written as trained per-layer K/V at 38 reserved positions (36 layers × 8 KV heads × 128 head_dim; encoder 19,094,236 params, the only trainable parameters). Gate was restatability, not distributional KL: 0.9583 exact reconstruction on held-out games against a 0.0000 no-channel control. Outcome +0.1882 [+0.1497, +0.2266]; isolation vs a mis-drawn deal at identical weights +0.0930 [+0.0474, +0.1390]. |
qkv_r2_attn_bias_sweep |
R2 sweep — 13 cells × 3 seeds × 24 train games (936 episodes) of a training-free additive attention-logit bias toward the threshold line / live-offer table / opponents' proposals. |
qkv_r2_exogenous_dose |
each span set's size measured on beta=0 (unbiased) prompts — the only safe dose x-axis (see below). |
qkv_r2_attn_bias_eval |
R2 held-out — the frozen config (beta=0.5, threshold_only) played once on 24 held-out games × 10 seeds × 3 arms (720 episodes). All load-bearing gates fail. |
Five results worth knowing before you use these tables
1. biased_share_of_prompt in r2_sweep is ENDOGENOUS — do not use it as a dose. It moves with the treatment: for all_three it runs 0.2108 → 0.1693 → 0.1420 → 0.2353 across beta 0.5 → 1 → 2 → 4, falling because a stronger bias degrades play so fewer offers accumulate (the spans are made of game state), then rising as degenerate </think> loops lengthen the prompt. The column is retained for accounting and named ..._ENDOGENOUS. Use r2_dose — 0.89% / 12.30% / 19.06% for threshold_only / offers_only / all_three, measured on unbiased prompts.
2. The below-threshold endpoint is exploitable, and this matters for anyone reusing it. It is scored reached AND any(surplus < 0) — conditional on a closed deal — so it is exactly zero when no deal closes. Under the originally preregistered unscreened selection rule the sweep winner is span_b2_all_three at below-threshold 0.1944 against the reference's 0.5972, which reads like it rivals a real text intervention (0.175) — but its deal rate is 0.4444 against 0.9167 and its welfare is worse (0.0709 against 0.1007). The apparent rationality gain is deal suppression. A viability screen was added before scoring (deal rate and malformed rate within 0.05 of the beta=0 reference). Any selection rule, gate, or reward built on a conjunctive metric that requires an event can be maximized by suppressing the event.
3. Do NOT quote mistargeted_does_not_reproduce: true as evidence of specificity. It appears as a passing gate in r2_eval and it is the one number in the bundle that reads better than it is: it passes only because its interval contains zero, while its point estimate (−0.0417) is half the treatment's with the same sign. The gate that matters is beats_mistargeted, and it fails.
4. R2's negative is control-validated, not underpowered hand-waving. The mis-targeted control (same beta, same token count, aimed at rules boilerplate) moves the endpoint −0.0417 in the same direction as the treatment's −0.0833 with no separation (−0.0417 [−0.1333, +0.0500]), and reproduces the welfare gain exactly (−0.0035 [−0.0303, +0.0248]). The manipulation applied: attention mass on the targeted spans went 0.0028 → 0.1281 across the swept range, a 46× span. A behavioural null with a confirmed manipulation was preregistered as a real negative and explicitly not a partial pass. The control is also conservative: starting from 4× the baseline mass (590 boilerplate tokens against ~26), it diverts more absolute mass at equal beta, so failing to separate from it is demanding rather than lenient.
5. The deal-suppression channel has a ceiling. At beta=4 on the widest span the below-threshold rate returns to 0.5972 — exactly the no-bias reference — with a 1.0000 malformed rate. Total degeneration does not maximize the endpoint; it destroys the episode. The metric is gameable by partially suppressing deals (beta=2 posts 0.1944 at half the deal rate), not by breaking the model outright.
Regeneration
Rungs R0 and R1 ran on a B200 pod, R2 on Slurm a6000-class nodes. $OUT is /workspace/large_artifacts/ii_mats/tom_qkv_v1 (pod), mirrored to /nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1.
# R0 — the uptake-circuit diagnostic (reuses the committed note-0027 episodes; no new rollouts)
python -m tom.qkv.run_uptake --stage concentration --out $OUT/r0 --n-scan-prompts 24 --n-mass-prompts 8 --cand-lo 8 --cand-hi 27
python -m tom.qkv.run_uptake --stage validate --out $OUT/r0 --heads $OUT/r0/concentration.json --n-episodes 40 --max-new-tokens 320
python -m tom.qkv.run_uptake --stage groupcontrol --out $OUT/r0 --heads $OUT/r0/concentration.json --n-random-controls 8
python -m tom.qkv.run_uptake --stage kvmass --out $OUT/r0 --heads $OUT/r0/concentration.json --n-soft-prompts 24 \
--soft-injection .../tom_channel_v1/distill/encoder.pt --kv-checkpoint $OUT/r1/free_v1/kv_encoder.pt
# R1 — train the per-layer K/V encoder (reconstruction gate), then the 960-episode campaign
python -m tom.qkv.kv_train --bank instances_nbs_confirmatory_v1 --logged-run .../nbsconfirm_v1_nbs_candidate \
--out $OUT/r1/free_v1 --parameterization free --d-mid 256 --encoder-hidden 512 --steps 800 --grad-accum 4 \
--lr 1e-3 --deals-per-game 16 --kl-weight 0.05 --eval-every 200 --max-holdout-probes 24
python -m tom.qkv.run_kv_campaign --bank instances_nbs_confirmatory_v1 \
--encoder-checkpoint $OUT/r1/free_v1/kv_encoder.pt --out $OUT/r1/campaign --max-pool-episodes 96
python -m tom.qkv.analyze_kv_campaign --campaign $OUT/r1/campaign --out $OUT/r1/analysis
# R2 — sweep on train games, freeze, then score once on held-out games
python -m tom.qkv.run_attn_bias launch --out $OUT/r2/sweep --split train --seeds 0 1 2 --n-shards 3 --max-pool-episodes 8
python -m tom.qkv.run_attn_bias manifest --out $OUT/r2/sweep --seeds 0 1 2
python -m tom.qkv.measure_dose --views-from $OUT/r2/sweep/no_bias__shard0 --out $OUT/r2/analysis_sweep/exogenous_dose.json
python -m tom.qkv.analyze_attn_bias sweep --campaign $OUT/r2/sweep --out $OUT/r2/analysis_sweep --exogenous-dose
python -m tom.qkv.analyze_attn_bias eval --campaign $OUT/r2/eval --out $OUT/r2/analysis_eval --notes
# this dataset
python -m tom.qkv.upload_hf --artifacts $OUT --out-dir /tmp/hf_qkv --push
Figures in the lane writeup are generated from these same JSON bundles, never hand-typed: python tom/writeup/make_figures.py --only salience ladder r2dose.
Weights & Biases
| stage | run |
|---|---|
| R0 concentration / validate / soft / spec | 17lj34w3 · ky016mvn · gkrf91bz · 0kflizw5 |
| R0 group control (reported, 8 draws, per-layer matched) | iiyktz60 — superseded 5-draw run vnarmktl |
| R0 salience (reported, with bare-placeholder control) | 4ae96zya — superseded simvsvox |
| R1 encoder training / campaign | 06whz5uz · msgmv9oo |
| R2 sweep analysis (reported) | 5nzftbdb — superseded tzsh2glb · yudew759 · crcrre4h |
| R2 held-out evaluation (reported) | 29qjn2u6 — supersedes the first scored pass 9tii25bg and one regeneration; every number is byte-identical across all three, only the narrative prose changed |
Cluster paths
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r0/ # R0 JSON bundles + interface specs
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r1/free_v1/ # encoder checkpoint, gate report, reconstruction transcripts
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r1/campaign/ # 960 episodes + transcripts
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r1/analysis/ # results.json, episode_rows.csv
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r2/sweep/ # 936 sweep episodes
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r2/analysis_sweep/ # frozen_config.json, exogenous_dose.json, SWEEP.md
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r2/eval/ # 720 held-out episodes
/nlp/scr/siddharth/ii_mats/rational_agents/tom_qkv_v1/r2/analysis_eval/ # results.json, manipulation_check.json, RESULTS.md
Source episodes reused by R0 (read-only, from the channel study): .../tom_channel_v1/campaign/{A_text,B_soft,C_none}/, 240 episodes each.
Related datasets
This is the third dataset in one arc, and the three are meant to be read together:
- 2026.RA.ToM-Hidden-Preference-Probe — can a listener's frozen representations be read for its opponent's hidden preferences? Preregistered negative.
- 2026.RA.NBS-Channel-Comparison — can known-useful advice be delivered through input-level virtual tokens? Preregistered negative, and the direct parent of this study.
- this dataset — the same delivery question moved to the attention interface. The negative reverses at depth.
One methodological thread runs through all three, and it is sharpened here. The channel study showed a channel can satisfy an optimized proxy (a distillation-KL training objective, three quarters of the distributional gap closed) while carrying zero behavioural payload. This study shows a channel can drive behaviour substantially while a measured proxy (attention mass at an identified head set — 0.0146 against 0.1309 for text) says it is barely attended to. One proxy you optimize against, one you measure and interpret, and each fails in the direction its own kind fails. Neither substitutes for an outcome contrast against a matched-capacity control.
- Downloads last month
- -