Abstract
Traditional recommendation systems often treat items as discrete IDs, ignoring the rich semantic information embedded in item titles. GenRec addresses this by reframing recommendation as a generative natural language task. By fine-tuning a LLaMA backbone using textual interaction histories, GenRec learns to directly "write" the name of the next item a user is likely to interact with. Experimental results on the MovieLens 25M dataset demonstrate that this generative approach significantly outperforms existing benchmarks, particularly when item names are semantically dense.
Introduction
Recommendation systems typically rely on Collaborative Filtering (CF) or Content-Based Filtering. While effective, these methods often struggle with data sparsity and the "cold start" problem. A fundamental limitation of modern neural recommenders is their reliance on discrete item IDs (e.g., ID: 10293), which lack inherent meaning. In contrast, a title like "Pinocchio (1940)" provides immediate context about genre and themes.
GenRec shifts the paradigm from a discriminative approach—where the system calculates scores for every candidate item—to a generative one. By treating recommendation as a sequence completion task, the model leverages the pre-trained knowledge of Large Language Models (LLMs) to predict the next item directly from its name.
The GenRec Framework
The GenRec framework utilizes a LLaMA (7B) model as its core engine, structured into three primary stages:
- Sequence Generation: Raw interaction data is transformed into a natural language prompt. This includes an instruction (e.g., "Based on the movie viewing habits, what is the most likely movie they will select to watch next?"), a chronological input list of previously viewed items, and the target output item name.
- Efficient Fine-Tuning: To manage the computational load of a 7-billion parameter model, the authors employ LoRA (Low-Rank Adaptation). This allows the model to be fine-tuned on consumer-grade hardware (e.g., a single 24GB GPU).
- Generative Inference: During inference, the model uses its internal semantic knowledge and the provided context to generate the target item name directly, bypassing the need to score an entire catalog.
Experimental Setup
The model was evaluated on two distinct benchmarks:
- MovieLens 25M: A large-scale dataset where movie titles provide rich semantic context.
- Amazon Toys: A dataset of toy purchase histories, characterized by different naming conventions and interaction patterns.
Evaluation followed a standard "leave-one-out" strategy, using the most recent interaction for testing and the penultimate for validation.
Results and Analysis
GenRec was compared against P5, a state-of-the-art unified LLM recommendation framework. The results highlight a clear advantage for generative modeling in semantically rich environments.
On the MovieLens 25M dataset, GenRec achieved a Hit Ratio (HR@5) of 0.1034, nearly doubling the P5 baseline of 0.0688. Similar improvements were observed in NDCG@5 (0.0716 vs. 0.0464), suggesting that GenRec is highly effective at ranking the correct item at the top of the list.
However, on the Amazon Toys dataset, GenRec underperformed compared to P5 (HR@5 of 0.0190 vs. P5's 0.0239). The authors attribute this to the "semantic density" of the data; movie titles carry more cultural and thematic weight than toy product names, providing more "hooks" for the LLM to utilize.
Conclusion and Future Work
GenRec demonstrates the potential of generative LLMs to revolutionize recommendation by capitalizing on the semantic information in item names. While highly effective for semantically rich datasets like movies, the approach's performance varies with the nature of the item metadata. Future work will explore incorporating broader textual data—such as reviews and descriptions—and testing the framework across diverse LLM architectures to further refine generative recommendation.
Summary updated