NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Continuous-Time Sequential Recommendation with Temporal Graph Collaborative Transformer

Ziwei Fan, Zhiwei Liu, Jiawei Zhang, Yun Xiong, Lei Zheng, Philip S. Yu

Abstract

Sequential Recommendation (SR) models typically focus on item-to-item transitions within individual user histories, often ignoring the rich collaborative signals present in user-item interaction graphs and treating time as discrete steps. This paper introduces the Temporal Graph Sequential Recommender (TGSRec), a framework that unifies sequential patterns with temporal collaborative signals. By representing interactions as a Continuous-Time Bipartite Graph (CTBG) and utilizing a novel Temporal Collaborative Transformer (TCT) layer, TGSRec effectively captures evolving user preferences in continuous time.

Introduction

Sequential Recommendation (SR) aims to predict future user actions based on historical sequences. While Transformer-based models like SASRec and BERT4Rec have set benchmarks by capturing item-to-item transitions, they possess a critical limitation: they treat user sequences in isolation. This approach ignores temporal collaborative signals—the interconnected web of interactions where one user's behavior can inform another's. Furthermore, traditional models often treat time as discrete sequence steps, failing to account for the actual continuous duration between events, which is vital for understanding preference decay.

Methodology: The TGSRec Framework

To address these gaps, TGSRec integrates graph-based collaborative filtering with sequential modeling through three primary components:

  1. Continuous-Time Bipartite Graph (CTBG): Interactions are modeled as a global bipartite graph where edges are annotated with continuous timestamps, moving beyond isolated sequences.
  2. Continuous-Time Embeddings: Using a translation-invariant kernel based on Bochner’s Theorem, scalar timestamps are mapped into vectors. This allows the model to calculate temporal effects between interactions mathematically, generalizing to any future timestamp.
  3. Temporal Collaborative Transformer (TCT) Layer: The TCT layer replaces standard self-attention with collaborative attention. It treats the user at a target time as a "query" and their historical interactions as "keys" and "values."
The TCT layer architecture utilizes temporal collaborative attention to propagate information across the bipartite graph.

By stacking these layers, the model propagates information across the graph, allowing for the dynamic inference of user and item embeddings at any arbitrary timestamp.

Datasets and Evaluation

The framework was evaluated on five real-world datasets, including sparse Amazon Review categories (Toys, Baby, Tools, Music) and the denser MovieLens ML-100K. Unlike standard "next-item" prediction, the evaluation protocol required predicting recommendations at specific continuous future timestamps, testing the model's ability to handle true temporal dynamics.

Key Results

TGSRec significantly outperformed both static graph models (e.g., LightGCN) and sequential models (e.g., SASRec and TiSASRec).

Performance comparison on the Toys dataset highlights the substantial gains achieved by TGSRec over existing baselines.
  • Quantitative Gains: The model achieved up to a 22.5% absolute improvement in Recall@10 and a 22.1% absolute improvement in Mean Reciprocal Rank (MRR) over the strongest baselines.
  • Ablation Studies: Experiments confirmed that both continuous-time embeddings and collaborative attention are essential; removing either component led to significant performance degradation.
  • Temporal Dynamics: Visualization of attention weights demonstrated that TGSRec successfully learns to decay the relevance of older interactions as the target prediction time moves further into the future.

Conclusion

TGSRec represents a significant advancement in recommendation systems by unifying sequential and collaborative signals within a continuous-time framework. While the current model relies on neighbor sampling for efficiency, future work may explore more sophisticated sampling strategies and the inclusion of heterogeneous data, such as user demographics or item metadata, to further enhance predictive power.

Summary updated

BibTeX
@inproceedings{fan2021continuous,
  author = {Ziwei Fan and Zhiwei Liu and Jiawei Zhang and Yun Xiong and Lei Zheng and Philip S. Yu},
  title = {{Continuous-Time Sequential Recommendation with Temporal Graph Collaborative Transformer}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2021},
  doi = {10.1145/3459637.3482242},
}
Figure