Abstract
In complex environments with high dimension, training a reinforcement learning (RL) model from scratch often suffers from lengthy and tedious collection of agent-environment interactions. Instead, leveraging expert demonstration to guide RL agent can boost sample efficiency and improve final convergence. In order to better integrate expert prior with on-policy RL models, we propose a generic framework for Learning from Demonstration (LfD) based on actor-critic algorithms. Technically, we first employ K-Means clustering to evaluate the similarity of sampled exploration with demonstration data. Then we increase the likelihood of actions in similar frames by modifying the gradient update strategy to leverage demonstration. We conduct experiments on 4 standard benchmark environments in Mujoco and 2 self-designed robotic environments. Results show that, under certain condition, our algorithm can improve sample efficiency by 20% ~ 40%. By combining our framework with on-policy algorithms, RL models can accelerate convergence and obtain better final mean episode rewards especially in complex robotic context where interactions are expensive.
Introduction
Reinforcement Learning (RL) often suffers from a "cold start" problem: at the beginning of training, an agent has zero knowledge and must explore randomly. In complex environments with high-dimensional state and action spaces, such as robotics, this random exploration is incredibly time-consuming and expensive. While off-policy algorithms like SAC or DDPG can incorporate expert data via a replay buffer, on-policy algorithms like PPO struggle to integrate external demonstrations without causing training instability. This paper introduces a generic framework for Learning from Demonstration (LfD) specifically designed for on-policy actor-critic algorithms to bridge this gap and improve sample efficiency.
Methodology
The proposed LfD pipeline modifies the standard gradient descent process to "nudge" the agent toward expert-like behavior through a multi-step process:
- Similarity Evaluation via K-Means: To handle high-dimensional spaces, the framework applies K-Means clustering to the agent's sampled experiences. It then identifies frames in the agent's exploration that are sufficiently similar to expert demonstration frames based on a threshold $H$.
- Dataset Augmentation ($D_p$): Similar frames are stored in a "promising" dataset, $D_p$.
- Modified Gradient Update: During the update phase, the agent combines the standard gradient with an additional term derived from $D_p$. This effectively increases the "step length" for actions that resemble expert behavior, guiding the agent toward global optima.
- Early-Stage Guidance: To prevent overfitting and allow the agent to eventually surpass the expert, this guidance is only applied during the early epochs of training.
Experimental Evaluation
The framework was evaluated on two sets of environments:
- Standard MuJoCo Benchmarks: Ant-v2, Hopper-v2, Humanoid-v2, and Swimmer-v2.
- Robotic Tasks: A simulated life-size humanoid (InMoov) with 87 joints and a mechanical robot arm (Jaka) tasked with button-pressing.
Expert demonstrations were generated using a pre-trained SAC model for 100 episodes per environment.
Results and Discussion
The proposed method achieved a 20% to 40% improvement in sample efficiency across all benchmarks. In the Swimmer environment, for instance, the agent reached 85% of the maximum reward in only 60% of the time required by the baseline PPO.
Key insights include:
- The "Soft" Nudge: Biasing the gradient rather than direct imitation allows the agent to maintain exploration benefits while using a human-like prior.
- Dimensionality Effects: The method is most effective in lower-dimensional action spaces. In high-dimensional spaces like Ant, the sparsity of demonstration data makes the model more prone to overfitting, requiring careful parameter tuning.
Conclusion
This research demonstrates that integrating expert demonstrations into on-policy actor-critic algorithms via clustering-based similarity evaluation significantly accelerates convergence. While the risk of overfitting in high-dimensional spaces remains a challenge, the framework offers a robust path toward more efficient robotic RL. Future work will focus on automating the adjustment of demonstration exploitation ratios.
Summary updated