Abstract
Session-based recommender systems (SBRSs) predict users' next interacted items based on their historical activities. While most SBRSs capture purchasing intentions locally within each session, capturing items' global information across different sessions is crucial in characterizing their general properties. Previous works capture this cross-session information by constructing graphs and incorporating neighbor information. However, this incorporation cannot vary adaptively according to the unique intention of each session, and the constructed graphs consist of only one type of user-item interaction. To address these limitations, we propose knowledge graph-based session recommendation with session-adaptive propagation. Specifically, we build a knowledge graph by connecting items with multi-typed edges to characterize various user-item interactions. Then, we adaptively aggregate items' neighbor information considering user intention within the learned session. Experimental results demonstrate that equipping our constructed knowledge graph and session-adaptive propagation enhances session recommendation backbones by 10%-20%. Moreover, we provide an industrial case study showing our proposed framework achieves 2% performance boost over an existing well-deployed model at The Home Depot e-platform.
Introduction
Session-based recommender systems (SBRSs) aim to predict a user's next move based on a short sequence of interactions. While modern models like Transformers excel at capturing local patterns within a single session, they often struggle to incorporate "global" knowledge—how items relate to each other across millions of other sessions.
Existing hybrid models that use Graph Neural Networks (GNNs) to bring in this global data face two major hurdles:
- Context Blindness: They often aggregate neighbor information "blindly." For example, if a user clicks on a "flower," a standard GNN might pull in data about both "garden loppers" and "kitchen vases." If the user is currently decorating a garden, the vase data is irrelevant noise.
- Uniform Relationships: Most models treat all interactions (viewing, adding to cart, purchasing) as the same, ignoring the nuanced difference between items that are substitutes (co-viewed) versus complements (co-purchased).
Methods
The proposed framework addresses these challenges through three main components:
Multi-Typed Knowledge Graph (KG)
Instead of a simple graph, the system builds a KG with three distinct edge types: co-view (items viewed together), co-ATC (items added to cart together), and co-view-ATC (one viewed, the other added to cart). This captures the difference between "this or that" (substitutes) and "this and that" (complements).
Session-Adaptive Propagation
This is the core innovation. The system uses a two-stage Transformer approach. The first Transformer generates a "contextual embedding" for the items in the current session. This embedding acts as a query to a Heterogeneous Graph Transformer (HGT). The HGT then selectively pulls information from the global KG that is relevant to the specific session's intent.
Multi-Task Learning
To further sharpen the model, a secondary task is added: predicting the metadata (like category or price) of the next item. This forces the model to learn richer, more descriptive item representations.
Experimental Results
The model was evaluated on three datasets: Diginetica (CIKM Cup 2016), Yoochoose 1/64 (RecSys Challenge 2015), and a massive real-world dataset from The Home Depot (THD) containing over 3 million sessions.
Key findings include:
- Significant Gains: Equipping standard backbones (like GRU4Rec or SASRec) with this framework improved performance (NDCG@10 and MRR@10) by 10% to 20%.
- State-of-the-Art: The proposed
M-KGHTmodel outperformed existing state-of-the-art baselines like NARM and SR-GNN across all tested datasets. - Real-World Impact: In a live deployment at The Home Depot, the model achieved a 2% performance boost over an already highly-optimized production model.
- Sparsity Resilience: The model proved particularly effective for sessions with "middle-level" sparsity—where there is enough global information to be useful, but the local session data is not yet overwhelming.
Conclusion
This research demonstrates that treating session context as a filter for global knowledge significantly improves recommendation quality. By using the current session to "query" a multi-relational global graph, item embeddings are dynamically updated to reflect the user's immediate goal. Future work may explore adding "user" nodes for deeper personalization and incorporating temporal dynamics to better reflect current trends.
Summary updated