Continual Task Allocation in Meta-Policy Network via Sparse Prompting

Yijun Yang, Tianyi Zhou, Jing Jiang, Guodong Long, Yuhui Shi

Introduction

In Reinforcement Learning (RL), agents typically excel at mastering a single objective. However, when tasked with learning a sequence of different skills—such as first learning to "open a door" and subsequently "push a button"—they often suffer from catastrophic forgetting. The new knowledge overwrites the old, causing the agent to lose its previously acquired abilities.

This challenge highlights the fundamental plasticity-stability trade-off in AI:

  • Plasticity: The capacity to quickly learn and adapt to new tasks.
  • Stability: The ability to retain knowledge and skills from previous tasks without degradation.

Existing solutions often rely on memory-intensive "experience replay" (storing and re-running old data) or restrictive "regularization" techniques. To overcome these limitations, researchers introduce CoTASP (Continual Task Allocation via Sparse Prompting). CoTASP allows RL agents to learn a sequence of tasks by carving out specific, reusable sub-networks for each one, effectively giving the agent a multi-tool brain where similar tasks share knowledge while preventing new tasks from overwriting old ones.

How CoTASP Works

CoTASP treats a large neural network as a shared pool of resources. Instead of updating the entire network for every new task, it intelligently allocates specific "neurons" based on the semantic similarity of the tasks.

CoTASP Architecture

The workflow operates through several key steps:

  1. Task Embedding: A task's textual description (e.g., "Push and close a window") is converted into a dense vector using a pretrained language model (Sentence-BERT).
  2. Sparse Prompting: This vector is passed through a learnable dictionary. Using sparse coding (solving a Lasso problem), the system generates a sparse prompt—a binary mask that dictates which neurons in the meta-policy network should be activated for this specific task.
  3. Sub-network Extraction: The sparse mask extracts a task-specific sub-network. Because the mask is sparse, only a small fraction of the overall network capacity is utilized for any single task.
  4. Alternating Optimization: The agent practices the task in its environment, alternately optimizing the weights of the active sub-network and the prompt itself. The dictionary is then updated to better align the task's text embedding with its optimized prompt.
  5. Selective Updates: To strictly prevent forgetting, when training on a new task, the system freezes the weights that have already been "claimed" by previous tasks.

Experimental Setup and Key Insights

The researchers evaluated CoTASP on the Continual World (CW) benchmark, which features complex robotic manipulation tasks (e.g., hammering, pushing, closing faucets). They tested sequences of 10 distinct tasks (CW10) and a repeated sequence of 20 tasks (CW20) to evaluate knowledge reuse.

A core insight from CoTASP is that semantic correlation drives positive transfer. Because prompts are derived from text descriptions, tasks that sound similar naturally generate similar masks. This forces them to share more neurons, facilitating positive knowledge transfer. Furthermore, because the dictionary learns the relationship between language and network structure, the model exhibits strong zero-shot potential, generating a highly effective starting sub-network for a brand-new task just by reading its description.

Key Results

CoTASP demonstrates a remarkable ability to balance the plasticity-stability trade-off, outperforming existing continual and multi-task RL methods.

Plasticity vs. Stability on CW20
  • Superior Performance: On the rigorous CW20 benchmark, CoTASP achieved an average success rate of 0.88, significantly outperforming popular baselines like PackNet (0.78) and HAT (0.67).
  • Zero Forgetting: By locking neurons used for previous tasks, CoTASP maintained a forgetting rate of essentially 0.00.
  • Faster Adaptation: CoTASP required significantly fewer environment steps to reach success thresholds on new tasks compared to other continual RL methods, proving its high plasticity.
  • Outperforming Multi-Task Learning: Surprisingly, CoTASP even outperformed some baselines that learn all tasks simultaneously. Its modular structure effectively reduces cross-task interference, a common pitfall in standard multi-task learning.

Limitations and Future Directions

While highly effective, CoTASP relies heavily on high-quality textual descriptions; vague or misleading text can lead to poor initial sub-network allocation. Additionally, while the meta-policy is large and sparse prompting delays capacity exhaustion, the network is ultimately finite and could "fill up" over an extremely long sequence of diverse tasks. Finally, while the model excels at preventing forgetting, future work will need to explore mechanisms for "backward transfer"—where learning a new task actively improves the agent's performance on an older one.

Summary updated

BibTeX
@inproceedings{yang2023continual,
  author = {Yijun Yang and Tianyi Zhou and Jing Jiang and Guodong Long and Yuhui Shi},
  title = {{Continual Task Allocation in Meta-Policy Network via Sparse Prompting}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=IqI8074rFu},
}
Figure