paper-with-me

Papers

From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformers

2025-12-21 · Ryotaro Kawata, Yujin Song, Alberto Bietti, Naoki Nishikawa, Taiji Suzuki, Samuel Vaiter, Denny Wu arxiv

Transformers can implement both generalizable algorithms (e.g., induction heads) and simple positional shortcuts (e.g., memorizing fixed output positions). In this work, we study how the choice of pretraining data distribution steers a shallow transformer toward one behavior or the other. Focusing on a minimal trigger-output prediction task -- copying the token immediately following a special trigger upon its second occurrence -- we present a rigorous analysis of gradient-based training of a single-layer transformer. In both the infinite and finite sample regimes, we prove a transition in the learned mechanism: if input sequences exhibit sufficient diversity, measured by a low ``max-sum'' ratio of trigger-to-trigger distances, the trained model implements an induction head and generalizes to unseen contexts; by contrast, when this ratio is large, the model resorts to a positional shortcut and fails to generalize out-of-distribution (OOD). We also reveal a trade-off between the pretraining context length and OOD generalization, and derive the optimal pretraining distribution that minimizes computational cost per sample. Finally, we validate our theoretical predictions with controlled synthetic experiments, demonstrating that broadening context distributions robustly induces induction heads and enables OOD generalization. Our results shed light on the algorithmic biases of pretrained transformers and offer conceptual guidelines for data-driven control of their learned behaviors.

📄 PDF Abstract BibTeX arXiv:2512.18634

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

When Do Attention Circuits Form? Developmental Trajectories of Capability and Attention-Sink Emergence Across Three 1B-ClassArchitectures

2026-06-01 · Yongzhong Xu arxiv

We track the developmental trajectory of attention-head circuit formation across three 1B-class language models spanning two architecture families (dense transformer, mixture-of-experts) and two pretraining corpora (The …

The Dual-Route Model of Induction

2025-04-03 · Sheridan Feucht, Eric Todd, Byron Wallace, David Bau

Prior work on in-context copying has shown the existence of induction heads, which attend to and promote individual tokens during copying. In this work we introduce a new type of induction head: concept-level induction h…

In-Context Learningmodel

LLMs Gaming Verifiers: RLVR can Lead to Reward Hacking

2026-04-16 · Lukas Helff, Quentin Delfosse, David Steinmann, Ruben Härle 외 arxiv

As reinforcement Learning with Verifiable Rewards (RLVR) has become the dominant paradigm for scaling reasoning capabilities in LLMs, a new failure mode emerges: LLMs gaming verifiers. We study this phenomenon on inducti…

Reinforcement Learning

In-Context Learning Without Copying

2025-11-07 · Kerem Sahin, Sheridan Feucht, Adam Belfki, Jannik Brinkmann 외 arxiv

Induction heads are attention heads that perform inductive copying by matching patterns from earlier context and copying their continuations verbatim. As models develop induction heads, they experience a sharp drop in tr…

Finding Dataset Shortcuts with Grammar Induction

2022-10-20 · Dan Friedman, Alexander Wettig, Danqi Chen

Many NLP datasets have been found to contain shortcuts: simple decision rules that achieve surprisingly high accuracy. However, it is difficult to discover shortcuts automatically. Prior work on automatic shortcut detect…

DiagnosticSentenceSentence Classification