TL;DR
The Hierarchical Orchestra of Policies (HOP) is a new modularity-based framework for continual reinforcement learning that prevents "catastrophic forgetting" without requiring explicit task labels. By dynamically activating and weighting a hierarchy of frozen policy checkpoints based on state similarity, HOP allows agents to retain old skills while rapidly adapting to new environments.
What Problem Does This Paper Address?
In reinforcement learning (RL), agents often suffer from catastrophic forgetting: as they learn a new task, the neural network weights optimized for the previous task are overwritten, leading to a total loss of prior knowledge.
Existing solutions usually fall into three camps:
- Regularization: Constraining weight updates (e.g., EWC).
- Replay: Re-training on old data (e.g., Experience Replay).
- Modularity: Adding new "columns" or modules for new tasks (e.g., Progressive Neural Networks).
However, most modularity-based methods rely on task labels—the agent must be told exactly when a task has changed. In the real world (or complex simulations), task boundaries are often blurry or unknown. The authors of this paper sought a way to achieve the stability of modularity-based methods without the "crutch" of task identifiers.
Methods
HOP builds a collection of policies over time using three core mechanisms:
- Checkpoints: At fixed intervals, the agent evaluates its current policy. If the performance (episodic return) exceeds a predefined threshold, the policy is frozen as a "checkpoint," and the states encountered during that successful run are stored as "trusted states."
- The Orchestra (Dynamic Activation): When the agent encounters a new state, it calculates the cosine similarity between that state and the "trusted states" of all previous checkpoints. If the similarity is high (threshold $\omega > 0.98$), that specific frozen policy is "activated" to join the orchestra.
- Hierarchical Weighting: Instead of just averaging policies, HOP uses a hierarchical structure. It combines the outputs (logits) of activated checkpoints and the current learning policy. Newer policies are given higher weights, assuming they are likely more refined, but older policies still provide a "safety net" if the state looks familiar to them.
Crucially, the agent samples actions from this combined "joined policy," but only the active learning policy (and specific activated checkpoints) receive gradient updates, preserving the integrity of the modular knowledge base.
Datasets
The researchers evaluated HOP using the Procgen suite, a set of 16 procedurally generated environments designed to test generalization in RL. Specifically, they used:
- StarPilot & Climber: Environments with very different dynamics.
- Ninja & StarPilot: A mix of platforming and space-shooting.
- Ninja & CoinRun: Two platforming games with similar dynamics to test transfer learning.
The experiments followed a three-phase "ABA" training schedule: Train on Task A $\rightarrow$ Switch to Task B $\rightarrow$ Return to Task A to check for forgetting.
Key Insights and Ideas
- Task-Agnostic Modularity: HOP proves that you don't need a human to tell the agent "you are now playing Task B." The agent uses its own experience (state similarity) to decide which prior knowledge is relevant.
- State Similarity as a Trigger: By using cosine similarity on raw observations, the agent effectively performs "case-based reasoning." If a room looks like a room it conquered 2 million steps ago, it automatically pulls the relevant policy off the shelf.
- The Power of Recency: The hierarchical weighting scheme (Equation 2 in the paper) elegantly handles the "too many cooks" problem. By weighting more recent successful policies more heavily, the agent avoids being bogged down by early, mediocre checkpoints while still benefiting from long-term memory.
Key Results
- Faster Recovery: In the "Steps-to-return" metric (how long it takes to regain peak performance after switching back to an old task), HOP significantly outperformed standard PPO. For example, in the StarPilot-Climber transition, HOP recovered in 1.04 million steps compared to 2.68 million for PPO.
- Competitive with "Cheating" Baselines: HOP performed comparably to Progressive Neural Networks (PNN). This is significant because PNN was given explicit task labels, while HOP had to figure out the transitions on its own.
- No Performance Ceiling: Unlike some continual learning methods that trade off peak performance for stability, HOP achieved final rewards that were often higher than the PPO baseline (e.g., an 18.15 vs 12.14 return in StarPilot-Climber).
Limitations and Future Work
- Hyperparameter Sensitivity: The effectiveness of HOP relies heavily on tuning the similarity threshold ($\omega$) and the reward threshold ($P$). If these are set poorly, the agent might activate irrelevant policies or fail to save useful ones.
- Initial Performance Dip: The authors noted a performance drop immediately following a task switch. While HOP recovers faster, it doesn't yet provide "zero-shot" adaptation.
- Fluid Transitions: Future work aims to test HOP in environments where tasks blend into each other continuously, rather than discrete switches, to further prove its robustness in label-free scenarios.
Summary updated