Learning Sparse Rewarded Tasks from Sub-Optimal Demonstrations

Zhuangdi Zhu, Kaixiang Lin, Bo Dai, Jiayu ZhouarXiv 2020

Abstract

Reinforcement Learning (RL) often struggles in environments with sparse rewards, while Imitation Learning (IL) is typically limited by the performance of the provided demonstrations. This paper introduces Self-Adaptive Imitation Learning (SAIL), a framework designed to solve sparse-reward tasks using only a few sub-optimal demonstrations. By employing an exploration-driven objective and a dynamic teacher buffer, SAIL enables agents to efficiently learn from mediocre guidance and eventually surpass the teacher's performance.

Introduction

Standard Reinforcement Learning requires frequent, dense reward signals to master complex tasks. In contrast, real-world scenarios often provide only sparse feedback—rewards given only upon task completion. While Imitation Learning can bridge this gap by following a teacher, it often hits a performance ceiling defined by the teacher's expertise. SAIL addresses this "Goldilocks" problem by allowing an agent to use a handful of sub-optimal demonstrations to solve "needle-in-a-haystack" sparse reward tasks and eventually achieve near-optimal performance.

The SAIL Framework

SAIL integrates the strengths of RL and IL through three primary innovations:

  1. Exploration-Driven Objective: Instead of simple mimicry, SAIL maximizes the ratio of teacher density to the agent's historical behavior density. This encourages the agent to prioritize states favored by the teacher that the agent itself has not yet explored thoroughly.
  2. Off-Policy Adversarial Learning: Built on the TD3 framework, SAIL uses a discriminator to distinguish between teacher and agent data. This provides a shaped reward signal that guides exploration without requiring dense environment feedback.
  3. Self-Adaptive Teacher Buffer: This mechanism allows the agent to replace the initial sub-optimal teacher data with its own higher-reward trajectories. As the agent improves, the "teacher" target shifts dynamically toward optimality.
The SAIL architecture featuring the Dynamic Teacher Buffer and Exploration-Driven Imitation Learning components.

Experimental Evaluation

The framework was evaluated on four continuous control tasks from the OpenAI MuJoCo suite: Walker2d-v2, Hopper-v2, HalfCheetah-v2, and Swimmer-v2. To simulate challenging conditions, standard dense rewards were replaced with a single episodic reward at the end of each trajectory. Sub-optimal demonstrations were generated from partially trained baseline agents, providing only 1 to 4 trajectories for the learner.

Results and Discussion

Experimental results demonstrate that SAIL consistently outperforms existing baselines such as DAC (Discriminator Actor-Critic) and GAIL in sparse-reward settings.

Comparison of SAIL-Dynamic against baselines across four MuJoCo environments, showing SAIL surpassing the demonstration performance (dotted line).

Key findings include:

  • Surpassing the Teacher: In all tasks, SAIL significantly exceeded the performance of the sub-optimal demonstrations. For instance, in Swimmer-v2, SAIL reached a return of nearly 350, far surpassing the teacher's return of approximately 50.
  • Sample Efficiency: Due to its off-policy nature, SAIL reached teacher-level performance with far fewer environment interactions than on-policy alternatives.
  • Robustness: The method maintained high performance even when provided with only a single demonstration trajectory, whereas baseline methods showed significant degradation.

Conclusion

SAIL provides a robust solution for learning in sparse-reward environments with limited, sub-optimal data. By treating the agent as its own potential teacher through a self-adaptive buffer, the framework effectively lifts the performance ceiling inherent in traditional imitation learning. Future work may explore the application of SAIL to discrete action spaces and environments with zero external feedback.

Summary updated

BibTeX
@misc{zhu2020learning,
  author = {Zhuangdi Zhu and Kaixiang Lin and Bo Dai and Jiayu Zhou},
  title = {{Learning Sparse Rewarded Tasks from Sub-Optimal Demonstrations}},
  year = {2020},
  eprint = {2004.00530},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.00530},
}
Figure