paper-with-me

Papers

Selective Induction Heads: How Transformers Select Causal Structures In Context

2025-09-09 · Francesco D'Angelo, Francesco Croce, Nicolas Flammarion arxiv

Transformers have exhibited exceptional capabilities in sequence modeling tasks, leveraging self-attention and in-context learning. Critical to this success are induction heads, attention circuits that enable copying tokens based on their previous occurrences. In this work, we introduce a novel framework that showcases transformers' ability to dynamically handle causal structures. Existing works rely on Markov Chains to study the formation of induction heads, revealing how transformers capture causal dependencies and learn transition probabilities in-context. However, they rely on a fixed causal structure that fails to capture the complexity of natural languages, where the relationship between tokens dynamically changes with context. To this end, our framework varies the causal structure through interleaved Markov chains with different lags while keeping the transition probabilities fixed. This setting unveils the formation of Selective Induction Heads, a new circuit that endows transformers with the ability to select the correct causal structure in-context. We empirically demonstrate that transformers learn this mechanism to predict the next token by identifying the correct lag and copying the corresponding token from the past. We provide a detailed construction of a 3-layer transformer to implement the selective induction head, and a theoretical analysis proving that this mechanism asymptotically converges to the maximum likelihood solution. Our findings advance the understanding of how transformers select causal structures, providing new insights into their functioning and interpretability.

📄 PDF Abstract BibTeX arXiv:2509.08184

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Spectral Probe-Circuits: A Three-Step Recipe for Identifying Attention-Head Circuits in Pretrained Transformers

2026-05-22 · Yongzhong Xu arxiv

We present a three-step recipe for identifying attention-head circuits in pretrained transformers. A per-head spectral signal -- the time-integrated participation ratio of each head's attention output -- ranks heads doin…

Linking In-context Learning in Transformers to Human Episodic Memory

2024-05-23 · Li Ji-An, Corey Y. Zhou, Marcus K. Benna, Marcelo G. Mattar

Understanding connections between artificial and biological intelligent systems can reveal fundamental principles of general intelligence. While many artificial intelligence models have a neuroscience counterpart, such c…

In-Context LearningRetrieval

One-layer transformers fail to solve the induction heads task

2024-08-26 · Clayton Sanford, Daniel Hsu, Matus Telgarsky

A simple communication complexity argument proves that no one-layer transformer can solve the induction heads task unless its size is exponentially larger than the size sufficient for a two-layer transformer.

In-context Learning and Induction Heads

2022-09-24 · Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph 외

"Induction heads" are attention heads that implement a simple algorithm to complete token sequences like [A][B] ... [A] -> [B]. In this work, we present preliminary and indirect evidence for a hypothesis that induction h…

In-Context Learning

Induction in Both Directions: A Mechanistic Analysis of In-Context Learning in Masked Diffusion Language Models

2026-07-17 · Andy Catruna, Emilian Radoi arxiv

While the internal mechanisms of autoregressive (AR) transformers have been studied extensively, much less is known about diffusion language models (DLMs), an emerging alternative that generates text by iterative denoisi…