Integrating LLM-Derived Multi-Semantic Intent into Graph Model for Session-based Recommendation

Shuo Zhang, Xiao Li, Jiayi Wu, Fan Yang, Xiang Li, Ming GaoarXiv 2025 · DOI

Abstract

Session-based recommendation (SBR) focuses on predicting a user's next interaction based on short-term sequences. While Graph Neural Networks (GNNs) excel at capturing structural transitions between item IDs, they often fail to grasp the underlying semantic reasoning—the "why" behind a user's choices. This paper introduces LLM-DMsRec, a framework that bridges this "semantic gap" by integrating Large Language Model (LLM) insights into GNN-based recommenders. By extracting explicit and latent user intents and aligning them with structural embeddings via KL divergence, the proposed method significantly enhances recommendation quality, achieving up to a 42.56% improvement in MRR@5 on benchmark datasets.

Introduction: The Semantic Gap in SBR

Traditional session-based recommendation systems primarily rely on Graph Neural Networks to model item transitions. These models treat sessions as sequences of anonymous IDs, effectively capturing structural patterns but ignoring the rich semantic context. For instance, a sequence involving a smartphone, wireless earbuds, and a smartwatch suggests a broader intent toward a "tech ecosystem" rather than just a random string of products.

Conceptual comparison between traditional GNN-based recommendation and the proposed LLM-augmented approach.

As shown in Figure 1, traditional methods (a) map item IDs directly to predictions. In contrast, the proposed approach (b) leverages an LLM to infer multi-semantic intents from item text, providing a deeper understanding of user behavior (c) that distinguishes between immediate needs (explicit intent) and potential future interests (latent intent).

Methodology: The LLM-DMsRec Framework

The LLM-DMsRec framework operates in three distinct phases designed to combine the structural precision of GNNs with the reasoning capabilities of LLMs while mitigating common issues like LLM hallucinations.

The three-phase architecture of LLM-DMsRec: Candidate Selection, Intent Inference, and Intent Alignment.

Phase I: Candidate Item Selection

To prevent the LLM from suggesting non-existent or irrelevant items (hallucinations), the system first employs a pre-trained GNN to generate a "knowledge base" of the top-50 most likely items. This restricts the LLM's reasoning space to a vetted set of candidates.

Phase II: Multi-Semantic Intent Inference

Using Qwen2.5-7B-Instruct, the model analyzes the text descriptions of items in the session. It categorizes inferred intents into two types:

  • Explicit Intent: Items or categories directly related to the current session (e.g., "more audio accessories").
  • Latent Intent: Complementary items not yet seen but logically related (e.g., "a charging dock for the devices").

Phase III: Intent Alignment and Training

The inferred text-based intents are encoded using BERT. Because the LLM's semantic space and the GNN's structural space differ, the authors utilize Kullback-Leibler (KL) divergence to align these two distributions. This ensures that the semantic insights from the LLM effectively inform the structural patterns learned by the GNN during the final prediction phase.

Experimental Results

The framework was evaluated on the Beauty (Amazon) and ML-1M (MovieLens) datasets, serving as a plug-in for various GNN backbones including SR-GNN and GCE-GNN.

Key Findings

  • Ranking Quality: The integration of LLM-DMsRec led to massive gains in ranking metrics. On the Beauty dataset, MRR@5 improved by 42.56% when applied to the GCE-GNN model.
  • Precision at the Top: The model showed its strongest performance at small values of K (e.g., Top-5), suggesting that semantic reasoning is particularly effective at identifying the most relevant "bullseye" items.
  • Ablation Success: Studies confirmed that the KL divergence alignment is critical; simply adding LLM features as raw input without proper distribution alignment yields significantly lower performance.

Conclusion and Future Work

LLM-DMsRec demonstrates that LLMs can serve as powerful reasoning engines for recommendation systems when properly constrained and aligned with traditional graph models. While the framework sets new benchmarks for accuracy, future work will address the computational overhead of running 7B-parameter models in real-time and refining prompts to further reduce semantic noise in long-tail recommendations.

Summary updated

BibTeX
@misc{zhang2025integrating,
  author = {Shuo Zhang and Xiao Li and Jiayi Wu and Fan Yang and Xiang Li and Ming Gao},
  title = {{Integrating LLM-Derived Multi-Semantic Intent into Graph Model for Session-based Recommendation}},
  year = {2025},
  eprint = {2507.20147},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.20147},
}
Figure