RecSim: A Configurable Simulation Platform for Recommender Systems

Eugene Ie, Chih-Wei Hsu, Martin Mladenov, Vihan Jain, Sanmit Narvekar, Jing Wang, Rui Wu, Craig BoutilierarXiv 2019

Abstract

We propose RecSim, a configurable platform for authoring simulation environments for recommender systems (RSs) that naturally supports sequential interaction with users. RecSim allows the creation of new environments that reflect particular aspects of user behavior and item structure at a level of abstraction well-suited to pushing the limits of current reinforcement learning (RL) and RS techniques in sequential interactive recommendation problems. Environments can be easily configured that vary assumptions about: user preferences and item familiarity; user latent state and its dynamics; and choice models and other user response behavior. We outline how RecSim offers value to RL and RS researchers and practitioners, and how it can serve as a vehicle for academic-industrial collaboration.

Introduction

Traditional recommender systems (RS) are often evaluated on static datasets, such as MovieLens, which capture only a snapshot of user preferences. However, real-world recommendation is inherently a sequential process where an agent's actions influence a user's future state, including their interests, mood, and engagement levels. Applying Reinforcement Learning (RL) to these problems faces significant hurdles: the counterfactual trap (static logs cannot predict outcomes of alternative actions), data distribution shifts, and the complexity of combinatorial action spaces (slates). RecSim is an open-source, configurable simulation platform designed to bridge the gap between traditional RS and RL by providing a "sandbox" to model these evolving dynamics.

RecSim Architecture

RecSim follows a modular, OpenAI Gym-compatible architecture, allowing researchers to author custom environments with varying degrees of complexity. The environment is structured around three primary components:

  1. Document Model: This component samples items from a corpus, defining both observable features (e.g., topic, length) and latent features (e.g., quality).
  2. User Model: This represents the user's internal state, such as interests and satisfaction. It includes a Transition Model that dictates how the user's state evolves after interacting with a recommended item.
  3. User Choice Model: A mathematical function (e.g., Multinomial Logit) that determines which items a user selects from a recommended "slate."
Figure 1: The RecSim environment architecture, illustrating the interaction between the agent, document models, and user models.

The platform also supports Hierarchical Agent Layers, enabling developers to stack logic, such as an exploration layer (bandits) atop a feature transformation layer.

Simulation Dynamics and Insights

RecSim enables the exploration of complex recommendation phenomena that are difficult to capture in static data:

  • "Chocolate vs. Kale": This case study explores the trade-off between "chocolate" content (high immediate engagement, low long-term satisfaction) and "kale" content (low immediate engagement, builds long-term satisfaction). RecSim allows agents to learn policies that optimize for long-term user health rather than myopic clicks.
  • Slate Decomposition: Recommending a list (slate) of $K$ items is a combinatorial challenge. RecSim facilitates the testing of methods like SlateQ, which decomposes the Q-value of a slate into individual item Q-values to maintain tractability.
  • Temporal Aggregation: In environments where user states change slowly, reducing control frequency or regularizing against frequent action changes can improve policy quality by filtering out noise.

Experimental Results

The utility of RecSim was demonstrated through three primary case studies:

  1. Latent State Bandits: In environments where topic affinity is paramount, UCB1 and Q-learning agents significantly outperformed greedy baselines, achieving a 25.17% average CTR compared to 17.56%.
  2. Slate RL: The decomposed TD-learning approach (SlateQ) successfully captured significant gains without the computational overhead of exhaustive slate evaluation.
  3. Long Horizons: Simulation results showed that temporal aggregation helps agents better track slowly evolving user satisfaction in noisy environments.

Discussion and Future Work

While RecSim provides a robust framework for stylized research, the authors note the "sim-to-real gap" as a primary limitation. Future work focuses on fitting these stylized models to real-world production logs to increase fidelity. Additionally, the platform aims to expand beyond single-user simulations to include multi-agent interactions and more diverse interaction modalities, such as natural language queries and user critiquing.

Summary updated

BibTeX
@misc{ie2019recsim,
  author = {Eugene Ie and Chih-Wei Hsu and Martin Mladenov and Vihan Jain and Sanmit Narvekar and Jing Wang and Rui Wu and Craig Boutilier},
  title = {{RecSim: A Configurable Simulation Platform for Recommender Systems}},
  year = {2019},
  eprint = {1909.04847},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.04847},
}
Figure