Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction
Antoine Gonon, Alexandre Cordonnier, Nicolas Boumal
TL;DR
Gaussian Match-and-Copy (GMC) isolates long-range, second-order correlations to study how Transformer architectures develop the $PTH\to IH$ retrieval circuit. The authors show that GMC reproduces core mechanisms observed in larger models, reveals a clear architectural gap between attention-based and non-attention models, and supports a conditional max-margin implicit bias in a minimal two-layer attention model under a high-probability geometric event. Empirically, GMC-trained Transformers consistently exhibit PTH and IH head emergence concurrent with sharp loss drops, and the learned mechanisms transfer to non-Gaussian data (e.g., Omniglot) via lightweight embedding adaptation. The work also provides a theoretical framework showing that, under specific assumptions, gradient descent on MSE converges in direction to the max-margin separator with the weight norm diverging logarithmically, offering a principled lens on induction dynamics. Overall, GMC serves as a cheap, controllable diagnostic for probing induction in sequence models and guides future architectural and theoretical investigations into long-range retrieval and in-context learning.
Abstract
Match-and-copy is a core retrieval primitive used at inference time by large language models to retrieve a matching token from the context then copy its successor. Yet, understanding how this behavior emerges on natural data is challenging because retrieval and memorization are entangled. To disentangle the two, we introduce Gaussian Match-and-Copy (GMC), a minimalist benchmark that isolates long-range retrieval through pure second-order correlation signals. Numerical investigations show that this task retains key qualitative aspects of how Transformers develop match-and-copy circuits in practice, and separates architectures by their retrieval capabilities. We also analyze the optimization dynamics in a simplified attention setting. Although many solutions are a priori possible under a regression objective, including ones that do not implement retrieval, we identify an implicit-bias regime in which gradient descent drives the parameters to diverge while their direction aligns with the max-margin separator, yielding hard match selection. We prove this max-margin alignment for GD trajectories that reach vanishing empirical loss under explicit technical conditions.
