This summary explores the paper "Learning Off-Policy with Online Planning" by Sikchi et al., presented at CoRL 2021.
TL;DR
LOOP (Learning Off-Policy with Online Planning) is a hybrid reinforcement learning framework that combines the sample efficiency of model-free off-policy learning with the flexibility of model-based online planning. By using a learned value function as a terminal reward for short-horizon trajectory optimization, LOOP achieves superior performance in online, offline, and safe RL settings compared to pure model-free or model-based methods.
What Problem Does This Paper Address?
Reinforcement learning (RL) in robotics faces a difficult tug-of-war. Model-free methods (like SAC) are sample-efficient but produce "black-box" policies that are hard to constrain for safety at deployment time. Model-based methods (like PETS) offer flexibility and explainability through planning, but they are often "myopic"—planning only a few steps ahead because long-horizon planning is computationally expensive and prone to compounding model errors.
The authors identify a specific gap: how can we use a learned dynamics model to plan effectively without suffering from short-sightedness or massive computational overhead? Furthermore, they tackle the "Actor Divergence" problem—a phenomenon where the planning agent behaves so differently from the learned parametric policy that the underlying value estimates become unstable.
Methods
The core of the paper is the LOOP framework, which operates on three main pillars:
- H-step Lookahead with Terminal Value: Instead of planning for a long horizon, LOOP plans for a short horizon ($H$ steps) using a learned dynamics model. To account for the infinite future beyond those $H$ steps, it appends a terminal value function learned via a standard off-policy algorithm (like SAC). Overview of LOOP
- Actor Regularized Control (ARC): To solve the "Actor Divergence" issue, the authors introduce ARC. This trajectory optimization procedure constrains the planner to stay relatively close to the learned parametric actor. It uses iterative importance sampling to find action sequences that maximize reward while remaining within a "trust region" of the policy that the value function was trained on.
- Unified Framework: LOOP is designed as a "plug-and-play" component. It can be used to improve exploration in Online RL, provide a performance boost to Offline RL algorithms (like CRR or PLAS), and incorporate cost-based constraints for Safe RL.
Datasets
The authors evaluated LOOP across a diverse set of benchmarks:
- Online RL: Standard MuJoCo locomotion tasks (HalfCheetah-v2, Walker2d-v2, Ant-v2) and complex manipulation tasks (PenGoal-v1, Claw-v1).
- Offline RL: The D4RL dataset, specifically the locomotion suites (Hopper, HalfCheetah, Walker2d) with varying data quality (random, medium, medium-expert).
- Safe RL: OpenAI Safety Gym (PointGoal1, CarGoal1) and a custom simulated RC-car environment requiring high-speed drifting while staying within bounds.
Key Insights and Ideas
- The Error Tradeoff: The paper provides a theoretical bound showing that $H$-step lookahead reduces the impact of value function errors by a factor of $\gamma^{H-1}$. While it introduces model error, in low-data regimes, value function bias (like overestimation) is usually the bigger enemy. LOOP effectively trades a bit of model error for a massive reduction in value error.
- Planning as a Regularizer: ARC isn't just about stability; it acts as a bridge. By regularizing the planner toward the actor, it ensures the transitions seen during planning are "familiar" to the value function, preventing the agent from exploiting model inaccuracies.
- Flexibility is Free: Because LOOP plans at test time, it can handle safety constraints (e.g., "don't hit that new obstacle") by simply adding a cost term to the trajectory optimization, something a fixed neural network policy cannot do without retraining.
Key Results
- Superior Sample Efficiency: In online tasks, LOOP-SAC significantly outperformed vanilla SAC and was competitive with or better than state-of-the-art model-based methods like MBPO. Online RL Comparisons
- Offline Gains: Adding LOOP on top of offline algorithms like CRR and PLAS resulted in average performance improvements of 15.9% and 29.5%, respectively, on D4RL benchmarks.
- Safe and Fast: In Safety Gym, LOOP reached high reward levels while maintaining safety constraints orders of magnitude faster than model-free safe RL baselines like CPO.
- The Drifting RC-Car: In the RC-car task, LOOP successfully learned complex drifting behaviors. The authors noted that pure planning methods (like PETS) failed here because drifting requires reasoning about momentum far beyond a short planning horizon—a gap LOOP fills with its terminal value function.
Limitations and Future Work
- Computational Cost: While more efficient than previous methods like POLO, LOOP still requires running trajectory optimization at every environment step, which is slower than a simple neural network forward pass.
- Model Dependency: The performance is still bounded by the quality of the learned dynamics model. In extremely high-dimensional or visually complex environments, model learning remains a bottleneck.
- Future Directions: The authors suggest exploring more advanced off-policy evaluation techniques to further refine the terminal value function and investigating how LOOP might scale to pixel-based observations.
Summary updated