Average Attention Transformers and Arithmetic Circuits

Lena Ehrmuth, Laura Strieker
5/6/2026
cs.CCcs.AIcs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

We analyse the computational power of transformer encoders as sequence-to-sequence functions on vectors. We show that average hard attention can be used to simulate arithmetic circuits if they are given as an input to an encoder.

Show full abstract

The circuit families that can be simulated this way have constant depth while using unbounded addition, binary multiplication and sign gates. The transformers we use have arithmetic circuits instead of feed-forward networks. With typical average attention the functions they compute are also computed by the same class of circuit families. Our results hold for transformers over the reals, rationals and any ring in between the two.

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{ehrmuth2026average,
  title  = {Average Attention Transformers and Arithmetic Circuits},
  author = {Lena Ehrmuth and Laura Strieker},
  year   = {2026},
  eprint = {2605.04683},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.04683v1}
}

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

Discussion