Saved in:
Bibliographic Details
Main Authors: Min, Youngjae, Wright, Benjamin, Bernstein, Jeremy, Azizan, Navid
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2305.16424
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918250801004544
author Min, Youngjae
Wright, Benjamin
Bernstein, Jeremy
Azizan, Navid
author_facet Min, Youngjae
Wright, Benjamin
Bernstein, Jeremy
Azizan, Navid
contents When machine learning models are trained continually on a sequence of tasks, they are often liable to forget what they learned on previous tasks--a phenomenon known as catastrophic forgetting. Proposed solutions to catastrophic forgetting tend to involve storing information about past tasks, meaning that memory usage is a chief consideration in determining their practicality. This paper develops a memory-efficient solution to catastrophic forgetting using the idea of matrix sketching, in the context of a simple continual learning algorithm known as orthogonal gradient descent (OGD). OGD finds weight updates that aim to preserve performance on prior datapoints, using gradients of the model on those datapoints. However, since the memory cost of storing prior model gradients grows with the runtime of the algorithm, OGD is ill-suited to continual learning over long time horizons. To address this problem, we propose SketchOGD. SketchOGD employs an online sketching algorithm to compress model gradients as they are encountered into a matrix of a fixed, user-determined size. In contrast to existing memory-efficient variants of OGD, SketchOGD runs online without the need for advance knowledge of the total number of tasks, is simple to implement, and is more amenable to analysis. We provide theoretical guarantees on the approximation error of the relevant sketches under a novel metric suited to the downstream task of OGD. Experimentally, we find that SketchOGD tends to outperform current state-of-the-art variants of OGD given a fixed memory budget.
format Preprint
id arxiv_https___arxiv_org_abs_2305_16424
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle SketchOGD: Memory-Efficient Continual Learning
Min, Youngjae
Wright, Benjamin
Bernstein, Jeremy
Azizan, Navid
Machine Learning
Artificial Intelligence
When machine learning models are trained continually on a sequence of tasks, they are often liable to forget what they learned on previous tasks--a phenomenon known as catastrophic forgetting. Proposed solutions to catastrophic forgetting tend to involve storing information about past tasks, meaning that memory usage is a chief consideration in determining their practicality. This paper develops a memory-efficient solution to catastrophic forgetting using the idea of matrix sketching, in the context of a simple continual learning algorithm known as orthogonal gradient descent (OGD). OGD finds weight updates that aim to preserve performance on prior datapoints, using gradients of the model on those datapoints. However, since the memory cost of storing prior model gradients grows with the runtime of the algorithm, OGD is ill-suited to continual learning over long time horizons. To address this problem, we propose SketchOGD. SketchOGD employs an online sketching algorithm to compress model gradients as they are encountered into a matrix of a fixed, user-determined size. In contrast to existing memory-efficient variants of OGD, SketchOGD runs online without the need for advance knowledge of the total number of tasks, is simple to implement, and is more amenable to analysis. We provide theoretical guarantees on the approximation error of the relevant sketches under a novel metric suited to the downstream task of OGD. Experimentally, we find that SketchOGD tends to outperform current state-of-the-art variants of OGD given a fixed memory budget.
title SketchOGD: Memory-Efficient Continual Learning
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2305.16424