MATH · IN · MODELS

A latent-context direction drives in-context hierarchy tracking

measured in 1 paper

Saanum et al. train linear probes to decode, from attention-head outputs in Qwen2.5 (0.5B/1.5B/3B), whether current and previous latent-context tokens match [saanum-etal-2025-hierarchical-in-context-circuit] Second-order chunk decodability exceeds 90% for several heads, replicated on Gemma2-2B, Llama3.2-3B, SmolLM3-3B and Qwen3-0.6B [saanum-etal-2025-hierarchical-in-context-circuit] Heads exceeding an 85% decoding score are labeled context-matching heads [saanum-etal-2025-hierarchical-in-context-circuit] Ablating these decoded heads sharply reduces hierarchical-structure prediction accuracy, far more than ablating equally many random heads [saanum-etal-2025-hierarchical-in-context-circuit]

Context

in-context hierarchical structure prediction, latent-context decodability, context-matching attention heads, head ablation vs. random-head control

Papers

A Circuit for Predicting Hierarchical Structure In-Context in Large Language Models — Saanum, Tankred, Demircan, Can, Gershman, Samuel J., Schulz, Eric2025 · arXiv:2509.21534