Causal and Interpretable Structures in LLM Compositional Tasks
Gurbir Arora, Toni J. B. Liu, Jiajun Bao, Raphaël Sarfati, Christopher J. Earls
Abstract
Large language models are able to solve tasks whose answers depend on not only individual input tokens, but also on relations among them. How is such relational information represented and processed across transformer layers? We study activations from ensembles of prompts that require inferring relationships between three tokens corresponding to a cyclic concept (months, hours, weekdays, and musical notes) to correctly predict the next token. Across model families (Llama, Qwen, Gemma, and Mistral) and cyclic concepts, we find a consistent layerwise progression in how the joint dependence among the tokens is geometrically organized and causally used: intermediate layers use a joint representation based on the inferred relationship between two tokens, while later layers use a joint representation associated with all three tokens to correctly complete the task. We also find other relationships between tokens that are geometrically structured but remain causally inert in the next-token prediction. Crucially, when taken together, these geometric and causal investigations reveal the representation-level mechanism that progressively organizes and composes the relational information to form the answer. More surprisingly, restricting the models to such causally relevant joint representations improves next-token prediction accuracy.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
- Comments
- 46 pages, 28 figures
Related papers
Neural Language Models Learn the Contextual Distributions of Dependency Structures: a statistical learning theory to compositionality
Shared title terminologycs.CLWang Bojun, Junjie Chen, Holly Jenkins et al.
Failure Broadens, Success Sharpens: Continual Adaptation of Tool-Use Agents Across Diverse Tasks with Dual-Polarity Memory
Shared title terminologycs.CLTianmai M. Zhang, Hoda Shajari, Amr Hendy et al.
Social Bias Neurons in Multilingual Language Models: A Mechanistic Interpretability Analysis
Shared title terminologycs.CLLance Calvin Lim Gamboa, Yue Feng, Mark Lee
Task-Dependent Linguistic Measures in Aphasia Discourse: A Comparative Analysis of Narrative, Descriptive, and Procedural Speech
Shared title terminologycs.CLEmma Al Kubaisi
Trallie: from Free-Form Text to Structured Data with LLMs
Shared title terminologycs.CLVijayasri Iyer, Cristiano De Nobili, Mubashir Hussain Shah et al.
Halluscoring 2026: The first shared task on llms hallucination detection and answer verification
Shared title terminologycs.CLAisha Alansari, Abdessalam Bouchekif, Ahmed Hasanaath et al.