Contextualized Graph Attention Network for Recommendation With Item Knowledge Graph

Yong Liu, Susen Yang, Yonghui Xu, Chunyan Miao, Min Wu, Juyong Zhang

TL;DR

This paper introduces CGAT, a novel recommendation system that leverages knowledge graphs (KGs) by explicitly modeling both local and non-local contextual information of items. By incorporating user-specific attention and a biased random walk with RNNs, CGAT significantly improves recommendation accuracy over existing KG-based methods.

What Problem Does This Paper Address?

Traditional recommender systems often struggle to capture the rich, interconnected information present in knowledge graphs (KGs). While recent methods use Graph Neural Networks (GNNs) to exploit KG structures, they often fall short in two key areas:

  1. User-Specific Preferences: Existing GNNs typically aggregate local KG context (first-order neighbors) uniformly, failing to account for how different users might value different aspects or attributes of an item. For instance, two users interacting with the same item might do so for entirely different reasons related to the item's KG connections.
  2. Non-Local Context: GNNs primarily focus on immediate neighbors. However, an item's true significance might be influenced by entities several hops away in the KG, especially for items with few direct connections. Ignoring this non-local context can lead to incomplete representations.

This paper aims to bridge this gap by developing a recommendation framework that explicitly models both local and non-local KG context, tailored to individual user preferences.

Methods

The proposed Contextualized Graph Attention Network (CGAT) tackles the problem through three main components:

  1. User-Specific Local Graph Context: CGAT employs a user-specific graph attention mechanism. Instead of a uniform aggregation of an item's neighbors in the KG, this mechanism assigns different attention scores to each neighbor based on the target user's preferences. This allows the model to learn which contextual entities are more relevant to a particular user.
  2. Biased Random Walk for Non-Local Graph Context: To capture non-local information, CGAT uses a biased random walk sampling (BRWS) process. This method explores paths of a certain length in the KG, starting from a target item. The sampled entities, ranked by their frequency in these walks, form the non-local context. A Recurrent Neural Network (RNN), specifically a Gated Recurrent Unit (GRU), is then used to model the dependencies within this non-local context sequence.
  3. Item-Specific Interaction Graph Context: CGAT also considers the user's historical interactions. An item-specific attention mechanism is developed to model how a user's previously interacted items influence their preference for a target item. This allows the model to weigh the importance of historical items differently when predicting preferences for different candidate items.

These three contextual embeddings are then combined to form a contextualized representation for both items and users, which are used to predict user-item interaction scores.

Datasets

The paper evaluates CGAT on three publicly available datasets:

  • Last-FM (FM)
  • Movielens-1M (ML)
  • Book-Crossing (BC)

These datasets are standard benchmarks for recommendation systems. The KGs used are derived from Microsoft Satori. The authors also mention filtering triples based on confidence levels and specific relation names to construct their KGs.

Key Insights and Ideas

  • Personalization is Key: The user-specific graph attention mechanism is crucial. Simply aggregating KG context without considering user preferences leads to suboptimal performance, highlighting that "one size fits all" KG context is insufficient.
  • Beyond First-Order Neighbors: Explicitly modeling non-local KG context through random walks and RNNs significantly enhances item representations, especially for items with sparse local connections. This suggests that distant but relevant entities can provide vital information.
  • Synergy of Contexts: CGAT's strength lies in its ability to integrate local KG context, non-local KG context, and user interaction history. Ablation studies show that removing any of these components degrades performance, underscoring their complementary roles.
  • KG Structure Matters: The regularization loss based on KG structure helps to enforce meaningful relationships between entities in the latent space, further improving recommendation quality.

Key Results

CGAT consistently outperformed several state-of-the-art KG-based recommendation methods across all three datasets and evaluation metrics (Precision@K, Recall@K, Hit Ratio@K).

  • On average, CGAT outperformed CFKG, RippleNet, MKR, KGNN-LS, and KGAT by significant margins (e.g., 9.56% improvement in HR@20 over KGAT).
  • Statistical significance tests (Wilcoxon signed rank test) confirmed that CGAT's improvements were significant (p < 0.05) in most scenarios.
  • Ablation studies showed that CGAT w/o L (local context) and CGAT w/o G (non-local context) performed worse than the full CGAT model, indicating the importance of both KG context types. CGAT w/o UA (user attention) also showed a performance drop, emphasizing the value of user-specific attention.

Limitations and Future Work

  • Parameter Sensitivity: The paper explores the sensitivity of CGAT to various hyperparameters (S, N, λ1, M, L) and identifies optimal ranges, but performance can still be affected by these choices.
  • Computational Complexity: While linear with most parameters, the complexity of biased random walk sampling and GRU processing can still be a factor for very large KGs.
  • Future Work: The authors suggest exploring different aggregation strategies to integrate KG context and interaction graph context more effectively. They also aim to develop more advanced methods to improve recommendation accuracy.

Summary updated

BibTeX
@article{liu2020contextualized,
  author = {Yong Liu and Susen Yang and Yonghui Xu and Chunyan Miao and Min Wu and Juyong Zhang},
  title = {{Contextualized Graph Attention Network for Recommendation With Item Knowledge Graph}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2020},
  doi = {10.1109/tkde.2021.3082948},
}
Figure