Source-linked AI summary

Heterogeneous Graph Contrastive Learning for Recommendation

Mengru Chen, Chao Huang, Lianghao Xia, Wei Wei, Yong Xu, Ronghua Luo

arXiv:2303.00995v1cs.IR

TL;DR

Recommendation models must incorporate heterogeneous social and item-knowledge relations despite sparse interaction labels and user- or item-specific side-information effects. HGCL combines heterogeneous graph encoding, cross-view contrastive knowledge transfer, and meta-network-based personalized augmentation. Experiments on three real-world datasets show superiority over state-of-the-art methods, with ablations validating its key components.

  • Problem

    Recommendation requires incorporating heterogeneous side information, but heterogeneous graph models are hindered by sparse interaction labels and side-information effects vary across users and items.

  • Method

    HGCL uses a heterogeneous graph encoder with contrastive learning and a meta network for user- and item-specific adaptive augmentation and cross-view knowledge transfer.

  • Results

    HGCL outperforms state-of-the-art recommendation methods on three real-world datasets, and ablations validate its key components.

  • Takeaways & Limitations

    Heterogeneous relational knowledge and adaptive contrastive augmentation improve recommendation performance and help alleviate data sparsity.

  • Takeaways & Limitations

    Existing heterogeneous graph neural network approaches are label-data-hungry and may produce low-quality embeddings when interaction labels are sparse.

Abstract

from arXiv · show

Graph Neural Networks (GNNs) have become powerful tools in modeling graph-structured data in recommender systems. However, real-life recommendation scenarios usually involve heterogeneous relationships (e.g., social-aware user influence, knowledge-aware item dependency) which contains fruitful information to enhance the user preference learning. In this paper, we study the problem of heterogeneous graph-enhanced relational learning for recommendation. Recently, contrastive self-supervised learning has become successful in recommendation. In light of this, we propose a Heterogeneous Graph Contrastive Learning (HGCL), which is able to incorporate heterogeneous relational semantics into the user-item interaction modeling with contrastive learning-enhanced knowledge transfer across different views. However, the influence of heterogeneous side information on interactions may vary by users and items. To move this idea forward, we enhance our heterogeneous graph contrastive learning with meta networks to allow the personalized knowledge transformer with adaptive contrastive augmentation. The experimental results on three real-world datasets demonstrate the superiority of HGCL over state-of-the-art recommendation methods. Through ablation study, key components in HGCL method are validated to benefit the recommendation performance improvement. The source code of the model implementation is available at the link https://github.com/HKUDS/HGCL.

1 INTRODUCTION

The paper addresses the challenge of incorporating heterogeneous side information into recommendation while overcoming sparse-label limitations and adapting knowledge transfer to users and items. HGCL combines heterogeneous graph learning, contrastive self-supervision, and meta-network-based personalized augmentation.

  • Existing GNN recommenders often model homogeneous user-item interactions, although real-world systems contain social user connections and knowledge-aware item dependencies.
  • Heterogeneous graph neural networks can preserve relation semantics, but their representation quality is hindered by sparse interaction labels.
  • Contrastive graph learning uses alignment between views and negative-pair separation to enrich representations when observed labels are insufficient.
  • HGCL uses a heterogeneous graph encoder and a meta network to perform user- and item-specific augmentation for cross-view knowledge transfer.
  • Experiments on real-world recommendation datasets report significant performance improvements over strong baselines, while validating adaptive augmentation and heterogeneous knowledge transfer.

2 RELATED WORK

Related work covers GNN-based recommendation for interaction, social, temporal, multi-behavior, multimedia, contrastive, and heterogeneous graphs. The paper positions heterogeneous graph contrastive learning for recommendation as an important but unexplored task.

  • GNN recommenders use message passing to model user-item interactions, social influence, temporal relations, diverse behaviors, and multimedia information.
  • Contrastive self-supervision enriches user representations through alignment between graph views and augmentation, addressing recommendation data sparsity.
  • Heterogeneous graph representation learning seeks embeddings that preserve the semantics of diverse node and connection types.
  • The paper tackles heterogeneous graph contrastive learning for recommendation as an important but unexplored research task.

3 METHODOLOGY

The methodology section introduces HGCL as a framework that enhances heterogeneous-graph representation learning for recommendation through cross-view contrastive learning.

  • HGCL enhances heterogeneous-graph representation learning for recommendation with cross-view contrastive learning.

3.1 Preliminaries

The paper represents interactions, social connections, and item dependencies as three heterogeneous graphs and predicts unobserved user-item interactions from them.

  • The interaction graph connects users to adopted items, while separate graphs encode user social connections and knowledge-based item dependencies.
  • Three adjacency matrices correspond to user-item, user-user, and item-item graphs, with dimensions determined by the numbers of users and items.
  • The objective is to predict unobserved user-item interactions given graphs containing heterogeneous relations.

3.2 Heterogeneous Graph Relation Learning

HGCL learns heterogeneous user and item representations from interaction, social, and dependency graphs. Relation-aware initialization, multi-layer message propagation, and layer aggregation preserve heterogeneous semantics and high-order connectivity.

  • Relation-aware embedding initialization: HGCL encodes user-item interactions, user-user social connections, and item-item relations with separate graph views.The three graphs provide complementary relational information for user and item representation learning.
  • Relation-aware embedding initialization: A self-gating module derives relation-aware auxiliary embeddings from a shared initial embedding space.Element-wise gating with a sigmoid and multiplicative skip connection preserves common semantics while adapting representations to homogeneous relations.
  • Heterogeneous message propagation: HGCL iteratively propagates messages over graph neighborhoods to refine user and item embeddings across layers.The user-item graph is described as an example, with analogous GCN processing for the user-user and item-item views.
  • Heterogeneous message propagation: Heterogeneous information is fused during propagation, with element-wise mean pooling used to reduce model complexity.The resulting high-order embeddings preserve heterogeneous semantics across multi-hop connections.
  • Heterogeneous message propagation: Layer-specific outputs are normalized, combined with initial embeddings through skip connections, and aggregated into overall user and item embeddings.The same layer-aggregation principle is applied to interaction, social, and item-dependency views.

3.3 Cross-View Meta Network

HGCL uses a cross-view meta network to transfer side-information knowledge into interaction representations in a personalized manner. User- and item-specific transformations adapt auxiliary-view augmentation to heterogeneous preferences and dependencies.

  • Motivation: Side-information influence on user-item interactions varies across users, motivating personalized knowledge transfer.Users may differ in whether social friends or personal preferences more strongly guide item adoption.
  • Meta knowledge construction: A cross-view meta network maps auxiliary user and item views to user-item interaction representations for each user and item.It extracts meta knowledge from source-side and target-interaction representations together with neighborhood information.
  • Personalized transformation: The meta network takes meta knowledge as input and outputs customized transformation matrices for personalized side-information transfer.The matrices are generated by a two-layer PReLU multilayer perceptron and provide separate transformations across users or items.
  • Personalized transformation: Customized auxiliary embeddings enhance interaction-view embeddings through a weighted fusion of transformed and original representations.The hyperparameter α_u controls the balance between user-item and user-user embeddings, while item customization is analogous.

3.4 Heterogeneous Relational Contrastive Learning for Augmentation

HGCL integrates personalized cross-view transfer with contrastive learning to provide self-supervision for heterogeneous recommendation. Auxiliary and interaction representations are adaptively aligned, using InfoNCE losses for users and items.

  • Cross-view contrastive learning: HGCL aligns auxiliary-view embeddings with user-item interaction embeddings to add self-supervised signals for representation learning.The auxiliary views act as regularization for interaction modeling, helping address data sparsity.
  • Adaptive augmentation: The cross-view alignment is adaptive because a meta network transforms auxiliary embeddings with personalized mapping functions.The meta network is trained to filter noisy auxiliary features to match the interaction view.
  • InfoNCE objective: HGCL applies an InfoNCE-based contrastive loss between personalized auxiliary and interaction representations for users and items.The framework obtains paired embedding sets for both entity types from interaction and side-information graphs.
  • InfoNCE objective: Cosine similarity compares positive cross-view pairs against negative samples, while the temperature coefficient controls contrastive discrimination.The total contrastive loss combines user and item losses with separate weighting hyperparameters.

3.5 Optimization Objectives of HGCL

HGCL predicts interaction likelihood from fused user and item embeddings and optimizes recommendation with pairwise ranking. Its overall objective combines Bayesian Personalized Ranking with augmented cross-view contrastive learning and regularization.

  • Recommendation objective: HGCL scores a user-item pair by the dot product of the final fused user and item embeddings.A larger predicted score represents a larger likelihood of user-item interaction.
  • Recommendation objective: BPR training pairs each user’s interacted positive item with a non-interacted negative item and maximizes their score difference.The loss includes a regularization term weighted by λ.
  • Joint optimization: The overall HGCL training objective combines the BPR recommendation loss with the augmented cross-view contrastive learning loss.This joint optimization trains recommendation and cross-view representation objectives together.

3.6 Model Complexity Analysis

HGCL’s complexity is analyzed across its heterogeneous GNN, cross-view meta network, and relational contrastive learning components.

  • Heterogeneous GNN: The heterogeneous GNN module takes O((|E_ui| + |E_uu| + |E_ii|) × d × L) time.Its cost depends on the user-item, user-user, and item-item edge counts, embedding dimension, and propagation layers.
  • Cross-view Meta Network: The cross-view meta network’s personalized mapping-function generation takes O((m + n) × d^2 × k) time.This is identified as the highest computational cost within the cross-view meta network.
  • Relational Contrastive Learning: The heterogeneous relational contrastive learning component has an additional complexity term of O(b × (m + n) × d).The supplied passage reports this component’s time complexity as part of the overall efficiency analysis.

4 EVALUATION

The evaluation tests HGCL against diverse baselines on three real-world datasets, examining overall performance, component contributions, sparsity robustness, and hyperparameter sensitivity. HGCL is reported to outperform state-of-the-art methods, retain strong performance under sparse interactions, and benefit from its adaptive heterogeneous contrastive components.

  • Experimental Setup: HGCL is evaluated on three real-world datasets containing user-item interactions and heterogeneous user or item side-information relations.Ciao and Epinions provide trust and item-category relations, while Yelp includes heterogeneous relations such as user social relations.
  • Experimental Setup: The evaluation uses one positive item and 99 negative items per user, with HR and NDCG measuring recommendation accuracy.These metrics are used to compare recommendation performance across methods.
  • Performance Comparison (RQ1): HGCL consistently achieves significant performance improvement compared with state-of-the-art recommendation methods.The reported improvements are attributed to heterogeneous knowledge transfer and adaptive contrastive self-supervision across relation views.
  • Ablation Study (RQ2): HGCL outperforms variants without contrastive learning, the meta network, the item-item graph, or the user-user graph.These results support cross-view contrastive transfer, personalized knowledge transfer, and heterogeneous side-information modeling as beneficial components.
  • Performance varying Data Sparsity: HGCL shows superior performance under different user-interaction sparsity environments and maintains decent performance with sparse user-item interactions.Users are divided into five groups by active degree, with accuracy plotted against average interactions per group.
  • Hyperparameter Analysis: Performance saturates at d = 32, is best with two graph propagation layers, and reaches its best value at low-rank dimension k = 3.The analysis also notes potential overfitting from larger embeddings and over-smoothing or noise from deeper GNNs.
  • Qualitative Evaluation: Personalized contrastive transformation matrices visualize stronger or weaker social influence across sampled Ciao users.Larger matrix values indicate greater social influence for a user, enabling adaptive augmentation based on personalized characteristics.

5 CONCLUSION

HGCL transfers knowledge from heterogeneous side information to user-item interaction modeling adaptively. Experiments validate improved performance, robustness under data sparsity, and opportunities to address popularity bias and confounding effects.

  • HGCL adaptively transfers knowledge from heterogeneous relations into user-item interaction modeling.
  • Experiments on real-world datasets report that HGCL outperforms state-of-the-art methods by a large margin.
  • In-depth analysis validates HGCL's robustness in alleviating data sparsity.
  • Future work includes disentangling real interest from conformity to address popularity bias and exploring confounding effects.
Loading 2303.00995v1…