TL;DR
This paper explores using large pre-trained language models (PLMs) like BERT and GPT as recommender systems by framing recommendations as a "fill-in-the-blank" (cloze) task. While PLMs show promise in zero-shot scenarios and can reduce data needs, they exhibit strong linguistic biases and, when fine-tuned, don't quite match traditional recommender system performance.
What Problem Does This Paper Address?
Traditional recommender systems often rely on item embeddings and sequential modeling to predict user preferences. However, these systems can struggle with cold-start problems (new users or items with little data) and require significant training data. Meanwhile, the rapid advancements in large pre-trained language models (PLMs) have shown their remarkable ability to understand and generate text, leveraging vast world knowledge. This paper investigates whether these powerful PLMs can be repurposed as recommender systems, potentially overcoming data limitations and offering new ways to understand user behavior. The core challenge is how to effectively translate the recommendation task into a format that PLMs can process and how to mitigate inherent biases in their language-modeling capabilities.
Methods
The authors propose "Language Model Recommender Systems" (LMRecSys) that treat recommendations as a multi-token cloze task. Instead of directly predicting an item ID, LMRecSys reformulates a user's interaction history into a text prompt. For example, a sequence of watched movies is converted into a sentence like: "A user watched Movie A, Movie B, Movie C. Now the user wants to watch [MASK]." The PLM then predicts the masked token(s) that would logically follow.
A key technical challenge is "multi-token inference," as PLMs are typically designed to predict one token at a time. The paper explores two main strategies:
- O(1) inference: This method attempts to predict all tokens for a potential next item simultaneously, often by padding item descriptions to a fixed length and using a single forward pass.
- O(L) inference: This approach uses multiple forward passes, predicting tokens sequentially for each potential item. This is more computationally intensive but generally more accurate.
The paper also investigates "domain-adaptive pre-training" (DAPT), where PLMs are further pre-trained on domain-specific text (movie synopses in this case) to improve their understanding of the recommendation domain.
Datasets
The primary dataset used in this study is MovieLens-1M (ML1M), a widely-used dataset for movie recommendations. It contains interactions from 6040 users, 3883 movies, and approximately 1 million ratings. For fine-tuning experiments, a subset called ML-1M-5Star was created, which only includes user interactions where the rating was 5 stars, aiming to reduce popularity bias.
Key Insights and Ideas
- PLMs as Zero-Shot Recommenders: PLMs can indeed function as recommender systems even without any specific training data for the recommendation task (zero-shot). They significantly outperform random recommendations.
- The Power of Prompts: Framing recommendations as a cloze task using carefully crafted prompts is an effective way to leverage PLMs.
- Linguistic Bias is Real: A major finding is that PLMs exhibit strong "linguistic biases." They tend to favor recommendations that result in grammatically correct and fluent sentences, sometimes at the expense of true user preference or item similarity. Different inference methods amplify these biases in distinct ways.
- Fine-tuning Helps, But Not Enough (Yet): Fine-tuning PLMs with recommendation data can reduce linguistic biases and improve performance. However, even fine-tuned PLMs in this study underperformed traditional, specialized recommender systems like GRU4Rec.
- Data Efficiency Potential: The inherent knowledge within PLMs suggests they could be more data-efficient than traditional methods, especially in low-data scenarios.
Key Results
- Zero-Shot Performance: In zero-shot settings, LMRecSys using PLMs like GPT2-XL achieved an R@20 of 0.0739, significantly outperforming the random baseline (0.0052) and BERT-Base ItemKNN (0.0599).
- Inference Method Impact: O(LN) inference (e.g., GPT2-Small O(LN)) generally performed better than O(1) inference, with O(1) sometimes performing worse than random. GPT2-XL with O(LN) inference showed the best zero-shot performance.
- Fine-Tuned Performance: After fine-tuning on ML-1M-5Star, the best LMRecSys model (ROBERTa-Base (DAPT) O(L)) achieved an MRR@20 of 0.0187 and R@20 of 0.0872. This was lower than the baseline GRU4Rec (MRR@20: 0.0302, R@20: 0.0986).
- Linguistic Bias: Case studies revealed that different inference methods favored different types of linguistic structures in recommendations (e.g., generic, uniquely long, or short grammatical sequences).
- Calibration: A simple calibration method to mitigate linguistic bias showed a slight improvement in R@20 (0.66%), but did not fully resolve the issue.
Limitations and Future Work
- Multi-token Inference: The paper highlights that inferring probabilities for multi-token items remains a significant challenge, with performance varying greatly depending on the inference strategy.
- Linguistic Bias Disentanglement: A key future direction is developing methods to disentangle the PLM's tendency to generate fluent text from its ability to predict relevant items based on user preferences.
- Domain Knowledge: Further research is needed on how to effectively inject and evaluate domain-specific knowledge into PLMs for recommendation. Domain-adaptive pre-training showed only marginal improvements.
- Model Scale: While larger models (like J1-Jumbo) qualitatively showed better understanding, their performance couldn't be fully evaluated due to API limitations. Exploring the impact of even larger models is a promising avenue.
- Performance Gap: The current fine-tuned LMRecSys still lags behind specialized recommender systems. Future work could focus on bridging this performance gap, perhaps through more sophisticated fine-tuning techniques or hybrid approaches.
Summary updated