Table of Contents
Fetching ...

GenRec: Generative Sequential Recommendation with Large Language Models

Panfeng Cao, Pietro Lio

TL;DR

This paper introduces GenRec, a light-weight, encoder–decoder Transformer framework that treats sequential recommendation as a sequence-to-sequence generation task. It uses a cloze-style, masked item prediction objective for both pretraining and finetuning, avoiding manual prompts and enabling effective learning from plain textual user-item sequences. Across public datasets (Amazon Sports, Amazon Beauty, Yelp), GenRec achieves state-of-the-art results on several metrics, with ablations showing substantial gains from pretraining. By combining bidirectional sequence modeling with a streamlined, prompt-free approach, GenRec demonstrates practical, scalable applicability of generative LLM-inspired methods to real-world sequential recommendation tasks.

Abstract

Sequential recommendation is a task to capture hidden user preferences from historical user item interaction data and recommend next items for the user. Significant progress has been made in this domain by leveraging classification based learning methods. Inspired by the recent paradigm of 'pretrain, prompt and predict' in NLP, we consider sequential recommendation as a sequence to sequence generation task and propose a novel model named Generative Recommendation (GenRec). Unlike classification based models that learn explicit user and item representations, GenRec utilizes the sequence modeling capability of Transformer and adopts the masked item prediction objective to effectively learn the hidden bidirectional sequential patterns. Different from existing generative sequential recommendation models, GenRec does not rely on manually designed hard prompts. The input to GenRec is textual user item sequence and the output is top ranked next items. Moreover, GenRec is lightweight and requires only a few hours to train effectively in low-resource settings, making it highly applicable to real-world scenarios and helping to democratize large language models in the sequential recommendation domain. Our extensive experiments have demonstrated that GenRec generalizes on various public real-world datasets and achieves state-of-the-art results. Our experiments also validate the effectiveness of the the proposed masked item prediction objective that improves the model performance by a large margin.

GenRec: Generative Sequential Recommendation with Large Language Models

TL;DR

This paper introduces GenRec, a light-weight, encoder–decoder Transformer framework that treats sequential recommendation as a sequence-to-sequence generation task. It uses a cloze-style, masked item prediction objective for both pretraining and finetuning, avoiding manual prompts and enabling effective learning from plain textual user-item sequences. Across public datasets (Amazon Sports, Amazon Beauty, Yelp), GenRec achieves state-of-the-art results on several metrics, with ablations showing substantial gains from pretraining. By combining bidirectional sequence modeling with a streamlined, prompt-free approach, GenRec demonstrates practical, scalable applicability of generative LLM-inspired methods to real-world sequential recommendation tasks.

Abstract

Sequential recommendation is a task to capture hidden user preferences from historical user item interaction data and recommend next items for the user. Significant progress has been made in this domain by leveraging classification based learning methods. Inspired by the recent paradigm of 'pretrain, prompt and predict' in NLP, we consider sequential recommendation as a sequence to sequence generation task and propose a novel model named Generative Recommendation (GenRec). Unlike classification based models that learn explicit user and item representations, GenRec utilizes the sequence modeling capability of Transformer and adopts the masked item prediction objective to effectively learn the hidden bidirectional sequential patterns. Different from existing generative sequential recommendation models, GenRec does not rely on manually designed hard prompts. The input to GenRec is textual user item sequence and the output is top ranked next items. Moreover, GenRec is lightweight and requires only a few hours to train effectively in low-resource settings, making it highly applicable to real-world scenarios and helping to democratize large language models in the sequential recommendation domain. Our extensive experiments have demonstrated that GenRec generalizes on various public real-world datasets and achieves state-of-the-art results. Our experiments also validate the effectiveness of the the proposed masked item prediction objective that improves the model performance by a large margin.
Paper Structure (15 sections, 2 equations, 2 figures, 3 tables)

This paper contains 15 sections, 2 equations, 2 figures, 3 tables.

Figures (2)

  • Figure 1: An illustration of the architecture of GenRec. The input textual user item interaction sequence is first tokenized into a sequence of tokens. Token embedding, ID embedding and positional embedding are summed up to produce the bidirectional encoder input. In pretraining and finetuning, a random item is masked and the auto-regressive decoder generates the masked item. In inference, the decoder generates top 20 masked item predictions to calculate the evaluation metrics.
  • Figure 2: An illustration of different masking mechanisms in pretraining, finetuning and inference. In pretraining, a random item in the sequence is masked while in finetuning and inference, masked items are appended to the end of the sequence. Note, the last two items in the user item interaction sequence are excluded in pretraining to avoid data leakage. Similarly, the last one item in the sequence is excluded in finetuning.