Building a Subspace of Policies for Scalable Continual Learning

Jean-Baptiste Gaya, Thang Doan, Lucas Caccia, Laure Soulier, Ludovic Denoyer, Roberta Raileanu

TL;DR

Continual Subspace of Policies (CSP) is a novel approach to Continual Reinforcement Learning (CRL) that avoids the "bloat" of growing models and the "forgetting" of fixed-size ones. By building a multi-dimensional "subspace" of policies—where any point is a valid behavior—the agent can learn new tasks by either interpolating between existing skills or adaptively adding new "anchors" only when a task is truly novel.

The Stability-Plasticity Dilemma

In Continual Reinforcement Learning, an agent faces a sequence of different tasks. The ultimate goal is to learn a new task (Task $N$) without forgetting how to perform previous ones (Task 1). This is known as the Stability-Plasticity Dilemma.

Current solutions generally fall into two camps:

  1. Fixed-size models: These use a single neural network for everything. They are memory-efficient but highly prone to "catastrophic forgetting," where learning a new task overwrites the weights needed for an old one.
  2. Growing-size models: These add new parameters (or entire networks) for every new task. While they prevent forgetting, they scale poorly. If an agent must learn 1,000 tasks, the model becomes 1,000 times larger, which is unfeasible for real-world robotics.

The authors aim to find a "middle way": a model that grows sublinearly, adding parameters only when the current knowledge base isn't enough to solve a new challenge.

Methods: The Subspace of Policies

The core innovation of this paper is the Subspace of Policies. Instead of learning a single set of weights $\theta$, CSP maintains a set of "anchors" (vertices) that define a simplex (a convex hull) in the parameter space.

The CSP algorithm dynamically grows a subspace of policies, pruning new anchors if existing ones suffice.
  • The Subspace: Any policy within this subspace is defined by a weight vector $\alpha$, which represents a convex combination of the anchors.
  • Adaptive Growth: When a new task arrives, the algorithm tentatively adds a new anchor and trains it.
  • The Pruning Step: After training, the agent asks: "Can I solve this new task almost as well using only my old anchors?" It uses a specialized Q-function (critic) to estimate the best possible performance in the old subspace versus the new one.
  • The Threshold ($\epsilon$): If the performance gain from the new anchor is less than a user-defined threshold $\epsilon$, the new anchor is discarded (pruned). The task is then represented simply as a single point (an $\alpha$ vector) within the existing subspace.

This mechanism allows the model to "recycle" behaviors. If Task 5 is similar to a mix of Task 1 and Task 2, CSP finds the right spot in the existing subspace rather than building an entirely new network.

Key Insights and Ideas

  • Zero Forgetting by Design: Because old tasks are stored as fixed $\alpha$ vectors (coordinates in the subspace) and anchors are frozen once established, the agent literally cannot forget how to perform a prior task.
  • Behavioral Compositionality: One of the most striking findings is that the subspace naturally captures "blended" behaviors. For example, if the agent learns to walk with "huge feet" and separately learns to walk in "low gravity," the subspace between those two anchors often contains a policy that can walk with "huge feet in low gravity" without any additional training.
  • The Power of the Critic: The authors use a "subspace critic" that takes the $\alpha$ vector as input. This allows the agent to search the subspace for the best policy for a new task very efficiently, without needing millions of environment interactions.

Key Results

The authors evaluated CSP on 18 different CRL scenarios across two major domains: Brax (a physics engine for locomotion) and Continual World (a challenging benchmark for robotic manipulation).

CSP achieves a strong balance between average performance and model size compared to baselines.
  • Performance vs. Size: On the Brax HalfCheetah sequence, CSP maintained high average performance while its model size grew much slower than linear baselines. It successfully achieved sublinear scaling.
  • Brax Scenarios: CSP outperformed popular baselines like EWC (Elastic Weight Consolidation) and PNN (Progressive Neural Networks). In the "Humanoid" scenario, CSP achieved a normalized performance of 1.76, significantly higher than the next best baseline (SAC-N at 1.0).
  • Continual World: On the CW10 benchmark, CSP achieved a success rate of 0.81, nearly matching the state-of-the-art PackNet (0.83) while being significantly more memory-efficient and not requiring prior knowledge of the total number of tasks.

Limitations and Future Work

While highly effective, CSP does have limitations:

  • Training Overhead: Even if an anchor is eventually pruned, it still has to be trained first. This means the computational cost during training still scales linearly with the number of tasks, even if the memory cost scales sublinearly.
  • Sequence Dependency: The final size of the subspace depends heavily on the order of tasks. If very diverse tasks appear early, the subspace grows quickly; if similar tasks appear, it stays small.

Future work could involve meta-learning the subspace structure or using active learning to navigate the subspace more effectively, potentially finding "hidden" skills that the agent hasn't been explicitly taught.

Summary updated

BibTeX
@inproceedings{gaya2023building,
  author = {Jean-Baptiste Gaya and Thang Doan and Lucas Caccia and Laure Soulier and Ludovic Denoyer and Roberta Raileanu},
  title = {{Building a Subspace of Policies for Scalable Continual Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=UKr0MwZM6fL},
}
Figure