Skip to main content
QUICK REVIEW

[Paper Review] Compressing Gradient Optimizers via Count-Sketches

Ryan Spring, Anastasios Kyrillidis|arXiv (Cornell University)|Feb 1, 2019
Advanced Neural Network ApplicationsComputer Science32 references5 citations
TL;DR

This paper proposes compressing auxiliary variables in first-order optimizers like Adam, Momentum, and AdaGrad using Count-Sketch data structures to reduce memory usage in large deep learning models. By exploiting sparsity in embedding and softmax layers, the method maintains convergence rates and model performance while reducing memory by up to 25% and accelerating training by 38% on extreme classification tasks with 49.5M classes.

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. 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.

Motivation & Objective

  • To address the growing memory overhead from auxiliary parameters in first-order optimizers like Adam and Momentum, which scale with model size.
  • To enable larger batch sizes and more expressive models by reducing memory consumption of optimizer states in deep learning.
  • To leverage structural sparsity in embedding and softmax layers to efficiently compress optimizer states without performance degradation.
  • To provide a theoretically grounded, memory-efficient alternative to full-precision optimizer states that maintains SGD convergence rates.
  • To demonstrate practical benefits on large-scale language modeling and extreme classification tasks with minimal accuracy loss.

Proposed method

  • Using Count-Sketch data structures to maintain compressed representations of second-order optimizer states (e.g., Adam's velocity and momentum) in embedding and softmax layers.
  • Storing only a small, fixed-size sketch (e.g., [3, 266, 1024]) instead of full optimizer states, reducing memory by up to 99% for second-moment estimates.
  • Updating the sketch incrementally using random hash functions to map gradient updates to bins, enabling constant-time operations.
  • Querying the sketch to approximate the full optimizer state during parameter updates, with controlled error via theoretical bounds.
  • Allowing a graceful trade-off between sketch size and accuracy by tuning the number of hash functions and bins.
  • Integrating the sketch-based optimizer directly into training pipelines, replacing standard optimizer states with compressed variants.

Experimental results

Research questions

  • RQ1Can Count-Sketch be used to compress auxiliary optimizer variables in deep learning without degrading convergence or performance?
  • RQ2How does the memory and training time of a sketch-based optimizer compare to standard Adam on large-scale models?
  • RQ3To what extent can the batch size be increased when using compressed optimizer states, and what is the impact on training speed?
  • RQ4Does the sketch-based optimizer maintain the same convergence rate as standard first-order methods under theoretical analysis?
  • RQ5Can the method be effectively applied to extremely large-scale classification tasks with over 49 million classes?

Key findings

  • On the 1-Billion Word language modeling task, the Count-Sketch optimizer reduced memory usage by 25% (from 11.7 GB to 8.6 GB) with no accuracy or performance loss.
  • For an extreme classification task with 49.5 million classes, increasing the mini-batch size 3.5× using the Count-Sketch optimizer reduced training time by 38%.
  • The Count-Sketch optimizer achieved a Recall@100 of 0.6889, compared to 0.6881 for the Adam baseline, showing negligible performance degradation.
  • The method reduced memory cost per model from 4 GB to 2.6 GB (35% reduction) by compressing the second-moment estimate using a 1% size sketch.
  • Theoretical analysis confirms that the Count-Sketch optimizer maintains the same SGD convergence rate as the full-precision baseline.
  • The approach enables a practical trade-off between memory usage and approximation error, with minimal computational overhead.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.