Abstract
Model-based Reinforcement Learning (MBRL) offers significant sample efficiency but is often hampered by compounding errors in long-horizon rollouts. We present Bidirectional Model-based Policy Optimization (BMPO), an approach that learns both forward and backward dynamics models. By initiating rollouts in both temporal directions from real-world states, BMPO effectively reduces the maximum rollout depth required to generate a trajectory of a given length, thereby mitigating error accumulation. Our results on complex MuJoCo control tasks demonstrate that BMPO achieves state-of-the-art sample efficiency and asymptotic performance, particularly in environments with large state spaces.
Introduction: The Challenge of Compounding Error
Reinforcement Learning (RL) typically faces a trade-off between the high sample requirements of model-free methods and the potential for "model bias" in model-based approaches. In MBRL, an agent learns a dynamics model to simulate transitions. However, small inaccuracies in the model accumulate over time—a phenomenon known as compounding error. As the agent "imagines" future trajectories, these errors cause it to deviate from realistic state distributions, leading to suboptimal policy updates.
Recent advancements like Model-Based Policy Optimization (MBPO) utilize short "branched" rollouts from real-world data to limit this error. Yet, these methods rely exclusively on forward-looking predictions. BMPO extends this paradigm by incorporating backward imagination, drawing inspiration from human reasoning which often considers the steps leading back from a goal.
Methodology: Bidirectional Imagination
The core innovation of BMPO is the integration of a backward dynamics model $q(s|s', a)$ and a corresponding backward policy. Instead of a standard $k$-step forward rollout, BMPO performs $k_1$ steps backward and $k_2$ steps forward from a state $s_t$ sampled from the environment replay buffer $\mathcal{D}_{\text{env}}$.
Error Reduction and State Sampling
Theoretically, while a forward-only model's error compounds over $k_1 + k_2$ steps, the bidirectional approach limits the compounding effect to $\max(k_1, k_2)$ steps. This "divide and conquer" strategy effectively resets the error clock at the starting real state.
To further improve learning, BMPO employs High-Value State Sampling. Rather than uniform sampling from $\mathcal{D}_{\text{env}}$, states are selected via a Boltzmann distribution based on their estimated values. This encourages the agent to perform rollouts in high-reward regions of the state space, facilitating more effective exploration and exploitation. Additionally, Model Predictive Control (MPC) is used during real-world data collection to ensure the quality of transitions added to the buffer.
Experimental Evaluation
BMPO was evaluated against several continuous control benchmarks, including standard MuJoCo tasks (Hopper, Walker2d, Ant) and "No Termination" (NT) variants. The NT environments are particularly challenging as they remove early-exit conditions, requiring the agent to navigate much larger state spaces without the signal of a terminal failure.
Key Results
BMPO consistently outperformed the original MBPO and model-free baselines like Soft Actor-Critic (SAC). The performance gap was most pronounced in the NT environments, suggesting that bidirectional rollouts are highly effective for long-horizon navigation in expansive state spaces.
Ablation studies confirmed that both the backward model and the MPC component are vital. Removing the backward model significantly increased compounding error and reduced final returns. Interestingly, the optimal configuration typically involved symmetric rollouts ($k_1 = k_2$), supporting the theory that minimizing the maximum rollout length in any one direction is key to stability.
Discussion and Limitations
While BMPO offers clear performance gains, it introduces additional computational overhead. Training ensembles for both forward and backward models, along with running MPC, increases wall-clock time by approximately 30-50% compared to forward-only methods. Furthermore, learning backward dynamics in extremely high-dimensional spaces (e.g., the 'Ant' task) remains difficult, sometimes requiring a fallback to forward-only rollouts. Future work may explore more robust generative architectures to stabilize backward planning in complex physical systems.
Conclusion
Bidirectional Model-based Policy Optimization addresses the fundamental bottleneck of compounding error in MBRL. By leveraging both forward and backward models, BMPO generates more accurate simulated data, leading to faster convergence and higher performance across a variety of complex robotic control tasks.
Summary updated