LLMRG: Improving Recommendations through Large Language Model Reasoning Graphs

Yan Wang, Zhixuan Chu, Xin Ouyang, Simeng Wang, Hongyan Hao, Yue Shen, Jinjie Gu, Siqiao Xue, James Zhang, Qing Cui, Longfei Li, Jun Zhou, Sheng Li

LLMRG: Improving Recommendations through Large Language Model Reasoning Graphs

Abstract

Traditional recommendation systems (RecSys) excel at pattern matching but often lack deep semantic understanding and interpretability. We introduce LLMRG (Large Language Model Reasoning Graphs), a novel framework that utilizes the reasoning power of Large Language Models (LLMs) to build personalized, interpretable graphs of user interests. LLMRG converts behavioral sequences into logical reasoning chains and fuses them with traditional recommendation models. Our approach significantly boosts recommendation accuracy—improving Hit Rate (HR@5) by over 14% on MovieLens-1M—and provides clear explanations for suggested products.

Introduction

Modern recommendation engines typically operate as "black boxes," identifying correlations (e.g., camera buyers often want tripods) without understanding the underlying user motivations. This leads to two primary challenges: a lack of interpretability and a "semantic gap" where models fail to capture higher-level conceptual relationships, such as a user's specific interest in "philosophical sci-fi" rather than just the "sci-fi" genre. While Knowledge Graphs (KGs) offer a partial solution, they are often static and suffer from coverage gaps. LLMRG addresses these issues by using LLMs as dynamic "graph architects" to map the logic behind user behaviors.

Methodology

The LLMRG framework consists of four interlocking modules designed to extract and refine user interest logic:

  1. Chained Graph Reasoning: The LLM processes user profiles and histories to generate "reasoning chains"—logical links explaining how specific attributes lead to observed behaviors.
  2. Divergent Extension: To move beyond reactive modeling, the LLM "imagines" future interests. It predicts plausible future trajectories (e.g., predicting an interest in cerebral thrillers for a fan of complex sci-fi), allowing the system to be proactive.
  3. Self-Verification and Scoring: To mitigate LLM hallucinations, the system employs abductive reasoning. By masking parts of a reasoning chain and asking the LLM to fill them in, the system assigns confidence scores based on prediction accuracy.
  4. Knowledge Base Self-Improvement: To address the latency and cost of LLM APIs, high-quality reasoning chains are cached. This shared "memory" allows the system to reuse logic for similar users, reducing LLM calls by approximately 30%.
The Adaptive Reasoning Architecture of LLMRG, illustrating the flow from interaction sequences to reasoning chains, self-verification, and divergent extension.

The resulting reasoning graphs are encoded into dense vectors using a Graph Neural Network (SR-GNN) and fused with standard sequential recommendation models (e.g., DuoRec) for final item prediction.

Results and Discussion

LLMRG was evaluated on three benchmarks: MovieLens-1M (ML-1M), Amazon Beauty, and Amazon Clothing. The system consistently outperformed state-of-the-art baselines like BERT4Rec and DuoRec. Notably, on the ML-1M dataset, LLMRG (using GPT-4) improved HR@5 by over 14% and NDCG@5 by over 26% compared to the base DuoRec model.

A key insight is that the quality of recommendations scales with the reasoning capability of the underlying LLM; GPT-4 consistently outperformed GPT-3.5. Furthermore, the system performs best on datasets with high "narrative complexity" (like movies), where there is more semantic meaning for the LLM to unpack.

Qualitative comparison of reasoning graphs generated by LLMRG, showing the impact of divergent extension and self-verification.

Ablation studies highlighted the necessity of the Self-Verification module. Without it, the LLM's reasoning can become noisy, potentially degrading the performance of the base recommendation model. The Divergent Extension module also proved vital for capturing multifaceted interests that have not yet appeared in a user's history but are logically consistent with their profile.

Conclusion

LLMRG demonstrates that LLMs can effectively serve as reasoning engines to enhance traditional recommendation systems. By bridging the semantic gap and providing interpretable reasoning paths, LLMRG offers a path toward more intelligent and transparent RecSys. Future work will focus on reducing computational costs by fine-tuning smaller, open-source LLMs and improving the mapping of "imagined" divergent interests to real-world product databases.

Summary updated

BibTeX
@inproceedings{wang2024llmrg,
  author = {Yan Wang and Zhixuan Chu and Xin Ouyang and Simeng Wang and Hongyan Hao and Yue Shen and Jinjie Gu and Siqiao Xue and James Zhang and Qing Cui and Longfei Li and Jun Zhou and Sheng Li},
  title = {{LLMRG: Improving Recommendations through Large Language Model Reasoning Graphs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i17.29887},
}
Figure