Giter Club home page Giter Club logo

mnemonics-training's Introduction

Mnemonics Training

LICENSE Python PyTorch

This repository contains the PyTorch implementation for "Mnemonics Training: Multi-Class Incremental Learning without Forgetting".

Summary

Introduction

Multi-Class Incremental Learning (MCIL) aims to learn new concepts by incrementally updating a model trained on previous concepts. However, there is an inherent trade-off to effectively learning new concepts without catastrophic forgetting of previous ones. To alleviate this issue, it has been proposed to keep around a few examples of the previous concepts but the effectiveness of this approach heavily depends on the representativeness of these examples. This paper proposes a novel and automatic framework we call mnemonics, where we parameterize exemplars and make them optimizable in an end-to-end manner. We train the framework through bilevel optimizations, i.e., model-level and exemplar-level. We conduct extensive experiments on three MCIL benchmarks, CIFAR-100, ImageNet-Subset and ImageNet, and show that using mnemonics exemplars can surpass the state-of-the-art by a large margin. Interestingly and quite intriguingly, the mnemonics exemplars tend to be on the boundaries between classes.

Figure: The t-SNE results of three exemplar methods in two phases. The original data of 5 colored classes occur in the early phase. In each colored class, deep-color points are exemplars, and light-color ones show the original data as reference of the real data distribution. Gray crosses represent other participating classes, and each cross for one class. We have two main observations. (1) Our approach results in much clearer separation in the data, than random (where exemplars are randomly sampled in the early phase) and herding (where exemplars are nearest neighbors of the mean sample in the early phase). (2) Our learned exemplars mostly locate on the boundaries between classes.

Dependencies

For more details, please kindly refer to this link.

Running Experiments

Clone this repository

git clone [email protected]:yaoyao-liu/mnemonics-training.git

Running experiments for baselines

cd ./mnemonics-training/1_train
python main.py --method=baseline --nb_cl=10
python main.py --method=baseline --nb_cl=5
python main.py --method=baseline --nb_cl=2

Running experiments for our method

cd ./mnemonics-training/1_train
python main.py --method=mnemonics --nb_cl=10
python main.py --method=mnemonics --nb_cl=5
python main.py --method=mnemonics --nb_cl=2

Performance

Average accuracy (%)

Method Dataset 5-phase 10-phase 25-phase
LwF CIFAR-100 52.44 48.47 45.75
LwF w/ ours CIFAR-100 54.21 52.72 51.59
iCaRL CIFAR-100 58.03 53.01 48.47
iCaRL w/ ours CIFAR-100 60.01 57.37 54.13

Forgetting rate (%, lower is better)

Method Dataset 5-phase 10-phase 25-phase
LwF CIFAR-100 45.02 42.50 39.86
LwF w/ ours CIFAR-100 40.00 36.50 34.25
iCaRL CIFAR-100 32.87 32.98 36.32
iCaRL w/ ours CIFAR-100 25.93 26.92 28.92

We find some bugs in the code for LUCIR w/ ours.
We'll update it later after we've fixed this issue.

Citation

Please cite our paper if it is helpful to your work:

@inproceedings{liu2020mnemonics,
author    = {Liu, Yaoyao and Su, Yuting and Liu, An{-}An and Schiele, Bernt and Sun, Qianru},
title     = {Mnemonics Training: Multi-Class Incremental Learning without Forgetting},
booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages     = {12245--12254},
year      = {2020}
}

Acknowledgements

Our implementation uses the source code from the following repositories:

mnemonics-training's People

Contributors

yaoyao-liu avatar

Watchers

paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.