R.15: Late-layer attention shortcuts past chain-of-thought; a Stage-2 attention bottleneck closes it
ReleasedIn standard single-pass decoding, late-layer attention puts 75% to 83% of its mass on the prefix and only 4% to 11% on the generated reasoning trace, enabling 72/72 CoT-decoupled tool hijacks. Masking the mutable prefix during Stage-2 action emission cuts stealth decoupling to 0/72, preserves 36/36 clean free-form calls without brittle regex rules, and forces adaptive attackers into 100% visible CoT corruption.
- 75-83%
- 4-11%
- 0/72
- 0/36
Summary
- Why chain-of-thought decouples from tool selection: At the tool-name decode token (
{"tool": "), late-layer attention routes75.1%to83.1%of its mass directly to the prefix KV cache and only4.2%to10.7%to the model’s own newly generated<thought>span across all three tested families (Qwen3-1.7B,Granite-3.3-2B,Phi-4-mini-3.8B). Causal path patching confirms a72/72vs0/72double dissociation: pairing a poisoned prefix with a clean<thought>executescalc72/72times, while pairing a clean prefix with the poisoned run’s<thought>executescalc0/72times. - An architectural fix that works on free-form reasoning without regex fragility: In R.14, heuristic regex CoT-to-action binding falsely blocked
13/24(54.2%) of benign multi-sentence traces because natural reasoning mentions negated tools ("not a calculation"). Splitting decoding into Stage 1 (generate<thought>attending to the full prefix) and Stage 2 (emit the JSON tool call attending only to[locked_minimal_schema + generated <thought>], masking out the mutable prefix) drops static CoT-decoupled hijacks from72/72to0/72on both MPS and CPUbfloat16(69/72MPS /68/72CPU clean recovery) while preserving36/36(100%) clean free-form accuracy. - Adaptive attackers lose stealth: Giving an adaptive attacker
192strict mantissa flips with full knowledge of the Stage-2 bottleneck produces0/36stealth decoupling on both MPS and CPU (0/720matched random controls, 95% CI [0.000, 0.005]). Because Stage 2 cannot attend to the poisoned prefix, the only channel left into tool selection is the discrete<thought>text itself, forcing34/36MPS (32/36CPU) hijacks into visibly corrupted reasoning traces. - Resolving R.14’s semantic paraphrase boundary: Layer-band ablations on zero-lexical-overlap finance paraphrases show that early layers alone (
0..L/2) fail onQwen3-1.7B(0/12,0/8fit), whereas full-depth pursuit actually reaches a320-flip sweet spot (7/12onQwen3-1.7Bwith11/12clean,8/12onGranite-3.3-2Bwith12/12clean and0/12FP) before over-flipping degrades the circuit (explaining R.14’s1/12collapse at768flips).
1. Causal mechanism: why CoT monitors see clean traces while tools hijack
In R.14, 64 to 192 mantissa flips caused three model families to emit benign <thought> reasoning declaring search or cal and immediately execute {"tool": "calc"} with HTTP 200. To identify the causal mechanism, we extracted eager attention weights at the exact tool-name prediction position ({"tool": ") and performed bidirectional causal path patching across both structured 1-sentence and unstructured 2-to-3-sentence reasoning traces.
| Model (Family) | Reasoning Style | Flips | Late-Layer Prefix Attn | Late-Layer <thought> Attn |
Patch: pois_prefix + clean_th |
Patch: clean_prefix + pois_th |
|---|---|---|---|---|---|---|
Qwen3-1.7B |
Structured 1-sent | 192 | 79.1% (75.7% clean) |
8.6% (8.9% clean) |
12/12 |
0/12 |
Qwen3-1.7B |
Free-form 2 to 3 sent | 128 | 78.9% (75.1% clean) |
9.1% (10.7% clean) |
12/12 |
0/12 |
Granite-3.3-2B |
Structured 1-sent | 96 | 81.6% (81.0% clean) |
4.3% (4.9% clean) |
12/12 |
0/12 |
Granite-3.3-2B |
Free-form 2 to 3 sent | 96 | 83.1% (81.7% clean) |
4.2% (5.1% clean) |
12/12 |
0/12 |
Phi-4-mini-3.8B |
Structured 1-sent | 128 | 77.7% (76.3% clean) |
6.1% (6.8% clean) |
12/12 |
0/12 |
Phi-4-mini-3.8B |
Free-form 2 to 3 sent | 128 | 79.7% (78.4% clean) |
5.6% (6.2% clean) |
12/12 |
0/12 |
| Combined | All 6 runs | 96 to 192 | 77.7% to 83.1% |
4.2% to 9.1% |
72/72 |
0/72 |
Because tool-routing heads attend overwhelmingly to the cached prefix rather than to the model’s freshly emitted reasoning tokens, <thought> behaves as an epiphenomenal commentary channel under standard single-pass decoding.
2. Two-stage attention-bottleneck decoding and adaptive evaluation
Rather than parsing free-form <thought> prose with brittle regular expressions, a two-stage attention bottleneck enforces causal coupling at the attention boundary itself:
- Stage 1 (Reasoning): The model attends to the full
[prefix KV + user query]and generates<thought>...</thought>. - Stage 2 (Action Bottleneck): To emit the tool JSON, the serving layer masks out the mutable prefix KV and attends strictly to
[locked_minimal_schema + generated <thought>...</thought>](a small, authenticated schema prefix cached once on the host).
| Model (Family) | Clean Free-Form (Stage 2) | Static Decoupled (Std -> Stage 2) | Stage-2 Clean Recovery (MPS / CPU) | Adaptive Stealth (192 fl, MPS / CPU) | Adaptive Visible CoT Corrupt (MPS / CPU) | Random Controls |
|---|---|---|---|---|---|---|
Qwen3-1.7B |
12/12 |
24/24 -> 0/24 |
22/24 / 22/24 |
0/12 / 0/12 |
12/12 / 12/12 |
0/240 |
Granite-3.3-2B |
12/12 |
24/24 -> 0/24 |
24/24 / 23/24 |
0/12 / 0/12 |
12/12 / 12/12 |
0/240 |
Phi-4-mini-3.8B |
12/12 |
24/24 -> 0/24 |
23/24 / 23/24 |
0/12 / 0/12 |
10/12 / 8/12 |
0/240 |
| Combined | 36/36 |
72/72 -> 0/72 |
69/72 / 68/72 |
0/36 / 0/36 |
34/36 / 32/36 |
0/720 |
On benign multi-sentence reasoning that includes negations and synonyms ("not a calculation", "The lookup tool is appropriate here"), Stage 2 parses intent natively at 36/36 (100%) accuracy (34/36 on 1-sentence structured traces, with 2 Qwen3 format misses on clean structured traces). Crucially, against an adaptive attacker who knows Stage 2 masks the prefix, covert decoupling stays 0/36 on both MPS and CPU: the attacker can only steer Stage 2 by overtly rewriting <thought> to endorse calc (e.g., declaring "This is an arithmetic request, so I should call calc" on "Look up the capital of Peru"), turning an invisible latent hijack into a visible trace anomaly.
3. Semantic layer-depth sweet spot (revisiting R.14’s paraphrase collapse)
In R.14, keyword-free semantic finance paraphrases (receipt, ledger, wire, payout in fit vs reimbursement, settlement, tariff, remittance, voucher, billing, statement, disbursement in held-out, zero shared finance noun) collapsed to 1/12 at the 768-flip stopping limit on Qwen3-1.7B. Running a controlled layer-band ablation at 320 flips explains both halves of that behavior:
- Early layers (
0..L/2) cannot route unseen semantic paraphrases onQwen3-1.7B:early_onlyscores0/12held-out (0/8fit,12/12clean,0/12FP) onQwen3-1.7Band only3/12(8/12clean) onGranite-3.3-2B. - Over-flipping caused R.14’s
768-flip collapse: At320flips,all_greedypeaks at7/12[0.32, 0.90] onQwen3-1.7B(11/12clean,1/12FP) and8/12[0.39, 0.94] onGranite-3.3-2B(12/12clean,0/12FP). Restricting tolate_consensus(layers14..27with>= 6/8per-paraphrase sign agreement) onQwen3-1.7Byields5/12with0/12FP (11/12clean), whilelate_onlywithout consensus peaks at8/12at 256 flips then collapses to0/12by 320 flips. Static prefix-KV triggers therefore exhibit a narrow mid-budget semantic sweet spot rather than a flat zero.
4. Scope, limits, and operational deployment
- What Stage 2 prevents and what it does not: Stage-2 attention bottlenecking eliminates covert CoT-to-action decoupling (
0/72static,0/36adaptive stealth). It does not stop a prefix-write attacker from visibly corrupting<thought>(34/36MPS,32/36CPU); it converts an invisible latent hijack into a visible reasoning anomaly that host auditing, query-to-intent verification, or human review can catch. - Overhead and layer placement: Stage 2 adds one short forward pass over
[locked_minimal_schema + <thought>](typically120to200tokens, with the locked schema KV cached once). It is a defense-in-depth layer that sits alongside prefix-chained whole-KV authentication (R.16) and host-side tool allowlists and argument validation. - Reproducibility:
bash checks/verify_all.shinsymbolon-latent-channels(v2.2) runschecks/verify_r15_bottleneck.py(372audited rows across3families +8semantic layer-band strategies +3/3negative fault-injection tests, part of22public recounts and31negative tests).
Changelog
- rev. 01 (2026-11-29): Initial release (
v2.2) with 3-family causal attention mediation, 72/72 path-patching double dissociation, Stage-2 attention-bottleneck defense (static + adaptive, MPS + CPUbfloat16), and semantic layer-depth ablation.
CoT shortcutting vs Stage-2 attention bottleneck
Destructive controls
Each arm removes one part of the attack or isolates one variable.
- Matched random single-mantissa-bit XOR across all 3 families0/720 [0.000, 0.005] decoupled or calc HTTP 200 executions (0/240 Qwen3, 0/240 Granite, 0/240 Phi-4-mini)
Removes: the attacker-chosen bit coordinates by flipping an equal count of uniform random mantissa bits (20 trials x 12 unseen queries per model).
- Causal path-patching double dissociation0/72 [0.00, 0.05] for clean_prefix + poisoned_<thought> vs 72/72 [0.95, 1.00] for poisoned_prefix + clean_<thought>
Removes: ambiguity over whether <thought> tokens carry hidden latent hijacking cues by evaluating clean_prefix + poisoned_<thought> against poisoned_prefix + clean_<thought>.
- Independent CPU bfloat16 cross-check100% parity on static block (72/72 -> 0/72) and adaptive stealth (0/36); clean recovery 68/72 CPU vs 69/72 MPS
Removes: Apple Silicon MPS arithmetic variance by re-evaluating every poisoned, Stage-2 bottleneck, and adaptive run on CPU.
Gates
| Gate | Preregistered condition | Result | Record |
|---|---|---|---|
| [Mechanism] Late-layer attention shortcutting and 72/72 causal path-patching double dissociation | Eager attention weights at the post-</thought> tool-name decode token ({"tool": ") plus causal path patching swapping only the prefix KV or only the generated <thought> span across Qwen3-1.7B, Granite-3.3-2B, and Phi-4-mini-3.8B (structured 1-sentence & unstructured 2-to-3-sentence reasoning). Measured: late-layer attention routes 75.1% to 83.1% mass to the prefix vs 4.2% to 10.7% to <thought>; poisoned_prefix + clean_<thought> triggers 72/72 [0.95, 1.00] calc HTTP 200 hijacks while clean_prefix + poisoned_<thought> triggers 0/72 [0.00, 0.05]. | Passed | verify_r15_bottleneck.py |
| [Defense] Two-stage attention-bottleneck decode eliminates static CoT decoupling on MPS & CPU | Stage 1 generates <thought> attending to the full prefix; Stage 2 emits the tool JSON attending only to [locked_minimal_schema + generated <thought>], masking the mutable prefix. Measured across 3 families & 2 reasoning styles: static decoupled hijacks drop from 72/72 [0.95, 1.00] to 0/72 [0.00, 0.05] on both MPS and CPU bfloat16, recovering 69/72 MPS and 68/72 CPU exact clean tool calls. | Passed | verify_r15_bottleneck.py |
| [Utility] Clean free-form 2-to-3-sentence accuracy without regex fragility | Evaluating Stage-2 bottlenecking on benign unstructured 2-to-3-sentence traces that naturally mention ruled-out tools ("not a calculation", "lookup tool"), where R.14 heuristic regex binding falsely blocked 13/24 (54.2%). Measured: 36/36 [0.90, 1.00] (12/12 Qwen3, 12/12 Granite, 12/12 Phi-4-mini) exact clean HTTP 200 routing; structured 1-sentence clean accuracy is 34/36 (10/12 Qwen3, 12/12 Granite, 12/12 Phi-4-mini). | Passed | verify_r15_bottleneck.py |
| [Adaptive test] Prefix-write attacker optimizing with full knowledge of Stage-2 bottleneck | Adaptive attacker applies 192 strict single-mantissa prefix flips aiming to hijack Stage 2 while keeping <thought> benign. Measured: 0/36 [0.00, 0.10] stealth decoupling on MPS and 0/36 on CPU; every Stage-2 hijack (34/36 MPS, 32/36 CPU) is forced into 100% visible <thought> corruption. | Passed | verify_r15_bottleneck.py |
| [Mechanism] Semantic layer-depth sweet spot explains R.14 paraphrase collapse | Layer-band ablation on zero-lexical-overlap finance paraphrases (320 strict mantissa flips) on Qwen3-1.7B and Granite-3.3-2B. Measured: early_only (layers 0..L/2) yields 0/12 [0.00, 0.24] on Qwen3 (0/8 fit) and 3/12 on Granite; all_greedy peaks at 7/12 [0.32, 0.90] Qwen3 (11/12 clean, 1/12 FP) and 8/12 [0.39, 0.94] Granite (12/12 clean, 0/12 FP) at 320 flips before over-flipping degrades it (R.14 1/12 at 768 flips). | Passed(peaks at 320 fl; early layers fail on Qwen3) | verify_r15_bottleneck.py |
Figures


