# Incremental Learning in Transformers for In-Context Associative Recall

*Aditya Vardhan Varre, Nicolas Flammarion*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150555) · [Open on the map](../papers.html#p150555)

Category: [Interpretability & Model Adaptation](../pcat/15.md) › [Transformer In-Context Reasoning](../pgroup/370.md) · Type: empirical study · Keywords: transformer in-context learning, circuit emergence, gradient-flow dynamics, conservation law, synthetic associative recall

Areas: [LLM Reasoning](../areas/reasoning.md) › Efficient Reasoning › Transformer Circuits; [Memory](../areas/memory.md) › Memory mechanisms › Associative Memory; [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Transformer Structural Properties

## Summary
We characterize how key circuits emerge during transformer training for in-context associative recall, deriving closed-form parameter dynamics and a conservation law that links learning across layers.

## Explained to a 5-year-old
Computers called transformers learn to remember things they see in a story. We look at how they learn to remember step by step. We use a simple toy problem where the computer must match a new puzzle piece to something it has seen before. We find rules that tell us why and when they remember. This helps us understand how computers can learn new tricks.

## Explained to a 5-year-old, longer
Transformers are computer programs that can learn from reading text. They sometimes suddenly start to remember things they read earlier. We wanted to understand how this remembering happens. We made a simple game where the computer had to match new puzzles to old ones. The game used random patterns that acted like hidden rules. We watched how the computer changed its internal numbers while playing. We discovered a special rule that connects different parts of the computer. This rule shows that the way we start the computer influences how fast it learns. In a special case where the computer starts almost zero, it jumps from one learning stage to another. We tested our ideas on a few different computer designs and they matched. This tells us more about why transformers sometimes learn quickly and sometimes slowly. Knowing this helps scientists build smarter computers in the future.

## For a technical reader
We investigated how transformers develop internal circuits that enable them to recall information seen earlier during training. By simplifying the model to a two-layer attention-only network and using a synthetic associative recall task, we derived exact formulas describing how its parameters evolve over time. We discovered a conservation law that ties the learning dynamics of the two layers together, revealing that initialization determines the speed at which these circuits emerge. In the limit of very small initial weights, the training trajectory follows a series of saddle points, jumping from one to the next. Empirical tests on varied architectures confirmed our theoretical predictions, providing insight into transformer learning behavior without requiring large-scale experiments.

## Problem
Understanding how internal circuits such as induction heads form during transformer training and what controls the speed at which they develop.

## Method
We study gradient-flow trajectories of a simplified two-layer attention-only transformer on a synthetic associative recall task, exploit symmetries in architecture and data to derive closed-form parameter dynamics, and identify a conservation law coupling parameters across layers.

## Results
The approach uncovers a conservation law linking parameters across layers, shows initialization governs emergence timescales, and demonstrates that training proceeds via saddle-to-saddle jumps in the vanishing initialization limit, with empirical validation across architectures.

## Contributions
We provide a mechanistic analysis of circuit emergence in transformers, deriving closed-form dynamics and a conservation law, and empirically validate the findings across varied architectural choices.

## Limitations and assumptions
The analysis is restricted to a simplified two-layer attention-only transformer and the vanishing-initialization limit, which may not capture all aspects of larger models.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150555)
