What can linear attention learn from nonlinear teachers in-context?

Mary Letey, Arman Rysmakhanov, Yue M. Lu, Cengiz Pehlevan, Jacob Zavatone-Veth
10/7/2026
stat.MLcs.LG

No confident code implementation found for this paper.

Abstract

Linear attention is a tractable model for understanding the mechanisms governing in-context learning in transformers. For linear regression tasks, recent asymptotic analyses have characterised its learning and generalisation behaviour.

Show full abstract

We extend this theory to nonlinear single-index targets, $y=f(x^\top w)+\varepsilon $. Our main result establishes a nonlinearity-noise equivalence: linear attention extracts only the linear Hermite component of $f$, while the remaining nonlinear structure contributes to the generalisation error as effective noise. This reduction allows results from the corresponding linear theory to be transferred to nonlinear tasks. We illustrate its implications for finite pretraining data and for the transition from task memorisation to task generalisation as task diversity increases. These results identify a limitation of the reduced linear-attention model and provide a tractable starting point for studying nonlinear 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{letey2026what,
  title  = {What can linear attention learn from nonlinear teachers in-context?},
  author = {Mary Letey and Arman Rysmakhanov and Yue M. Lu and Cengiz Pehlevan and Jacob Zavatone-Veth},
  year   = {2026},
  eprint = {2610.10761},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.10761v1}
}

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

Discussion