Official Pytorch implementation of Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference (ICLR 2022)

Related tags

Deep Learningi-Blurry
Overview

The Official Implementation of CLIB (Continual Learning for i-Blurry)

Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference
Hyunseo Koh*, Dahyun Kim*, Jung-Woo Ha, Jonghyun Choi
ICLR 2022 [Paper]
(* indicates equal contribution)

Overview

Abstract

Despite rapid advances in continual learning, a large body of research is devoted to improving performance in the existing setups. While a handful of work do propose new continual learning setups, they still lack practicality in certain aspects. For better practicality, we first propose a novel continual learning setup that is online, task-free, class-incremental, of blurry task boundaries and subject to inference queries at any moment. We additionally propose a new metric to better measure the performance of the continual learning methods subject to inference queries at any moment. To address the challenging setup and evaluation protocol, we propose an effective method that employs a new memory management scheme and novel learning techniques. Our empirical validation demonstrates that the proposed method outperforms prior arts by large margins.

Results

Results of CL methods on various datasets, for online continual learning on i-Blurry-50-10 split, measured by metric. For more details, please refer to our paper.

Methods CIFAR10 CIFAR100 TinyImageNet ImageNet
EWC++ 57.34±2.10 35.35±1.96 22.26±1.15 24.81
BiC 58.38±0.54 33.51±3.04 22.80±0.94 27.41
ER-MIR 57.28±2.43 35.35±1.41 22.10±1.14 20.48
GDumb 53.20±1.93 32.84±0.45 18.17±0.19 14.41
RM 23.00±1.43 8.63±0.19 5.74±0.30 6.22
Baseline-ER 57.46±2.25 35.61±2.08 22.45±1.15 25.16
CLIB 70.26±1.28 46.67±0.79 23.87±0.68 28.16

Getting Started

To set up the environment for running the code, you can either use the docker container, or manually install the requirements in a virtual environment.

Using Docker Container (Recommended)

We provide the Docker image khs8157/iblurry on Docker Hub for reproducing the results. To download the docker image, run the following command:

docker pull khs8157/iblurry:latest

After pulling the image, you may run the container via following command:

docker run --gpus all -it --shm-size=64gb -v /PATH/TO/CODE:/PATH/TO/CODE --name=CONTAINER_NAME khs8157/iblurry:latest bash

Replace the arguments written in italic with your own arguments.

Requirements

  • Python3
  • Pytorch (>=1.9)
  • torchvision (>=0.10)
  • numpy
  • pillow~=6.2.1
  • torch_optimizer
  • randaugment
  • easydict
  • pandas~=1.1.3

If not using Docker container, install the requirements using the following command

pip install -r requirements.txt

Running Experiments

Downloading the Datasets

CIFAR10, CIFAR100, and TinyImageNet can be downloaded by running the corresponding scripts in the dataset/ directory. ImageNet dataset can be downloaded from Kaggle.

Experiments Using Shell Script

Experiments for the implemented methods can be run by executing the shell scripts provided in scripts/ directory. For example, you may run CL experiments using CLIB method by

bash scripts/clib.sh

You may change various arguments for different experiments.

  • NOTE: Short description of the experiment. Experiment result and log will be saved at results/DATASET/NOTE.
    • WARNING: logs/results with the same dataset and note will be overwritten!
  • MODE: CL method to be applied. Methods implemented in this version are: [clib, er, ewc++, bic, mir, gdumb, rm]
  • DATASET: Dataset to use in experiment. Supported datasets are: [cifar10, cifar100, tinyimagenet, imagenet]
  • N_TASKS: Number of tasks. Note that corresponding json file should exist in collections/ directory.
  • N: Percentage of disjoint classes in i-blurry split. N=100 for full disjoint, N=0 for full blurry. Note that corresponding json file should exist in collections/ directory.
  • M: Blurry ratio of blurry classes in i-blurry split. Note that corresponding json file should exist in collections/ directory.
  • GPU_TRANSFORM: Perform AutoAug on GPU, for faster running.
  • USE_AMP: Use automatic mixed precision (amp), for faster running and reducing memory cost.
  • MEM_SIZE: Maximum number of samples in the episodic memory.
  • ONLINE_ITER: Number of model updates per sample.
  • EVAL_PERIOD: Period of evaluation queries, for calculating .

Citation

If you used our code or i-blurry setup, please cite our paper.

@inproceedings{koh2022online,
  title={Online Continual Learning on Class Incremental Blurry Task Configuration with Anytime Inference},
  author={Koh, Hyunseo and Kim, Dahyun and Ha, Jung-Woo and Choi, Jonghyun},
  booktitle={ICLR},
  year={2022}
}

License

Copyright (C) 2022-present NAVER Corp.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
Owner
NAVER AI
Official account of NAVER CLOVA AI Lab, Korea No.1 Industrial AI Research Group
NAVER AI
Repo 4 basic seminar §How to make human machine readable"

WORK IN PROGRESS... Notebooks from the Seminar: Human Machine Readable WS21/22 Introduction into programming Georg Trogemann, Christian Heck, Mattis

experimental-informatics 3 May 29, 2022
An implementation of the methods presented in Causal-BALD: Deep Bayesian Active Learning of Outcomes to Infer Treatment-Effects from Observational Data.

An implementation of the methods presented in Causal-BALD: Deep Bayesian Active Learning of Outcomes to Infer Treatment-Effects from Observational Data.

Andrew Jesson 9 Apr 04, 2022
(under submission) Bayesian Integration of a Generative Prior for Image Restoration

BIGPrior: Towards Decoupling Learned Prior Hallucination and Data Fidelity in Image Restoration Authors: Majed El Helou, and Sabine Süsstrunk {Note: p

Majed El Helou 22 Dec 17, 2022
A Re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"

What is This This is a simple re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"(1). Only Sections

102 Dec 14, 2022
Automated Attendance Project Using Face Recognition

dependencies for project: cmake 3.22.1 dlib 19.22.1 face-recognition 1.3.0 openc

Rohail Taha 1 Jan 09, 2022
FIRM-AFL is the first high-throughput greybox fuzzer for IoT firmware.

FIRM-AFL FIRM-AFL is the first high-throughput greybox fuzzer for IoT firmware. FIRM-AFL addresses two fundamental problems in IoT fuzzing. First, it

356 Dec 23, 2022
Machine learning framework for both deep learning and traditional algorithms

NeoML is an end-to-end machine learning framework that allows you to build, train, and deploy ML models. This framework is used by ABBYY engineers for

NeoML 704 Dec 27, 2022
Unsupervised captioning - Code for Unsupervised Image Captioning

Unsupervised Image Captioning by Yang Feng, Lin Ma, Wei Liu, and Jiebo Luo Introduction Most image captioning models are trained using paired image-se

Yang Feng 207 Dec 24, 2022
Forecasting with Gradient Boosted Time Series Decomposition

ThymeBoost ThymeBoost combines time series decomposition with gradient boosting to provide a flexible mix-and-match time series framework for spicy fo

131 Jan 08, 2023
Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX

CQL-JAX This repository implements Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX (FLAX). Implementation is built on

Karush Suri 8 Nov 07, 2022
Source code for our paper "Improving Empathetic Response Generation by Recognizing Emotion Cause in Conversations"

Source code for our paper "Improving Empathetic Response Generation by Recognizing Emotion Cause in Conversations" this repository is maintained by bo

Yuhan Liu 24 Nov 29, 2022
Use CLIP to represent video for Retrieval Task

A Straightforward Framework For Video Retrieval Using CLIP This repository contains the basic code for feature extraction and replication of results.

Jesus Andres Portillo Quintero 54 Dec 22, 2022
(NeurIPS 2021) Pytorch implementation of paper "Re-ranking for image retrieval and transductive few-shot classification"

SSR (NeurIPS 2021) Pytorch implementation of paper "Re-ranking for image retrieval and transductivefew-shot classification" [Paper] [Project webpage]

xshen 29 Dec 06, 2022
[CoRL 2021] A robotics benchmark for cross-embodiment imitation.

x-magical x-magical is a benchmark extension of MAGICAL specifically geared towards cross-embodiment imitation. The tasks still provide the Demo/Test

Kevin Zakka 36 Nov 26, 2022
Machine Learning Privacy Meter: A tool to quantify the privacy risks of machine learning models with respect to inference attacks, notably membership inference attacks

ML Privacy Meter Machine learning is playing a central role in automated decision making in a wide range of organization and service providers. The da

Data Privacy and Trustworthy Machine Learning Research Lab 357 Jan 06, 2023
Canonical Capsules: Unsupervised Capsules in Canonical Pose (NeurIPS 2021)

Canonical Capsules: Unsupervised Capsules in Canonical Pose (NeurIPS 2021) Introduction This is the official repository for the PyTorch implementation

165 Dec 07, 2022
Notification Triggers for Python

Notipyer Notification triggers for Python Send async email notifications via Python. Get updates/crashlogs from your scripts with ease. Installation p

Chirag Jain 17 May 16, 2022
GPOEO is a micro-intrusive GPU online energy optimization framework for iterative applications

GPOEO GPOEO is a micro-intrusive GPU online energy optimization framework for iterative applications. We also implement ODPP [1] as a comparison. [1]

瑞雪轻飏 8 Sep 10, 2022
Encode and decode text application

Text Encoder and Decoder Encode and decode text in many ways using this application! Encode in: ASCII85 Base85 Base64 Base32 Base16 Url MD5 Hash SHA-1

Alice 1 Feb 12, 2022
This repo will contain code to reproduce and build upon understanding transfer learning

What is being transferred in transfer learning? This repo contains the code for the following paper: Behnam Neyshabur*, Hanie Sedghi*, Chiyuan Zhang*.

4 Jun 16, 2021