Source-linked AI summary

Knowledge Graph Self-Supervised Rationalization for Recommendation

Yuhao Yang, Chao Huang, Lianghao Xia, Chunzhen Huang

arXiv:2307.02759v1cs.IRcs.AI

TL;DR

Knowledge-aware recommendation needs to exploit informative knowledge while limiting noise and sparsity, but existing approaches do not explicitly identify task-relevant rationales. KGRec learns rationale scores and combines rationale-aware masking, reconstruction, and cross-view contrastive learning; experiments on three real-world datasets show superior performance over existing knowledge-aware recommender systems.

  • Problem

    Knowledge graphs can alleviate sparse user-item interactions but also introduce noise, while existing contrastive approaches do not explicitly model latent rationales linking knowledge and recommendation.

  • Method

    KGRec learns attentive rationale scores for knowledge triplets, masks high-scored connections for reconstruction, and filters low-scored knowledge during cross-view contrastive learning.

  • Results

    KGRec consistently outperforms baseline models across both evaluation metrics and all three datasets.

  • Takeaways & Limitations

    Rationale-aware masking and reconstruction distill useful knowledge, while noise-free cross-view contrastive learning aligns knowledge and collaborative signals for recommendation.

Abstract

from arXiv · show

In this paper, we introduce a new self-supervised rationalization method, called KGRec, for knowledge-aware recommender systems. To effectively identify informative knowledge connections, we propose an attentive knowledge rationalization mechanism that generates rational scores for knowledge triplets. With these scores, KGRec integrates generative and contrastive self-supervised tasks for recommendation through rational masking. To highlight rationales in the knowledge graph, we design a novel generative task in the form of masking-reconstructing. By masking important knowledge with high rational scores, KGRec is trained to rebuild and highlight useful knowledge connections that serve as rationales. To further rationalize the effect of collaborative interactions on knowledge graph learning, we introduce a contrastive learning task that aligns signals from knowledge and user-item interaction views. To ensure noise-resistant contrasting, potential noisy edges in both graphs judged by the rational scores are masked. Extensive experiments on three real-world datasets demonstrate that KGRec outperforms state-of-the-art methods. We also provide the implementation codes for our approach at https://github.com/HKUDS/KGRec.

1 INTRODUCTION

Knowledge graphs address sparse user-item interactions but can introduce noisy or irrelevant connections. KGRec uses rationale-aware masking, reconstruction, and cross-view contrastive learning to retain recommendation-relevant knowledge.

  • Knowledge graphs enrich recommendation by providing item information when user-item interactions are sparse.
  • Existing contrastive methods use random augmentation or cross-view signals without explicitly modeling latent rationales between knowledge graphs and recommendation.
  • Figure 1 motivates rationale discovery by showing that few knowledge triplets receive high attention while many have low scores, and collaborative labels can indicate rationality.
  • KGRec generates task-related rational scores, masks high-scored triplets for reconstruction, and filters low-scored knowledge as potential noise for contrastive learning.
  • KGRec unifies generative and contrastive self-supervision to distill useful knowledge and align it with collaborative signals in a noise-resistant manner.
  • Experiments on three real-world datasets report superior performance against existing knowledge-aware recommender systems.

2 PRELIMINARIES

The paper formulates recommendation using two linked graphs: a binary user-item interaction graph and a heterogeneous knowledge graph. The model predicts the likelihood that a user interacts with an item from both graphs.

  • The user-item interaction graph represents collaborative signals between users and items with binary labels indicating whether an interaction occurred.
  • The knowledge graph represents item-related knowledge as entity-relation-entity triplets, with items forming a proper subset of entities.
  • KG-aware recommendation learns a model from both graphs that outputs a value in [0, 1] representing the likelihood of a user-item interaction.

3 METHODOLOGY

KGRec assigns rationale scores to knowledge triplets and uses them in heterogeneous graph aggregation. The resulting knowledge and user representations combine relational knowledge with collaborative signals for recommendation.

  • KGRec's attentive knowledge rationalization module generates scores that represent each triplet's recommendation-related importance.
  • The knowledge aggregator injects relational context into neighboring entity embeddings and weights neighbor information by rationale scores.
  • Rationale-aware aggregation operates across knowledge-graph neighbors to produce contextual entity representations.
  • Because items are knowledge entities, item representations are obtained from knowledge-graph aggregation, while user embeddings aggregate neighboring items in the interaction graph.
  • Final user and entity representations sum aggregated embeddings across graph layers.

3.3 Knowledge-aware Masked Autoencoder

KGRec uses rationale scores to identify important knowledge edges, masks them for self-supervised reconstruction, and removes low-scored edges when constructing contrastive graph views. Reconstruction then recovers masked relations using relational context.

  • Noisy or irrelevant knowledge-graph connections can interrupt representation learning and produce inaccurate recommendations.
  • The generative task reconstructs important rationale connections from augmented-graph embeddings under relational context using a dot-product log-loss.
  • KGRec uses a global rationale criterion to compare triplet importance across the knowledge graph by adjusting local scores with head-entity degree.
  • The masking mechanism selects the top k highest-scored triplets as masked knowledge for self-supervised learning.
  • Low-rationale edges are removed from the augmented knowledge graph, while masked high-rationale edges provide reconstruction supervision.

3.4 Knowledge Rationale-aware Contrasting

KGRec constructs contrastive views by filtering low-rationale knowledge and interaction edges, then aligns rationale-aware knowledge and collaborative item representations with a contrastive objective.

  • Knowledge graph augmentation: KGRec removes low-rationale knowledge triplets to produce an augmented knowledge graph containing more informative connections.The knowledge graph is debiased by filtering triplets with lower rationale scores.
  • Interaction graph augmentation: Interaction edges are weighted by the mean rationale score of an item's linked knowledge triplets to distinguish informative from noisy interactions.Items with lower mean rationale scores are filtered, while multinomial sampling provides randomized edge-dropout candidates.
  • View-specific representations: LightGCN aggregates the augmented interaction graph, while rationale-aware knowledge aggregation produces item representations for the knowledge view.The interaction-view representation sums LightGCN outputs across layers, whereas the knowledge view incorporates triplet rationale scores.
  • Cross-view alignment: Two MLPs map collaborative and knowledge representations into a shared latent space before cross-view contrastive alignment.The two input views originate in different representation spaces and are projected before comparison.
  • Contrastive objective: The contrastive objective uses stochastically sampled negatives, cosine similarity between normalized vectors, and a temperature controlling contrastive hardness.The modified InfoNCE objective uses one random negative sample for each view to reduce over-fitting and false negatives.

3.5 Model Learning and Discussion

KGRec jointly optimizes recommendation, rationale masking-reconstruction, and cross-view contrastive learning, while its analysis links these auxiliary tasks to alignment and uniformity properties.

  • Main recommendation task: KGRec predicts user-item preference with dot products and optimizes Bayesian Personalized Ranking using observed interactions against sampled negatives.The recommendation task uses masked-graph entity embeddings rather than re-aggregating the original knowledge graph.
  • Joint optimization: The overall objective jointly weights the recommendation, mask-and-reconstruction, and cross-view contrastive losses.λ1 and λ2 control the mask-and-reconstruction and cross-view contrastive tasks, respectively.
  • Generative task: Rational masking-reconstruction explicitly aligns features by reconstructing masked knowledge triplets selected from high-rationale connections.The generative loss is characterized as an alignment loss over masked rationale triplets.
  • Contrastive analysis: The contrastive loss connects cross-view representation learning with alignment and uniformity, using positive item pairs and randomly sampled negatives.Its lower bound is satisfied when positive embeddings are perfectly aligned, x^T y = 1.
  • Discussion: KGRec derives better alignment and uniformity than stochastic methods, which can lead to improved representations for more accurate recommendations.The rationale-aware sampling distribution supports rational positive pairing and removes potential noise from cross-view contrasting.

4 EVALUATION

KGRec is evaluated against diverse baselines on three real-world datasets using Recall@20 and NDCG@20, with additional studies of ablations, cold-start, sparsity, KG incompleteness, and interpretability. It consistently outperforms baselines and retains strong performance under challenging data conditions.

  • Overall Evaluation: KGRec is evaluated on Last-FM, MIND, and Alibaba-iFashion using full-rank Recall@20 and NDCG@20 comparisons.The data use a 70%/10%/20% train-tuning-test split and 10-Core preprocessing.
  • Overall Evaluation: KGRec consistently outperforms all baseline models on both metrics across all three datasets.The comparison includes general collaborative filtering, embedding-based knowledge-aware, and graph-based recommender models.
  • Ablation Study: Rationale-aware masking and reconstruction contributes most to performance enhancement, while rational augmentation and cross-view contrastive learning provide additional benefits.Non-rationale augmented graph contrastive learning can hurt performance on MIND, indicating that noisy contrasting is not always effective.
  • Cold-Start and Sparsity: KGRec outperforms baseline methods across user groups with different interaction counts, including groups with stronger cold-start effects.The study divides Alibaba-iFashion users into five groups, with lower group numbers indicating stronger cold-start effects.
  • Cold-Start and Sparsity: KGRec consistently outperforms baselines across item sparsity groups, supporting its effectiveness for long-tail item representation learning.The authors attribute this result to rationale mining that better leverages external knowledge under data scarcity.
  • Knowledge Graph Robustness: With only partial knowledge graphs, KGRec retains over 95% performance on Last-FM and over 90% on Alibaba-iFashion.The evaluation keeps different proportions of knowledge triplets, ranging from 40% to 70%.

5 RELATED WORK

Knowledge-aware recommendation methods use embeddings, paths, or GNNs to exploit knowledge graphs, while self-supervised learning addresses interaction sparsity. Existing contrastive approaches improve robustness and cross-view learning but insufficiently model knowledge rationales.

  • Knowledge-aware recommenders are categorized into embedding-based, path-based, and GNN-based methods.
  • GNN-based methods unify embedding and path paradigms by capturing high-order information and weighting knowledge neighbors.
  • Self-supervised learning leverages additional signals from raw data to address inherent recommendation data sparsity.
  • KGCL and MCCLK use contrastive learning to mitigate knowledge-graph noise, long-tail problems, and sparse supervision across KG and interaction views.
  • Existing methods do not sufficiently consider the rationales embedded in the knowledge graph.

6 CONCLUSION

KGRec is a graph self-supervised rationalization method that weights knowledge triplets, reconstructs rational knowledge, and uses rationale scores for cross-view contrastive learning. Experiments validate its advantages over state-of-the-art solutions.

  • KGRec weights knowledge triplets through attentive knowledge rationalization and emphasizes rational knowledge with rational masking and reconstruction.
  • Rationale scores support knowledge-aware cross-view contrastive learning by filtering low-scored, less informative knowledge as noise.
  • Extensive experiments validate KGRec’s advantages against state-of-the-art solutions.
  • Future work will explore graph structure learning and graph sparsification for more complex knowledge graph rationalization.

A.1 Sensitivity to Key Hyperparameters

KGRec’s optimal masking, graph-augmentation, and contrastive-temperature settings depend on dataset characteristics. The study provides dataset-specific settings and practical tuning ranges while noting sensitivity to optimal selection.

  • KGRec’s sensitivity study varies masking size k_m, CL graph-augmentation keep ratio ρ, and CL temperature τ.
  • A masking size of 512 is ideal for MIND and Alibaba-iFashion, whereas 256 is optimal for Last-FM.
  • A CL keep ratio of 0.5 is best for Last-FM and Alibaba-iFashion.
  • Recommended CL temperatures are 0.1 for MIND, 0.3 for Alibaba-iFashion, and 0.9 for Last-FM.
  • The authors suggest tuning masking size within [128, 512] and CL keep ratio within [0.4, 0.6] for other datasets.

A.2 Explainability Study

The explainability study examines rationale scores for knowledge-graph relations associated with news categories and user interests. Examples show how KGRec distinguishes personalized rationale connections and strengthens them through masking reconstruction and contrastive learning.

  • The study averages learned rationale scores by relation for triplets connected to MIND news items within preset categories.
  • Sports preferences rationalize league-category and team relations in the knowledge graph.
  • Political-news preferences rationalize partisan orientation and political-figure-position relations.
  • Masking reconstruction and cross-view rationale contrastive learning emphasize and strengthen connections reflecting user interests.
  • The rationalized graph and KGRec architecture provide a structured framework for personalized recommendation that considers user preferences and interests.
Loading 2307.02759v1…