Co-Imitation Learning without Expert Demonstration

Kun-Peng Ning, Hu Xu, Kun Zhu, Sheng-Jun Huang

Introduction

Reinforcement Learning (RL) has demonstrated significant potential in solving complex decision-making tasks. However, its practical application is often hindered by high sample inefficiency, frequently requiring millions of environment interactions. While Imitation Learning (IL) can mitigate this by leveraging expert demonstrations, such data is often prohibitively expensive or unavailable in domains like robotics or medicine.

Self-Imitation Learning (SIL) offers an alternative by encouraging agents to learn from their own past successful experiences. Yet, SIL is constrained by a "performance ceiling": an agent can only imitate what it has already discovered. In environments with sparse rewards or local optima, SIL fails to provide the necessary guidance for further progress. This paper introduces Co-Imitation Learning (CoIL), a framework that utilizes peer supervision to break these performance plateaus without requiring external expert data.

Methodology

Co-Imitation Learning (CoIL) involves the simultaneous training of two distinct agents, $\pi$ and $\hat{\pi}$. The framework operates through a cycle of exploration and mutual exploitation, characterized by three key components:

  1. Utility Estimation: To ensure agents do not imitate suboptimal or "lucky" trajectories, CoIL employs a utility estimation mechanism. For a given state-action pair $(\hat{s}, \hat{a})$ from a peer's experience, the utility $P_\pi$ is calculated as the difference between the peer's cumulative reward $\hat{R}$ and the agent's current estimated state value $V_\theta(\hat{s})$: $$P_\pi(\hat{a}, \hat{s}) = \hat{R} - V_\theta(\hat{s})$$
  2. Selective Imitation: Experiences are only imitated if they provide a positive advantage over the agent's current expectations. If $P_\pi > 0$, the agent updates its policy to align with the peer's successful actions.
  3. Joint Optimization: The final objective function combines standard RL losses (e.g., PPO or A2C) with the co-imitation loss, allowing agents to benefit from both their own exploration and their peer's discoveries.

Experimental Setup

The effectiveness of CoIL was evaluated on two diverse benchmarks:

  • Continuous Control (MuJoCo): Tasks included Swimmer, HalfCheetah, Ant, and Walker2d. Harder "Delayed" variants were also tested, where rewards are provided only every 20 steps.
  • Sparse-Reward Gridworlds (MiniGrid): Procedurally generated tasks such as DoorKey and MultiRoom were used to test exploration capabilities in environments where rewards are extremely infrequent.

Results and Analysis

CoIL demonstrated substantial performance gains across all tested environments. In the continuous control task HalfCheetah, CoIL achieved a cumulative reward of approximately 5,000, more than doubling the performance of PPO and SIL baselines (~2,000).

In sparse-reward MiniGrid tasks, the advantage of co-imitation was even more pronounced. In the KeyCorridorS3R1 environment, standard A2C and SIL failed to achieve any success, while CoIL successfully learned the task. Visual analysis of agent visitation patterns confirms that CoIL agents are more effective at navigating complex, multi-room environments.

Visitation heatmaps in MiniGrid-MultiRoom-N6-v0 comparing BEBOLD, SIL+BEBOLD, and CoIL+BEBOLD.

As shown in the heatmaps above, while curiosity-based methods like BEBOLD and self-imitation methods (SIL+BEBOLD) often stall in early rooms, the CoIL+BEBOLD agent successfully traverses the entire sequence of rooms to reach the goal. This suggests that the diversity provided by two agents, combined with selective imitation, allows the system to maintain a higher degree of collective exploration.

Conclusion

Co-Imitation Learning provides a robust framework for accelerating RL in the absence of expert demonstrations. By leveraging the "aha moments" of a peer agent, CoIL effectively bypasses the limitations of self-imitation. Future work will explore methods to explicitly maintain agent diversity and investigate the scalability of this approach to larger populations of agents.

Summary updated

BibTeX
@inproceedings{ning2023co,
  author = {Kun-Peng Ning and Hu Xu and Kun Zhu and Sheng-Jun Huang},
  title = {{Co-Imitation Learning without Expert Demonstration}},
  booktitle = {RRL @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=H9ulBifsnMm},
}
Figure