Compressing Gradient Optimizers via Count-Sketches

Ryan Spring, Anastasios Kyrillidis, Vijai Mohan, Anshumali Shrivastava
2/1/2019
cs.LGcs.DSstat.ML

Official code: rdspring1/Count-Sketch-Optimizers (25 stars, Python, Apache-2.0, PyTorch, last commit 2019-11-26).

Abstract

Many popular first-order optimization methods (e.g., Momentum, AdaGrad, Adam) accelerate the convergence rate of deep learning models. However, these algorithms require auxiliary parameters, which cost additional memory proportional to the number of parameters in the model.

Show full abstract

The problem is becoming more severe as deep learning models continue to grow larger in order to learn from complex, large-scale datasets. Our proposed solution is to maintain a linear sketch to compress the auxiliary variables. We demonstrate that our technique has the same performance as the full-sized baseline, while using significantly less space for the auxiliary variables. Theoretically, we prove that count-sketch optimization maintains the SGD convergence rate, while gracefully reducing memory usage for large-models. On the large-scale 1-Billion Word dataset, we save 25% of the memory used during training (8.6 GB instead of 11.7 GB) by compressing the Adam optimizer in the Embedding and Softmax layers with negligible accuracy and performance loss. For an Amazon extreme classification task with over 49.5 million classes, we also reduce the training time by 38%, by increasing the mini-batch size 3.5x using our count-sketch optimizer.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

A compressed adaptive optimizer for training large-scale deep learning models using PyTorch

2511PythonSep 15, 20187 years agoApache-2.0
adagradadam-optimizercount-min-sketchcount-sketchdeep-learning+8 more

Similar Papers

Cite this paper

@article{spring2019compressing,
  title  = {Compressing Gradient Optimizers via Count-Sketches},
  author = {Ryan Spring and Anastasios Kyrillidis and Vijai Mohan and Anshumali Shrivastava},
  year   = {2019},
  eprint = {1902.00179},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1902.00179}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1902.00179.svg)](https://codeofpaper.com/paper/1902.00179)

Discussion