arXiv Machine Learning

A Mechanistic Analysis of In-Context Learning and Out-of-Context Hallucination

The paper investigates how large language models use functional roles in dynamic context to perform in‑context learning (ICL) and how they sometimes produce out‑of‑context hallucinations. It shows that role information can be internally represented but does not always reliably constrain output, and derives a first‑order decomposition that links role effect to sufficient contribution magnitude and coherent signed aggregation. Causal analysis reveals that role span contributions influence key token choices in response structure, content selection, and factual values, and that sufficient role span support can reverse failing choices.

arXiv Machine Learning
Sep 2

How Do Language Models Choose Between Context and Memory?

The paper investigates how language models decide between contextual information and their internal memory when the two conflict. By estimating "authority directions" from agreement prompts and swapping these directions between matched prompts, the authors show that such interventions can reproduce 30–68% of the shift in source choice across Qwen, Llama, and OLMo models. Cross‑task experiments reveal that authority directions learned on one task transfer only modestly (≈9%) to another, indicating that authority computations are largely task‑specific.

By Benjamin Shih, John Winnicki, Arianna Cao
arXiv Machine Learning
Oct 23

How Depth Growth and Looping Shape In-Context Learning in Language Models

The paper investigates how depth growth and looping in language models influence in-context learning (ICL). It shows that models with these architectural features rely more on contextual information, acquire ICL earlier, and retain it better than fully dense counterparts. Attention analysis reveals that depth growth propagates early induction heads across layers, and ablations confirm that these models depend more on induction-ranked heads for few‑shot performance and token prediction.

By Ferdinand Kapl, Kaitlin Maile, Stefan Bauer, Johannes von Oswald
arXiv AI
Oct 31

Interventional Training Reduces Causal Bypass in In-Context Introspection

The paper investigates how language models (LMs) can introspect their internal signals and identifies a problem called causal bypass, where self-reports depend on correlated but causally unrelated signals. By training hundreds of introspectors on low‑level signals across multiple LMs, the authors show that standard supervised fine‑tuning (SFT) often leads to causal bypass. They propose interventional training, which trains models to report on counterfactually perturbed values, and demonstrate that this approach yields more accurate introspection for both endogenous and injected signals, even on out‑of‑distribution data, and that the method generalizes across token positions and scales with more data.

By Zilu Tang, Jongin Kim, Kerem Sahin, David Atkinson, Aaron Mueller, Derry Wijaya
arXiv Computation and Language
Nov 5

Llama See, Llama Do: A Mechanistic Perspective on Contextual Entrainment and Distraction in LLMs

The paper reports a new phenomenon called contextual entrainment, where language models give higher probability to tokens that have appeared earlier in the prompt, even if those tokens are irrelevant. This effect is largely mechanistic but is modulated by semantic factors, with counterfactual prompts amplifying it more than factual ones. The authors identify a set of attention heads—entrainment heads—responsible for this behavior, and show that disabling these heads reduces the entrainment effect, suggesting a path toward mitigating distraction in large language models.

By Jingcheng Niu, Xingdi Yuan, Tong Wang, Hamidreza Saghir, Amir H. Abdi