Adaptive Loops and Memory in Transformers: Think Harder or Know More?

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Frey, Markus, Shomali, Behzad, Bashir, Ali Hamza, Berghaus, David, Koehler, Joachim, Ali, Mehdi
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914386081218560
author Frey, Markus
Shomali, Behzad
Bashir, Ali Hamza
Berghaus, David
Koehler, Joachim
Ali, Mehdi
author_facet Frey, Markus
Shomali, Behzad
Bashir, Ali Hamza
Berghaus, David
Koehler, Joachim
Ali, Mehdi
contents Chain-of-thought (CoT) prompting enables reasoning in language models but requires explicit verbalization of intermediate steps. Looped transformers offer an alternative by iteratively refining representations within hidden states. This parameter efficiency comes at a cost, as looped models lack the storage capacity of deeper models which use unique weights per layer. In this work, we investigate transformer models that feature both adaptive per-layer looping, where each transformer block learns to iterate its hidden state via a learned halting mechanism, and gated memory banks, that provide additional learned storage. We find that looping primarily benefits mathematical reasoning, while memory banks help recover performance on commonsense tasks compared to parameter and FLOP matched models. Combining both mechanisms yields a model that outperforms an iso-FLOP baseline, with three times the number of layers, across math benchmarks. Analysis of model internals reveals layer specialization: early layers learn to loop minimally and access memory sparingly, while later layers do both more heavily.
format Preprint
id arxiv_https___arxiv_org_abs_2603_08391
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Adaptive Loops and Memory in Transformers: Think Harder or Know More?
Frey, Markus
Shomali, Behzad
Bashir, Ali Hamza
Berghaus, David
Koehler, Joachim
Ali, Mehdi
Computation and Language
Chain-of-thought (CoT) prompting enables reasoning in language models but requires explicit verbalization of intermediate steps. Looped transformers offer an alternative by iteratively refining representations within hidden states. This parameter efficiency comes at a cost, as looped models lack the storage capacity of deeper models which use unique weights per layer. In this work, we investigate transformer models that feature both adaptive per-layer looping, where each transformer block learns to iterate its hidden state via a learned halting mechanism, and gated memory banks, that provide additional learned storage. We find that looping primarily benefits mathematical reasoning, while memory banks help recover performance on commonsense tasks compared to parameter and FLOP matched models. Combining both mechanisms yields a model that outperforms an iso-FLOP baseline, with three times the number of layers, across math benchmarks. Analysis of model internals reveals layer specialization: early layers learn to loop minimally and access memory sparingly, while later layers do both more heavily.
title Adaptive Loops and Memory in Transformers: Think Harder or Know More?
topic Computation and Language
url https://arxiv.org/abs/2603.08391