Manuscript Offprint

arXiv:2610.07907

Continuous Memory Machines

Ciaran Regan, Kai Arulkumaran, Luke Darlow, Stefania Druga, Sebastian Risi, Llion Jones

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Recurrent neural networks typically compress information into a single vector-valued recurrent state, forcing short-term computation and long-term retention to share the same representation. Past extensions alleviate this bottleneck by increasing the memory capacity or separating timescales, but lack the combination of rapid neuron-level processing and longer-term retention found in biology. To that end, we introduce the Continuous Memory Machine (CMM), a recurrent architecture with matrix-valued short- and long-term memory states serving distinct functional roles. Building on the Continuous Thought Machine (CTM), the CMM's short-term memory tracks recent neural activity, with uniquely parameterized neuron-level models learning to use these activity patterns for computation. A persistent long-term memory stores information for later use, with a Transformer jointly updating both memory stores, providing an expressive bidirectional read-write mechanism such that each store can reorganize its own contents and both read from and write to the other. Across algorithmic, in-context learning, and recurrent reasoning tasks, the CMM outperforms a broad suite of baselines, exhibiting stronger generalization than prior memory-augmented networks while preserving the CTM's interpretable attention patterns. Code is available at https://github.com/SakanaAI/continuous-memory-machines.

1 Introduction

Many complex problems require sequential information to be maintained and manipulated over multiple timescales. A model executing an algorithm, for instance, needs to simultaneously track rapidly changing inputs while managing information acquired earlier. Such tasks can be challenging for Transformers [1] which, despite their dominance in sequence processing, can struggle with state tracking [2]. Recurrent neural networks (RNNs), on the other hand, are naturally suited to such settings, updating a persistent hidden state over time. This state, however, typically compresses the entire sequence history into a single hidden vector [3, 4], with the same representation responsible for both short-term computation and long-term memory. This creates a bottleneck that limits performance on tasks that may benefit from both rapid computation and persistent storage [5].

Several lines of work have sought to address these limitations. Multiscale RNNs introduce hidden states that update with different rates [6, 7], allowing some components to respond to recent inputs while others retain information over longer horizons. Fast weight RNNs take an alternative approach, replacing vector-valued with matrix-valued hidden states, supporting associative storage [8–10]. Memory-augmented neural networks (MANNs) couple a controller, such as a long short-term memory [LSTM; 3], to an addressable matrix, providing an external store from which information can be retrieved and updated [5, 11]. Recurrent Transformers extend the effective context of standard Transformers by carrying hidden representations or memory tokens across successive input blocks [12,

*Corresponding author: ciaran@sakana.ai.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Personalized, Aligned, Long-Term Memory for AI Systems (PALM).

Figure

Figure 1: The Continuous Memory Machine. At timestep tt, the current observation oto^t and previous activated state ztz^t are processed by the feedforward synapse model to produce a pre-activated state ata^t. This state is appended to the sliding short-term memory (STM) AtA^t. AtA^t and the long-term memory BtB^t are jointly processed by a Transformer, producing updated memories A~t\tilde{A}^t and B~t\tilde{B}^t. A~t\tilde{A}^t is passed through the neuron-level models to produce the next activated state zt+1z^{t+1}. From the activated-state history, the model computes the synchronization St+1S^{t+1} and output yt+1y^{t+1}. AtA^t, B~t=Bt+1\tilde{B}^t = B^{t+1}, and zt+1z^{t+1} are carried forward to the next iteration.

13]. These approaches expand capacity or separate timescales, but the combination of persistent memory with rich short-term neural dynamics remains relatively unexplored.

Biological neural networks present this as a possible solution, with memory organized across interacting dynamical systems with distinct functional roles [14, 15]. The complementary learning systems framework argues that this separation is necessary, as a single memory store cannot simultaneously encode new information and retain accumulated knowledge stably without interference [14, 16]. Existing RNN architectures fail to capture this sufficiently. Multiscale RNNs retain vector-valued memories, fast weight RNNs increase the capacity of a single recurrent state, and MANNs pair an external matrix-valued memory with a limited controller state. Conversely, the recently-introduced Continuous Thought Machine [CTM; 17] demonstrates the benefits of rich short-term dynamics, directly leveraging recent neural activation patterns for computation, but lacks long-term storage, as we show in section 4. This motivates the question: “Can the short-term dynamics of the CTM be combined with the capabilities of memory-augmented architectures to create a more capable recurrent model?”

To that end, we introduce the Continuous Memory Machine (CMM), a recurrent architecture that explicitly separates short- and long-term memory into distinct matrix-valued recurrent states. The CMM combines the persistent memory mechanisms of MANNs with the CTM's ability to exploit rich short-term neural dynamics for computation. Its short- and long-term memory states are processed by a shared Transformer, allowing each memory to update its own contents while also exchanging information with the other through learned bidirectional interactions. Across algorithmic, in-context learning, maze-solving, and image-classification tasks, the CMM achieves strong performance and improved generalization while preserving the CTM's interpretable reasoning behavior. Analysis reveals the CMM learns task-dependent memory strategies, relying on persistent long-term memory for memory-intensive tasks while suppressing cross-memory interaction when it is unnecessary. In summary, our contributions are as follows:

• We introduce the Continuous Memory Machine, an RNN with distinct matrix-valued short-and long-term memories. A shared Transformer updates both, supporting within-memory computation and learned cross-memory interaction.

• We show the CMM achieves strong performance in algorithmic, few-shot learning and reasoning tasks, with improved generalization while preserving the interpretability of the CTM.

• We show that the CMM learns task-dependent memory strategies, using long-term memory for retention and manipulation while suppressing interactions when persistent storage is unnecessary.

References (46)