Abstract
Offline-to-Online Reinforcement Learning (RL) aims to leverage static datasets for pre-training before refining policies through real-world interaction. However, this transition often suffers from the "pessimism trap"—where agents are too cautious to explore—or the "instability trap"—where agents unlearn offline knowledge upon encountering online distribution shifts. This paper introduces Adaptive Policy Learning (APL), a framework that selectively applies pessimistic updates to offline data and optimistic updates to online interactions. APL achieves state-of-the-art performance on D4RL benchmarks, demonstrating high sample efficiency and robustness even when initialized with low-quality data.
1. Introduction
Reinforcement Learning (RL) has traditionally been divided into two paradigms: Online RL, which learns through active exploration, and Offline RL, which learns from fixed datasets. While Online RL is often prohibitively expensive or risky in real-world applications, Offline RL is limited by the quality and coverage of the provided data. The ideal middle ground is Offline-to-Online RL, where an agent is pre-trained on offline data and subsequently fine-tuned via online interaction.
The transition from offline to online learning presents two primary challenges. First, the Pessimism Trap: Offline algorithms use conservative updates to avoid out-of-distribution (OOD) actions. If this pessimism persists during online tuning, the agent fails to explore effectively. Second, the Instability Trap: Online algorithms are inherently optimistic. A sudden shift to pure online learning can cause the agent to "unlearn" valuable patterns from the offline dataset, leading to catastrophic performance collapses. Adaptive Policy Learning (APL) addresses these issues by treating data differently based on its origin.
2. The Adaptive Policy Learning Framework
The core of APL is a unified update rule that balances conservative and greedy objectives.
2.1 The Unified Update Rule
The framework defines a general update equation for a policy or value function $C$: $$C^{k+1} \leftarrow \mathcal{F}(\mathbb{A}(C^k) + W(s, a)\mathbb{B}(C^k))$$ In this equation:
- $\mathbb{A}(C^k)$ represents the Optimistic component, typically a standard online RL objective like Bellman error that encourages policy improvement.
- $\mathbb{B}(C^k)$ represents the Pessimistic component, a penalty term (e.g., from Conservative Q-Learning) that keeps the agent's actions within the known data distribution.
- $W(s, a)$ is the Adaptive Switch. For online interaction data, $W=0$, allowing the agent to be greedy and explore. For offline data, $W=1$, maintaining the necessary caution to handle OOD actions.
2.2 Online-Offline Replay Buffer (OORB)
To manage the data streams, APL utilizes a two-level buffer system. A small "online" buffer stores recent interactions to provide near-on-policy feedback. A larger "offline" buffer contains the original dataset and all historical online data. During training, the agent samples from these buffers with a probability $p$, ensuring a balanced diet of historical knowledge and new experiences.
2.3 Concrete Implementations
APL is an algorithmic "wrapper" compatible with various architectures. The authors demonstrate this with two versions:
- GCQL (Greedy-Conservative Q-ensemble Learning): A value-based implementation combining REDQ (online) and CQL (offline).
- GCTD3BC: A policy-based implementation building on the TD3+BC algorithm.
3. Experimental Evaluation
The researchers evaluated APL using the D4RL benchmark, specifically focusing on MuJoCo continuous control tasks (Walker2d, Hopper, and HalfCheetah). The experiments spanned four data quality tiers: random, medium, medium-replay, and medium-expert.
3.1 Performance and Efficiency
APL, particularly the GCQL variant, consistently outperformed competitive baselines such as IQL, AWAC, and OFF2ON. Across all MuJoCo tasks, GCQL achieved a total normalized score of 969, compared to 863 for OFF2ON. Notably, APL demonstrated superior sample efficiency, reaching higher performance levels using only 20% of the online interactions required by previous state-of-the-art methods like AWAC.
3.2 Robustness to Data Quality
One of the most significant findings was APL's ability to recover from "trash" data. In the halfcheetah-random task, GCQL reached an expert-level score of 101. In contrast, pure offline methods (CQL) and pure online methods (REDQ) stalled at scores of 46 and 59, respectively. This suggests that APL effectively uses the random offline data as a baseline and rapidly improves through targeted online refinement.
4. Discussion and Conclusion
The success of APL lies in its simplicity. By replacing complex constraints with a binary switch based on data origin, it avoids the "dip" in performance often seen during the offline-to-online transition. The framework proves that pessimism is a tool for managing OOD actions in static data, not a permanent requirement for the agent's entire lifecycle.
4.1 Limitations and Future Work
While robust, the performance of APL is influenced by the sampling probability $p$ between the online and offline buffers. While $p=0.5$ is generally effective, extreme values can impact stability. Furthermore, while APL mitigates the impact of poor data, the starting quality of the offline dataset still influences the initial learning trajectory. Future research will explore the application of the Greedy-Conservative balance in complex, real-world environments like robotics and healthcare.
Summary updated