Make Continual Learning Stronger via C-Flat
About
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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Class-incremental learning | ImageNet-R B0 Inc20 | Last Accuracy77.25 | 79 | |
| Class-incremental learning | CIFAR-100 B0_Inc5 | Average Accuracy71.11 | 47 | |
| Class-incremental learning | CIFAR-100 B0_Inc10 | Avg Accuracy94.41 | 43 | |
| Class-incremental learning | ImageNet-100 B=50, C=10 1.0 | Avg Incremental Acc86.64 | 42 | |
| Class-incremental learning | CUB (B0 Inc10) | Last Accuracy88.76 | 39 | |
| Incremental Learning | CIFAR100 T=50 | Last Accuracy84.03 | 19 | |
| Class-incremental learning | ObjNet B0 Inc10 | Avg Accuracy72.15 | 15 | |
| Task-Incremental Learning | S-TinyImageNet T=20 | Average Accuracy (A-bar)23.97 | 15 | |
| Online Continual Learning | S-CIFAR-100 T=10 15 | Last Accuracy (AT)26.81 | 15 | |
| Task-Incremental Learning | S-CIFAR-100 T=10 | Average Accuracy (A-bar)44.61 | 15 |