Coder Social home page Coder Social logo

continual-learning-with-invertible-generative-models's Introduction

Continual Learning with Invertible Generative Models

This repository contains a PyTorch implementation of the paper:

Continual Learning with Invertible Generative Models

Jary Pomponi, Simone Scardapane, Aurelio Uncini

Abstract

Catastrophic forgetting (CF) happens whenever a neural network overwrites past knowledge while being trained on new tasks. Common techniques to handle CF include regularization of the weights (using, e.g., their importance on past tasks), and rehearsal strategies, where the network is constantly re-trained on past data. Generative models have also been applied for the latter, in order to have endless sources of data. In this paper, we propose a novel method that combines the strengths of regularization and generative-based rehearsal approaches. Our generative model consists of a normalizing flow (NF), a probabilistic and invertible neural network, trained on the internal embeddings of the network. By keeping a single NF throughout the training process, we show that our memory overhead remains constant. In addition, exploiting the invertibility of the NF, we propose a simple approach to regularize the network's embeddings with respect to past tasks. We show that our method performs favorably with respect to state-of-the-art approaches in the literature, with bounded computational power and memory overheads.

Main Dependencies

  • pytorch==1.4.0
  • python=3.6
  • cudatoolkit=10.1
  • torchvision==0.5.0
  • yaml

The complete list can be found in the environment file env.yml.

Training

The folder './files/' contains some yaml files that can be passed as argument to the main.py script. The main.py produces a path in the save_path indicated by the yaml file. The resulting folder contains:

  • One folder for each experiment. Each folder contains:
    • models [if save=yes]: a folder which contains the model checkpoints, one for each task.
    • plots [if method == 'prer']: a folder that contains the plots produced by the method.
    • results [if save=yes]: the serialized results obtained on the tasks.
    • final_results.pkl: the final results serialized using pickle.
    • experiment.log: the log file containing information about the current experiment.
  • final_score.log: the final log file which reports the final scores obtained.

Please refer to the yaml files to understand how they can be formatted, and to the methods to understand the parameters that can be used.

continual-learning-with-invertible-generative-models's People

Contributors

jaryp avatar

Watchers

 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.