Reinforcement Learning-based Recommender Systems with Large Language Models for State Reward and Action Modeling

Jie Wang, Alexandros Karatzoglou, Ioannis Arapakis, Joemon M. Jose

Abstract

This paper introduces LEA (Large Language Model-based Environment Augmentation), a novel framework that leverages Large Language Models (LLMs) as simulated environments to train offline Reinforcement Learning (RL) recommender systems. By utilizing the semantic knowledge of LLMs to model user states, rewards, and synthetic data, the proposed method significantly enhances recommendation accuracy. Crucially, the LLM is only utilized during the training phase, allowing the final production model to remain lightweight and efficient for real-time inference.

Introduction

Reinforcement Learning (RL) is theoretically well-suited for recommendation tasks as it optimizes for long-term user satisfaction. However, training RL agents in real-world environments is risky, leading to a reliance on Offline RL trained on historical logs. This approach faces two primary challenges: sparse feedback (logs only capture observed interactions) and oversimplified rewards (binary signals like clicks fail to capture semantic nuances).

Methodology: Large Language Model-based Environment Augmentation (LEA)

The authors propose using an LLM as a "World Model" during training to overcome offline RL limitations. The core idea is to transition from traditional ID-based state representations to semantically rich models.

Comparison between traditional SSRL4R and the proposed state and reward modeling approach.

Key Components

  • Item Tokenization: Unique "item tokens" are optimized in the LLM’s embedding space based on textual descriptions, aligning discrete IDs with semantic knowledge.
  • LLM as Environment (LE): A Mistral-7B model is fine-tuned via LoRA to serve as a State Model (SM) for generating user representations and a Reward Model (RM) for predicting nuanced scalar rewards.
  • Action Augmentation: The LE simulates user behavior to predict additional likely interactions, augmenting sparse training data with synthetic positive samples.
The complete LEA framework, illustrating the integration of the LLM-based environment for state, reward, and action augmentation.

Lean Inference

A significant advantage of LEA is that the LLM is decoupled from the inference process. The final recommender uses a standard architecture (e.g., SASRec), ensuring high-speed performance in production environments.

Experimental Evaluation

The framework was evaluated on the Last.fm (LFM) music dataset and an Amazon Industrial product dataset.

Key Results

  • Performance Gains: LEA consistently outperformed state-of-the-art RL baselines. On LFM, the LEASR variant achieved a Hit Ratio (HR@5) of 0.3325, a significant improvement over the SA2C baseline (0.2902).
  • Impact of Augmentation: Action augmentation was identified as a primary driver of performance, improving generalization to unseen user-item pairs.
  • Domain Sensitivity: Improvements were more pronounced in the music domain, likely due to the LLM's extensive pre-training on popular culture.

Discussion and Conclusion

The "Teacher-Student" dynamic, where the LLM acts as a sophisticated environment for a smaller RL agent, proves highly effective. While computationally intensive during training, the approach offers a path toward semantically aware, long-term-optimized recommenders without sacrificing inference speed. Future work will explore more complex reward structures like diversity and serendipity.

Summary updated

BibTeX
@inproceedings{wang2024reinforcement,
  author = {Jie Wang and Alexandros Karatzoglou and Ioannis Arapakis and Joemon M. Jose},
  title = {{Reinforcement Learning-based Recommender Systems with Large Language Models for State Reward and Action Modeling}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2024},
}
Figure