Online Pre-Training for Offline-to-Online Reinforcement Learning

Yongjae Shin, Jeonghye Kim, Whiyoung Jung, Sunghoon Hong, Deunsol Yoon, Youngsoo Jang, Geon-Hyeong Kim, Jongseong Chae, Youngchul Sung, Kanghoon Lee, Woohyung Lim

Introduction

Offline-to-online reinforcement learning (RL) promises the best of both worlds: pre-training an agent safely and cheaply on a massive static dataset, followed by fine-tuning in the real world to reach peak performance. However, this paradigm often suffers from a counter-intuitive trend where pre-trained agents perform worse during online fine-tuning than agents trained entirely from scratch.

To address this, researchers have introduced Online Pre-Training (OPT). OPT fixes this performance collapse by introducing an intermediate learning phase and a second, dedicated value function specifically "meta-adapted" to handle the shift from static datasets to live interactions. This novel approach yields an average 30% performance boost across standard benchmarks.

The Problem: Distribution Shift and Value Collapse

In a perfect scenario, offline pre-training provides a massive head start. In practice, the transition to online interaction often fails catastrophically due to distribution shift.

When an agent begins interacting with a live environment, it inevitably encounters states and actions that were not present in its offline training data. The agent’s "critic"—the value function responsible for estimating future rewards—produces wildly inaccurate, often over-optimistic estimates for these unfamiliar experiences. Because the agent's policy relies on these broken estimates to make decisions, its performance collapses the moment it goes online. In many cases, standard offline-to-online fine-tuning performs worse than simply initializing a random agent and training it from scratch.

The OPT Solution: A Three-Stage Pipeline

To prevent this collapse, the authors propose transforming the standard two-stage pipeline (Offline $\rightarrow$ Online) into a three-stage process with a new "bridge" phase.

Comparison of conventional offline-to-online RL and the proposed OPT pipeline.
  1. Offline Pre-Training: The agent learns an initial policy ($\pi$) and a value function ($Q^{off-pt}$) from a static dataset, identical to standard offline RL.
  2. Online Pre-Training (The Bridge): This is the core innovation. The agent collects a small amount of online data. Instead of immediately updating the policy, it initializes a second value function ($Q^{on-pt}$) and trains it using a meta-adaptation objective. This forces $Q^{on-pt}$ to learn from the offline data while simultaneously ensuring it can rapidly adapt to new online samples. Crucially, the policy is kept "frozen" during this phase to prevent it from being corrupted by early, noisy value estimates.
  3. Online Fine-Tuning: The agent resumes full training. It updates the policy using a weighted combination of both the conservative offline value function and the adaptive online value function.

A scheduling coefficient ($\kappa$) manages this transition. Early in fine-tuning, the agent relies heavily on the stable $Q^{off-pt}$. As training progresses and $Q^{on-pt}$ becomes more accurate, the agent gradually shifts its trust toward the new, adaptive online value function.

Key Insights and Results

The OPT method was evaluated using the industry-standard D4RL benchmark, covering MuJoCo locomotion tasks, complex Antmaze navigation, and high-dimensional Adroit robotic hand manipulation.

Learning curves demonstrating OPT's superiority over standard fine-tuning and training from scratch.
  • Superior Performance: OPT achieved an average 30% improvement over baseline methods across the D4RL environments. It consistently outperformed recent state-of-the-art baselines like Cal-QL and OEMA.
  • Robustness to Poor Data: The performance gains were most dramatic in datasets with "random" quality data (e.g., Walker2d-random). In these scenarios, the gap between offline data and optimal behavior is massive, causing traditional fine-tuning to fail completely. OPT successfully bridged this gap.
  • The "Two-Headed" Critic: Unlike most methods that try to fix or regularize the original offline value function, OPT demonstrates that it is highly effective to leave the offline critic as a stable "anchor" while training a separate "specialist" critic for the online regime.
  • Plug-and-Play Versatility: OPT is not a standalone RL algorithm but a modular addition. The authors successfully integrated it with different backbone algorithms like TD3+BC, SPOT, and IQL, proving it improves performance regardless of the underlying architecture.

Limitations and Future Work

While highly effective, OPT does introduce computational overhead. Adding a second value function and an extra training phase increases the computational cost (e.g., a 50% increase in training time for a Walker2d task). Additionally, while the authors provide a robust schedule for the weighting coefficient $\kappa$, optimal scheduling might require tuning for entirely new environments. Future work will likely explore how to make this crucial "bridge" phase even shorter and more data-efficient.

Summary updated

BibTeX
@inproceedings{shin2025online,
  author = {Yongjae Shin and Jeonghye Kim and Whiyoung Jung and Sunghoon Hong and Deunsol Yoon and Youngsoo Jang and Geon-Hyeong Kim and Jongseong Chae and Youngchul Sung and Kanghoon Lee and Woohyung Lim},
  title = {{Online Pre-Training for Offline-to-Online Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=5anr1H5vR5},
}
Figure