用知识图谱增强大模型推荐,一次推理完成个性化排序。
LlamaRec-LKG-RAG: A Single-Pass, Learnable Knowledge Graph-RAG Framework for LLM-Based Ranking
- 构建用户偏好子图,从行为数据中提取关键关系路径
- 在ML-100K和Amazon Beauty上提升MRR、NDCG和召回率
- 适合想提升推荐可解释性与结构化推理能力的研究者
大语言模型在推荐系统中的应用依赖于检索增强生成框架,但现有方法多采用扁平的相似度检索,未能利用用户-物品交互中的丰富关系结构。本文提出LlamaRec-LKG-RAG,一种单次遍历、端到端可训练的框架,将个性化知识图谱上下文融入基于LLM的推荐排序。该方法在LlamaRec基础上引入轻量级用户偏好模块,从用户行为与物品元数据构建的异构知识图中识别显著关系路径,生成个性化子图并嵌入提示词,通过微调的Llama-2模型实现高效且可解释的统一推理。在ML-100K与Amazon Beauty数据集上的实验表明,该框架在关键排序指标(MRR、NDCG、Recall)上持续优于LlamaRec。结果验证了结构化推理在基于LLM推荐中的关键价值,为下一代可扩展、知识感知的个性化推荐系统奠定基础。代码已开源。
原文摘要 · Abstract (English)
Recent advances in Large Language Models (LLMs) have driven their adoption in recommender systems through Retrieval-Augmented Generation (RAG) frameworks. However, existing RAG approaches predominantly rely on flat, similarity-based retrieval that fails to leverage the rich relational structure inherent in user-item interactions. We introduce LlamaRec-LKG-RAG, a novel single-pass, end-to-end trainable framework that integrates personalized knowledge graph context into LLM-based recommendation ranking. Our approach extends the LlamaRec architecture by incorporating a lightweight user preference module that identifies salient relation paths within a heterogeneous knowledge graph constructed from user behavior and item metadata. These personalized subgraphs are seamlessly integrated into prompts for a fine-tuned Llama-2 model, enabling efficient and interpretable recommendations through a unified inference step. Comprehensive experiments on ML-100K and Amazon Beauty datasets demonstrate consistent improvements over LlamaRec across key ranking metrics (MRR, NDCG, Recall). LlamaRec-LKG-RAG demonstrates the critical value of structured reasoning in LLM-based recommendations and establishes a foundation for scalable, knowledge-aware personalization in next-generation recommender systems. Code is available at~\href{https://github.com/VahidAz/LlamaRec-LKG-RAG}{repository}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。