StateLoop: Persistent State for Looped Transformers

Feichen Song, Boyi Zeng, He Li, Shixiang Song, Yiqin Hao +5 more
10/26/2026
cs.CL
transformer-attention

No confident code implementation found for this paper.

Abstract

Looped Transformers offer a parameter-efficient approach to language modeling by repeatedly applying a shared backbone. Vanilla looped Transformers use each backbone output directly as the input to the next iteration.

Show full abstract

These outputs may contain information useful several iterations later, but retaining it across the loop depends entirely on the single hidden state. We introduce StateLoop, which maintains one additional persistent state per token to retain information across iterations. At each iteration, a learned gate controls how much of the previous state is retained and how much information from the backbone output is incorporated. The updated state is projected back and added to the backbone output for subsequent iterations and final prediction. This design reduces Pile perplexity and improves average accuracy across eight zero-shot tasks over Vanilla Looped. Its perplexity advantage over Vanilla Looped grows with trained loop depth, consistent with persistent state becoming increasingly useful as recurrent computation deepens.

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{song2026stateloop,
  title  = {StateLoop: Persistent State for Looped Transformers},
  author = {Feichen Song and Boyi Zeng and He Li and Shixiang Song and Yiqin Hao and Zitong Wang and Yizhou Yang and Yifan Liu and Ziwei He and Zhouhan Lin},
  year   = {2026},
  eprint = {2610.35544},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.35544v1}
}

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

Discussion