NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Prompting-Based Representation Learning Method for Recommendation with Large Language Models

Junyi Chen, Toyotaro SuzumuraarXiv 2024 · DOI

This paper introduces P4R, a framework that combines the deep semantic understanding of Large Language Models (LLMs) with the structural efficiency of Graph Convolutional Networks (GCNs). P4R enhances recommender systems by using LLMs to generate rich, reasoning-based item profiles that are converted into semantic embeddings and aligned with a GCN to improve collaborative filtering.

Introduction

Traditional recommender systems often rely on "ID-based" collaborative filtering, which models user-item relationships as a bipartite graph. While Graph Convolutional Networks (GCNs) have improved this approach, they often ignore the "why" behind an interaction, missing out on rich textual metadata like item descriptions, user reviews, and categories.

Conversely, while LLMs possess vast external knowledge, using them directly as recommenders is computationally expensive and prone to hallucinations. P4R addresses this by bridging the gap between high-level semantic text features and the low-level interaction data used in collaborative filtering.

Methodology

The P4R (Prompting-Based Representation Learning for Recommendation) framework operates in two main stages:

  1. Profile Generation (The LLM Step): Using Llama-2-7b-chat, the system processes contextual attributes through a specialized prompt. This prompt distinguishes between Intrinsic information (stable facts like name and category) and Extrinsic information (subjective data like ratings). The LLM generates a profile consisting of a summary, user preference predictions, and a logical reasoning component.
  2. Textual Embedding and GCN Alignment: These profiles are passed through a pre-trained BERT-110M model and a Fully Connected (FC) layer to create semantic embeddings. These embeddings are then integrated into a GCN framework where neighborhood aggregation propagates these rich features across the user-item interaction graph. The system is optimized using Bayesian Personalized Ranking (BPR) loss.
The P4R framework architecture, illustrating the two-step process of profile representation learning and GNN-based alignment.

Experimental Setup

The researchers evaluated P4R on two popular open-source datasets characterized by high sparsity (over 99%):

  • Yelp2018: A cross-domain business dataset with 767 users and 3,647 items.
  • Amazon-VideoGames: A niche dataset focused on gaming products with 795 users and 6,627 items.

Key Results and Insights

P4R was compared against state-of-the-art baselines including NGCF, LightGCN, and SGL. Experimental results show that P4R consistently outperformed all baselines across metrics like Recall, NDCG (Normalized Discounted Cumulative Gain), and MRR (Mean Reciprocal Rank).

Performance comparison of P4R against baseline models on Yelp and Amazon-VideoGames datasets.

Key insights from the evaluation include:

  • Reasoning as a Feature: By forcing the LLM to provide "Recommendation-Oriented Reasoning," the resulting embeddings capture the logic of user appeal rather than just keywords.
  • Efficiency through Inference: Unlike methods requiring LLM fine-tuning, P4R uses the LLM for one-time profile generation, making it more accessible for practical deployment.
  • Embedding Capacity: Performance consistently improved as embedding size increased (from 32 to 256), suggesting that LLM-generated profiles contain dense semantic information that benefits from higher-dimensional representations.

Conclusion

P4R demonstrates that LLM-driven semantic profiles can significantly boost the performance of graph-based recommender systems, outperforming traditional models by up to 8.4%. Future work may involve incorporating sequential interaction data to capture evolving user interests and exploring larger LLMs for even more detailed profile generation.

Summary updated

BibTeX
@misc{chen2024prompting,
  author = {Junyi Chen and Toyotaro Suzumura},
  title = {{A Prompting-Based Representation Learning Method for Recommendation with Large Language Models}},
  year = {2024},
  eprint = {2409.16674},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.16674},
}
Figure