Multi-view Intent Learning and Alignment with Large Language Models for Session-based Recommendation

Shutong Qiao, Wei Zhou, Junhao Wen, Chen Gao, Qun Luo, Peixuan Chen, Yong Li

TL;DR

This paper introduces LLM4SBR, a novel two-stage framework that leverages Large Language Models (LLMs) to enhance Session-Based Recommendation (SBR). By integrating multi-view semantic inferences from LLMs with traditional behavioral modeling, LLM4SBR significantly improves recommendation performance, especially in sparse and anonymous session data scenarios, while maintaining efficiency.

What Problem Does This Paper Address?

Session-based recommendation (SBR) systems aim to predict a user's next action based on their recent interaction history within a session. Traditional SBR methods often struggle with data sparsity and the anonymity of session data, limiting their ability to capture nuanced user intent. While Large Language Models (LLMs) offer powerful semantic understanding capabilities, their direct application to SBR is hindered by high computational costs, latency, and challenges in handling short, anonymous sequences. This paper addresses the need for a lightweight and effective framework that can seamlessly integrate LLMs into SBR to leverage rich semantic information without sacrificing efficiency.

Methods

The proposed LLM4SBR framework operates in two stages:

  1. Intent Inference Stage:
    • Multi-view Prompts: LLMs are guided by carefully designed prompts to infer user intents from different perspectives (e.g., long-term vs. short-term interests). This multi-view approach aims to capture a more comprehensive understanding of user intent.
  2. Intent Localization Module: To mitigate LLM hallucinations and enhance semantic accuracy, a novel intent localization module is introduced. This module uses BERT embeddings to compute cosine similarities between LLM inference results and item descriptions, selecting the most relevant items to refine the inference.
  3. Representation Enhancement Stage:
    • Behavioral Modeling: Traditional SBR models (like SR-GNN) are used to process interaction data and learn session embeddings.
  4. Alignment and Fusion: The semantic embeddings from LLM inference are aligned and unified with the behavioral embeddings from the SBR model. This is done separately for each view (long-term and short-term) to ensure a more principled integration. Finally, these aligned representations are fused to create a comprehensive session representation for prediction.

This two-stage design separates the computationally intensive LLM inference from the SBR model training, leading to a more efficient and plug-and-play framework.

Datasets

The authors utilized two datasets, adapted for session-based recommendation:

  • Beauty: Originally from the Sequential Recommendation domain, this dataset was processed to form session sequences.
  • MovieLens-1M (MI-1M): Also from the Sequential Recommendation domain, this dataset was processed using 10-minute intervals to segment user sequences into sessions.

These datasets were chosen because they provide both interaction ID sequences and item name information, which is crucial for the LLM-enhanced approach.

Key Insights and Ideas

  • LLMs Alone Are Insufficient for SBR: Directly using LLM inference results for recommendation tasks performs poorly, highlighting the necessity of integrating them with established SBR models that excel at capturing behavioral patterns and item relationships.
  • Multi-view Inference is Crucial: Considering both long-term and short-term user interests through distinct LLM prompts significantly enhances recommendation performance, demonstrating that neither view alone is sufficient.
  • Intent Localization Mitigates Hallucinations: The proposed intent localization module effectively addresses LLM hallucinations and improves the accuracy of semantic inferences, which is vital for reliable recommendations.
  • Alignment is Key for Modality Fusion: Aligning and unifying representations from different modalities (semantic and behavioral) before fusion leads to better performance than direct fusion, suggesting a more structured approach to multimodal integration.
  • Plug-and-Play Framework: The modular design of LLM4SBR allows it to be easily integrated with existing SBR models, making it a versatile tool for researchers and practitioners.

Key Results

  • Significant Performance Improvement: LLM4SBR consistently improved the performance of various backbone SBR models (e.g., GRU4Rec, SASRec, SR-GNN) across multiple metrics (P@K, MRR@K, NDCG@K). For instance, P@5 on the MI-1M dataset for SR-GNN increased by 83.93% after being enhanced by LLM4SBR.
  • Better Performance with Smaller K: The framework showed greater improvements for smaller values of K (e.g., P@5), suggesting that the semantic enhancement is particularly effective for predicting the immediate next items.
  • Efficiency Gains: Despite using LLMs, the two-stage approach and the fact that LLM inference is done offline before SBR training, resulted in comparable training times and GPU usage to traditional SBR models, making it practical for real-world applications.
  • LLM Size Matters, but Smaller LLMs are Viable: While larger LLMs can provide more comprehensive inferences, even smaller models (like Qwen1.5-7B-Chat) demonstrated significant performance improvements when integrated into LLM4SBR, showcasing the framework's flexibility.

Limitations and Future Work

  • LLM Hallucinations: While the intent localization module helps, LLMs can still generate inferences outside the user's sequence, especially larger models. The framework's design, however, effectively constrains this.
  • Dataset Limitations: The authors had to adapt existing datasets due to the lack of readily available SBR datasets with both interaction IDs and item names.
  • Future Work:
    • Exploring additional LLM inference views and utilizing LLM Agents for logical inference.
  • Investigating the application of LLM for other downstream tasks beyond SBR.
  • Further research into the optimal integration of LLMs with recommender systems to open new avenues in the field.

Summary updated

BibTeX
@article{qiao2025multi,
  author = {Shutong Qiao and Wei Zhou and Junhao Wen and Chen Gao and Qun Luo and Peixuan Chen and Yong Li},
  title = {{Multi-view Intent Learning and Alignment with Large Language Models for Session-based Recommendation}},
  journal = {ACM Trans. Information Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=atuUjMU6X6},
}
Figure