OLLIE: Imitation Learning from Offline Pretraining to Online Finetuning

Sheng Yue, Xingyuan Hua, Ju Ren, Sen Lin, Junshan Zhang, Yaoxue Zhang · DOI

Introduction

Imitation Learning (IL) has traditionally been divided into two paradigms: offline learning from static demonstration datasets and online learning through active environment interaction. The ideal approach is a hybrid "offline-to-online" pipeline: pretrain a policy on existing data to establish a baseline, then refine it online to achieve expert-level performance. However, this transition often suffers from a phenomenon known as "unlearning," where the policy's performance collapses immediately upon starting online finetuning.

The Challenge of Offline-to-Online Transition

The primary cause of this performance dip is the misalignment of the reward signal. Popular online IL methods like Generative Adversarial Imitation Learning (GAIL) rely on a discriminator to provide rewards. When finetuning begins, this discriminator is typically randomly initialized. Consequently, it provides noisy, "garbage" rewards that contradict the knowledge embedded in the pretrained policy, causing the agent to quickly discard its learned skills. As shown in the comparison below, a random initialization leads to a significant drop in return before recovery begins.

Comparison of performance between random discriminator initialization (left) and OLLIE's aligned initialization (right). Note the immediate performance dip in the random case.

The OLLIE Framework

To address this, we introduce OLLIE (OffLine-to-onLine Imitation lEarning). OLLIE provides a principled framework for initializing both the policy and the discriminator using offline data, ensuring a seamless transition to online interaction.

Methodology

  1. Surrogate Objective Formulation: OLLIE treats IL as a divergence minimization problem. It utilizes a surrogate objective that leverages both expert demonstrations and supplementary suboptimal data to learn robust behavior.
  2. Convex Optimization: By applying convex conjugate theory, the complex dual problem is transformed into a convex-concave Stochastic Saddle Point problem. This allows for efficient offline solving using unbiased stochastic gradients.
  3. Aligned Initialization: The key innovation is the analytical derivation of an "aligned" discriminator from the offline optimization variables. This discriminator is already tuned to the expert's distribution relative to the pretrained policy.
  4. Stable Finetuning: Because the discriminator starts with meaningful knowledge, the agent receives accurate reward signals from the first online step, preventing unlearning and enabling rapid improvement.

Experimental Evaluation

OLLIE was evaluated across 21 diverse tasks in five domains, including MuJoCo locomotion, Adroit robotic hand manipulation, AntMaze navigation, FrankaKitchen long-horizon tasks, and vision-based Robomimic tasks. These benchmarks represent a significant challenge due to high-dimensional state spaces and complex manipulation requirements.

The suite of benchmark environments used to evaluate OLLIE, ranging from simple locomotion to complex vision-based manipulation.

Key Results

  • Superior Offline Performance: OLLIE significantly outperformed baselines like DWBC and MLIRL in the offline phase, particularly in complex manipulation tasks where it achieved 2-4x higher scores.
  • Rapid Online Convergence: During finetuning, OLLIE reached expert-level performance with extreme efficiency, often requiring as few as 10 online episodes.
  • Robustness to Suboptimal Data: OLLIE effectively utilizes imperfect data to mitigate covariate shift and learn environment dynamics, turning suboptimal trajectories into a valuable learning resource.

Conclusion

OLLIE demonstrates that the discriminator is as critical as the policy in adversarial imitation learning. By aligning the reward function before online interaction begins, OLLIE enables stable and efficient learning across high-dimensional robotic tasks. Future work will explore extending this alignment framework to off-policy methods and non-adversarial IL to further enhance sample efficiency.

Summary updated

BibTeX
@inproceedings{yue2024ollie,
  author = {Sheng Yue and Xingyuan Hua and Ju Ren and Sen Lin and Junshan Zhang and Yaoxue Zhang},
  title = {{OLLIE: Imitation Learning from Offline Pretraining to Online Finetuning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=eG42XBhV9a},
}
Figure