Tackling Continual Offline RL through Selective Weights Activation on Aligned Spaces

Jifeng Hu, Sili Huang, Li Shen, Zhejian Yang, Shengchao Hu, Shisong Tang, Hechang Chen, Lichao Sun, Yi Chang, Dacheng Tao

In the quest to build truly versatile AI agents, we face a daunting "double whammy": agents must learn from static, pre-collected datasets (Offline RL) and continue to master new skills over time without forgetting old ones (Continual Learning). Most existing research assumes a convenient but unrealistic constraint: that every task the agent encounters shares the exact same "body"—the same sensors (state space) and the same motors (action space).

A new paper introduces VQ-CD (Vector-Quantized Continual Diffuser), a framework designed to break these barriers and allow agents to learn across heterogeneous environments.

TL;DR

VQ-CD is a novel framework for Continual Offline Reinforcement Learning (CORL) that enables agents to master a sequence of tasks even when their state and action spaces differ. It achieves this by aligning diverse task spaces into a unified quantized latent space and using task-specific weight masking within a diffusion model to eliminate catastrophic forgetting.

High-level overview of the VQ-CD framework

What Problem Does This Paper Address?

The authors tackle two primary bottlenecks in Continual Offline RL:

  1. Space Heterogeneity: Most CORL methods fail if Task A is a quadruped robot and Task B is a bipedal walker. Their state and action dimensions are different, making it impossible to use a single, fixed-size neural network policy across both.
  2. Catastrophic Forgetting: When a model learns a new task, the gradient updates typically overwrite the weights used for previous tasks. While "rehearsal" (replaying old data) helps, it is computationally expensive and often fails to preserve old knowledge perfectly.

Methods

VQ-CD introduces a two-pronged architecture to solve these issues:

1. Quantized Spaces Alignment (QSA)

To handle different state/action spaces, the authors use Vector Quantization (VQ). Think of this as a "universal translator." For each task, a task-specific encoder maps the unique state/action dimensions into a shared, unified "codebook" of latent vectors. This allows a single backbone model to process data from any environment, regardless of its original dimensionality.

2. Selective Weights Activation (SWA)

Once the spaces are aligned, the agent uses a Diffusion Model (specifically a U-Net) to model the trajectories. To prevent forgetting, the authors implement Selective Weights Activation.

  • Before training on a new task, the model identifies "disengaged" (unused) weights in the convolution kernels.
  • It generates a sparse task mask that activates only these specific weights for the current task.
  • During inference, the model only uses the weights associated with the relevant task mask, effectively "siloing" knowledge and preventing interference between tasks.

3. Inverse Dynamics & Weights Assembling

The diffusion model generates state sequences, and a separate Inverse Dynamics Model predicts the actions needed to achieve those states. After training is complete, all task-specific weights are "assembled" into a single model for efficient multi-task deployment.

Datasets

The researchers evaluated VQ-CD on 15 tasks across three major benchmarks:

  • MuJoCo Ant-dir: A standard benchmark where an ant robot must learn to run in different directions.
  • Continual World (CW10): A suite of 10 robotic manipulation tasks (e.g., pushing, sliding, hammering).
  • General CL (D4RL): A custom, more difficult setting created by the authors using Hopper, Walker2d, and HalfCheetah. This specifically tests the model's ability to handle tasks with entirely different state and action spaces.

Key Insights and Ideas

  • VQ vs. Standard Autoencoders: A key insight was finding that Vector Quantization (VQ) significantly outperforms standard Autoencoders (AE) for space alignment. VQ forces a more "concentrated" distribution in the latent space, which makes it much easier for the diffusion model to learn the underlying data distribution.
  • Kernel Masking over Neuron Masking: Traditional structure-based methods often mask entire neurons. However, in complex architectures like U-Nets, masking individual weights within convolution kernels provides much finer control, allowing the model to stay compact while mastering more tasks.
  • The Power of Diffusion: By modeling the joint distribution of trajectories rather than just a simple mapping of state-to-action, the diffusion backbone handles multi-modal data (different ways to solve a task) much better than standard MLP-based policies.

Key Results

Learning curves comparing VQ-CD to baselines on heterogeneous tasks
  • SOTA Performance: VQ-CD outperformed 17 representative baselines (including diffusion-based and regularization-based methods) across almost all settings, particularly shining in the heterogeneous D4RL environments.
  • Zero Forgetting: In the Ant-dir experiments, VQ-CD maintained near-perfect performance on early tasks even after learning five subsequent tasks, whereas baselines showed significant performance decay.
  • Efficiency: By using DDIM sampling, the authors sped up the action generation process by nearly 20x compared to standard diffusion sampling, making the model much more viable for real-time RL applications.
  • Space Alignment: Visualization showed that VQ-CD successfully partitioned different environments into distinct, manageable regions in the latent space, whereas other alignment methods resulted in a "jumbled" mess that confused the policy.

Limitations and Future Work

  • Task-Awareness: Currently, VQ-CD is "task-aware," meaning it needs to be told when a task boundary has been crossed and which task it is currently performing. Moving toward "task-agnostic" learning is a necessary next step.
  • Dramatic Shifts: The method works best on tasks with some underlying similarities. Handling "dramatic shifts" in representation (e.g., moving from low-dimensional states to high-dimensional raw pixels) remains a challenge.
  • Online Extension: While designed for offline data, the authors suggest that parallelized sampling techniques could eventually allow VQ-CD to work in online, real-time interaction settings.

Summary updated

BibTeX
@inproceedings{hu2025tackling,
  author = {Jifeng Hu and Sili Huang and Li Shen and Zhejian Yang and Shengchao Hu and Shisong Tang and Hechang Chen and Lichao Sun and Yi Chang and Dacheng Tao},
  title = {{Tackling Continual Offline RL through Selective Weights Activation on Aligned Spaces}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=KfRfTAJpjh},
}
Figure