首页 > AI前沿 > LooM: Loop-Invariant Memory for Causal Encoder-Decoder Language Models

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

arXiv自然语言 2026-11-05 01:52 11 阅读 查看原文

动机与方法

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.

在因果编码器-解码器(CED)中的设计

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.