Manuscript Offprint

arXiv:2610.01513

Decision Titan: Test-Time Training for Long-Term Memory in Offline Reinforcement Learning

Jude Waide, Robert Lieck

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

Long-term dependencies remain a major challenge for sequential decision-making in the field of AI: RNNs suffer from vanishing gradients and the limited expressivity of vector-based hidden states, whilst Transformer-based models are limited by the quadratic scaling of attention. Recent work has proposed tackling this problem with the Test-Time Training (TTT) framework, which stores episodic memories in the parameters of a neural network through gradient descent at both train and test-time. This approach has seen success in the domain of Natural Language Processing, however, to the best of our knowledge it has not yet been applied to the domain of Reinforcement Learning (RL), nor has there been a study analysing how this memory practically functions. In this paper, we study the potential of the TTT framework for offline RL by augmenting a Decision Transformer with TTT layers, dubbed the Decision Titan. We analyse performance and properties of the model in the X-Maze environment, an extension of T-Maze designed to test sequential memory, and investigate how the memory mechanism learns by visualising gate values over time. Our key findings are that Decision Titan can learn long-term dependencies with ranges 20x longer than the context window, generalises to lengths 1.7x the training data, but crucially temporal generalisation depends on the time embeddings used, and the ability to learn long-term dependencies depends on how the relevant information is encoded.

1. Introduction

Long-term dependencies remain a fundamental challenge across the field of AI. They occur when the optimal output of a neural network depends on information from the distant past—a situation that occurs in many real-world scenarios. Modelling these dependencies is difficult for two main reasons: credit assignment and episodic memory. The credit assignment problem (Pignatelli et al., 2024) occurs when actions have delayed effects on rewards, e.g. an optimal move in a game of chess may only lead to an enemy piece getting captured several moves later. In such a scenario, a model must be able to learn which past actions are responsible for present outcomes—a challenge that becomes increasingly severe over long temporal horizons (Bengio et al., 1994). However, in the context of long-term dependencies, the problem shifts: rather than asking “Which actions are relevant to the current reward?”, we instead ask “Which observations are relevant to the current decision?”. Addressing this form of credit assignment is essential for identifying what information must be retained over time. Once identified, the model must retain it, motivating the need for an effective episodic memory mechanism.

Current approaches are limited at handling these dependencies. Recurrent Neural Networks (RNNs) (Hochreiter & Schmidhuber, 1997; Chung et al., 2014) propagate a hidden state through time, theoretically allowing the modelling of arbitrarily long dependencies. However, in practice they suffer from finite hidden-state expressivity and vanishing gradients over time. Transformers (Vaswani et al., 2017) avoid these issues by feeding the model the last k inputs at each step, directly modelling the dependencies within this fixed-size window through self-attention. The major issue is the quadratic scaling cost of attention, limiting the size of the context-window and the length of dependencies that can be modelled, positioning Transformers as a short-term memory. Whilst there has been work reducing the scaling to linear (Tay et al., 2022), the context length is still limited and therefore does not address the underlying need for an episodic long-term memory.

Recent work has proposed storing episodic memories in weights via the Test-Time Training framework (Sun et al., 2025). By reserving a fraction of a model’s parameters

1^{1}Department of Computer Science, University of Durham, Durham, United Kingdom. Correspondence to: Jude Waide jude.waide@durham.ac.uk.

Accepted at ICML 2026 Workshop on Decision-Making from Offline Datasets to Online Adaptation: Black-Box Optimization to Reinforcement Learning.

as fast weights, episodic information can be stored in these weights by using gradient descent at test-time. The Titans architecture (Behrouz et al., 2024) has applied this framework to Transformers, using self-attention as a short-term memory and TTT layers as a long-term one. Furthermore, they add momentum and a forgetting gate to the fast weight gradient descent, achieving SOTA performance in NLP tasks featuring long-term dependencies. However, to the best of our knowledge, neither Titans nor the TTT framework has been applied to Reinforcement Learning, nor has an in-depth analysis been done on how Titans learn in practice.

In this work, we investigate the potential of the Test-Time Training framework to address long-term dependencies in Reinforcement Learning (RL). To this end, we examine whether Titans can learn an effective policy in environments with long-term dependencies and provide similar benefits in RL as observed in NLP. To answer this, we introduce the Decision Titan (DTi) by merging Titans with Decision Transformer (Chen et al., 2021) (a method for applying Transformers to offline RL by treating the problem as a sequence modelling task).

Our secondary objective is to better understand how the Titans memory module operates and to characterise its strengths and limitations. To achieve this, we introduce X-Maze, an extension of T-Maze (Ni et al., 2023), providing a controlled environment for evaluating a model's ability to remember the order of past observations over long temporal horizons. We test DTi in this environment, examining properties such as the ability of the model to extrapolate and the impact of different positional embedding strategies. Furthermore, we visualise the gating mechanisms of the fast weight update rule and perform ablation studies on the momentum. We then evaluate our findings to highlight promising directions of future study.

We find that the Decision Titan can learn dependencies with ranges 20x longer than the context window. Furthermore, we find that momentum helps the model learn dependencies by propagating them further during training. We also show that: DTi memory learns which information to remember by chance, catastrophic forgetting is likely the largest limitation facing the approach, the model can remember sequential information under the right conditions, the choice of embedding has an impact on the memory retention of the model when extrapolating to longer episode lengths, and that sparse memory access is a promising area for future research.

References (50)