LooM: Loop-Invariant Memory for Causal Encoder-Decoder Language Models

Lele Yang, Muxi Diao, Zhonghao Yan, Jiankang Chen, Bin Wen +5 more
11/4/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Looped Transformers increase effective depth by re-executing shared layers, but three limitations hinder their adoption: memory grows with the loop count, compute can only be adjusted in whole-block steps, and the loop count is hard to change after training. We propose LooM (Loop-invariant Memory), which addresses each in turn.

Show full abstract

In a causal encoder-decoder (CED), LooM loops only the decoder layers after the first, which read a global memory written once per token, and each of them publishes the key-value (KV) entry for a token only on its first visit, so the cache does not grow with the loop count. These layers loop independently, providing every budget from 3 to 21 layer executions per token, and one model trained on randomly sampled budgets covers all of them without a router. With enough loops, LooM outperforms a single-pass baseline trained on the same data on language modeling, zero-shot accuracy and long-context perplexity, while using the same cache size. Our analysis further shows that the training budget distribution decides what extra depth buys. These results suggest that a CED is a natural place to loop: memory is written once, and depth becomes a budget chosen at deployment.

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{yang2026loom,
  title  = {LooM: Loop-Invariant Memory for Causal Encoder-Decoder Language Models},
  author = {Lele Yang and Muxi Diao and Zhonghao Yan and Jiankang Chen and Bin Wen and Tingting Gao and Wentao Zhang and Kongming Liang and Zhanyu Ma and Weiran Xu},
  year   = {2026},
  eprint = {2611.06835},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.06835v1}
}

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

Discussion