Make Continual Learning Stronger via C-Flat

Ang Bian, Wei Li, Hangjie Yuan, Chengrong Yu, Mang Wang +4 more
4/1/2024
cs.LGcs.CV

Official code: WanNaa/C-Flat (12 stars, last commit 2025-10-11).

Abstract

Model generalization ability upon incrementally acquiring dynamically updating knowledge from sequentially arriving tasks is crucial to tackle the sensitivity-stability dilemma in Continual Learning (CL). Weight loss landscape sharpness minimization seeking for flat minima lying in neighborhoods with uniform low loss or smooth gradient is proven to be a strong training regime improving model generalization compared with loss minimization based optimizer like SGD. Yet only a few works have discussed this training regime for CL, proving that dedicated designed zeroth-order sharpness optimizer can improve CL performance. In this work, we propose a Continual Flatness (C-Flat) method featuring a flatter loss landscape tailored for CL. C-Flat could be easily called with only one line of code and is plug-and-play to any CL methods. A general framework of C-Flat applied to all CL categories and a thorough comparison with loss minima optimizer and flat minima based CL approaches is presented in this paper, showing that our method can boost CL performance in almost all cases. Code is available at https://github.com/WanNaa/C-Flat.

View on arXivView PDF

Code Implementations(1)

WanNaa/C-FlatOfficial100%
120PythonOct 24, 20241 years ago

Similar Papers

Cite this paper

@article{bian2024make,
  title  = {Make Continual Learning Stronger via C-Flat},
  author = {Ang Bian and Wei Li and Hangjie Yuan and Chengrong Yu and Mang Wang and Zixiang Zhao and Aojun Lu and Pengliang Ji and Tao Feng},
  year   = {2024},
  eprint = {2404.00986},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2404.00986},
  url    = {http://arxiv.org/abs/2404.00986v2},
  journal = {NEURIPS 2024 2024}
}

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/2404.00986.svg)](https://codeofpaper.com/paper/2404.00986)

Discussion