Incremental Learning of Sparse Attention Patterns in Transformers

Oğuz Kaan Yüksel, Rodrigo Alvarez Lucendo, Nicolas Flammarion
2/22/2026
cs.LGmath.OCstat.ML

No official code found. Best implementation: ralvarezlucend/IL-SAP-Transformers (2 stars, last commit 2026-04-22).

Abstract

This paper introduces a high-order Markov chain task to investigate how transformers learn to integrate information from multiple past positions with varying statistical significance. We demonstrate that transformers learn this task incrementally: each stage is defined by the acquisition of specific information through sparse attention patterns. Notably, we identify a shift in learning dynamics from competitive, where heads converge on the most statistically dominant pattern, to cooperative, where heads specialize in distinct patterns. We model these dynamics using simplified differential equations that characterize the trajectory and prove stage-wise convergence results. Our analysis reveals that transformers ascend a complexity ladder by passing through simpler, misspecified hypothesis classes before reaching the full model class. We further show that early stopping acts as an implicit regularizer, biasing the model toward these simpler classes. These results provide a theoretical foundation for the emergence of staged learning and complex behaviors in transformers, offering insights into generalization for natural language processing and algorithmic reasoning.

View on arXivView PDF

Code Implementations(1)

Incremental Learning of Sparse Attention Patterns in Transformers

20Shell, PythonJan 19, 20266 months ago

Similar Papers

Cite this paper

@article{yksel2026incremental,
  title  = {Incremental Learning of Sparse Attention Patterns in Transformers},
  author = {Oğuz Kaan Yüksel and Rodrigo Alvarez Lucendo and Nicolas Flammarion},
  year   = {2026},
  eprint = {2602.19143},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.19143v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.19143.svg)](https://codeofpaper.com/paper/2602.19143)

Discussion