GOT4Rec: Graph of Thoughts for Sequential Recommendation

Zewen Long, Liang Wang 0001, Shu Wu, Qiang Liu, Liang Wang 0056arXiv 2024 · DOI · arXiv

Introduction

Sequential recommendation aims to predict a user's next interaction by analyzing their chronological history. While Large Language Models (LLMs) possess vast world knowledge, standard "input-output" prompting often fails to effectively bridge this general knowledge with specific recommendation tasks. Existing advanced strategies like Chain-of-Thought (CoT) allow LLMs to "think" step-by-step, but their linear nature is a significant bottleneck. A single chain often fixates on narrow aspects of a user's history, such as the most recent purchase, while ignoring broader patterns or collaborative signals from similar users.

To address these limitations, the GOT4Rec framework models the recommendation process as a directed graph of "thoughts." By decomposing complex user histories into manageable sub-tasks across multiple reasoning branches, GOT4Rec enables LLMs to aggregate diverse preference signals more effectively than linear methods, outperforming state-of-the-art baselines by an average of 37.11%.

The GOT4Rec Framework

The core of GOT4Rec is its ability to perform networked reasoning through three distinct pipelines:

  1. Short-Term Reasoning: This branch focuses on the most recent interactions to capture immediate user needs or "cravings."
  2. Long-Term Reasoning: This branch analyzes the entire interaction sequence to identify stable, underlying preferences, such as brand loyalty or specific dietary requirements.
  3. Collaborative Reasoning: Utilizing a retrieval module, this branch identifies sequences from similar users, allowing the LLM to leverage "wisdom of the crowd" patterns.
The GOT4Rec framework decomposes recommendation into short-term, long-term, and collaborative reasoning branches.

The Graph of Thoughts (GoT) process involves three key stages:

  • Generation: The LLM generates multiple "thoughts" for each branch, such as identifying preference factors and selecting relevant categories.
  • Aggregation & Voting: Instead of relying on a single output, the model aggregates results from all branches. The LLM then "votes" on the best items to produce a final recommendation list.
  • Multi-Level Retrieval: To ensure natural language outputs correspond to actual database items, a two-level retrieval approach (Sequence-level and Item-level) is employed, powered by the all-mpnet-base-v2 embedding model.

Experimental Evaluation

The model was evaluated using the Amazon Reviews ’23 dataset across three domains: Video Games (Games), Grocery and Gourmet Food (Food), and Home and Kitchen (Home). The evaluation followed a "leave-one-out" strategy, focusing on users with 6 to 20 interactions.

Performance Results

GOT4Rec consistently outperformed both traditional neural models (e.g., SASRec) and state-of-the-art LLM-based strategies (e.g., SLIM, CoT-SC, and ToT).

GOT4Rec demonstrates significant performance improvements across Games, Food, and Home datasets compared to various baselines.

Key findings from the results include:

  • Substantial Gains: In the Food dataset, GOT4Rec achieved a remarkable 73.93% improvement in NDCG@10 over the best LLM baseline (CoT-SC).
  • Domain Sensitivity: Ablation studies indicated that different reasoning branches vary in importance by domain. Short-term interests were paramount in the Food category, while collaborative signals were strongest in Games.
  • Popularity Bias Mitigation: By leveraging deep semantic understanding, GOT4Rec is significantly better at discovering "tail" items (niche products) compared to traditional models that often favor popular "head" items.

Conclusion

GOT4Rec demonstrates that networked reasoning is superior to linear prompting for complex recommendation tasks. By allowing an LLM to reason independently about short-term, long-term, and collaborative data before merging these "thoughts," the framework avoids the "tunnel vision" inherent in standard CoT. While the computational cost of multi-branch LLM reasoning remains a challenge, the significant accuracy gains and the ability to mitigate popularity bias mark a major step forward in LLM-based recommendation systems.

Summary updated

Abstract

With their vast open-world knowledge and reasoning abilities, large language models (LLMs) have become a promising tool for sequential recommendation. Researchers have explored various methods to harness these capabilities, but most existing approaches rely on simple input-output prompting, failing to effectively bridge the gap between LLMs' general knowledge and the specific needs of recommendation tasks. While reasoning strategies like chain-of-thought (CoT) have been introduced to enhance performance, they often produce inaccurate recommendations due to underutilized user preference information and insufficient reasoning depth. To address these challenges, we propose GOT4Rec, a novel sequential recommendation method leveraging the graph of thoughts (GoT) reasoning strategy. Our method focuses on three key types of information in user histories: short-term interests, long-term interests and collaborative information from other users. It enables LLMs to reason independently and generate recommendations, subsequently aggregating results to derive final items. This method allows LLMs, with enhanced reasoning capabilities, to better utilize the user sequence information, producing more accurate recommendations and comprehensive explanations. Extensive experiments on real-world datasets demonstrate the effectiveness of GOT4Rec, outperforming existing state-of-the-art baselines with an average improvement of 37.11%. Our code is available at https://anonymous.4open.science/r/GOT4Rec.
BibTeX
@misc{long2024got,
  author = {Zewen Long and Liang Wang and Shu Wu and Qiang Liu and Liang Wang},
  title = {{GOT4Rec: Graph of Thoughts for Sequential Recommendation}},
  year = {2024},
  eprint = {2411.14922},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.14922},
}
Figure