In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separation

Frank Cole, Yuxuan Zhao, Yu-Long Lu, Tianhao Zhang
2/1/2025
transformer-attention

No confident code implementation found for this paper.

Abstract

This paper investigates approximation-theoretic aspects of the in-context learning capability of the transformers in representing a family of noisy linear dynamical systems. Our first theoretical result establishes an upper bound on the approximation error of multi-layer transformers with respect to an $L^2$-testing loss uniformly defined across tasks.

Show full abstract

This result demonstrates that transformers with logarithmic depth can achieve error bounds comparable with those of the least-squares estimator. In contrast, our second result establishes a non-diminishing lower bound on the approximation error for a class of single-layer linear transformers, which suggests a depth-separation phenomenon for transformers in the in-context learning of dynamical systems. Moreover, this second result uncovers a critical distinction in the approximation power of single-layer linear transformers when learning from IID versus non-IID data.

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{cole2025incontext,
  title  = {In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separation},
  author = {Frank Cole and Yuxuan Zhao and Yu-Long Lu and Tianhao Zhang},
  year   = {2025},
  eprint = {2502.08136},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-5641},
  url    = {https://doi.org/10.52202/085713-5641},
  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/2502.08136.svg)](https://codeofpaper.com/paper/2502.08136)

Discussion