Late-layer bottleneck determines when LLMs obey prompt injection attacks
LLMs only gain causal leverage to break their system role in a late-layer bottleneck despite early layers encoding attack signals
Security & privacy arXiv 29 Sep 2026 Measurement Simulation evidence
Published as “Where Do LLMs Decide to Break the Rules? Mechanistic Localization of Prompt Injection Compliance”
Why it matters
The identified late-layer bottleneck enables targeted runtime interventions and more reliable detection of prompt-injection attacks without retraining the entire model.
Summary
Prompt injection compliance is concentrated in a late-layer bottleneck that lies in the final third of the network; intervening at this layer reverses compliance in 77-92% of cases. Attack presence is linearly decodable from the first layer, but causal leverage only emerges after roughly 44% of the depth. The authors demonstrate this across five models (4B-32B) using layer-by-layer causal activation patching and show that the same late layer yields the best detection performance, even under obfuscations. Evidence is strong for the synthetic “AcmeCorp” setting but weaker on diverse naturalistic benchmarks where flip rates drop to ~12%.
What they found 2
- Patching the late-layer bottleneck reverses compliance in 77-92% of cases.
“Patching this bottleneck reverses compliance in 77-92% of cases.”
- Attack information is linearly decodable from the first layer while causal leverage is negligible until a late-layer bottleneck.
“attack information is linearly decodable from the first layer, yet causal leverage over the model’s behavior is negligible until a late-layer bottleneck in the final third of the network.”
Caveats 4
- Flip rates reach 77-92% in the calibrated AcmeCorp setting, but drop to about 12% on diverse naturalistic benchmarks.
- On BIPIA and Gandalf benchmarks, peak flip rates are only 66-70%, indicating reduced intervention effectiveness in more varied phrasing.
- Our detailed analysis focuses primarily on Qwen3-4B, although we evaluate architectures up to 32B parameters. The peak layer varies from 63% to 91% of network depth and must therefore be identified per model. Our main stimuli are also primarily synthetic, single-turn, and English-language.
- The strong single-token causal localization observed in dense, non-thinking models becomes substantially weaker in reasoning, MoE, and agentic settings, where compliance may be distributed across generated tokens or computation paths.
What’s new here 4
- Provides the first layer-wise causal localization of prompt-injection compliance rather than treating the model as a black box.
- Identifies a compact low-rank linear subspace (rank-8 to rank-64) that governs the compliance decision.
- Shows that the causal peak layer also offers the most robust detection point, outperforming early-layer probes under obfuscation.
- Demonstrates architectural stability of the late-layer bottleneck across multiple model families and sizes.