KnowRU: Knowledge Reuse via Knowledge Distillation in Multi-Agent Reinforcement Learning

Zijian Gao, Kele Xu, Bo Ding, Huaimin Wang

TL;DR

This paper introduces KnowRU, a novel knowledge distillation framework for Multi-Agent Reinforcement Learning (MARL) that enables agents to efficiently reuse knowledge from past tasks. KnowRU significantly accelerates training and improves final performance in new, dynamic environments without requiring complex, task-specific designs.

What Problem Does This Paper Address?

Training agents in Multi-Agent Reinforcement Learning (MARL) for complex tasks is notoriously time-consuming and resource-intensive. This is especially true in dynamic environments where tasks, agent numbers, or objectives can change. Existing methods often struggle to efficiently leverage past experiences, either requiring extensive hand-coded designs that are not generalizable or failing to adapt to continuously evolving systems. The core challenge is to develop a practical and broadly applicable mechanism for agents to learn from historical data, thereby reducing training time and enhancing performance in new scenarios.

Methods

The paper proposes KnowRU, a task-independent knowledge reuse framework that leverages the principles of Knowledge Distillation (KD). Instead of relying on complex hand-coded strategies or domain expertise, KnowRU treats the output of well-trained "teacher" agents from previous tasks as a source of knowledge.

The core idea is to have "student" agents in a new task learn not only from the environment's rewards but also by mimicking the outputs (specifically, the logits before the softmax layer) of the teacher agents when presented with the same observations. This mimicry is framed as a knowledge reuse loss (L_reuse), which is combined with the standard reinforcement learning objective (L_Q).

KnowRU employs a two-phase approach:

  1. Phase I (Guidance): Initially, a higher weight is given to the knowledge reuse loss (L_reuse), guiding the new agents with the distilled knowledge.
  2. Phase II (Specialization): As training progresses, the weight of L_reuse is gradually reduced, allowing agents to specialize in the new task and adapt to its specific dynamics. This annealing of the alpha parameter (weight for L_reuse) is crucial for balancing guidance and specialization.

The paper explores using Mean Squared Error (MSE) as the L_reuse loss, finding it effective. They also note that while KD in computer vision often uses temperature scaling for softening teacher outputs, it's not strictly necessary in MARL where tasks can be significantly different.

Datasets

The experiments were conducted using the Multi-Agent Particle Environment (MPE), a standard benchmark for MARL research. The authors created several scenarios within MPE to simulate variations in cooperative and competitive tasks, including:

  • Simple_spread: A cooperative scenario where agents must reach targets.
  • Simple_adversary: A competitive scenario involving agents and adversaries.
  • Cooperative_treasure_collection: A more complex scenario combining cooperation and competition.

These scenarios were adapted by changing the number of agents, targets, and adversaries to simulate dynamic task variations, serving as both training environments for teacher models and evaluation environments for KnowRU.

Key Insights and Ideas

  • Knowledge Distillation for MARL is Viable: The paper demonstrates that KD, a technique successful in supervised learning, can be effectively adapted to MARL for knowledge reuse, offering a more generalizable approach than previous methods.
  • Mimicking Outputs as Knowledge Transfer: The core insight is that mimicking the action-selection logic (logits) of past successful agents provides a direct and effective way to transfer "dark knowledge" without needing explicit task-specific feature engineering.
  • Two-Phase Training (Guidance & Specialization): The annealing of the alpha parameter is a key innovation. It allows KnowRU to first leverage the broad knowledge from past tasks and then fine-tune for the specifics of the new task, preventing overfitting and ensuring optimal adaptation.
  • Task-Independent Design: KnowRU's strength lies in its generality. It can be easily integrated with existing MARL algorithms (like MADDPG and MAAC) without requiring significant modifications or deep domain knowledge about the specific tasks.

Key Results

KnowRU consistently demonstrated significant improvements across various MARL scenarios:

  • Accelerated Training: KnowRU drastically reduced the number of episodes required to reach convergence compared to baseline methods like MADDPG and MAAC. For instance, in the Cooperative Treasure Collection scenario, KnowRU achieved convergence approximately 21.6% faster than MAAC.
  • Improved Asymptotic Performance: In addition to faster training, KnowRU also led to higher final performance levels, indicating that the reused knowledge helps agents achieve better long-term outcomes.
  • Robustness and Stability: Experiments showed that KnowRU resulted in more stable training processes with less fluctuation in loss values compared to baselines, which often exhibited considerable instability, especially in early training stages.
  • Effectiveness in Diverse Scenarios: KnowRU proved effective in both cooperative (simple_spread) and competitive (simple_adversary) settings, as well as in more complex, less related tasks (cooperative_treasure_collection), highlighting its versatility.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the paper explores the impact of alpha, the optimal settings for alpha and other hyperparameters might still require tuning for different task combinations. The paper notes that the best settings for alpha are approximately 0.3-0.5.
  • Task Relatedness: Although KnowRU works even when tasks are not closely related, the degree of improvement might be influenced by the similarity between past and current tasks.
  • Future Work: The authors suggest exploring other forms of knowledge transfer beyond mimicking logits, such as feature-based or relation-based distillation. They also mention that scaling L_reuse to match the order of magnitude of L_Q is important for effective training, implying further research into loss balancing could be beneficial. The paper also notes that the source code for KnowRU is publicly available, encouraging further research and application.

Summary updated

BibTeX
@inproceedings{gao2021knowru,
  author = {Zijian Gao and Kele Xu and Bo Ding and Huaimin Wang},
  title = {{KnowRU: Knowledge Reuse via Knowledge Distillation in Multi-Agent Reinforcement Learning}},
  booktitle = {Entropy},
  year = {2021},
  url = {https://openreview.net/forum?id=dU6y6NBYXS},
}
Figure