[Paper Review] Memory-Efficient Adaptive Optimization
This paper proposes SM3, a memory-efficient adaptive optimization method that reduces the memory overhead of adaptive optimizers like Adam and Adagrad by maintaining only a compressed, low-rank approximation of second-order statistics. The method enables significantly larger batch sizes and model sizes with comparable or better convergence, achieving up to 2-fold speedups in training time on large-scale language models and image classification tasks while preserving convergence guarantees.
Adaptive gradient-based optimizers such as Adagrad and Adam are crucial for achieving state-of-the-art performance in machine translation and language modeling. However, these methods maintain second-order statistics for each parameter, thus introducing significant memory overheads that restrict the size of the model being used as well as the number of examples in a mini-batch. We describe an effective and flexible adaptive optimization method with greatly reduced memory overhead. Our method retains the benefits of per-parameter adaptivity while allowing significantly larger models and batch sizes. We give convergence guarantees for our method, and demonstrate its effectiveness in training very large translation and language models with up to 2-fold speedups compared to the state-of-the-art.
Motivation & Objective
- To address the high memory overhead of adaptive optimizers like Adam and Adagrad, which restricts model size and batch size in large-scale training.
- To develop a method that retains the benefits of per-parameter adaptivity while drastically reducing memory consumption.
- To enable training of very large models—especially in NLP and vision—by freeing memory for larger batch sizes.
- To provide theoretical convergence guarantees in the convex online optimization setting.
- To empirically demonstrate that the method achieves comparable or better convergence with reduced memory and faster wall-time.
Proposed method
- SM3 maintains a low-rank approximation of the second-order gradient statistics instead of storing full per-parameter second moments.
- The method uses a stochastic, memory-efficient update rule that compresses the adaptive statistics using a rank-one approximation.
- It applies a diagonal scaling factor to maintain per-parameter adaptivity while minimizing storage.
- The algorithm is designed to be compatible with standard deep learning frameworks and requires minimal code changes.
- It leverages natural gradient-like updates through a structured approximation of the Fisher information matrix.
- The method dynamically adapts to gradient patterns without requiring prior knowledge of activation structure.
Experimental results
Research questions
- RQ1Can a memory-efficient adaptive optimizer maintain convergence performance comparable to Adam and Adagrad while reducing memory usage?
- RQ2To what extent can memory savings from SM3 be leveraged to increase batch size in distributed training?
- RQ3Does the low-rank approximation of second-order statistics affect convergence rates in large-scale models?
- RQ4How does SM3 compare to existing memory-efficient methods like Adafactor and Shampoo in terms of memory, speed, and accuracy?
- RQ5Can SM3 achieve faster wall-time convergence than standard adaptive optimizers under fixed computational budgets?
Key findings
- On the WMT’14 en→fr translation task, SM3 achieved a BLEU score of 40.50 with 40% less memory than Adam, enabling larger batch sizes.
- On BERT-Large language modeling, SM3 reached 70% masked LM accuracy in 35% less wall-time than Adam when using double the batch size.
- With a batch size of 2048, SM3 used only 6.02 GiB per core, comparable to Adam at 1024, but allowed scaling up to 2^16 without hitting memory limits.
- On ImageNet with AmoebaNet-D, SM3 achieved 78.71% top-1 accuracy and 94.31% top-5 accuracy, matching state-of-the-art performance.
- SM3 reduced memory usage by 40% compared to Adam while maintaining similar convergence speed and accuracy on large models.
- Per-step time for SM3 was 3% faster than Adam, and wall-time for convergence was reduced by up to 50% when doubling the batch size.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.