NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PerSim: Data-Efficient Offline Reinforcement Learning with Heterogeneous Agents via Personalized Simulators

Anish Agarwal, Abdullah Omar Alomar, Varkey Alumootil, Devavrat Shah, Dennis Shen, Zhi Xu, Cindy Yang

TL;DR

PerSim addresses the "cold-start" problem in offline reinforcement learning: how do you learn a personalized policy for a unique agent when you only have a single, potentially sub-optimal historical trajectory for them? By treating transition dynamics as a low-rank tensor problem—similar to how Netflix predicts movie preferences—PerSim pools data across many heterogeneous agents to build highly accurate personalized simulators. This approach significantly outperforms current state-of-the-art methods in data-scarce environments.

The Challenge: Severe Data Scarcity and Heterogeneous Agents

In many real-world applications of Reinforcement Learning (RL), such as healthcare or autonomous driving, we cannot simply let an agent "explore" and learn from its mistakes safely. Instead, we must rely on Offline RL, learning exclusively from pre-existing logs.

The authors identify a particularly brutal regime for offline RL: severe data scarcity combined with heterogeneous agents. Imagine 500 different patients (agents), each with slightly different physiology (heterogeneity). For each patient, you only have one record of their medical history (a single trajectory).

Standard RL algorithms usually fail in this setting. If you try to learn a "one-size-fits-all" model, you ignore critical individual differences. Conversely, if you try to learn a model for just one person, you lack enough data to understand the full state-action space.

Methods: The PerSim Approach

To solve this, the authors propose PerSim, a model-based approach that operates in two main steps:

1. Learning Personalized Simulators

Instead of learning a policy directly, PerSim learns the "physics" of each agent. The core innovation is a Latent Low-rank Factor Representation. The authors posit that the transition dynamics—the "next state" given a current state and action—can be decomposed into three separable latent functions: one for the agent ($n$), one for the state ($s$), and one for the action ($a$).

PerSim Architecture

As shown in the architecture above, PerSim uses a regularized neural network with three separate encoders. By preventing these encoders from sharing edges until the final output layer, the model is forced to learn a structured, low-rank interaction. This acts as a powerful form of regularization, preventing the model from overfitting to the sparse data of any single agent.

2. Planning via Model Predictive Control (MPC)

Once the personalized simulator is built, PerSim uses Model Predictive Control (MPC) to plan the best actions. Essentially, the system "asks" the simulator what would happen under various action sequences and selects the one that yields the highest predicted reward.

Datasets and Evaluation

The researchers evaluated PerSim using modified versions of standard OpenAI Gym benchmarks to introduce agent heterogeneity:

  • MountainCar: Modified by varying the gravity for each of the 500 agents.
  • CartPole: Modified by varying the pole length and mass.
  • HalfCheetah: A high-dimensional environment (18-dimensional state space) modified by varying the mass of the cheetah's torso.

For each environment, they generated offline datasets ranging from "Pure Policy" (data from a good agent) to "Random" (noisy, sub-optimal data) to test the model's robustness.

Key Insights

  • Collaborative Filtering for Physics: The most striking idea is the bridge between recommendation systems and RL. Just as collaborative filtering predicts a user's rating for an unseen movie by looking at similar users, PerSim predicts an agent's reaction to an unvisited state by looking at how "similar" agents reacted.
  • Low-Rank is Natural: The authors prove that for classical systems like MountainCar, the transition dynamics exactly satisfy a low-rank tensor representation. This suggests the low-rank assumption is rooted in underlying physics, not just a convenient math trick.
  • Robustness to "Bad" Data: Unlike many offline RL methods that struggle if historical data was generated by a poor policy, PerSim remains effective. By focusing on learning the dynamics (the "rules of the world") rather than mimicking the policy (the "actions taken"), it can extrapolate to find better paths than those in the original logs.

Key Results

Superior Prediction and Control

In MountainCar and CartPole, PerSim’s prediction error (RMSE) was often orders of magnitude lower than baselines like Context-Aware Dynamics Model (CaDM). In many cases, PerSim achieved a near-perfect $R^2$ of 1.00, while baselines often produced negative $R^2$ values.

CartPole Simulation Comparison

This predictive accuracy translates directly to better control. As seen in the CartPole simulation comparison, PerSim successfully keeps the pole upright over 90 steps, whereas baseline methods quickly diverge and fail.

Higher Rewards and Boosting Model-Free RL

PerSim consistently achieved higher average rewards across all test agents. For example, in the "Random" data regime for CartPole, PerSim achieved rewards near the maximum (~197), while most baselines hovered around 40-60.

Furthermore, PerSim can act as a "data factory." By using PerSim to generate synthetic trajectories, the authors significantly improved the performance of popular model-free algorithms like BCQ and CQL, which otherwise failed in the sparse data setting.

Limitations and Future Work

  • The MPC Bottleneck: While the simulator is efficient, using MPC for planning can be computationally expensive compared to simply querying a pre-learned policy.
  • High-Dimensional Scaling: While PerSim outperformed others in the 18-dimensional HalfCheetah environment, the performance gap was smaller than in simpler environments. Learning latent factors for very high-dimensional, complex robotics tasks remains an ongoing challenge.
  • Theoretical Bounds: Further research is needed to determine the exact "sparsity patterns" in the data (which trajectories we observe) that allow for guaranteed recovery of the full transition tensor.

Summary updated

BibTeX
@inproceedings{agarwal2021persim,
  author = {Anish Agarwal and Abdullah Omar Alomar and Varkey Alumootil and Devavrat Shah and Dennis Shen and Zhi Xu and Cindy Yang},
  title = {{PerSim: Data-Efficient Offline Reinforcement Learning with Heterogeneous Agents via Personalized Simulators}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=v2w7CVZGHeA},
}
Figure