Curriculum Offline Imitating Learning

Minghuan Liu, Hanye Zhao, Zhengyu Yang, Jian Shen, Weinan Zhang, Li Zhao, Tie-Yan Liu

Curriculum Offline Imitating Learning (COIL) addresses the "quantity-quality dilemma" in offline imitation learning. By iteratively imitating "neighboring" policies within a dataset, COIL climbs a curriculum ladder of increasingly better trajectories. This approach achieves state-of-the-art performance on mixed datasets without the instability and bootstrapping errors typical of offline Reinforcement Learning (RL).

The Offline Learning Dilemma

Offline learning—learning from a fixed dataset without environment interaction—is highly desirable for real-world AI applications like robotics or healthcare, where trial-and-error is dangerous or expensive. Currently, researchers generally rely on two main approaches, both of which have significant drawbacks:

  1. Offline RL: Methods like CQL or BCQ try to surpass the dataset's average performance by estimating value functions. However, they suffer from "bootstrapping errors" (hallucinating high values for actions not present in the dataset). This makes them notoriously unstable and difficult to tune without online evaluation.
  2. Offline Imitation Learning (IL): Simple Behavior Cloning (BC) is stable but suffers from a quantity-quality dilemma. If you train on the whole dataset, the agent learns a mediocre average behavior. If you restrict training to only the top 10% of trajectories to capture high-quality behavior, the agent lacks sufficient data. This data scarcity leads to "compounding errors," where a small mistake pushes the agent into unfamiliar states it never saw during training, causing catastrophic failure.

The core question COIL addresses is: Can we achieve the stability of imitation learning while still reaching the performance of the best trajectories in a diverse, mixed-quality dataset?

The COIL Framework: A Curriculum of Imitation

COIL treats offline learning as a sequence of imitation tasks. Instead of jumping straight to imitating the best trajectories, the agent follows a curriculum:

  • Adaptive Experience Picking: The core insight is that Behavior Cloning requires very little data if the target trajectory is "close" to the agent's current policy. COIL uses a "neighboring policy assessment" to identify trajectories in the dataset that the current policy can easily reach and learn from.
  • Return Filter: To ensure the agent is always improving, COIL maintains a moving average return threshold. It only considers trajectories that perform better than the current stage's average.
  • The Curriculum Loop:
    1. Pick "neighboring" trajectories that have higher returns than the current policy.
  • Perform Behavior Cloning on this specific subset.
  • Update the return filter and repeat.

Crucially, COIL does not estimate a value function (Q-function). It relies purely on strategically applied supervised learning, entirely avoiding the mathematical instability of bootstrapping.

Key Insights: The Proximity Advantage

Empirical analysis showing that policies closer to the target require fewer trajectories to successfully clone behavior.

The most surprising finding in the paper is that the amount of data needed for successful Behavior Cloning is inversely proportional to how similar the target is to the starting point. By taking small steps toward "expert" behavior and using intermediate "mediocre" data as a bridge, COIL overcomes the data scarcity that typically plagues top-tier trajectories.

The authors provide a new theoretical performance bound that explicitly includes an "initialization gap." This mathematically justifies why starting "close" to your target reduces the data required for success. Furthermore, unlike many offline RL methods that require a human to pick the best checkpoint via online testing, COIL naturally terminates when it can no longer find better neighboring trajectories in the pool.

Key Results

Dataset trajectory distribution and COIL's performance compared to standard Behavior Cloning.

The paper evaluates COIL on "Final Buffer Datasets" (the entire training history of an online RL agent) and the standard D4RL benchmark suite.

  • Outperforming Standard BC: On final buffer datasets, standard BC achieves mediocre scores (e.g., ~1480 on Hopper). COIL nearly doubles this, reaching ~2872 and coming very close to the expert's performance of ~3163. As seen in the training curves, COIL steadily climbs past all static BC baselines.
  • Competitive with SOTA RL: On D4RL benchmarks, COIL is competitive with—and sometimes beats—heavyweight RL algorithms like CQL and MOPO. For example, on walker2d-medium-expert, COIL scores 4012.3, significantly outperforming standard BC (297.0) and BAIL (3633.9).
  • Stability: The training curves for COIL are remarkably smooth compared to RL-based methods, which often fluctuate wildly due to value estimation errors.

Limitations and Future Directions

While powerful, COIL has a few limitations. First, it relies heavily on the dataset containing a "path" of improving policies. If a dataset only contains very bad and very good trajectories with no intermediate stepping stones, the "neighboring" strategy may struggle to bridge the gap. Second, because it is an imitation-based method, COIL is generally capped by the best performance present in the dataset; it cannot "invent" a policy significantly better than the best trajectory it sees.

Future work may explore more sophisticated ways to measure policy discrepancy beyond the heuristics used in this paper, making the neighbor-picking process even more robust across disjointed datasets.

Summary updated

BibTeX
@inproceedings{liu2021curriculum,
  author = {Minghuan Liu and Hanye Zhao and Zhengyu Yang and Jian Shen and Weinan Zhang and Li Zhao and Tie-Yan Liu},
  title = {{Curriculum Offline Imitating Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure