Abstract
Large Language Models (LLMs) have shown promise in recommendation systems, yet they often struggle with semantic sparsity and the gap between textual and collaborative data. This paper introduces RALLRec (Representation learning for retrieval Augmented Large Language model Recommendation), a framework that aligns LLM-generated item descriptions with user-item interaction data. By employing self-supervised learning and a novel temporal reranker, RALLRec bridges the modality gap and achieves state-of-the-art performance on major recommendation benchmarks including MovieLens and Amazon.
Introduction
While LLMs excel at natural language understanding, their application in recommendation systems (LLMRec) faces three primary hurdles:
- Semantic Sparsity: Retrieval-Augmented Generation (RAG) methods often rely on sparse item titles (e.g., "Toy Story"), which lack the depth required for high-quality retrieval.
- The Modality Gap: Traditional systems rely on "collaborative semantics" (interaction patterns), while LLMs rely on "textual semantics." These modalities are rarely aligned, leading to retrieval that ignores historical user-item interactions.
- Temporal Dynamics: User preferences shift over time. Standard retrieval often fails to balance long-term semantic similarity with short-term "recency" trends.
Methodology
The RALLRec framework introduces a multi-stage pipeline designed to unify these disparate information sources.
Enhanced Textual Representation
Instead of relying on raw titles, RALLRec prompts an LLM to generate detailed, knowledge-rich descriptions for items. These descriptions are then encoded into high-dimensional embeddings, providing a richer signal for retrieval.
Joint Representation Learning (SSL)
To bridge the gap between text and interaction data, the system extracts collaborative embeddings using traditional models like LightGCN. A self-supervised contrastive learning objective (SSL) is then applied via a two-layer MLP projector. This ensures that items with similar interaction patterns are mapped near each other in the semantic space, making the retrieval "collaborative-aware."
Retrieval and Reranking
The final retrieval utilizes a concatenated vector of normalized textual, collaborative, and aligned (SSL) embeddings. Following retrieval, a heuristic reranker applies a score based on both semantic similarity and item timestamps. This ensures the LLM prompt contains a balanced mix of semantically relevant and recently interacted items.
Experimental Setup
The authors evaluated RALLRec on three widely used public datasets:
- BookCrossing: User ratings for books.
- MovieLens-1M: A classic movie recommendation dataset.
- Amazon (Movies & TV): A subset of the massive Amazon product review dataset.
All datasets were preprocessed using a "5-core" strategy to ensure data quality, and the base LLM (Llama 3.1-8B) was fine-tuned using LoRA on recommendation-specific tasks.
Key Results
RALLRec consistently outperformed both traditional ID-based models (like DeepFM) and state-of-the-art LLM-based methods (like ReLLa).
As shown in the figure above, RALLRec maintains a significant performance lead over baselines as the length of the user behavior sequence increases. Key performance metrics include:
- MovieLens: Achieved an AUC of 0.7772, significantly higher than the previous best LLM-based baseline (0.7646).
- Amazon: Reached an AUC of 0.8463, outperforming all baselines with statistical significance ($p < 0.01$).
Key Insights
- Alignment is Crucial: Simply concatenating ID-based and text embeddings is insufficient. The self-supervised alignment (SSL) is essential for effective retrieval.
- LLMs as Feature Augmenters: Using LLM "world knowledge" to expand titles into descriptions provides a much richer signal for the recommendation process.
- Instruction Tuning: Ablation studies confirm that without instruction tuning, performance drops to near zero-shot levels, proving that retrieval is only as good as the LLM's ability to follow task instructions.
Conclusion and Future Work
RALLRec demonstrates that aligning textual and collaborative semantics is key to unlocking the potential of LLMs in recommendation. While the current framework uses a heuristic reranker, future work could explore more sophisticated, learning-based rerankers and expand the system's scope from binary CTR prediction to generative "Top-10" list recommendations.
Summary updated