Linear Transformers Implicitly Discover Unified Numerical Algorithms

P. Lutz, Aditya Gangrade, Hadi Daneshmand, Venkatesh Saligrama
9/1/2025
transformer-attention

No confident code implementation found for this paper.

Abstract

We train a linear attention transformer on millions of masked-block matrix completion tasks: each prompt is masked low-rank matrix whose missing block may be (i) a scalar prediction target or (ii) an unseen kernel slice of Nystr\"om extrapolation. The model sees only input-output pairs and a mean-squared loss; it is given no normal equations, no handcrafted iterations, and no hint that the tasks are related.

Show full abstract

Surprisingly, after training, algebraic unrolling reveals the same parameter-free update rule across three distinct computational regimes (full visibility, rank-limited updates, and distributed computation). We prove that this rule achieves second-order convergence on full-batch problems, cuts distributed iteration complexity, and remains accurate with rank-limited attention. Thus, a transformer trained solely to patch missing blocks implicitly discovers a unified, resource-adaptive iterative solver spanning prediction, estimation, and Nystr\"om extrapolation, highlighting a powerful capability of in-context learning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lutz2025linear,
  title  = {Linear Transformers Implicitly Discover Unified Numerical Algorithms},
  author = {P. Lutz and Aditya Gangrade and Hadi Daneshmand and Venkatesh Saligrama},
  year   = {2025},
  eprint = {2509.19702},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2509.19702},
  url    = {https://doi.org/10.48550/arXiv.2509.19702},
  journal = {Neural Information Processing Systems}
}

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/2509.19702.svg)](https://codeofpaper.com/paper/2509.19702)

Discussion