Abstract
Large Language Models (LLMs) have demonstrated remarkable performance across diverse domains, prompting researchers to explore their potential for use in recommendation systems. Initial attempts have leveraged the exceptional capabilities of LLMs, such as rich knowledge and strong generalization through In-context Learning, which involves phrasing the recommendation task as prompts. Nevertheless, the performance of LLMs in recommendation tasks remains suboptimal due to a substantial disparity between the training tasks for LLMs and recommendation tasks and inadequate recommendation data during pre-training. This paper introduces RLRF4Rec, a novel framework integrating Reinforcement Learning from Recsys Feedback for Enhanced Recommendation Reranking (RLRF4Rec) with LLMs to address these challenges. Specifically, we first have the LLM generate inferred user preferences based on user interaction history, which is then used to augment traditional ID-based sequence recommendation models. Subsequently, we trained a reward model based on knowledge augmentation recommendation models to evaluate the quality of the reasoning knowledge from LLM. We then select the best and worst responses from the N samples to construct a dataset for LLM tuning. Finally, we design a structure alignment strategy with Direct Preference Optimization (DPO). We validate the effectiveness of RLRF4Rec through extensive experiments, demonstrating significant improvements in recommendation re-ranking metrics compared to baselines.
Introduction
While LLMs possess immense world knowledge and reasoning capabilities, they are not inherently optimized for recommendation tasks. Standard LLM-enhanced recommendation systems often suffer from two primary issues: an objective mismatch, where LLMs are pre-trained to predict tokens rather than optimize for recommendation metrics like Click-Through Rate (CTR) or Normalized Discounted Cumulative Gain (NDCG), and a unidirectional knowledge flow, where LLMs provide reasoning without receiving feedback on its utility for the specific recommendation engine.
RLRF4Rec addresses these challenges by establishing a bidirectional alignment strategy. By treating a traditional recommender model as a "reward model," the framework fine-tunes LLMs to ensure the reasoning they generate actually improves recommendation accuracy.
Methodology
RLRF4Rec introduces a pipeline inspired by Reinforcement Learning from Human Feedback (RLHF), but replaces human judgment with RecSys-driven feedback. The process consists of four key stages:
- Reasoning Extraction: The LLM is prompted to infer user preferences from historical interactions. To ensure diversity, the model generates $N$ different reasoning samples for each user.
- The Recommender as a Reward Model: These reasoning samples are converted into embeddings and integrated into a traditional ID-based recommendation model (such as DLCM or PRM). The recommendation performance (e.g., NDCG) for each sample is calculated. The sample leading to the best performance is labeled "Chosen," while the worst is labeled "Rejected."
- Direct Preference Optimization (DPO): Instead of complex reinforcement learning algorithms like PPO, the framework uses DPO to directly optimize the LLM's policy. This increases the likelihood of the model generating "Chosen" reasoning that aligns with the recommender's needs.
- Iterative Optimization: This process can be repeated, allowing the LLM and the recommender to mutually adapt over multiple rounds.
Experimental Results
The framework was evaluated on three public datasets: ML-1M (MovieLens), Amazon-Books, and Amazon-Beauty. The authors utilized various backbone recommenders (DLCM, PRM, SetRank) and LLMs (Llama3.1-8B, Mistral-7B, Yi-6B) to demonstrate flexibility.
Key Findings
- Consistent Performance Gains: RLRF4Rec consistently outperformed strong baselines. On the ML-1M dataset, it achieved significant relative improvements in MAP@5 over standard backbone models.
- The Importance of Alignment: Ablation studies (visualized below) show that while adding "reasoning knowledge" provides an initial performance jump, the DPO alignment phase is what truly "polishes" that knowledge to make it effective for the ranking task.
- Task-Specific Superiority: Interestingly, a fine-tuned Llama3.1-8B using RLRF4Rec outperformed zero-shot GPT-4o, suggesting that task-specific alignment is more critical than raw model size in recommendation contexts.
Discussion and Conclusion
Analysis of the iterative process revealed an "overfitting trap": performance typically peaks at two iterations of DPO. By the third iteration, the LLM can become too aligned with the training data, leading to a drop in test performance.
While RLRF4Rec significantly improves instruction-following and recommendation quality, future work will focus on reducing the computational cost of generating multiple reasoning samples during training and exploring dynamic co-training where both the LLM and the recommender evolve simultaneously. Overall, RLRF4Rec demonstrates that closing the feedback loop between LLMs and recommenders is essential for high-performance personalized systems.
Summary updated