Source-linked AI summary

Collaborative Large Language Model for Recommender Systems

Yaochen Zhu, Liang Wu, Qi Guo, Liangjie Hong, Jundong Li

arXiv:2311.01343v4cs.IR

TL;DR

LLM-based recommender systems still struggle to align natural-language modeling with user/item semantics and efficient recommendation. CLLM4Rec integrates ID tokens with pretrained LLMs through soft+hard prompting, mutual regularization, and recommendation-oriented finetuning. The paper reports multifaceted superiority over state-of-the-art methods and potential for efficient recommendations, while focusing on implicit-feedback settings and relying on consistent prompt formulations.

  • Problem

    The semantic gap between natural language and recommendation tasks leaves LLM-based recommenders vulnerable to noisy content modeling and inefficient recommendation processes.

  • Method

    CLLM4Rec extends the LLM vocabulary with user/item ID tokens and uses soft+hard prompting, mutual regularization, and recommendation-oriented finetuning with an item prediction head.

  • Results

    The paper reports multifaceted superiority of CLLM4Rec over state-of-the-art methods and improved performance over comparison models in offline experiments.

  • Takeaways & Limitations

    The approach supports efficient multi-item recommendation without hallucination and shows potential for industrial applications where low latency matters.

  • Takeaways & Limitations

    The study focuses on recommendations with implicit feedback, and its prompt formulation assumes consistent meaning across training and testing.

Abstract

from arXiv · show

Recently, there has been growing interest in developing the next-generation recommender systems (RSs) based on pretrained large language models (LLMs). However, the semantic gap between natural language and recommendation tasks is still not well addressed, leading to multiple issues such as spuriously correlated user/item descriptors, ineffective language modeling on user/item data, inefficient recommendations via auto-regression, etc. In this paper, we propose CLLM4Rec, the first generative RS that tightly integrates the LLM paradigm and ID paradigm of RSs, aiming to address the above challenges simultaneously. We first extend the vocabulary of pretrained LLMs with user/item ID tokens to faithfully model user/item collaborative and content semantics. Accordingly, a novel soft+hard prompting strategy is proposed to effectively learn user/item collaborative/content token embeddings via language modeling on RS-specific corpora, where each document is split into a prompt consisting of heterogeneous soft (user/item) tokens and hard (vocab) tokens and a main text consisting of homogeneous item tokens or vocab tokens to facilitate stable and effective language modeling. In addition, a novel mutual regularization strategy is introduced to encourage CLLM4Rec to capture recommendation-related information from noisy user/item content. Finally, we propose a novel recommendation-oriented finetuning strategy for CLLM4Rec, where an item prediction head with multinomial likelihood is added to the pretrained CLLM4Rec backbone to predict hold-out items based on soft+hard prompts established from masked user-item interaction history, where recommendations of multiple items can be generated efficiently without hallucination. Codes are released at https://github.com/yaochenzhu/llm4rec.

1 INTRODUCTION

LLM-based recommender systems promise richer use of user and item semantics, but natural-language representations remain poorly aligned with recommendation needs. CLLM4Rec addresses this gap by combining true ID tokens, soft+hard prompting, mutual regularization, and recommendation-oriented finetuning.

  • Pretrained LLMs offer knowledge, reasoning, and generative capabilities that could support recommender systems using rich user and item text.
  • Existing LLM-based recommenders convert interactions, features, and candidates into natural-language prompts before querying the model.
  • Pseudo-ID representations can create spurious correlations after tokenization, whereas description-based representations impose semantic biases that may misrepresent users or items.
  • LLM-based recommendation can also introduce temporal correlations from interaction ordering and capture content noise unrelated to recommendations.
  • CLLM4Rec adds user/item ID tokens and combines soft+hard prompting, mutually regularized pretraining, and recommendation-oriented finetuning.Its finetuning predicts hold-out items from masked interaction histories using an item prediction head, enabling efficient multi-item generation without hallucination.

2 RELATED WORK

Related work establishes how LLMs encode knowledge through pretraining and generate responses through finetuning. LLM-based recommender research uses these capabilities for zero-shot ranking and recommendation-oriented finetuning.

  • LLMs learn knowledge from large-scale corpora through language modeling with transformer self-attention mechanisms.
  • During finetuning, prompt-output examples or human feedback guide LLMs to reason and generate answers from pretrained knowledge.
  • LLM-based recommender systems have been explored as zero-shot rankers and as finetuned models for recommendation tasks.

3 METHODOLOGY

CLLM4Rec couples pretrained LLMs with recommendation-specific user/item ID tokens to model collaborative and content semantics. Its soft+hard prompting, mutual regularization, and recommendation-oriented finetuning address semantic mismatch, noisy content, interaction-order issues, and inefficient autoregressive recommendation.

  • 3.2 Extension of User/Item Tokens: CLLM4Rec expands the LLM vocabulary with unsplittable user/item ID tokens and aligned collaborative/content embeddings to represent recommendation-specific semantics.The tokens are assigned dedicated IDs rather than decomposed into atomic vocabulary tokens.
  • 3.3.2 Soft+Hard Prompting: Soft+hard prompting separates heterogeneous user/item and vocabulary tokens in prompts from homogeneous item or vocabulary main text for stable language modeling.The strategy is applied to corpora transformed from interactions and user/item textual features.
  • 3.3.2 Soft+Hard Prompting: The collaborative LLM predicts item tokens from user and prior-item context, learning token embeddings that capture collaborative semantics.Its item prediction head maps the final hidden representation into the item probability space.
  • 3.3.3 Mutually-Regularization: Mutual regularization uses collaborative and content LLMs together to focus content modeling on recommendation-related information while reducing collaborative overfitting from sparse interactions.The approach addresses noisy information in textual features and sparsity in observed user-item interactions.
  • 3.4.2 Masked Prompting with Multinomial Prediction Head: Recommendation-oriented finetuning adds an item prediction head that generates multiple recommendations in one forward pass from masked interaction-history prompts.Because targets are constrained to the item probability space, the procedure avoids hallucinated items.

4 EMPIRICAL STUDY

The empirical study evaluates CLLM4Rec against ID-, LM-, and LLM-based baselines on public and LinkedIn recommendation datasets, and examines its components and mutual-regularization strength. Results show gains from pretrained knowledge, recommendation-oriented finetuning, and appropriately balanced mutual regularization, while deployment latency remains a constraint.

  • Datasets and setup: Experiments use four public datasets and a LinkedIn job-recommendation dataset, with implicit-feedback interactions and textual user/item features.The public datasets are Amazon Beauty, Amazon Toys, Amazon Sports, and Yelp; LinkedIn records job-ad clicks and user biographies.
  • Baselines and research questions: CLLM4Rec is compared with ID-based, hybrid, LM-based, and LLM-based recommendation baselines, including Multi-VAE, MD-CVAE, BERT4Rec, S3Rec, LLM-Scratch, LLM-CF, and LLM-FtAll.The comparisons target both recommendation performance and the effects of pretraining and recommendation-oriented finetuning.
  • Public-dataset results: CLLM4Rec outperforms MD-CVAE by a large margin, while Multi-VAE remains a strong collaborative-filtering baseline and LLM-Scratch performs worst among the included baselines.The authors attribute the advantage over MD-CVAE to deeper pretrained-LM understanding of textual features and the weakness of LLM-Scratch to the value of pretrained knowledge.
  • Finetuning analysis: Recommendation-oriented finetuning improves performance over LLM-PreRec, demonstrating the effectiveness of adapting the collaborative LLM for efficient recommendations.The finetuning stage predicts hold-out items from masked interactions using multinomial likelihood rather than relying only on generative pretraining.
  • LinkedIn results: CLLM4Rec outperforms the LinkedIn two-tower model by a large margin, but its higher inference budget still makes direct online deployment infeasible relative to that model.The study therefore introduces CLLM4Rec-Emb, which improves over the original two-tower and M6-Retrieval models in offline experiments.
  • Parameter sensitivity: Performance peaks at around 𝜆_c = 1 across all four public datasets, whereas weak or excessive mutual regularization reduces recommendation quality.Small 𝜆_c provides insufficient content side information; large 𝜆_c causes the mutual-regularization loss to dominate language-modeling learning.

5 CONCLUSION

CLLM4Rec tightly couples the ID and LLM paradigms to capture user/item semantics and use pretrained LLM knowledge for recommendation. The paper reports multifaceted superiority over state-of-the-art methods, while summarizing dataset statistics in Table 3.

  • CLLM4Rec tightly couples the ID and LLM paradigms to capture user/item semantics while using pretrained LLM knowledge and reasoning ability.
  • Mutually regularized pretraining with soft+hard prompting captures collaborative and content information through language modeling.
  • Recommendation-oriented finetuning uses pretrained CLLM4Rec knowledge to generate recommendations efficiently.
  • The paper reports multifaceted superiority over state-of-the-art recommender systems in extensive experiments.
  • Table 3 summarizes statistics for the public datasets and the LinkedIn recommendation dataset.

A.1 Implementation of Soft+Hard Prompting

The appendix describes how recommendation-oriented finetuning uses a multinomial prediction head, regularization, and collaborative item embeddings. It also identifies the comparison table covering additional backbones and baselines.

  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The RecLLM prediction head produces a multinomial probability over hold-out items for recommendation-oriented finetuning.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: Collaborative token embeddings of items interacted by a user are used in the finetuning objective.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The rec-step objective formulates recommendation-oriented finetuning with regularization from the content LLM.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The appendix includes a table comparing CLLM4Rec with additional backbones and baselines on three Amazon Review datasets.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The displayed objective includes an MR loss with the content LLM alongside recommendation terms.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The objective contains a negative log-likelihood term, while C_rec is constant for optimization.
  • A.2 Mutually Regularized Objective for Recommendation-Oriented Finetuning: The RecLLM latent representation of a user's historical interaction is encouraged to resemble the collaborative embeddings of interacted items.

B.1 Statistics of the Datasets

The appendix states that Table 3 reports statistics for the public datasets and the LinkedIn recommendation dataset.

  • Table 3 summarizes statistics for the public datasets and the LinkedIn recommendation dataset.
  • The table is the appendix's stated source for dataset statistics.
  • The listed datasets include both public datasets and a LinkedIn recommendation dataset.

B.2 Implementation Details for the GPT-2-based CLLM4Rec

The GPT-2-based implementation warms up content token embeddings, alternates mutually regularized pretraining, and then evaluates a selected hyperparameter against baselines.

  • Content LLM training warms up user/item content token embeddings for 10 epochs via language modeling.
  • Mutually regularized pretraining alternately trains the collaborative and content LLMs for 100 epochs.
  • The implementation then proceeds to later training stages after the alternating pretraining procedure.
  • A hyperparameter is first fixed to its grid-search optimum before comparison with other baselines.
  • The selected hyperparameter's influence is discussed in a subsequent experimental section.

B.3 Additional Results

CLLM4Rec is evaluated with T5-base and LLaMA-7B backbones to assess generalization beyond GPT-2. Training follows the GPT-2 procedure with backbone-specific handling for item prediction heads.

  • Additional Results: CLLM4Rec is tested with T5-base and LLaMA-7B backbones, both using 32,128 vocabulary tokens.T5-base uses 768-dimensional embeddings, while LLaMA-7B uses 4,096-dimensional embeddings.
  • Additional Results: For non-symmetric LLMs, item prediction-head weights are randomly initialized and learned with item collaborative token embeddings.
  • Additional Results: Training warms up the content LLM for ten epochs, followed by 100 epochs of mutually regularized pretraining.

B.3.1 Implementation Details for More Backbones.

The appendix adds EASE and BPR as ID-based baselines and compares additional backbones. CLLM4Rec-T5 generally exceeds the reported baselines but remains below CLLM4Rec-GPT2, partly because of training instability and prompt mismatch.

  • More Baselines.: EASE adds a constrained single-layer auto-encoder, while BPR combines textual bag-of-word features with collaborative latent variables.
  • More Baselines.: CLLM4Rec-T5 generally outperforms ID-based and shallow LM-based baselines but consistently underperforms CLLM4Rec-GPT2.
  • More Baselines.: T5 training is less stable than GPT-2 training because T5 uses unit-variance initialization, producing larger numerical values and update steps.
  • More Baselines.: A mismatch between T5’s original prompt use and CLLM4Rec prompts may also contribute to its inferior performance.
  • More Baselines.: LLaMA-7B does not outperform CLLM4Rec-GPT2 on the smaller AM-Beauty and AM-Sports datasets.
Loading 2311.01343v4…