Abstract
Modeling time-evolving user preferences through sequential item interactions is a cornerstone of modern recommendation systems. However, most existing models focus on a single interaction type (e.g., purchases), ignoring the rich context provided by multi-typed behaviors like clicks, favorites, and cart additions. This paper introduces the Temporal Graph Transformer (TGT), a framework designed to capture complex cross-type behavior dependencies and evolving user interests. By integrating sequential modeling with graph-based relational learning, TGT effectively distills knowledge from diverse interaction patterns to improve recommendation accuracy.
The Challenge of Multi-Behavior Sequences
Real-world user journeys are rarely linear or limited to a single action. A user might view several items, favorite a few, and eventually purchase one. Traditional sequential recommenders often struggle with two main hurdles:
- Cross-type Behavior Inter-dependency: A "click" today might be a precursor to a "purchase" tomorrow. Capturing these deep, time-lagged dependencies is difficult with simple concatenation.
- Temporal Multi-behavior Pattern Fusion: The significance of an action changes over time (e.g., a click during a flash sale vs. a routine browse).
The Temporal Graph Transformer (TGT) Framework
TGT addresses these challenges through a multi-layered architecture that combines the strengths of Transformers and Graph Neural Networks (GNNs).
Core Components:
- Behavior-Aware Context Embedding: Injects behavior types and temporal signals into initial item embeddings using sinusoid functions to preserve time-awareness.
- Item-wise Sequential Dependency: Employs self-attention to capture the "flow" of user interest within short-term sequences.
- Multi-Behavior Pattern Aggregation: Uses a bipartite graph and a Multi-Channel Projection strategy to differentiate the semantics of various actions (e.g., distinguishing a "cart" addition from a "view").
- Global Relational Context Learning: Maintains a global user-item graph to capture long-term dynamics and collaborative filtering effects across the entire user base.
Experimental Evaluation
The authors evaluated TGT on two large-scale e-commerce datasets: Taobao (~7.6M interactions) and IJCAI-Contest (~36M interactions). In both cases, the model was tasked with predicting the "purchase" behavior using other interactions as context.
Key Results:
- State-of-the-Art Performance: TGT consistently outperformed 18 baselines, including SASRec and MBGCN. On Taobao, it achieved a 22.5% relative improvement in NDCG@10 over the best multi-behavior baseline.
- Ablation Insights: Removing "view" or "browse" context behaviors significantly degraded performance, proving that non-purchase actions are critical "force multipliers" for prediction.
- Layer Depth: The study found that two GNN layers provided the best balance, while a third layer led to "over-smoothing," where node representations became too similar.
Conclusion
The Temporal Graph Transformer represents a significant step forward in sequential recommendation by treating user history as a complex, multi-behavioral graph rather than a simple list of items. By explicitly modeling both short-term transitions and long-term global relations, TGT provides a more nuanced and accurate representation of evolving user intent. Future work may involve incorporating multi-modal features like product images and addressing inherent popularity biases in user data.
Summary updated