Skip to content

VatsalRaina/variational_continual_learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

VARIATIONAL CONTINUAL LEARNING

By Aymeric Roucher, Vatsal Raina, Shawn Shen and Adian Liusie

This repositry is a reimplementation of the variational continual learning paper by Nguyen et. Al. (2018) as part of the MLMI4 course at the university of Cambridge. The code is loosely based on that from the original author however with now a Pytorch-based implementation.

Theory

Introduction

Continual learning is the area of machine learning where a model is given multiple different tasks that it should try to optimize over and perform well at. However the big caveat in this task is that not all task data is available at the same time: instead, the tasks are provided in an online fashion (i.e. the tasks are given one after another) and so the model parameters must be updated incrementally after seeing a specific subset of the task data. Although one may at first consider updating the parameters of a standard deep learning architecture task after task using SGD, it has been shown that deep learning mondels generally suffer from catastrophic forgetting and a model trained in this manner often performs very poorly on early tasks. We therefore want an approach where even though a model may only be trained incrementally on individual tasks, it can still retain relevant information and perform reasonably well over all tasks.

Bayesian Solution

The VCL paper is built on the observation that Bayesian inference is a very natural framework for Continual learning. In particular given model parameters $θ$, a prior over the model parameters $p(θ)$ and training data $D$, assuming independence between training examples, the posterior distirbution of the parameters given the data can be written as:

Which can be broken further down into:

Which implies that the distirbution of the model paremeters can be updated after each task, and still lead to exact inference of the true posterior.

Dependencies

To install

pip install torch
pip install blitz-bayesian-pytorch

About

Variational Continual Learning for discriminative models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages