Heterogeneous Graph Neural Network for Recommendation

Jinghan Shi, Houye Ji, Chuan Shi, Xiao Wang, Zhiqiang Zhang, Jun ZhouarXiv 2020

Abstract

The prosperous development of e-commerce has spawned diverse recommendation systems. As a matter of fact, there exist rich and complex interactions among various types of nodes in real-world recommendation systems, which can be constructed as heterogeneous graphs. How learn representative node embedding is the basis and core of the personalized recommendation system. Meta-path is a widely used structure to capture the semantics beneath such interactions and show potential ability in improving node embedding. In this paper, we propose Heterogeneous Graph neural network for Recommendation (HGRec) which injects high-order semantic into node embedding via aggregating multi-hops meta-path based neighbors and fuses rich semantics via multiple meta-paths based on attention mechanism to get comprehensive node embedding. Experimental results demonstrate the importance of rich high-order semantics and also show the potentially good interpretability of HGRec.

Introduction

Traditional recommendation systems often rely on Collaborative Filtering (CF), modeling interactions as a simple bipartite graph between users and items. However, real-world data is inherently heterogeneous, containing diverse node types (e.g., users, items, categories, brands) and complex relationships. HGRec (Heterogeneous Graph neural network for Recommendation) addresses this by modeling data as a multi-typed graph and leveraging "meta-paths" to capture high-order relationships.

The challenge in such systems is three-fold: handling node and edge heterogeneity, capturing high-order semantics (e.g., a "User-Movie-User-Movie" path revealing shared niche tastes), and fusing these diverse semantic signals. HGRec utilizes an attention mechanism to automatically weigh different meta-paths, ensuring the most informative relationships drive the final recommendations.

Methodology

HGRec operates through three primary layers:

  1. Semantic Aggregation Layer: The model uses predefined meta-paths to identify high-order neighbors. Unlike standard Graph Convolutional Networks (GCNs), HGRec employs an Interaction Encoding method using element-wise products ($e_k \odot e_u$) to capture the specific relationship between a node and its neighbor. These layers are stacked to reach $L$-order neighbors, with embeddings from different orders concatenated to preserve both local and global context.
  2. Semantic Fusion Layer: To handle multiple meta-paths (e.g., U-M, U-U, U-M-G-M), a semantic-level attention mechanism learns specific weights for each path, allowing the model to prioritize the most relevant signals for a given user or dataset.
  3. Prediction and Optimization: Final embeddings are combined via an inner product and trained using the Bayesian Personalized Ranking (BPR) loss, which optimizes for ranking observed interactions above unobserved ones.

Experimental Evaluation

The model was evaluated on three benchmark datasets: Movielens (social and genre links), Amazon (category and brand links), and Yelp (social and city links). HGRec consistently outperformed strong baselines such as NGCF and MCRec across all metrics.

Performance comparison on the Amazon dataset showing HGRec's superiority over baselines.

On the Amazon dataset, HGRec achieved a significant improvement in Recall@10, outperforming the strongest baselines. Ablation studies comparing HGRec to a version with uniform weights (HGRec-) confirmed that the attention-based semantic fusion is critical for performance.

Key Insights and Analysis

Experimental analysis revealed several key properties of the HGRec architecture:

  • The "Sweet Spot" of Depth: Performance generally peaks at a depth of $L=3$. Beyond this point, the model may begin to overfit, or the signal from distant neighbors becomes too noisy to be useful.
  • Interaction Expressiveness: The use of element-wise products during aggregation allows the model to learn how user preferences interact with neighbor characteristics more effectively than simple feature addition.
  • Interpretability: Attention weights provide transparency. For example, in Movielens, the model can assign higher weights to personal history paths over social paths if they are more predictive for that domain.
Impact of layer depth (L) on recommendation performance for Movielens and Amazon datasets.

Conclusion

HGRec demonstrates the power of high-order semantics in heterogeneous graphs for recommendation. While the model shows state-of-the-art performance, future work could focus on automated meta-path discovery to remove the need for expert-defined paths and improving scalability to prevent performance drops at higher layer depths.

Summary updated

BibTeX
@misc{shi2020heterogeneous,
  author = {Jinghan Shi and Houye Ji and Chuan Shi and Xiao Wang and Zhiqiang Zhang and Jun Zhou},
  title = {{Heterogeneous Graph Neural Network for Recommendation}},
  year = {2020},
  eprint = {2009.00799},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.00799},
}
Figure