Source-linked AI summary
Explainable Reasoning over Knowledge Graphs for Recommendation
Xiang Wang, Dingxian Wang, Canran Xu, Xiangnan He, Yixin Cao, Tat-Seng Chua
TL;DR
Existing recommendation methods do not fully exploit knowledge-graph paths to model sequential dependencies and holistic path semantics for preference inference. KPRN composes entity and relation semantics with recurrent path modeling and weighted pooling, and experiments on movie and music data show improved performance over established baselines.
Problem
Existing methods incompletely model sequential dependencies and holistic semantics within knowledge-graph paths when inferring user preferences.
Method
KPRN uses LSTM-based path representations that compose entities and relations, then weights paths to infer preferences and distinguish their contributions.
Results
The model improves recommendation performance over CKE and NFM, while a case study shows one path contributing 0.356 to a movie recommendation.
Takeaways & Limitations
Explicit path reasoning and path-contribution weighting provide recommendation signals together with explanations of user-item interactions.
Takeaways & Limitations
The approach requires labor-intensive extraction of qualified paths, motivating future propagation-based alternatives.
Abstract
from arXiv · showhide
Incorporating knowledge graph into recommender systems has attracted increasing attention in recent years. By exploring the interlinks within a knowledge graph, the connectivity between users and items can be discovered as paths, which provide rich and complementary information to user-item interactions. Such connectivity not only reveals the semantics of entities and relations, but also helps to comprehend a user's interest. However, existing efforts have not fully explored this connectivity to infer user preferences, especially in terms of modeling the sequential dependencies within and holistic semantics of a path. In this paper, we contribute a new model named Knowledge-aware Path Recurrent Network (KPRN) to exploit knowledge graph for recommendation. KPRN can generate path representations by composing the semantics of both entities and relations. By leveraging the sequential dependencies within a path, we allow effective reasoning on paths to infer the underlying rationale of a user-item interaction. Furthermore, we design a new weighted pooling operation to discriminate the strengths of different paths in connecting a user with an item, endowing our model with a certain level of explainability. We conduct extensive experiments on two datasets about movie and music, demonstrating significant improvements over state-of-the-art solutions Collaborative Knowledge Base Embedding and Neural Factorization Machine.
Introduction
Knowledge graphs provide complementary user-item connectivity for recommendation, but prior methods incompletely model path semantics and reasoning. KPRN addresses this gap by composing entity and relation semantics, modeling sequential dependencies, and weighting paths for explainable preference inference.
- Motivation: Knowledge graphs add complementary connectivity between users and items beyond direct interaction data.
- Motivation: Paths through entities and relations can reveal user intent and support reasoning about unseen user-item interactions.
- Research gap: Meta-path methods omit relations and require predefined patterns, limiting holistic path semantics and discovery of unseen connectivity.
- Research gap: Knowledge graph embedding methods mainly regularize item representations using direct relations, lacking multi-hop path reasoning.
- Approach: KPRN uses an LSTM to compose entity and relation semantics along paths, then pools paths to infer preferences and distinguish their contributions.
- Contributions: The paper contributes explicit KG reasoning, an end-to-end path-semantic model, and a MovieLens–IMDB dataset for KG-enhanced recommendation.
Knowledge-aware Path Recurrent Network
KPRN represents user-item paths by composing entity and relation information, models their sequential dependencies, and aggregates path scores with a weighted pooling operation for preference inference and explainability.
- Knowledge Graph Construction: KPRN integrates user-item interactions with an enriched knowledge graph containing entities, relations, and an interact relation.Items are merged with KG entities through string matching, while users and interactions are added to the combined graph.
- Path Representation: The model represents each user-item connection as a path consisting of sequential entities and relations.Paths may encode direct or multiple-step relational properties between users and items.
- Path Representation: KPRN concatenates entity, entity-type, and relation-type embeddings and feeds each path step into an LSTM.The recurrent hidden state uses prior path-step information, and the final state represents the whole path.
- Preference Prediction: Two fully connected layers transform each path representation into a predictive score for a user-item interaction.The model predicts the plausibility of τ = (u, interact, i) from the final path state.
- Weighted Pooling Layer: A weighted pooling operation aggregates path scores while distinguishing the different contributions of paths to user preferences.Its exponential weighting is controlled by γ; γ →0 yields max-pooling, whereas γ →∞ yields mean-pooling.
- Learning: KPRN learns interaction predictions as binary classification using pointwise learning and a negative log-likelihood objective.Observed interactions receive target 1 and unobserved interactions target 0, with L2 regularization applied to trainable parameters.
Experiments
The experiments evaluate KPRN on two real-world datasets against state-of-the-art KG-enhanced methods and examine path modeling and preference reasoning.
- Experiments: Experiments on two real-world datasets compare KPRN with state-of-the-art knowledge-graph-enhanced methods.The evaluation also studies how multi-step path modeling affects KPRN and whether it can reason over paths to infer user preferences.
Dataset Description
The study evaluates movie and music recommendation using MI and KKBox, combining user-item interactions with auxiliary knowledge-graph information. Interaction data are converted into binary feedback and split into training and test sets with negative sampling.
- MI combines MovieLens-1M interaction data with IMDb knowledge-graph information about movies, including genre, actor, director, and writer.
- KKBox is a benchmark music dataset from the WSDM Cup 2018 Challenge and a music streaming service.
- Observed ratings or song interactions are assigned target value 1, while non-interactions are assigned 0.
- Each user’s interactions are randomly divided into 80% training and 20% test data, with four negatives per training positive and 100 negatives per test positive.
Path Extraction
Path extraction is bounded because the number of knowledge-graph paths grows exponentially with path length. The method therefore truncates paths and disregards remote connections to make connectivity modeling feasible.
- The number of knowledge-graph paths grows exponentially with path length, making exhaustive exploration infeasible.
- The approach truncates paths at a certain length and disregards remote connections when modeling user-item connectivity.
Experimental Settings
The experiments evaluate top-K recommendation and preference ranking against interaction-only, factorization, KG-embedding, and meta-path baselines. Performance is averaged across K values from 1 through 15 under a common optimization and hyperparameter-search procedure.
- Evaluation protocols: The evaluation uses hit@K for retrieving relevant items within the top K positions and ndcg@K for their relative ranking order.
- Evaluation protocols: Average metrics are reported for K = {1, 2, · · · , 15} across all test instances.
- Compared methods: Baselines include MF, NFM, CKE, and FMG, representing interaction-only factorization, neural factorization, KG embedding, and meta-path approaches.
- Optimization: All models are trained from scratch with Adam, while grid search tunes learning rate and L2 regularization.
Performance Comparison (RQ1)
Across MI and KKBox, KPRN achieves the best reported recommendation performance and substantially outperforms CKE on hit@K and ndcg@K. The comparisons attribute this advantage to explicit path-based reasoning that incorporates entities and relations, with a larger margin for preference ranking.
- FMG performs poorly on both datasets, consistent with limitations attributed to predefined meta-graph patterns and remote entities.
- NFM outperforms MF, while CKE improves consistently on the extremely sparse KKBox dataset but is comparable to NFM on denser MI.
- KPRN substantially outperforms CKE on hit@K and ndcg@K, achieving the best performance.
- KPRN’s explicit use of paths explores user-item connectivity, whereas CKE uses the knowledge graph to guide item representation learning.
- KPRN’s larger advantage on ndcg@K indicates stronger preference-ranking capacity than the other baselines.
Study of KPRN (RQ2)
KPRN’s relation-aware path modeling improves recommendation performance over a relation-free variant, while weighted pooling performs best when it balances contributions from informative paths.
- Relation modeling: KPRN-r removes relation embeddings from path inputs, enabling a direct comparison of KPRN with and without relation modeling.
- Relation modeling: Removing relations decreases performance on both datasets, indicating that relations help capture path semantics when the same entities recur.
- Relation modeling: KPRN improves KPRN-r by 6.45% w.r.t. hit@5 on MI, but only 0.70% on KKBox.
- Weighted pooling: The weighted pooling operation aggregates prediction scores from multiple paths between a user-item pair.
- Weighted pooling: Decreasing γ from 1 to 0.1 degrades performance because pooling becomes similar to max-pooling and selects only the most important paths.
- Weighted pooling: Increasing γ from 1 to 10 worsens hit@K and ndcg@K because pooling aggregates contributions from more paths instead of the most informative ones.
Case Studies (RQ3)
KPRN reasons over multiple knowledge-graph paths to infer user preferences and provide path-wise explanations. In the movie example, paths connect the target to previously watched films through shared entities and relations.
- Case Studies (RQ3): KPRN captures higher-level semantics from entities, entity types, and relations to infer preferences and generate explanations.
- Case Studies (RQ3): The Shakespeare in Love example uses qualified paths extracted between user u4825 and the target movie.
- Case Studies (RQ3): A path involving user u5448 contributes 0.356 to inferring the user’s interest, illustrating a collaborative-filtering effect.
- Case Studies (RQ3): Different paths connect Shakespeare in Love to Rush Hour, Titanic, and Fantasia through shared actors or directors, supporting distinct path-wise explanations.
Related Work
Related work combines knowledge graphs with recommendation through embedding-based and path-based approaches. Embedding methods guide item representations, while meta-path methods encode predefined entity-type connectivity but depend on domain knowledge and do not reason over paths.
- Related Work: Knowledge-graph recommendation methods are broadly categorized as embedding-based and path-based.
- Embedding-based Methods: Embedding-based methods guide item representations by combining collaborative latent factors with semantic knowledge-aware embeddings.
- Path-based Methods: Meta-paths are sequences of entity types, such as user-movie-direct-movie, used to capture user-item affinities in knowledge graphs.
- Path-based Methods: Path-based methods update user-item similarity rather than reason over paths, and their performance depends heavily on meta-path quality and domain knowledge.
- Path-based Methods: Some programming-based methods infer preferences along paths but do not learn user and item representations, limiting generalization to unseen interactions.
Conclusions
The paper presents KPRN as a knowledge-aware path recurrent network that composes entity and relation semantics and uses LSTM-based path reasoning to infer preferences. Future work targets graph neural networks for less labor-intensive path extraction and zero-shot learning for cross-domain cold start.
- Conclusions: KPRN constructs complementary user-item connectivity from knowledge-graph paths and represents each path by composing entity and relation semantics.
- Conclusions: LSTM modeling captures sequential dependencies in paths, enabling reasoning over paths to infer user preferences.
- Conclusions: Future work will use graph neural networks because extracting qualified paths is labor-intensive.
- Conclusions: Future work will also explore zero-shot learning for cold-start issues in target domains linked through overlapping knowledge-graph entities.