Abstract
Knowledge Graphs (KGs) significantly enhance the semantic understanding of recommender systems but are often plagued by noise, incompleteness, and high maintenance costs. This paper introduces CKG-LLMA, a novel framework that utilizes Large Language Models (LLMs) to clean and augment KGs through targeted subgraph extraction. To address the inherent risks of LLM hallucinations, CKG-LLMA incorporates a learnable confidence mechanism that dynamically filters unreliable triplets during graph aggregation. Our evaluation across three benchmark datasets—Amazon-Book, Steam, and Anime—demonstrates that CKG-LLMA consistently outperforms state-of-the-art baselines while providing grounded, natural-language explanations for its recommendations.
Introduction
Recommender systems increasingly rely on Knowledge Graphs to capture intricate relationships between users, items, and their attributes. However, real-world KGs frequently contain outdated or irrelevant links and suffer from missing information. While Large Language Models (LLMs) possess the reasoning capabilities to address these issues, their integration into KG-based recommendation faces two primary hurdles: context window constraints (token limits) and the propensity for hallucinations. CKG-LLMA overcomes these challenges by processing targeted subgraphs and employing a mathematical "safety net" to filter generated noise.
Methodology
The CKG-LLMA framework is composed of four integrated components designed to maximize the utility of LLM reasoning while maintaining system robustness.
- LLM-based Subgraph Augmenter: To manage token limits, the system extracts localized subgraphs based on user-item interactions. These subgraphs are presented to an LLM (e.g., GPT-3.5) to suggest the addition of missing factual links or the deletion of irrelevant ones.
- Confidence-aware MOE Message Propagation: Recognizing that LLMs can hallucinate, we implement a Mixture-of-Experts (MoE) layer. This layer assigns a learnable confidence score to every triplet in the augmented graph. Edges with low confidence are dynamically pruned during the message-passing phase of the Graph Convolutional Network (GCN).
- Dual-view Contrastive Learning: The framework constructs two distinct augmented views of the interaction graph—one based on LLM suggestions and another refined by confidence scores. Contrastive learning is then applied to ensure the model learns user and item representations that are resilient to graph noise.
- Confidence-aware Explanation Generation: The learned confidence scores serve a dual purpose by grounding the LLM's explanation generation. By feeding these scores back to the LLM, the system generates explanations based on the actual logic used by the recommendation engine rather than speculative reasoning.
Experimental Results
We evaluated CKG-LLMA against 11 baseline models, including traditional collaborative filtering and advanced GNN-based methods.
Performance Comparison
CKG-LLMA achieved state-of-the-art results across all tested datasets. On the Amazon-Book dataset, it reached a Recall@10 of 0.1883 and an NDCG@10 of 0.1592, surpassing top-tier models like KGRec and RLMRec. Ablation studies confirmed the necessity of the confidence mechanism; removing it led to a significant performance drop (e.g., Recall on Amazon-Book fell to 0.1773), highlighting the critical role of filtering LLM-induced noise.
Sensitivity to Augmentation Ratios
A key finding of our study is the model's robustness to varying levels of LLM-suggested edits. As shown in the sensitivity analysis, performance typically peaks when incorporating approximately 60-70% of suggested additions.
The results indicate that while LLM suggestions are valuable, blind acceptance of all generated triplets (Add Ratio = 1.0) or excessive pruning (high Delete Ratio) can lead to sub-optimal performance. The learnable confidence scores effectively navigate this trade-off.
Conclusion
CKG-LLMA demonstrates a scalable and cost-effective method for integrating LLM reasoning into KG-based recommendation. By using LLMs for offline preprocessing and employing a learnable confidence filter, the framework achieves superior accuracy and explainability without the high latency or hallucination risks typically associated with LLM-based systems. Future work will explore the use of open-source LLMs to further reduce operational costs and enhance data privacy.
Summary updated