Hierarchical Orchestra of Policies

Thomas P Cannon, Özgür Şimşek

TL;DR

This paper introduces the Hierarchical Orchestra of Policies (HOP), a novel modularity-based approach to lifelong reinforcement learning that mitigates catastrophic forgetting. HOP dynamically forms a hierarchy of policies based on state similarity, allowing agents to adapt to new tasks without explicit task labels and outperforming baseline methods in knowledge retention.

What Problem Does This Paper Address?

Traditional neural networks struggle when learning sequentially in dynamic environments, a phenomenon known as catastrophic forgetting. This occurs when an agent learns a new task, it rapidly loses knowledge acquired from previous tasks. This is a significant hurdle for applications like robotics or dialogue systems that require continuous adaptation. Existing solutions often rely on task labels or complex replay mechanisms, which can be impractical in real-world scenarios where task boundaries are ambiguous. This paper tackles the challenge of enabling agents to learn new skills while retaining existing knowledge, even without explicit task identification.

Methods

The core of this paper is the Hierarchical Orchestra of Policies (HOP), a modularity-based framework designed for continual reinforcement learning. HOP builds upon a base reinforcement learning algorithm (PPO in this case) and introduces three key mechanisms:

  1. Checkpoints: When a policy performs well on a task (surpassing a reward threshold), it's "frozen" and stored as a checkpoint. These checkpoints are associated with a set of "trusted states" encountered during successful task execution.
  2. Orchestration of Policy Activation: When the agent encounters a new state, it's compared against the trusted states of all frozen policies. If a state is sufficiently similar (cosine similarity > 0.98) to a trusted state of a checkpoint policy, that policy is activated.
  3. Hierarchical Weightings: Instead of directly sampling actions from a single policy, HOP combines the outputs of activated checkpoint policies and the current learning policy. This combination is weighted hierarchically, giving more influence to more recent policies, but still allowing older policies to contribute if newer ones don't activate. This prevents direct conflicts between policies and allows for a nuanced blend of past and present knowledge.

Crucially, HOP does not require explicit task labels, making it more adaptable to environments with ambiguous task boundaries.

Datasets

The experiments were conducted using the Procgen suite of environments (Cobbe et al., 2020). This suite provides procedurally generated environments that allow for testing generalization and adaptation across various tasks. The authors specifically used four environments: Ninja, StarPilot, Climber, and CoinRun. The experiments involved training across three phases, switching between different environment combinations to assess knowledge retention and transfer.

Key Insights and Ideas

  • Task-agnostic adaptation: HOP's ability to learn and adapt without explicit task labels is a significant advantage for real-world applications where tasks are not always clearly defined.
  • Dynamic policy hierarchy: The formation of a hierarchical structure of policies based on state similarity allows for a flexible and adaptive learning process.
  • Balancing old and new knowledge: The hierarchical weighting mechanism effectively balances the influence of past knowledge with the need to adapt to new tasks, preventing catastrophic forgetting without sacrificing performance on existing skills.
  • State similarity as a key: The reliance on state similarity to activate relevant policies is a clever way to infer task relevance without explicit labels.

Key Results

  • HOP significantly outperformed the baseline Proximal Policy Optimization (PPO) in continual learning scenarios, demonstrating faster performance recovery and higher final rewards.
  • HOP performed comparably to Progressive Neural Networks (PNN), a state-of-the-art transfer method, even when PNN was provided with task labels and HOP was not.
  • In experiments with similar environment dynamics (e.g., Ninja and CoinRun), HOP showed meaningful transfer of learning, activating relevant frozen policies.
  • HOP maintained performance when tasks remained constant, highlighting its versatility.

Limitations and Future Work

  • Hyperparameter sensitivity: The effectiveness of HOP is noted to depend on the careful tuning of hyper-parameters, particularly the similarity threshold (w) and reward threshold (P).
  • Diverse task transitions: The paper suggests future work could evaluate HOP on transitions between highly diverse tasks and environments where task boundaries are more ambiguous, as current methods struggle in such scenarios.
  • Continuous environments: Adapting HOP to continuous environments with fluid task transitions is proposed as a way to further highlight its robustness.
  • Learnable parameter for adaptation: The authors suggest introducing a learnable parameter that could dynamically adjust the influence of previous checkpoints to enable immediate adaptation following task distribution changes.

Summary updated

BibTeX
@inproceedings{cannon2024hierarchical,
  author = {Thomas P Cannon and Özgür Şimşek},
  title = {{Hierarchical Orchestra of Policies}},
  booktitle = {IMOL @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=Oc0x7csK0c},
}
Figure