Source-linked AI summary
Knowledge Graph Contrastive Learning for Recommendation
Yuhao Yang, Chao Huang, Lianghao Xia, Chenliang Li
TL;DR
KG-enhanced recommendation is challenged by sparse long-tail entities and noisy, topic-irrelevant connections that distort item representations. KGCL combines knowledge-graph augmentation, denoising, and cross-view contrastive learning, and consistently outperforms state-of-the-art methods across three public datasets.
Problem
Long-tail and noisy knowledge graphs provide sparse supervision and topic-irrelevant connections, limiting accurate knowledge-aware item and preference representations.
Method
KGCL uses knowledge-graph-guided topology denoising and cross-view contrastive learning jointly with user–item interaction modeling.
Results
KGCL consistently outperforms various state-of-the-art recommendation methods across three public datasets and settings.
Takeaways & Limitations
Knowledge-graph augmentation supplies self-supervised signals that guide robust user and item representation learning under noisy recommendation data.
Takeaways & Limitations
Without knowledge-graph denoising, noisy entity-dependent information can create false hard negatives that produce large optimization gradients.
Abstract
from arXiv · showhide
Knowledge Graphs (KGs) have been utilized as useful side information to improve recommendation quality. In those recommender systems, knowledge graph information often contains fruitful facts and inherent semantic relatedness among items. However, the success of such methods relies on the high quality knowledge graphs, and may not learn quality representations with two challenges: i) The long-tail distribution of entities results in sparse supervision signals for KG-enhanced item representation; ii) Real-world knowledge graphs are often noisy and contain topic-irrelevant connections between items and entities. Such KG sparsity and noise make the item-entity dependent relations deviate from reflecting their true characteristics, which significantly amplifies the noise effect and hinders the accurate representation of user's preference. To fill this research gap, we design a general Knowledge Graph Contrastive Learning framework (KGCL) that alleviates the information noise for knowledge graph-enhanced recommender systems. Specifically, we propose a knowledge graph augmentation schema to suppress KG noise in information aggregation, and derive more robust knowledge-aware representations for items. In addition, we exploit additional supervision signals from the KG augmentation process to guide a cross-view contrastive learning paradigm, giving a greater role to unbiased user-item interactions in gradient descent and further suppressing the noise. Extensive experiments on three public datasets demonstrate the consistent superiority of our KGCL over state-of-the-art techniques. KGCL also achieves strong performance in recommendation scenarios with sparse user-item interactions, long-tail and noisy KG entities. Our implementation codes are available at https://github.com/yuh-yang/KGCL-SIGIR22
1 INTRODUCTION
KG-enhanced recommendation can improve preference modeling but remains vulnerable to sparse, long-tail, and topic-irrelevant knowledge-graph information. KGCL addresses these issues by combining topology denoising with cross-view contrastive learning and reports consistent superiority across public datasets.
- Collaborative filtering methods still suffer from data scarcity, motivating knowledge graphs as external information for enhancing recommendation.
- Real-world knowledge graphs exhibit long-tail entity distributions and topic-irrelevant item–entity connections that make item representation vulnerable to noise.Long-tail entities receive insufficient triplets for accurately modeling semantic transitions, while unrelated connections can distort item semantics.
- KG noise harms item representations locally through low-quality neighbor aggregation and globally through over-smoothing via popular entities.The motivating example connects Zack Wheeler to semantically irrelevant entities such as Smyrna, GA and UCL Reconstruction.
- KGCL uses knowledge-graph-guided topological denoising and cross-view contrastive objectives to refine user and item representations.The framework learns to drop irrelevant KG triplets and items based on structural consistency and is jointly optimized with graph neural collaborative filtering.
- KGCL integrates knowledge-graph learning and user–item interaction modeling under a joint self-supervised learning paradigm.
- Experiments on three public datasets show that KGCL consistently outperforms various state-of-the-art recommendation methods.The contribution summary also reports ablation analyses supporting the rationality of its key components.
2 PRELIMINARIES
The task combines user–item interaction data with an item knowledge graph to learn a function that forecasts users’ likely future interactions. The formulation emphasizes extracting useful item knowledge despite noisy and irrelevant entities and relations.
- The user–item interaction matrix records whether each user has previously adopted each item through actions such as clicks, reviews, or purchases.
- The interaction matrix is converted into a graph whose nodes are users and items, with edges representing observed positive interactions.
- The knowledge graph organizes external item attributes through entity–relation–entity triplets and supplies facts and connections among items.
- The task learns a function from user–item interactions and item knowledge to forecast items each user would like to interact with.The formulation treats the model parameters as part of the learned function.
- Because knowledge graphs contain noisy and item-irrelevant entities and relations, the framework seeks topology denoising to distill informative guidance for user and item representations.
3 METHODOLOGY
KGCL’s overall architecture combines knowledge-graph-guided contrastive learning with a graph-based recommendation architecture. The paper presents the architecture first and then develops its technical components in subsequent subsections.
- KGCL’s overall architecture is presented in Figure 3.
- The framework combines knowledge-graph-guided contrastive learning with a graph neural collaborative filtering architecture.
- Technical details of the architecture are discussed in the following subsections.
3.1 Relation-aware Knowledge Aggregation
KGCL first models heterogeneous item–entity relations with relation-aware attention and further trains the aggregator with TransE. This combination produces context-sensitive aggregation while strengthening multi-relational semantic representations.
- The relation-aware knowledge embedding layer captures heterogeneous knowledge-graph connection structures using entity- and relation-dependent context.Parameterized attention replaces manually designed path generation and projects contextual information into specific representations.
- Attention weights estimate the relevance of each neighboring entity and relation to the target item during knowledge aggregation.The mechanism distinguishes relationship semantics between an item and its neighboring entity.
- The aggregation layer uses a parametric weight matrix and LeakyReLU to transform item–entity representations nonlinearly.
- Alternative training between the relation-aware aggregator and TransE enhances the multi-relational semantic representation space for entity–item dependencies.TransE encourages the head and relation embeddings to approach the tail representation under an L1-based similarity function.
- TransE generates negative samples by randomly replacing the tail entity in observed knowledge-graph triplets.
3.2 Knowledge Graph Augmentation
KGCL generates two stochastic knowledge-graph views and measures each item’s structural consistency across them. This consistency identifies items less sensitive to topology changes and guides noise-aware representation learning.
- Noise-aware learning: KGCL bridges knowledge-graph embedding and contrastive learning through auxiliary self-supervised signals that maximize agreement between augmented views.The framework uses knowledge-graph context to refine user and item representations with contrastive objectives.
- Knowledge-graph views: KGCL uses stochastic augmentation to generate two correlated knowledge-graph views for contrastive learning.The augmentation operator η(·) produces η1(Gk) and η2(Gk) by sampling knowledge triplets.
- Noise-aware learning: The augmentation scheme aims to identify less ambiguous items that better capture correlated users’ preferences.Items less sensitive to structural variation are treated as more useful for preference modeling.
- Structure consistency: Each item’s knowledge-graph structure consistency is computed from agreement between representations encoded from the two augmented views.The relation-aware aggregator produces view-specific item embeddings, whose cosine similarity estimates consistency.
- Structure consistency: Higher consistency indicates lower sensitivity to topological changes and greater tolerance to noisy entity connections.Items more affected by KG noise are expected to receive lower consistency scores than less affected items.
3.3 Knowledge-Guided Contrastive Learning
KGCL uses knowledge-guided augmentation to create interaction-graph views and combines them with augmented knowledge-graph views. Cross-view contrastive learning then jointly refines recommendation representations while emphasizing interactions associated with more consistent item structures.
- Overview: KGCL integrates knowledge-graph augmentation with graph contrastive learning to improve graph-based collaborative filtering robustness and representation ability.The design transfers denoised item knowledge into user-preference learning and alleviates sparse supervision.
- Interaction-graph augmentation: Unlike purely random dropout, KGCL guides interaction-graph augmentation using estimated knowledge-graph structure consistency.This guidance is intended to retain interactions that better characterize user preference with less bias.
- Interaction-graph augmentation: Items with higher structure consistency receive greater influence in modeling users’ real interests during interaction augmentation.Item-specific consistency scores determine interaction-edge dropout probabilities after normalization.
- Interaction-graph augmentation: The operator φ(·) creates augmented interaction graphs by dropping user-item edges according to inferred probabilities.Two Bernoulli masking vectors are applied to the interaction graph to produce separate views.
- Joint encoding: KGCL forms two knowledge-guided corrupted graphs by combining augmented knowledge subgraphs with consistency-guided interaction graphs.Users and items are then encoded with graph-based collaborative filtering and relation-aware knowledge aggregation.
- Knowledge-aware co-contrastive learning: Contrastive learning treats corresponding user or item embeddings across views as positives and different-node representations as negatives.The InfoNCE-based objective uses cosine similarity and temperature τ to encourage agreement between positive pairs.
3.4 Model Analysis of KGCL
KGCL uses knowledge-graph structure to improve contrastive learning by distinguishing hard negatives and reducing the influence of noisy entity-dependent information. Its design also adds modest computational overhead for knowledge aggregation and augmentation.
- Theoretical Discussion of KGCL: High-similarity hard negatives can produce much larger contrastive gradients than easy negatives.For 0.7 ≤ s ≤ 0.9, the gradient approaches 40 when τ is 0.2 or 0.3.
- Theoretical Discussion of KGCL: KGCL uses knowledge-graph structural consistency to guide edge dropout in the user-item interaction graph.The augmentation drops noisy knowledge-graph triplets and improves hard-negative discrimination.
- Theoretical Discussion of KGCL: Without knowledge-graph denoising, noisy entity-dependent information can create false hard negatives that exert large optimization gradients.KGCL alleviates this effect through contrastive augmentation functions.
- Theoretical Discussion of KGCL: The resulting more accurate gradients improve the robustness of knowledge-aware recommender systems.This follows from enhancing discrimination between true and false hard negatives.
- Theoretical Discussion of KGCL: Knowledge aggregation requires O(|E_k| × d) calculations, while knowledge-graph augmentation requires O(|E_k| + |V| × d) time.The aggregation module also adds O(B_t × d) time for TransE knowledge-graph embedding.
4 EXPERIMENTS
The experiments evaluate KGCL on three public recommendation datasets using all-ranking Recall@N and NDCG@N, alongside collaborative-filtering, graph-based, self-supervised, and knowledge-aware baselines. KGCL consistently outperforms the compared methods, while its augmentation components and knowledge-guided contrastive learning support the reported gains.
- Experimental Setup: Experiments use Yelp2018, Amazon-Book, and MIND, covering business venue, product, and news recommendation.The datasets differ in interaction sparsity and knowledge-graph characteristics.
- Experimental Setup: Recall@N and NDCG@N evaluate top-N recommendation under all-ranking, with N=20 as the default.All non-interacted items are treated as negative samples for each target user.
- Baselines for Comparison: The baseline set spans conventional, neural, graph-based, self-supervised, embedding-based, path-based, and GNN-based knowledge-aware recommenders.Examples include BPR, NCF, LightGCN, SGL, CKE, RippleNet, KGCN, KGAT, KGIN, and CKAN.
- Performance Comparison: KGCL consistently performs better than the other baselines across datasets, sparsity degrees, knowledge-graph characteristics, and recommendation scenarios.The reported results support the generality and flexibility of the framework.
- Ablation and Impact Studies: The performance superiority of KGCL is reported across all model variants in the impact study.This result concerns the knowledge-guided contrastive learning and knowledge-graph contrastive components evaluated in Table 3.
- Performance Comparison: KGCL’s reported improvements are attributed to denoising entity-dependent relationships and using distilled item knowledge to guide interaction-data augmentation.The framework combines knowledge-graph contrastive learning with self-supervised signals from user-item interactions.
4.3 Ablation Study of KGCL Framework (RQ2)
The ablation study finds that both knowledge-guided interaction-graph contrastive learning and knowledge-graph contrastive learning contribute to KGCL’s recommendation performance. Additional evaluations show robustness across sparse interactions, long-tail items, noisy knowledge graphs, and qualitative ranking cases.
- Ablation results: Both knowledge-guided contrastive components improve KGCL’s recommendation performance when included in the framework.Removing either the interaction-graph augmentation or knowledge-graph contrastive learning component reduces performance relative to the complete model.
- Hyper-parameter sensitivity: KGCL achieves its best reported performance with λ1 = 0.1 and τ = 0.2.λ1 controls contrastive regularization strength, while τ controls hard-negative sampling.
- Sparse interactions: KGCL is evaluated on sparse users, defined as users with fewer than 20 interactions in Yelp2018 and Amazon-Book and five interactions in MIND.The sparse-user results are reported in Figure 6.
- Long-tail items: KGCL improves recommendation performance for long-tail items and alleviates popularity bias compared with competing methods.Items are divided into five equal-sized groups ordered by increasing interaction density; results are shown in Figure 5.
- Knowledge-graph noise: KGCL consistently outperforms SGL and improves performance under knowledge-graph noise and long-tail entity conditions.The study injects noisy triplets and evaluates items connected with long-tail knowledge-graph entities, with results reported in Table 5 and Figure 7.
- Case studies: In case studies, KGCL ranks semantically relevant news more effectively after suppressing misleading entities and connections.For the Kevin Spacey example, KGCL ranks news about Cuba Gooding Jr. and The Hunchback of Notre Dame rather than unrelated nationality and politics topics; Figure 8 visualizes the comparisons.
5 RELATED WORK
Related work covers knowledge-graph-enhanced recommendation and contrastive learning for recommender systems. KG-enhanced methods use entity embeddings or meta-paths, while contrastive approaches learn representations by comparing samples across views.
- Knowledge Graph-enhanced Recommendation: Embedding-based recommendation methods use knowledge-graph relations and entities to enhance semantic representations, often with transition-based embedding constraints.CKE is cited as an example that combines structural, textual, and visual side information.
- Knowledge Graph-enhanced Recommendation: Path-based methods construct meta-paths to propagate information and capture higher-order knowledge-aware dependencies between items.MCRec is described as using meta-path-based mutual attention for top-N recommendation.
- Contrastive Learning for Recommender System: Contrastive learning provides self-supervised signals by contrasting positive and negative samples from different views, including in recommendation.The related work identifies SGL as a recommendation approach using dropout operations.
6 CONCLUSION
KGCL explores knowledge-graph semantics through knowledge-guided contrastive learning to address data noise in recommendation. Experiments on real-world datasets report superiority over various state-of-the-art methods.
- Conclusion: KGCL uses knowledge-guided contrastive learning to explore knowledge-graph semantics and alleviate data noise in recommendation.The framework uses knowledge-aware augmentation to obtain auxiliary self-supervised signals for user-preference learning.