Unsupervised-to-Online Reinforcement Learning

Junsu Kim, Seohong Park, Sergey Levine · DOI

Abstract

Traditional offline-to-online reinforcement learning (RL) typically relies on task-specific pre-training, which limits the versatility of pre-trained models and often leads to performance instability during online fine-tuning. We present Unsupervised-to-Online RL (U2O RL), a framework that leverages task-agnostic unsupervised pre-training to learn a diverse library of skills. By incorporating a bridging phase with reward scale matching, U2O RL facilitates stable transitions to specific downstream tasks. Our results demonstrate that U2O RL not only matches or exceeds the performance of state-of-the-art supervised methods across various benchmarks but also exhibits superior scaling in high-complexity tasks like AntMaze-Ultra.

Introduction

The standard paradigm for data-driven decision-making is offline-to-online RL (O2O RL), where a policy is first trained on a static dataset and then fine-tuned through environment interaction. However, this approach faces two significant hurdles:

  1. Task Specificity: Models must be re-trained from scratch for every new reward function, hindering the development of general-purpose "foundation models" for robotics.
  2. Brittleness: The distributional shift between offline data and online interaction often causes a performance "crash" during the initial stages of fine-tuning.

U2O RL addresses these issues by asking whether task-specific pre-training is necessary, or if a more robust, task-agnostic foundation can be built through unsupervised learning.

The U2O RL Framework

U2O RL consists of a three-stage pipeline designed to maximize representation quality and transition stability.

Overview of the U2O RL framework compared to traditional supervised offline-to-online RL.
  1. Unsupervised Offline Pre-training: The agent learns a diverse library of skills (represented by a latent vector $z$) using intrinsic rewards from a reward-free offline dataset. A key method used is HILP (Hilbert foundation policy), which embeds temporal distances into a latent space to encourage broad exploration.
  2. Bridging: To adapt to a specific task, the agent identifies the optimal learned skill $z^*$ that aligns with the target reward. This is achieved through linear regression on successor features using a minimal amount of reward-labeled data. Reward Scale Matching is introduced here to normalize the transition between intrinsic and extrinsic rewards, preventing Q-value divergence.
  3. Online Fine-tuning: Starting with the pre-trained weights and the selected skill $z^*$, the agent continues training using standard online RL algorithms such as IQL or TD3.

Experimental Evaluation

The framework was evaluated across nine diverse environments, including state-based and pixel-based inputs:

  • ExORL: Exploratory datasets for Walker, Cheetah, Quadruped, and Jaco.
  • AntMaze (Large & Ultra): Complex navigation tasks requiring long-horizon planning.
  • Kitchen (State & Visual): Sequential robotic manipulation.
  • Adroit: High-dimensional dexterous manipulation (Pen and Door).

Key Insights and Results

The Representation Advantage

A core finding is that unsupervised pre-training often yields superior features compared to supervised methods. While supervised RL tends to "collapse" representations to only the features necessary for a specific reward, unsupervised RL maintains a richer, more stable representation that is more resilient during fine-tuning.

Performance and Efficiency

U2O RL consistently matched or outperformed specialized O2O methods like Cal-QL and RLPD. Notably, in the AntMaze-Ultra environment, U2O RL achieved a normalized score of ~54-58, a massive improvement over the ~13 achieved by previous state-of-the-art methods. Furthermore, despite the lack of task-specific rewards during pre-training, U2O RL often reached peak performance faster during the online phase than its supervised counterparts.

Multi-Task Versatility

The reward-agnostic nature of the pre-training allows a single model to be fine-tuned for multiple tasks. For instance, a model pre-trained on the "Walker" domain was successfully adapted to four distinct tasks (Run, Flip, Stand, Walk) without requiring a new offline phase for each.

Limitations and Future Work

The success of U2O RL depends on the diversity of the offline dataset; if the data is highly specialized (e.g., single-task expert demonstrations), the benefits of unsupervised skill learning are reduced. While the pre-training is unsupervised, the bridging step still requires a small amount of reward-labeled data (as little as 0.2%). Future research aims to scale this approach to massive, heterogeneous datasets to move closer to a "GPT moment" for reinforcement learning and robotics.

Summary updated

BibTeX
@misc{kim2024unsupervised,
  author = {Junsu Kim and Seohong Park and Sergey Levine},
  title = {{Unsupervised-to-Online Reinforcement Learning}},
  year = {2024},
  eprint = {2408.14785},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.14785},
}
Figure