arXiv Machine Learning

Distinct mechanisms underlying in-context learning in transformers

The paper investigates how transformers perform in-context learning by training them on a finite set of discrete Markov chains. It identifies four distinct algorithmic phases—based on memorization versus generalization and on using 1-point versus 2-point statistics—each implemented by specific multi-layer subcircuits. The study shows that transitions between these phases are governed by data diversity thresholds and a representational bottleneck, and it provides a symmetry-constrained theory explaining the sharp shift from 1-point to 2-point generalization.

Hugging Face Trending Papers
Jul 13

Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks

We present a theoretical framework to explain the emergence of inductive reasoning abilities in Transformer language models. While previous works on Transformer learning dynamics have so far been mostly tied to specific tasks, we study a generalized class of inductive tasks that unifies several synthetic tasks known in the literature, including in-context n-grams and multi-hop reasoning.

arXiv Machine Learning
Sep 30

Lost in Tokenization: Fundamental Trade-offs in Graph Tokenization for Transformers

The paper investigates how the choice of graph tokenization affects transformer expressivity. It analyzes three tokenization families—spectral, random‑walk, and adjacency—showing that each induces different depth requirements and that some tokenizations are inherently lossy or ill‑conditioned for certain tasks. The authors prove lower bounds and impossibility results for converting between tokenizations and validate these findings with experiments on synthetic and real‑world data.

By Maya Bechler-Speicher, Gilad Yehudai, Gil Harari, Clayton Sanford, Amir Globerson, Joan Bruna
arXiv AI
Oct 7

Learning a Mixture of GFlowNets

arXiv:2610.07562v1 Announce Type: cross Abstract: Learning an ensemble of GFlowNets to sample from a discrete target distribution has become a common approach for achieving better state space explora...

By Tiago da Silva, Amauri H. Souza, Salem Lahlou
arXiv Machine Learning
4d ago

When Does Depth Matter For In-Context Learning? Adaptive Inference in Deep Transformers

The paper investigates when stacking multiple attention‑feedforward layers in transformers benefits in‑context learning. It develops a theory of distributed inference for generalized linear attention transformers, showing that deeper models can progressively refine latent context variables through internal representations called function vectors. Experiments on linear regression tasks confirm that one‑layer transformers are optimal for Gaussian priors, while multi‑layer transformers outperform them for non‑Gaussian, tree‑like priors, and causal key‑patching demonstrates that intermediate layers mediate adaptive information routing.

By Ravin Raj, Gautam Reddy
arXiv AI
Jul 28

Extracting Algorithms in Pre-trained LLMs: A Case on Hidden Markov Models

arXiv:2607. 22646v1 Announce Type: new Abstract: Large language models (LLMs) display a striking ability to predict next observations from Hidden Markov Models (HMMs) via in-context learning (ICL), but the algorithm underlying this capability remains undetermined: prior work has proposed several candidates without consensus, and none has been grounded in the model's internal activations.

By Yijia Dai, Zhaolin Gao, Yahya Sattar, Jennifer J. Sun, Sarah Dean
arXiv AI
Nov 11

You Don't Need Feature Learning to Do In-Context Learning

The paper investigates memorization versus generalization in in-context learning (ICL) by analyzing how rotation‑invariant kernel machines solve a linear regression ICL task. By decomposing the task in the kernel eigenbasis, it shows that as more samples are added, the model first captures low‑degree components that generalize, then progressively learns higher‑degree components that lead to memorization. The study concludes that feature learning is not essential for ICL and that transformers exhibit memorization patterns predicted by the kernel theory.

By Joseph Turnbull, Jamie Simon