Abstract
Offline reinforcement learning (RL) seeks to derive optimal policies from static, pre-collected datasets, avoiding the risks and costs of real-world exploration. However, distributional shift remains a primary obstacle, as agents often over-optimistically exploit errors in value or dynamics estimates for out-of-distribution actions. We present MOPO (Model-based Offline Policy Optimization), a framework that leverages a learned dynamics model with uncertainty-aware reward penalization. By incorporating a conservative "imagination" process, MOPO allows agents to generalize beyond the training data while remaining robust to model inaccuracies. Our experiments demonstrate that MOPO significantly outperforms state-of-the-art model-free methods on standard benchmarks and challenging out-of-distribution tasks.
Introduction
Reinforcement Learning (RL) typically relies on active exploration to improve performance. In many critical domains—such as healthcare, autonomous driving, or industrial robotics—this trial-and-error approach is prohibitively expensive or dangerous. Offline RL offers a solution by learning from fixed datasets. The central challenge is distributional shift: when an agent selects actions different from those in the dataset, its predictions become unreliable. Standard algorithms often exploit these inaccuracies, leading to poor real-world performance. While model-free approaches often constrain the agent to the data manifold, they can be overly restrictive. MOPO addresses this by using a model-based approach that quantifies and penalizes uncertainty, enabling safe yet flexible generalization.
Methodology
MOPO follows a model-based paradigm, first learning a simulator of the environment and then optimizing the policy within it.
- Dynamics Ensemble: MOPO trains an ensemble of probabilistic neural networks to predict next-state distributions and rewards. The disagreement within this ensemble serves as a proxy for epistemic uncertainty.
-
Uncertainty-Penalized Rewards: The core of MOPO is a modified reward function that penalizes states and actions where the model is uncertain: $$\tilde{r}(s, a) = r(s, a) - \lambda u(s, a)$$ Here, $u(s, a)$ represents the maximum variance across the ensemble, and $\lambda$ is a tunable penalty coefficient.
-
Conservative Imagination: The agent generates synthetic trajectories ("rollouts") using the learned model. The penalty ensures that the agent avoids regions where the model's predictions are likely to be erroneous.
- Policy Optimization: Standard off-policy algorithms, such as Soft Actor-Critic (SAC), are applied to the penalized synthetic data to derive the final policy.
Experimental Evaluation
We evaluated MOPO on the D4RL benchmark, covering various data qualities (random, medium, mixed, and medium-expert) in MuJoCo environments. Additionally, we introduced "Out-of-Distribution" (OOD) tasks like halfcheetah-jump, where the agent must learn a behavior (jumping) not explicitly present in the forward-running training data.
Results and Discussion
MOPO achieves state-of-the-art performance across a wide range of D4RL tasks. As shown in the table below, MOPO consistently outperforms model-free baselines like BEAR and BRAC, particularly in "mixed" and "random" datasets where data diversity allows for better model learning.
A key advantage of MOPO is its ability to generalize. In the halfcheetah-jump task, model-free methods fail because the target behavior is absent from the dataset. MOPO, by recombining learned physical dynamics, successfully "imagines" how to jump. The figure below illustrates this performance gap, showing that the model-based approach significantly exceeds the best trajectories in the buffer.
Conclusion
MOPO demonstrates that model-based RL is a powerful tool for the offline setting. By explicitly penalizing model uncertainty, it provides a principled way to handle distributional shift without being overly conservative. While MOPO excels in diverse datasets, future work will focus on improving performance in narrow data distributions and developing more robust uncertainty estimators.
Summary updated