MOS: Model Surgery for Pre-Trained Model-Based Class-Incremental Learning

Hai-Long Sun, Da-Wei Zhou, Hanbin Zhao, Le Gan, De-Chuan Zhan +1 more
12/12/2024
cs.LGcs.CV

Official code: sun-hailong/AAAI25-MOS (57 stars, last commit 2025-04-17). 1 more implementation below.

Abstract

Class-Incremental Learning (CIL) requires models to continually acquire knowledge of new classes without forgetting old ones. Despite Pre-trained Models (PTMs) have shown excellent performance in CIL, catastrophic forgetting still occurs as the model learns new concepts. Existing work seeks to utilize lightweight components to adjust the PTM, while the forgetting phenomenon still comes from {\em parameter and retrieval} levels. Specifically, iterative updates of the model result in parameter drift, while mistakenly retrieving irrelevant modules leads to the mismatch during inference. To this end, we propose MOdel Surgery (MOS) to rescue the model from forgetting previous knowledge. By training task-specific adapters, we continually adjust the PTM to downstream tasks. To mitigate parameter-level forgetting, we present an adapter merging approach to learn task-specific adapters, which aims to bridge the gap between different components while reserve task-specific information. Besides, to address retrieval-level forgetting, we introduce a training-free self-refined adapter retrieval mechanism during inference, which leverages the model's inherent ability for better adapter retrieval. By jointly rectifying the model with those steps, MOS can robustly resist catastrophic forgetting in the learning process. Extensive experiments on seven benchmark datasets validate MOS's state-of-the-art performance. Code is available at: https://github.com/sun-hailong/AAAI25-MOS

View on arXivView PDF

Code Implementations(2)

[AAAI 2025] The code repository for "MOS: Model Surgery for Pre-Trained Model-Based Class-Incremental Learning" in PyTorch.

579PythonDec 10, 20241 years ago
PyTorchMIT

πŸŽ‰ PILOT: A Pre-trained Model-Based Continual Learning Toolbox

59266PythonAug 30, 20238 months agoMIT
continual-learningdeep-learningincremental-learninglifelong-learningmachine-learning+6 more

Similar Papers

Cite this paper

@article{sun2024mos,
  title  = {MOS: Model Surgery for Pre-Trained Model-Based Class-Incremental Learning},
  author = {Hai-Long Sun and Da-Wei Zhou and Hanbin Zhao and Le Gan and De-Chuan Zhan and Han-Jia Ye},
  year   = {2024},
  eprint = {2412.09441},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.09441v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.09441.svg)](https://codeofpaper.com/paper/2412.09441)

Discussion