Abstract
Reinforcement learning (RL) in low-data and risk-sensitive domains requires performant and flexible deployment policies that can readily incorporate constraints during deployment. One such class of policies are the semi-parametric H-step lookahead policies, which select actions using trajectory optimization over a dynamics model for a fixed horizon with a terminal value function. In this work, we investigate a novel instantiation of H-step lookahead with a learned model and a terminal value function learned by a model-free off-policy algorithm, named Learning Off-Policy with Online Planning (LOOP). We provide a theoretical analysis of this method, suggesting a tradeoff between model errors and value function errors, and empirically demonstrate this tradeoff to be beneficial in deep reinforcement learning. Furthermore, we identify the "Actor Divergence" issue in this framework and propose Actor Regularized Control (ARC), a modified trajectory optimization procedure. We evaluate our method on a set of robotic tasks for Offline and Online RL and demonstrate improved performance. We also show the flexibility of LOOP to incorporate safety constraints during deployment with a set of navigation environments. We demonstrate that LOOP is a desirable framework for robotics applications based on its strong performance in various important RL settings.
Introduction
Reinforcement Learning (RL) typically bifurcates into two paradigms: model-free methods, which learn policies or value functions directly from environmental interaction, and model-based methods, which learn a simulator to plan actions. While model-free algorithms like Soft Actor-Critic (SAC) are sample-efficient, they often suffer from unstable value estimation and produce "black-box" policies that are difficult to constrain at runtime. Conversely, pure model-based planning excels at short-term accuracy but struggles with long-term horizons due to exponential computational costs and compounding model errors.
The authors of "Learning Off-Policy with Online Planning" (LOOP) address this gap by proposing a hybrid framework. LOOP combines the stability of short-term planning with the long-horizon foresight of a learned value function, ensuring these components work in synergy through a novel regularization technique.
The LOOP Framework
LOOP integrates three core components to bridge the gap between planning and learning:
- H-step Lookahead: Instead of planning for an infinite horizon, the agent plans for a fixed $H$ steps using a learned dynamics model. To account for rewards beyond this horizon, it appends a terminal value function $\hat{V}$ learned via a standard model-free off-policy algorithm.
- Actor Regularized Control (ARC): A critical challenge identified is "Actor Divergence." If the online planner selects actions outside the distribution the value function was trained on, the value estimates become unreliable. ARC addresses this by constraining trajectory optimization to stay close to the learned actor's policy using iterative importance sampling.
- Semiparametric Deployment: Since the final action is determined by an optimization process at runtime, the agent can incorporate new constraints—such as safety boundaries—without retraining.
Key Insights and Theoretical Trade-offs
A central contribution of the paper is the theoretical analysis of the error trade-off in H-step lookahead. The authors demonstrate that this approach reduces the impact of value function errors by a factor of $\gamma^{H-1}$. This suggests that even a sub-optimal value function can be highly effective when paired with a reliable short-term model.
Furthermore, the introduction of ARC is pivotal. By regularizing the planner toward the actor, the system ensures that state-action visitation remains within the "known" regions of the value function, preventing the instabilities that often plague naive hybrid methods.
Experimental Evaluation
The researchers evaluated LOOP across several challenging benchmarks, including standard OpenAI Gym MuJoCo locomotion tasks (HalfCheetah, Walker2d, Ant), complex manipulation tasks (PenGoal, Claw), and the D4RL offline RL dataset.
Performance and Sample Efficiency
In online tasks, LOOP-SAC significantly outperformed standard SAC. For instance, in the HalfCheetah-v2 environment, LOOP-SAC demonstrated superior reward accumulation compared to baselines, reaching higher average rewards in fewer timesteps.
Offline and Safe RL
On D4RL benchmarks, LOOP improved the performance of underlying offline algorithms (CRR and PLAS) by an average of 15.9% and 29.5%, respectively. In safety-critical environments like OpenAI Safety Gym, LOOP achieved higher rewards than CPO and PPO-Lagrangian while being significantly more sample-efficient. Its ability to incorporate constraints directly into the planning objective allowed it to learn safe behaviors orders of magnitude faster than model-free counterparts.
Conclusion and Future Work
LOOP presents a robust framework for robotics applications, offering a balance between the precision of planning and the foresight of learning. While trajectory optimization at every timestep introduces computational overhead, the gains in sample efficiency and safety flexibility are substantial. Future work may explore automating the selection of the planning horizon $H$ and integrating LOOP with other model-based techniques to further enhance performance.
Summary updated