REPAINT: Knowledge Transfer in Deep Reinforcement Learning

Yunzhe Tao, Sahika Genc, Tao Sun, Sunil MallyaOpenReview 2023

TL;DR

This paper introduces REPAINT, a novel algorithm for knowledge transfer in deep reinforcement learning that significantly speeds up learning, especially when source and target tasks are dissimilar. REPAINT combines on-policy representation transfer with an off-policy instance transfer that intelligently selects useful past experiences based on their advantage in the new task.

What Problem Does This Paper Address?

Deep reinforcement learning (RL) agents often require vast amounts of data and computation to learn complex tasks from scratch. A key challenge is accelerating this learning process by leveraging knowledge acquired from previously learned tasks. This is particularly difficult when the new (target) task is significantly different from the old (source) tasks, or when the source tasks are simpler sub-tasks of the target. Existing transfer learning methods often struggle in these low-similarity scenarios, either by failing to transfer knowledge effectively or by performing poorly when the target task is more complex.

Methods

REPAINT tackles this challenge by employing a two-pronged approach:

  • On-policy Representation Transfer (Kickstarting): This component uses policy distillation to encourage the student agent's policy to mimic the teacher's policy. This helps to "kickstart" the learning process by providing a good initial policy, especially useful when the tasks are somewhat similar.
  • Off-policy Instance Transfer (Advantage-based Experience Selection): This is the core innovation. REPAINT maintains a replay buffer of experiences collected by the teacher policy. However, instead of blindly using all these experiences, it employs an "advantage-based experience selection" mechanism. This means it only selects past experiences (transitions) that have a high "advantage" (i.e., were particularly good actions) under the target task's reward function. This allows the agent to learn from relevant past experiences even if the tasks are semantically different, focusing on what was beneficial in the new context.

REPAINT combines these two components, allowing for flexible transfer learning that is not solely reliant on task similarity.

Datasets

The paper evaluates REPAINT across several benchmark environments:

  • MuJoCo: Reacher and Ant environments for continuous control tasks.
  • AWS DeepRacer: Single-car and multi-car racing environments for autonomous driving.
  • StarCraft II Learning Environments: BuildMarines and FindAndDefeatZerglings mini-games for complex strategy tasks.

The authors do not introduce new benchmarks but use existing, well-established RL environments to demonstrate the effectiveness of their approach.

Key Insights and Ideas

  • Advantage-based selection is key for dissimilar tasks: The most significant insight is that selecting past experiences based on their advantage in the new task is more effective than relying on direct task similarity when transferring knowledge. This allows REPAINT to leverage useful data even when the source and target tasks have low semantic overlap.
  • REPAINT is robust to task similarity: Unlike many prior methods that require high task similarity, REPAINT demonstrates strong performance across a spectrum of task similarities, including cases where source tasks are dissimilar or even sub-tasks of the target.
  • Combining representation and instance transfer is beneficial: The paper shows that the combination of kickstarting with a pre-trained policy and intelligently selecting past experiences leads to superior results compared to using either method alone.
  • Simplicity and extensibility: REPAINT is designed to be easily integrated with existing policy gradient RL algorithms, including actor-critic methods and even Q-learning.

Key Results

  • Significant training time reduction: REPAINT consistently reduces the total training time required to reach a target performance level across various environments and task similarity conditions. For instance, in the StarCraft II sub-task scenario, REPAINT achieved a 92% reduction in training iterations compared to the baseline.
  • Improved asymptotic performance: In many cases, REPAINT not only speeds up learning but also achieves higher final performance (return scores) than baseline methods.
  • Outperforms baselines in low-similarity scenarios: When source tasks are dissimilar to or sub-tasks of the target tasks, REPAINT significantly outperforms other methods like simple kickstarting or instance transfer.
  • Experience selection is crucial: The advantage-based experience selection mechanism was shown to be more effective than other prioritization methods (like Prioritized Experience Replay) when task similarity is low.

Limitations and Future Work

  • Hyperparameter sensitivity: The paper acknowledges that hyperparameters like the cross-entropy weight ($\beta_k$) and the advantage threshold ($\zeta$) are task-specific and may require tuning. While REPAINT shows some robustness, finding optimal values can still be challenging.
  • Automatic hyperparameter tuning: The authors suggest future work on automatically learning task similarity and determining the best hyperparameters ($\beta_k$, $\zeta$) for transfer learning.
  • Neural network architecture impact: While preliminary results are presented, a deeper investigation into how neural network architectures affect transfer performance is suggested.
  • Extension to Q-learning: While an extension to Q-learning is discussed, its empirical evaluation is limited.

Summary updated

BibTeX
@misc{tao2023repaint,
  author = {Yunzhe Tao and Sahika Genc and Tao Sun and Sunil Mallya},
  title = {{REPAINT: Knowledge Transfer in Deep Reinforcement Learning}},
  year = {2023},
  url = {https://openreview.net/forum?id=keyF9TPkGTL},
  howpublished = {OpenReview},
}
Figure