When Collaborative Filtering Meets Reinforcement Learning

Yu Lei, Wenjie LiarXiv 2019

Abstract

Collaborative Filtering Reinforcement Learning (CFRL) is a novel framework that treats interactive recommendation as a sequential decision-making problem. Traditional Collaborative Filtering (CF) often fails to account for the long-term impact of recommendations, while standard Reinforcement Learning (RL) struggles with high-dimensional, sparse state representations. CFRL bridges this gap by encoding sparse user feedback into a dense, collaborative latent space. By training a Deep Q-Network (DQN) on these representations, the system learns to maximize long-term user satisfaction. Evaluations on MovieLens datasets show that CFRL consistently outperforms state-of-the-art baselines, especially in realistic scenarios with large item sets.

Introduction

Traditional Collaborative Filtering (CF) methods are primarily designed for single-step prediction, excelling at estimating immediate user preference but struggling with multi-step interactions. In real-world recommender systems, interactions occur over multiple rounds; each recommendation provides feedback that should ideally inform all subsequent actions.

Existing RL approaches for recommendation often face three major hurdles:

  1. A focus on implicit feedback (clicks/views) rather than explicit ratings.
  2. Reliance on raw, sparse state representations (e.g., large item vectors), which complicates neural network training.
  3. A failure to leverage the "collaborative" nature of the problem—using knowledge about the broader user community to inform recommendations for a specific individual.

Methodology

The CFRL framework integrates CF and RL through a structured Markov Decision Process (MDP) formulation.

MDP Formulation

The recommendation process is modeled as an MDP where the recommender acts as the agent, the user serves as the environment, and the actions correspond to the items recommended.

CF-based State Representation

The core innovation of CFRL is the use of Matrix Factorization to create a dense state representation. Instead of feeding sparse rating vectors into the RL agent, the system uses pre-trained item feature vectors ($V$). As a user provides new ratings, a low-dimensional user feature vector ($U_u$) is updated via Stochastic Gradient Descent (SGD). This dense vector captures both individual preferences and community-wide relationships, serving as the "state" for the RL agent.

The CFRL framework architecture, illustrating the integration of pre-trained item vectors, dynamic user vector updates, and the Deep Q-Network.

Q-Network Learning

A Deep Q-Network (DQN) learns the optimal policy by taking the CF-based state as input and outputting Q-values (expected long-term rewards) for all possible items. To ensure stable training, the framework employs standard deep RL techniques such as Experience Replay and Target Networks.

Experimental Evaluation

The researchers evaluated CFRL using three benchmark datasets from MovieLens: ML100K, ML1M, and ML10M. These datasets contain explicit integer ratings (1–5). The experiments simulated a "cold-start" scenario where a new user interacts with the system for $T=40$ steps.

Two tasks were tested:

  • Task I: Recommending only from items the user has previously rated.
  • Task II: Recommending from the entire item set, treating unknown ratings as a reward of zero.

Key Insights and Results

  • Latent Space Advantages: Using latent factors from Matrix Factorization as state inputs provides a "warm start" for the neural network by embedding prior domain knowledge about item similarities.
  • Global Optimization: RL allows the system to choose items that might yield moderate immediate ratings if they are expected to provide feedback that leads to higher long-term rewards.
  • Performance Gains: CFRL consistently outperformed baselines including standard Matrix Factorization (MF), Contextual Bandits (LinUCB), and standard DQN. In the more challenging Task II, CFRL showed an "overwhelming advantage," improving upon the best baselines by up to 19.90% on the ML1M dataset.
  • Representation Efficacy: The significant performance gap between CFRL and standard DQN confirms that the CF-based state representation is a critical driver of success compared to using raw, sparse data.

Conclusion

CFRL demonstrates that integrating collaborative latent spaces with reinforcement learning significantly improves interactive recommendation performance. While the current model uses standard Matrix Factorization, the framework is flexible enough to incorporate more complex encoders like Deep CF or side-information-aware models. Future work will explore adapting these dense state representations for implicit or hybrid feedback streams.

Summary updated

BibTeX
@misc{lei2019when,
  author = {Yu Lei and Wenjie Li},
  title = {{When Collaborative Filtering Meets Reinforcement Learning}},
  year = {2019},
  eprint = {1902.00715},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.00715},
}
Figure