Table of Contents
Fetching ...

TTT4Rec: A Test-Time Training Approach for Rapid Adaption in Sequential Recommendation

Zhaoqi Yang, Yanan Wang, Yong Ge

TL;DR

TTT4Rec tackles the challenge of adapting sequential recommendation models to evolving user behavior, especially when training data is limited. It introduces a Test-Time Training framework with a dual-loop optimization: an outer supervised loop that updates global projections and an inner self-supervised loop that updates the hidden state $W_t$ during inference, using multi-view projections ($K$, $V$, $Q$) and a RoPE-augmented embedding pathway. The architecture supports both Transformer and Mamba backbones, and demonstrates state-of-the-art or competitive performance across Gowalla, Twitch-100k, and Amazon-video-game, with particular strength in data-scarce or highly variable settings. The approach enables real-time adaptation in recommender systems, and the authors provide code to facilitate reproducibility and integration into real-world pipelines.

Abstract

Sequential recommendation tasks, which aim to predict the next item a user will interact with, typically rely on models trained solely on historical data. However, in real-world scenarios, user behavior can fluctuate in the long interaction sequences, and training data may be limited to model this dynamics. To address this, Test-Time Training (TTT) offers a novel approach by using self-supervised learning during inference to dynamically update model parameters. This allows the model to adapt to new user interactions in real-time, leading to more accurate recommendations. In this paper, we propose TTT4Rec, a sequential recommendation framework that integrates TTT to better capture dynamic user behavior. By continuously updating model parameters during inference, TTT4Rec is particularly effective in scenarios where user interaction sequences are long, training data is limited, or user behavior is highly variable. We evaluate TTT4Rec on three widely-used recommendation datasets, demonstrating that it achieves performance on par with or exceeding state-of-the-art models. The codes are available at https://github.com/ZhaoqiZachYang/TTT4Rec.

TTT4Rec: A Test-Time Training Approach for Rapid Adaption in Sequential Recommendation

TL;DR

TTT4Rec tackles the challenge of adapting sequential recommendation models to evolving user behavior, especially when training data is limited. It introduces a Test-Time Training framework with a dual-loop optimization: an outer supervised loop that updates global projections and an inner self-supervised loop that updates the hidden state during inference, using multi-view projections (, , ) and a RoPE-augmented embedding pathway. The architecture supports both Transformer and Mamba backbones, and demonstrates state-of-the-art or competitive performance across Gowalla, Twitch-100k, and Amazon-video-game, with particular strength in data-scarce or highly variable settings. The approach enables real-time adaptation in recommender systems, and the authors provide code to facilitate reproducibility and integration into real-world pipelines.

Abstract

Sequential recommendation tasks, which aim to predict the next item a user will interact with, typically rely on models trained solely on historical data. However, in real-world scenarios, user behavior can fluctuate in the long interaction sequences, and training data may be limited to model this dynamics. To address this, Test-Time Training (TTT) offers a novel approach by using self-supervised learning during inference to dynamically update model parameters. This allows the model to adapt to new user interactions in real-time, leading to more accurate recommendations. In this paper, we propose TTT4Rec, a sequential recommendation framework that integrates TTT to better capture dynamic user behavior. By continuously updating model parameters during inference, TTT4Rec is particularly effective in scenarios where user interaction sequences are long, training data is limited, or user behavior is highly variable. We evaluate TTT4Rec on three widely-used recommendation datasets, demonstrating that it achieves performance on par with or exceeding state-of-the-art models. The codes are available at https://github.com/ZhaoqiZachYang/TTT4Rec.
Paper Structure (23 sections, 12 equations, 2 figures, 4 tables)

This paper contains 23 sections, 12 equations, 2 figures, 4 tables.

Figures (2)

  • Figure 1: Structure of the TTT4Rec Model.
  • Figure 2: Structure of the Sequence Modeling Block. In the Mamba backbone, $\sigma$ represents GELU hendrycks2016gaussian.