cs.LGApr 10, 2026

Single-Position Intervention Fails: Distributed Output Templates Drive In-Context Learning

Authors: Bryan Cheng, Jasper Zhang

Organizations: William A. Shine Great Neck South High School

Abstract

Understanding how large language models encode task identity from few-shot demonstrations is a central open problem in mechanistic interpretability. Prior work uses linear probing to localize task representations, reporting high classification accuracy at specific layers. We reveal a striking dissociation: probing accuracy completely fails to predict causal importance. Single-position activation intervention achieves 0% task transfer across all 28 layers of Llama-3.2-3B-despite 100% probing accuracy at those same positions. This null result is itself a key finding, demonstrating that task encoding is fundamentally distributed. Multi-position intervention-replacing activations at all demonstration output tokens simultaneously-achieves up to 96% transfer (N=50, 95% CI: [87%, 99%]) at layer 8, pinpointing for the first time the causal locus of ICL task identity. We establish the generality of these findings across four models spanning three architecture families (LLaMA, Qwen, Gemma), discovering a universal intervention window at ~30% network depth. Causal tracing uncovers an asymmetric architecture: the query position is strictly necessary (53-100% disruption) while no individual demonstration position is necessary (0% disruption)-resolving a key ambiguity in prior accounts. Crucially, transfer depends on internal representation compatibility, not surface similarity (r=-0.05 vs r=0.31), ruling out trivial explanations. These results establish the distributed template hypothesis: ICL task identity is encoded as output format templates distributed across demonstration tokens, fundamentally reshaping our understanding of how in-context learning operates.

Figures & tables

Appendix figures & tables22 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Capturing In-Context Learning Dynamics with Task Operators

    Oct 1, 2026Guangzhi Xiong, Zhenghao He, Bohan Liu +3Transformer InterpretabilityIn-Context Learning

  2. Out of Support, Not Out of Reach: In-Context Learning with Unsupported Instructions and Composed Tasks

    Oct 16, 2026Xuhan Tong, Yuchen Zeng, Jiawei ZhangIn-Context Learning

  3. From Observation to Intervention: Distilling Self-Generated In-Context Demonstrations via Executable Causal Intervention

    Oct 15, 2026Minming Ye, Min Liu, Haoang Chi +2In-Context LearningIn-Context Example Selection