mlsanityData to 7 Oct 2026

Mesa: A Memory-saving Training Framework for Transformers

arXiv 2111.11124 ↗First posted 22 Nov 2021cs.CV cs.LGcited by 16

Not on the map. Why?

Abstract (arXiv)

There has been an explosion of interest in designing high-performance Transformers. While Transformers have delivered significant performance improvements, training such networks is extremely memory intensive owing to storing all intermediate activations that are needed for gradient computation during backpropagation, especially for long sequences. To this end, we present Mesa, a memory-saving training framework for Transformers. Specifically, Mesa uses exact activations during forward pass while storing a low-precision version of activations to reduce memory consumption during training. The low-precision activations are then dequantized during back-propagation to compute gradients. Besides, to address the heterogeneous activation distributions in the multi-head self-attention layers, we propose a head-wise activation quantization strategy, which quantizes activations based on the statistics of each head to minimize the approximation error. To further boost training efficiency, we learn quantization parameters by running estimates. More importantly, by re-investing the saved memory in employing a larger batch size or scaling up model size, we may further improve the performance under constrained computational resources. Extensive experiments on ImageNet, CIFAR-100 and ADE20K demonstrate that Mesa can achieve flexible memory-savings (up to 50%) during training while achieving comparable or even better performance. Code is available at https://github.com/ziplab/Mesa.

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 43 of its 54 references that are in the map. First posted on arXiv 22 Nov 2021.

Builds on

43 of 54 references.

References · 43

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  6. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  7. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  8. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  9. 2020End-to-End Object Detection with Transformerscited by 7,384
  10. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
  11. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
  12. 2016Layer Normalizationcited by 5,579
31 more
  1. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
  2. 2016Gaussian Error Linear Units (GELUs)cited by 3,431
  3. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  4. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
  5. 2017Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inferencecited by 1,548
  6. 2020Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformerscited by 1,368
  7. 2017Mixed Precision Trainingcited by 1,135
  8. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
  9. 2016Semantic Understanding of Scenes through the ADE20K Datasetcited by 1,063
  10. 2016XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networkscited by 829
  11. 2016Training Deep Nets with Sublinear Memory Costcited by 825
  12. 2019Panoptic Feature Pyramid Networkscited by 644
  13. 2019Learned Step Size Quantizationcited by 604
  14. 2015BinaryConnect: Training Deep Neural Networks with binary weights during propagationscited by 571
  15. 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
  16. 2018PACT: Parameterized Clipping Activation for Quantized Neural Networkscited by 456
  17. 2018HAQ: Hardware-Aware Automated Quantization with Mixed Precisioncited by 426
  18. 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
  19. 2019Data-Free Quantization Through Weight Equalization and Bias Correctioncited by 328
  20. 2019On the Relationship between Self-Attention and Convolutional Layerscited by 299
  21. 2019Q8BERT: Quantized 8Bit BERTcited by 296
  22. 2017TernGrad: Ternary Gradients to Reduce Communication in Distributed Deep Learningcited by 253
  23. 2019Parameter Efficient Training of Deep Convolutional Neural Networks by Dynamic Sparse Reparameterizationcited by 187
  24. 2021AutoFormer: Searching Transformers for Visual Recognitioncited by 186
  25. 2020LSQ+: Improving low-bit quantization through learnable offsets and better initializationcited by 180
  26. 2020BinaryBERT: Pushing the Limit of BERT Quantizationcited by 175
  27. 2018Learning to Quantize Deep Networks by Optimizing Quantization Intervals with Task Losscited by 157
  28. 2020TernaryBERT: Distillation-aware Ultra-low Bit BERTcited by 145
  29. 2021ActNN: Reducing Training Memory Footprint via 2-Bit Activation Compressed Trainingcited by 61
  30. 2021GLiT: Neural Architecture Search for Global and Local Image Transformercited by 53
  31. 2019Backprop with Approximate Activations for Memory-efficient Network Trainingcited by 19

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 3; 2023: 5; 2024: 4; 2025: 3; 2026: 1.

16 papers.

Sort:

By area: