TL;DR
This paper introduces a novel way to model user preferences for recommendations by combining sequential interaction data with item similarity graphs. Their proposed "Heterogeneous User Graph Transformer" (HUGT) effectively fuses these two perspectives, leading to improved recommendation accuracy, especially for users with long interaction histories.
What Problem Does This Paper Address?
Recommender systems aim to predict what a user might like next. Traditionally, two main approaches have been used: modeling user behavior as a sequence of interactions (e.g., what they watched or bought in order) or as a graph where items are nodes and relationships (like similarity) are edges. While sequential models capture temporal dynamics, they can miss broader item relationships. Graph-based models excel at capturing these relationships but often overlook the crucial temporal order of interactions. This paper addresses the gap of effectively unifying these two complementary views of user behavior to build more robust user models for better recommendations.
Methods
The core innovation is the Heterogeneous User Graph (HUG), a data structure that represents a user's interactions as a graph. This HUG contains two types of edges:
- Sequential Edges: These preserve the chronological order of item interactions, similar to traditional sequence models.
- Collaborative Edges: These connect items that are collaboratively similar, meaning they are frequently interacted with by similar sets of users. This similarity is derived from a SVD decomposition of the user-item interaction matrix.
To learn from these HUGs, the authors propose the Heterogeneous User Graph Transformer (HUGT). HUGT builds upon the Transformer architecture (specifically SASRec) and uses a multi-head self-attention mechanism. Crucially, the attention heads are split into two groups:
- Sequential Modeling Heads: These focus on learning from the sequential edges.
- Graph Modeling Heads: These focus on learning from the collaborative edges.
This dual-head approach allows HUGT to concurrently capture both sequential patterns and graph topology. The paper also explores two variants for graph modeling: "Message Passing" (MP) which aggregates information from immediate neighbors, and "Spatial Encoding" (SE) which leverages shortest path distances between items in the graph.
Datasets
The authors evaluate their method on four real-world datasets from three domains:
- ML1M: Movie recommendation
- Netflix: Movie recommendation
- Steam: Game recommendation
- Taobao: E-commerce
These datasets vary in size, density, and sequence length, allowing for a comprehensive evaluation across different scenarios.
Key Insights and Ideas
- Sequence and Graph are Complementary: The paper strongly suggests that combining sequential and graph-based user modeling is more powerful than either approach alone. This is because sequential data captures "what happened next," while graph data captures "what is similar."
- HUG as a Unified Representation: The HUG structure provides a flexible and effective way to store both types of information, bridging the gap between existing methods.
- Dual-Head Attention for Fusion: Splitting attention heads to process sequential and graph information separately within the Transformer architecture is a key mechanism for effectively fusing these diverse signals.
- Long Sequences Benefit Most: The benefits of joint modeling are most pronounced on datasets with long user interaction sequences, where capturing complex relationships beyond immediate temporal order becomes critical.
Key Results
- Outperforms Baselines: HUGT significantly outperforms state-of-the-art sequential recommendation baselines on ML1M, Netflix, and Taobao datasets, showing improvements of up to 10%.
- Competitive on Short Sequences: For shorter sequences (like Steam), HUGT performs comparably to strong baselines like SASRec.
- Joint Modeling is Superior: Experiments show that models that jointly consider sequences and graphs (HUGT) perform better than those that model them sequentially (e.g., graph first, then sequence, or vice-versa).
- Graph Topology is Important: Removing graph heads from HUGT leads to a performance drop, highlighting the value of collaborative graph information, especially for longer sequences.
Limitations and Future Work
- Short Sequences: The paper notes that for very short sequences, the benefit of graph modeling is less pronounced, suggesting that simpler sequential models might suffice.
- Graph Construction: The current collaborative edges are based on item similarity derived from SVD. The authors suggest that future work could explore other types of item-item relations, such as item temporal graphs or item feature similarity graphs, to enrich the HUG.
- Scalability: While the Transformer's quadratic complexity is a known challenge, the paper mentions that pre-processing steps like SVD and shortest path computation can be done in parallel. However, for extremely large graphs, further optimizations might be needed.
Summary updated