The Edge-of-Reach Problem in Offline Model-Based Reinforcement Learning

Anya Sims, Cong Lu, Jakob Foerster, Yee Whye Teh

TL;DR

This paper identifies a fundamental flaw in current offline model-based reinforcement learning (RL) called the edge-of-reach problem. The authors demonstrate that existing algorithms fail catastrophically even when given a perfect, error-free world model because they "bootstrap from the void" at the end of truncated rollouts. To fix this, they propose Reach-Aware Value Learning (RAVL), a method that uses value pessimism to "future-proof" offline RL as dynamics models inevitably improve.

What Problem Does This Paper Address?

Offline RL aims to train agents using only pre-collected datasets, avoiding the cost and danger of real-world exploration. Model-based approaches try to solve the lack of data by training a "world model" (a simulator) and then performing short "rollouts" in that simulator to generate synthetic data.

The prevailing wisdom in the field was that the performance gap in these methods was solely due to model inaccuracies—errors in the simulator that the agent exploits. However, the authors discovered a startling paradox: if you replace the learned simulator with the true, perfect environment dynamics, existing state-of-the-art methods like MOPO fail completely.

The culprit is the edge-of-reach problem. Because rollouts are truncated to $k$ steps to prevent error accumulation, the agent reaches states that are used as targets for Bellman updates but are never themselves updated. This leads to a "bootstrapping from the void" effect, where the agent hallucinates high values for states it can never properly learn about, causing a total collapse in performance.

The edge-of-reach problem: states at the end of rollouts are used as targets but never updated.

Methods

The authors propose a new algorithm called Reach-Aware Value Learning (RAVL).

Standard model-based methods apply a penalty based on dynamics uncertainty (how much the simulator "distrusts" its own prediction). RAVL shifts the focus to value pessimism. Instead of penalizing the reward based on the model's error, RAVL uses an ensemble of Q-functions and takes the minimum value across them during updates.

Key differences:

  • Standard Methods: Penalize based on $\text{Var}(\text{Dynamics})$. This penalty vanishes as the world model gets better, leading to failure.
  • RAVL: Penalizes based on $\text{Var}(\text{Value})$. This detects "edge-of-reach" states where the value function hasn't been trained, regardless of how perfect the dynamics model is.

Datasets

The authors evaluated their findings and RAVL across several standard benchmarks:

  • D4RL MuJoCo: The standard benchmark for offline RL, including tasks like HalfCheetah, Hopper, and Walker2d with various data quality levels (medium, mixed, medexp).
  • Simple 2D Environment: A custom-built environment used to visualize the "edge-of-reach seeking" behavior and verify the hypothesis.
  • V-D4RL (Pixel-based): A more challenging benchmark using visual (image) inputs from the DeepMind Control Suite, testing RAVL's ability to scale to latent-space models like DreamerV2.

Key Insights and Ideas

  • Better Models $\neq$ Better Performance: The most surprising finding is that improving the world model actually breaks current algorithms. As the model becomes perfect, the "uncertainty" penalties used by existing methods disappear, leaving the edge-of-reach problem completely unaddressed.
  • Bootstrapping from the Void: Truncated rollouts create a "frontier" of states. In a Bellman update, the value of a state at step $k-1$ depends on the value of a state at step $k$. If the state at step $k$ is never updated (because it's the end of the rollout), its value remains at its random initialization, which the agent's "max" operator quickly exploits.
  • Edge-of-Reach Seeking: Agents don't just stumble into these states; they actively "seek" them out because their overestimated values make them look like high-reward regions.
  • Accidental Success: The authors reveal that previous methods were only working because their dynamics uncertainty penalties happened to correlate with edge-of-reach states. They were fixing the right problem for the wrong reason.
Figure 1: Existing offline model-based RL methods fail if the accuracy of the dynamics model is increased (with all else kept the same). Results shown are for MOPO [36], but note that this failure indicates the failure of all existing uncertainty-based methods since each of their specific penalty terms disappear under the true dynamics as ‘uncertainty’ is zero. By contrast, our method is much more robust to changes in dynamics model. The x-axis shows linearly interpolating next states and rewards of the learned model with the true model (center→right) and random model (center→left), with results on the D4RL W2d-medexp benchmark (min/max over 4 seeds). The full set of results and experimental setup are provided in Table 1 and Appendix C.2 respectively.

Key Results

  • Robustness to Model Quality: While MOPO's performance drops to near zero when using the true dynamics on D4RL Hopper-medexp, RAVL maintains a high score (107.2 vs MOPO's 6.1).
  • Q-Value Stability: RAVL successfully prevents the "value explosion" seen in baseline methods. In Walker2d-medexp, baseline Q-values explode to $10^{10}$, while RAVL keeps them near the true optimal value.
  • State-of-the-Art on Pixels: RAVL achieved a new SOTA on the pixel-based V-D4RL benchmark, outperforming Offline DV2 and LOMPO.
  • Efficiency: RAVL is approximately 13% faster per epoch than competitors like MOBILE because it avoids multiple forward passes through the dynamics model to calculate uncertainty.
RAVL prevents the catastrophic Q-value explosion seen in the base procedure.

Limitations and Future Work

  • Balancing Penalties: In environments with very poor dynamics models, the edge-of-reach problem might be secondary to model error. Future work could explore how to optimally balance value pessimism with dynamics uncertainty.
  • Implicit Bias in Online RL: The authors suggest that the edge-of-reach effect might also exist as an implicit exploration bias in standard online RL, which warrants further investigation.
  • Hyperparameter Sensitivity: While RAVL is more robust than previous methods, it still relies on choosing an appropriate ensemble size and diversity weight, though the authors show it is relatively stable across two orders of magnitude.

Summary updated

BibTeX
@inproceedings{sims2024edge,
  author = {Anya Sims and Cong Lu and Jakob Foerster and Yee Whye Teh},
  title = {{The Edge-of-Reach Problem in Offline Model-Based Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=3dn1hINA6o},
}
Figure