Table of Contents
Fetching ...

Test-Time Alignment for Tracking User Interest Shifts in Sequential Recommendation

Changshuo Zhang, Xiao Zhang, Teng Shi, Jun Xu, Ji-Rong Wen

TL;DR

T$^2$ARec, a novel model leveraging state space model for TTT by introducing two Test-Time Alignment modules tailored for sequential recommendation, effectively capturing the distribution shifts in user interest patterns over time is proposed.

Abstract

Sequential recommendation is essential in modern recommender systems, aiming to predict the next item a user may interact with based on their historical behaviors. However, real-world scenarios are often dynamic and subject to shifts in user interests. Conventional sequential recommendation models are typically trained on static historical data, limiting their ability to adapt to such shifts and resulting in significant performance degradation during testing. Recently, Test-Time Training (TTT) has emerged as a promising paradigm, enabling pre-trained models to dynamically adapt to test data by leveraging unlabeled examples during testing. However, applying TTT to effectively track and address user interest shifts in recommender systems remains an open and challenging problem. Key challenges include how to capture temporal information effectively and explicitly identifying shifts in user interests during the testing phase. To address these issues, we propose T$^2$ARec, a novel model leveraging state space model for TTT by introducing two Test-Time Alignment modules tailored for sequential recommendation, effectively capturing the distribution shifts in user interest patterns over time. Specifically, T$^2$ARec aligns absolute time intervals with model-adaptive learning intervals to capture temporal dynamics and introduce an interest state alignment mechanism to effectively and explicitly identify the user interest shifts with theoretical guarantees. These two alignment modules enable efficient and incremental updates to model parameters in a self-supervised manner during testing, enhancing predictions for online recommendation. Extensive evaluations on three benchmark datasets demonstrate that T$^2$ARec achieves state-of-the-art performance and robustly mitigates the challenges posed by user interest shifts.

Test-Time Alignment for Tracking User Interest Shifts in Sequential Recommendation

TL;DR

TARec, a novel model leveraging state space model for TTT by introducing two Test-Time Alignment modules tailored for sequential recommendation, effectively capturing the distribution shifts in user interest patterns over time is proposed.

Abstract

Sequential recommendation is essential in modern recommender systems, aiming to predict the next item a user may interact with based on their historical behaviors. However, real-world scenarios are often dynamic and subject to shifts in user interests. Conventional sequential recommendation models are typically trained on static historical data, limiting their ability to adapt to such shifts and resulting in significant performance degradation during testing. Recently, Test-Time Training (TTT) has emerged as a promising paradigm, enabling pre-trained models to dynamically adapt to test data by leveraging unlabeled examples during testing. However, applying TTT to effectively track and address user interest shifts in recommender systems remains an open and challenging problem. Key challenges include how to capture temporal information effectively and explicitly identifying shifts in user interests during the testing phase. To address these issues, we propose TARec, a novel model leveraging state space model for TTT by introducing two Test-Time Alignment modules tailored for sequential recommendation, effectively capturing the distribution shifts in user interest patterns over time. Specifically, TARec aligns absolute time intervals with model-adaptive learning intervals to capture temporal dynamics and introduce an interest state alignment mechanism to effectively and explicitly identify the user interest shifts with theoretical guarantees. These two alignment modules enable efficient and incremental updates to model parameters in a self-supervised manner during testing, enhancing predictions for online recommendation. Extensive evaluations on three benchmark datasets demonstrate that TARec achieves state-of-the-art performance and robustly mitigates the challenges posed by user interest shifts.

Paper Structure

This paper contains 35 sections, 1 theorem, 27 equations, 7 figures, 4 tables, 1 algorithm.

Key Result

theorem 1

Denote $\bm \epsilon_n = \bm Q - \bm Q^{\mathrm{b}}_{n+1}$ and $\bm Q^{\mathrm{b}}_{n+1} = - A^{-1}\bm{B}_{n+1}$, and let $P = \frac{\ln\left(- A^{-1}\right)}{\Delta_{n+1}}$, the following upper bound for $\mathcal{L}_{\mathrm{state}}$ holds:

Figures (7)

  • Figure 1: Illustrates of user interest shifts between train and testing phases in sequential recommendation. During the training phase (weekdays), the user’s historical behavior is focused on study-related content (e.g., books), and the model learns to predict the next item based on this pattern. In the testing phase (weekends), user interest shifts from study-related items to leisure activities (e.g., sports). Although the Test input includes the ground truth from the training phase, the model continues to recommend study-related content, failing to adapt to the user’s new preferences. This highlights the importance of modeling temporal contexts and handling user interest shifts effectively in recommendations.
  • Figure 2: Validation of user interest shifts during the testing phase. We conducted experiments on two datasets (ML-1M and Amazon Prime Pantry) using two backbone models (SASRec and Mamba4Rec). After training the models on the training set, the testing set was evenly divided into four segments based on timestamps, and NDCG@10 was used as the evaluation metric for analysis and comparison.
  • Figure 3: Overall framework of $\text{T$^2$ARec}$: $\text{T$^2$ARec}$ processes input sequences through an embedding layer, followed by the $\text{T$^2$A-Mamba}$ block and $\text{Align}^2\text{-SSM}$ block for state updates and output generation. The prediction layer using output embedding $\bm{o}_n$ generated from the feed forward network layer for next-item predictions. $\bm{o}_n$ is reintroduced into the $\text{T$^2$A-Mamba}$ block to compute the alignment losses.
  • Figure 4: The logits and losses computation in $\text{Align}^2\text{-SSM}$: The left side illustrates the time interval alignment loss ($\mathcal{L}_{\mathrm{time}}$), which aligns the predicted time intervals $\bm\Delta$ with the ground truth $\bm T$. The right side shows the $\text{interest state}$ alignment loss ($\mathcal{L}_{\mathrm{state}}$), aligning the final state $\bm h_{n}$ with the backward state $\hat{\bm h}^{\rm b}_{n}$. These two losses jointly enhance the model’s robustness and effectiveness in handling user interest shifts. During testing, the model leverages these self-supervised losses to perform gradient descent, adapting to the input data and improving prediction performance.
  • Figure 5: Effectiveness of $\text{T$^2$ARec}$ on user interest shifts.
  • ...and 2 more figures

Theorems & Definitions (1)

  • theorem 1