Skip to content

Persistent Recurrent Memory Between Transformer Layers - Improves Language Model Generalization

Sep 2026 · arXiv.org · Vol abs/2609.17251 · 0 citations · 12 references
Computer Science

Abstract

We introduce a simple architectural modification to decoder-only transformers: a persistent recurrent state that observes hidden representations via cross-attention, updates itself through a GRU, and modulates subsequent processing via gated addition. Inserted between the lower and upper halves of a 6-layer transformer, this module adds only 3.7\% additional parameters while reducing evaluation loss from $2.438 \pm 0.004$ to $1.743 \pm 0.018$, corresponding to a 28.5\% reduction on held-out language modeling data. The improvement is statistically significant across 5 random seeds ($p<0.01$) and corresponds to reduced overfitting (generalization gap 0.12 vs 0.26). Through controlled ablations, we demonstrate that the improvement stems entirely from the persistent memory topology, not from auxiliary self-prediction objectives. A model with identical topology but no auxiliary loss performs equivalently, while a random auxiliary loss provides no benefit. Representation probing reveals that the persistent state encodes narrative position (52\% vs 33\% chance level)---information that standard attention maintains less efficiently. Our results suggest that bridging transformer layers with a lightweight recurrent memory is a simple, effective approach to improving generalization in small-scale language models.

View source

Similar papers

#machine learning Preprint Nov 2026

GatedV: Self-Gated Values for Transformer Language Models

Standard attention forms query (Q), key (K), and value (V) matrices through learned linear projections of input hidden states. Architectures such as GAU and Mega incorporate nonlinear transformations into attention. In this paper, we propose GatedV, a simple attention variant that applies SiLU only to V before aggregat...

Li-Ming Yu, Hong-Yu Zhou · 0 citations
Preprint Nov 2026

Quantizing Recurrent Language Models Is Easier Than You Think

Linear recurrences are becoming an increasingly common building block in large language models, replacing the growing KV cache of softmax attention with a fixed-size recurrent state that enables efficient decoding. However, the quantization stack has largely been developed around softmax Transformers, whose numerical p...

Philipp Nazari, Neehal Tumma, D. Rus et al. · 1 citation
#artificial intelligence Preprint Oct 2026

Dynamical Memory Transformer: Selective Recurrent Memories with Constant Cost Attention

The Dynamical Memory Transformer is presented, a hybrid architecture that separates sequence encoding from information reading and achieves the best results on several cognitive tasks and language modeling performance close to that of Transformer, but remains behind Mamba in language modeling.

Y. Bendi-Ouis, X. Hinaut · 0 citations
Oct 2026

Enhancing transformer language models with liquid time-constant networks

The feedforward sublayer in a transformer block applies an identical, position-wise transformation to every token, with no mechanism to vary its computational behaviour based on syntactic role or local context. This paper investigates whether replacing these static feedforward layers with Closed-form Continuous-time...

Nidhin Paul, Anitha Jeevanayagam, Shanu Mathew · 0 citations
#artificial intelligence Preprint Sep 2026

TinyCeNN-LM: Quality-Gated Conversion of Pretrained Attention with CeNN-Inspired Cellular-Recurrent Layers

TinyCeNN-LM introduces a quality-gated post-training conversion framework using CeNN-inspired cellular-recurrent layers with bounded local processing, compact recurrent memory, routing, fusion, fusion, and accept-or-rollback validation to support conservative, quality-gated structural conversion.

Kabeh Mohsenzadegan, V. Tavakkoli, K. Kyamakya · 0 citations
#artificial intelligence Preprint Oct 2026

DeltaTTT: Layerwise Optimization for Nonlinear Recurrent Memory

Sequential test-time training adapts a memory network through successive updates, each computing an inner-loop gradient based on the network's previous state. Intuitively, this state dependence should allow each update to account for what the memory has already learned and better incorporate new information. However, w...

Yi-Ning Li, Dong-Chen Han, Jie Fu et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 23, 2026

Many languages, one common neural code

Analyzing speakers of 21 languages, an MIT study using multilingual AI finds the human brain may represent meaning in much the same way.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.