Skip to main content
QUICK REVIEW

[Paper Review] Memory Optimization for Deep Networks

Aashaka Shah, Chao-Yuan Wu|arXiv (Cornell University)|Oct 27, 2020
Advanced Neural Network ApplicationsComputer Science34 references10 citations
TL;DR

MONeT is an automatic framework that jointly optimizes checkpointing schedules and memory-efficient operator implementations to reduce memory usage in deep learning training. It achieves 3× memory reduction over PyTorch with only 9–16% computational overhead by modeling memory and compute trade-offs as an integer program, outperforming both hand-tuned and automated baselines.

ABSTRACT

Deep learning is slowly, but steadily, hitting a memory bottleneck. While the tensor computation in top-of-the-line GPUs increased by 32x over the last five years, the total available memory only grew by 2.5x. This prevents researchers from exploring larger architectures, as training large networks requires more memory for storing intermediate outputs. In this paper, we present MONeT, an automatic framework that minimizes both the memory footprint and computational overhead of deep networks. MONeT jointly optimizes the checkpointing schedule and the implementation of various operators. MONeT is able to outperform all prior hand-tuned operations as well as automated checkpointing. MONeT reduces the overall memory requirement by 3x for various PyTorch models, with a 9-16% overhead in computation. For the same computation cost, MONeT requires 1.2-1.8x less memory than current state-of-the-art automated checkpointing frameworks. Our code is available at https://github.com/utsaslab/MONeT.

Motivation & Objective

  • To address the growing memory bottleneck in deep learning training, where GPU memory has grown only 2.5× while compute has increased 32× over five years.
  • To overcome the limitations of existing approaches that optimize either local operator implementations or global checkpointing schedules in isolation.
  • To develop an automatic framework that jointly optimizes both local and global memory reduction techniques under a fixed memory budget.
  • To minimize peak memory consumption during forward and backward passes while maintaining computational efficiency.
  • To provide a unified, theoretically grounded optimization framework that tightly bounds memory usage and enables optimal trade-offs between memory and compute.

Proposed method

  • Formalizes memory and computational cost bounds for forward, backward, and recomputation phases under varying operator implementations and checkpointing schedules.
  • Models the joint optimization of operator implementation and checkpointing as a 0-1 integer program with linearized memory constraints.
  • Uses standard mixed-integer linear programming solvers to find the optimal configuration that minimizes memory usage under a given budget.
  • Supports multiple optimization strategies: convolution algorithm selection, in-place activation, output-activation reuse, and intermediate activation recomputation.
  • Integrates with PyTorch and supports end-to-end training with minimal framework modifications.
  • Employs theoretical analysis to derive tight bounds on peak memory consumption, enabling precise optimization.

Experimental results

Research questions

  • RQ1Can joint optimization of local operator implementations and global checkpointing schedules yield better memory-computation trade-offs than isolated optimization of either?
  • RQ2What is the theoretical bound on peak memory consumption when combining different memory-saving techniques in backpropagation?
  • RQ3How does the joint optimization of convolution algorithm selection and checkpointing impact overall memory and compute efficiency?
  • RQ4To what extent can automatic selection of memory-efficient operator implementations outperform hand-crafted or heuristic-based approaches?
  • RQ5How does MONeT compare to state-of-the-art automated checkpointing frameworks in terms of memory savings and computational overhead?

Key findings

  • MONeT reduces memory usage by 3× compared to PyTorch across multiple models including ResNet, VGG, UNet, GoogleNet, and MobileNet-V2.
  • For the same computational cost, MONeT requires 1.2–1.8× less memory than the current state-of-the-art automated checkpointing framework.
  • The framework incurs only a 9–16% increase in computation time compared to standard PyTorch training.
  • Joint optimization of convolution algorithms and checkpointing yields significant performance gains, as convolution workspace memory characteristics strongly affect speed and memory trade-offs.
  • Ablation studies show that combining all optimization strategies (conv, output-activated, intermediate-activated) results in the lowest computational overhead.
  • The detailed case study on ResNet-50 confirms that MONeT reduces peak memory from 14.7 GB (PyTorch) to 8.0 GB while maintaining training stability.

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.