Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modeling

Mingze Wang, E. Weinan
2/3/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We conduct a systematic study of the approximation properties of Transformer for sequence modeling with long, sparse and complicated memory. We investigate the mechanisms through which different components of Transformer, such as the dot-product self-attention, positional encoding and feed-forward layer, affect its expressive power, and we study their combined effects through establishing explicit approximation rates. Our study reveals the roles of critical parameters in the Transformer, such as the number of layers and the number of attention heads. These theoretical insights are validated experimentally and offer natural suggestions for alternative architectures.

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. 1 weaker match is hidden by default — 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{wang2026understanding,
  title  = {Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modeling},
  author = {Mingze Wang and E. Weinan},
  year   = {2026},
  eprint = {2402.00522},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2402.00522},
  url    = {https://arxiv.org/abs/2402.00522},
  journal = {NEURIPS 2024 2024}
}

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

Discussion