Self-Expansion of Pre-trained Models with Mixture of Adapters for Continual Learning

Huiyi Wang, Haodong Lu, Lina Yao, Dong Gong

Introduction

Continual Learning (CL) is a fundamental challenge in artificial intelligence, requiring models to learn from a continuous stream of tasks without suffering from "catastrophic forgetting." While modern approaches often utilize large Pre-trained Models (PTMs) like Vision Transformers (ViT) by adding small, learnable adapters, they frequently encounter a "Stability-Plasticity" dilemma. Fixed-size methods are stable but lack the plasticity to handle diverse new data, while linear expansion methods lead to inefficient, "exploding" model sizes that fail to reuse knowledge across similar tasks.

The SEMA Framework

To address these challenges, we introduce SEMA (Self-Expansion with Modularized Adaptation), a framework designed for automated, on-demand architectural growth. SEMA allows a model to expand its capacity only when it encounters data distributions it does not recognize.

Overview of the SEMA architecture and the self-expansion mechanism.

Modular Adapters and Novelty Detection

The core of SEMA is the "Modular Adapter," which consists of two primary components:

  1. Functional Adapter: A lightweight bottleneck layer that learns task-specific features.
  2. Representation Descriptor (RD): An internal "gatekeeper" implemented as a small Autoencoder (AE).

When a new task arrives, the data passes through existing RDs. Each RD calculates a reconstruction error; if the error is high (measured via a z-score), it indicates a distribution shift. If all existing RDs signal such a shift, SEMA triggers a self-expansion signal, adding a new modular adapter to that specific layer. This allows for sub-linear parameter growth, as Task B can reuse Task A's adapter if their distributions are similar.

Mixture of Adapters (MoA)

Rather than selecting a single adapter, SEMA employs an Expandable Weighting Router. This router learns a "soft mixture" of existing adapters, allowing the model to combine knowledge from multiple modules for a single input. This is particularly effective for tasks that fall between previously learned distributions.

Experimental Results

SEMA was evaluated on several standard computer vision benchmarks, including CIFAR-100, ImageNet-R, ImageNet-A, and the Visual Task Adaptation Benchmark (VTAB).

Performance comparison on ImageNet-R showing SEMA's superior accuracy as the number of classes increases.

As shown in the ImageNet-R results, SEMA consistently outperforms existing state-of-the-art PTM-based methods such as L2P, DualPrompt, and CODA-P. On the challenging ImageNet-A dataset, SEMA achieved an average accuracy of 64.53%, significantly higher than the next best method (ADAM at 60.15%). These results were achieved without memory rehearsal (storing old images), representing a major advantage for privacy and storage efficiency.

Conclusion

SEMA provides a robust solution to the stability-plasticity dilemma by combining autoencoder-based novelty detection with a flexible mixture-of-adapters approach. The framework achieves state-of-the-art performance with efficient, sub-linear parameter growth. Future research will focus on extending this self-expansion logic to fully task-free online settings and Large Language Models (LLMs).

Summary updated

BibTeX
@inproceedings{wang2025self,
  author = {Huiyi Wang and Haodong Lu and Lina Yao and Dong Gong},
  title = {{Self-Expansion of Pre-trained Models with Mixture of Adapters for Continual Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00943},
}
Figure