[Paper Review] GACT: Activation Compressed Training for Generic Network Architectures
GACT is a general framework for Activation Compressed Training (ACT) that enables memory-efficient training of diverse neural network architectures—convolutional, transformer, and graph networks—by dynamically compressing activations with provable convergence. It reduces activation memory by up to 8.1×, allowing up to 24.7× larger batch sizes with negligible accuracy loss, and is implemented as a PyTorch library for seamless integration with existing models and memory-saving techniques.
Training large neural network (NN) models requires extensive memory resources, and Activation Compressed Training (ACT) is a promising approach to reduce training memory footprint. This paper presents GACT, an ACT framework to support a broad range of machine learning tasks for generic NN architectures with limited domain knowledge. By analyzing a linearized version of ACT's approximate gradient, we prove the convergence of GACT without prior knowledge on operator type or model architecture. To make training stable, we propose an algorithm that decides the compression ratio for each tensor by estimating its impact on the gradient at run time. We implement GACT as a PyTorch library that readily applies to any NN architecture. GACT reduces the activation memory for convolutional NNs, transformers, and graph NNs by up to 8.1x, enabling training with a 4.2x to 24.7x larger batch size, with negligible accuracy loss. We implement GACT as a PyTorch library at https://github.com/LiuXiaoxuanPKU/GACT-ICML.
Motivation & Objective
- To develop a general activation compression framework for training diverse neural network architectures without architectural or operator-specific assumptions.
- To prove convergence of activation compressed training without prior knowledge of operator types or model structures.
- To design an adaptive algorithm that selects optimal compression ratios per tensor at runtime based on gradient impact estimation.
- To implement GACT as a PyTorch library that integrates seamlessly with existing training pipelines and other memory-saving techniques like gradient checkpointing and swapping.
Proposed method
- Formulate ACT as a computational graph of operators to generalize across architectures, avoiding layer-specific assumptions.
- Analyze the stochastic gradient of ACT using a linearized approximation, proving it is unbiased and has a structured variance that enables numerical estimation.
- Develop a numerical algorithm to predict gradient variance under different compression strategies, enabling optimal strategy selection.
- Use an integer program approximation to automatically determine the optimal compression ratio for each tensor based on its sensitivity to gradient updates.
- Implement GACT as a PyTorch library with multiple optimization levels, supporting user-defined operators and integration with existing memory-efficiency techniques.
- Enable runtime compression ratio adaptation by estimating each tensor’s impact on gradient variance during training.
Experimental results
Research questions
- RQ1Can activation compressed training be made provably convergent across generic neural network architectures without architectural assumptions?
- RQ2How can compression ratios be adaptively selected per tensor to maintain training stability and accuracy?
- RQ3Can a general-purpose ACT framework be built that supports arbitrary operators, including user-defined ones, without custom implementations?
- RQ4What is the trade-off between memory reduction, training speed, and accuracy loss in generic deep learning models?
- RQ5How does GACT integrate with and enhance existing memory-efficiency techniques like gradient checkpointing and swapping?
Key findings
- GACT reduces activation memory by up to 8.1× across convolutional networks, transformers, and graph neural networks with negligible accuracy loss.
- GACT enables training with up to 24.7× larger batch sizes on the same GPU memory budget, significantly improving training throughput.
- On ResNet-152, GACT allows scaling to 7.0× deeper, 3.6× wider, or 3.0× higher resolution under 16GB GPU memory.
- For BERT-large, GACT supports models 2.0× deeper or 1.6× wider under the same memory constraints.
- Combining GACT with gradient checkpointing reduces peak activation memory by 5.4× at batch size 288, with no accuracy drop.
- GACT combined with swapping increases training speed by up to 2.3× due to faster CPU-GPU communication of compressed tensors, and prefetching adds ~7% speedup with minimal memory overhead.
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.