Memory-Efficient Integer-Only Training of Deep Neural Networks
Organizations: Dipartimento di Elettronica, Informazione e Bioingegneria (DEIB), Politecnico di Milano, Milan, Italy
Abstract
Training neural networks in reduced precision can yield significant efficiency gains, yet all existing methods that scale to standard computer vision benchmarks retain floating-point in at least one stage, typically the weight update or optimizer state. We present a training algorithm that scales to modern deep neural networks, in which every tensor (weights, gradients, and activations) is stored as INT8, and every operation (forward pass, backward pass, weight update, optimizer update) is performed in integer arithmetic. Specifically, tensors are stored as signed integer mantissas paired with explicit power-of-two exponents, on which integer-only operations are performed using five custom composable building blocks (products, sums, divide-by-constant, nonlinear functions, and weight updates). This allows complete implementation of trainable integer layers, including convolutions, batch and layer normalization, softmax, and GELU. A per-group velocity mechanism with independent exponent tracking preserves gradient precision across neurons and channels with diverse magnitudes. As every tensor fits in INT8, training memory is roughly 4x smaller than the FP32 baseline. We validate our training algorithm on CNNs (ResNet-18/34/50/101, MobileNetV2) and Vision Transformers (ViT-Ti / B), demonstrating for the first time that training neural networks with INT8 tensors and integer arithmetic can achieve competitive accuracy on CIFAR-10, CIFAR-100 and ImageNet at a reduced memory budget.
Figures & tables
| Category | Method | Fwd/Bwd int | Wt update int | Wt storage int | Momentum + LR | CNN @ INet | ViT |
|---|---|---|---|---|---|---|---|
| Low-precision training | Mixed-Prec. Micikevicius et al. (2018) | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ |
| FP8 Micikevicius et al. (2022) | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ | |
| F8Net Jin et al. (2022) | ✗ | ✗ | ✗ | ✓ | ✓ | ✗ | |
| DQT Shalby et al. (2026) | ✗ | ✗ | ✗ | ✓ | ✓ | ✗ | |
| Integer fwd/bwd passes | Banner et al. (2018) | ✓ | ✗ | ✗ | ✓ | ✓ | ✗ |
| Zhu et al. (2020) | ✓ | ✗ | ✗ | ✓ | ✓ | ✗ |
| Method | Weights | Gradient | Velocity | Activations |
|---|---|---|---|---|
| FP32 | FP32 | FP32 | FP32 | FP32 |
| FP16 Micikevicius et al. (2018) | FP32 | FP32 | FP32 | FP16 |
| FP8 NVIDIA Micikevicius et al. (2022) | FP32 | FP32 | FP32 | FP16 |
| FP8 IBM / HFP8 Sun et al. (2019) | FP16 | FP16 | FP16 | FP8 |
| INT8 fwd/bwd Jin et al. (2022) | FP32 | FP32 | FP32 | FP32 |
| Ghaffari et al. (2022) | FP32 | FP32 | INT16 | FP32 |
| Dataset | Model | Method | Acc. (%) | Training | Precision |
| mem. (GB) | |||||
| CIFAR-10 | ResNet-18 | FP32 Ghaffari et al. (2022) | 95.3 | 1.36 | FP32 |
| Ghaffari et al. (2022) | 94.8 | 1.33 | INT8/16 + FP32 | ||
| Ours | 94.7 | INT8 | |||
| ResNet-34 | FP32 Mert Bülent Sarıyıldız (2018) | 95.5 | 2.16 | FP32 | |
| Ours | 95.1 | INT8 |
| Method | Metric | INT8 | INT7 | INT6 | INT5 | INT4 | Precision ( ) |
|---|---|---|---|---|---|---|---|
| Acc (%) | 94.8 | 94.7 | 94.47 | 88.5 | Diverge | ||
| Ghaffari et al. (2022) | Mem (GB) | 1.33 | 1.33 | 1.33 | 1.33 | 1.33 | intB + FP32, velocity INT16 |
| Acc (%) | 94.7 | 94.1 | 91.8 | 83.3 | 70.5 | ||
| Ours | Mem (GB) | 0.34 | 0.30 | 0.26 | 0.22 | 0.17 | intB, velocity INT8 |
| Dataset | Model | FP32 | w/o per-group velocity | w/ per-group velocity | ||
|---|---|---|---|---|---|---|
| (Reference) | Acc. | Exp. mem. | Acc. | Exp. mem. | ||
| CIFAR-10 | ResNet-18 | 95.3 | 93.8 ( ) | KB | 94.7 ( ) | KB |
| MobileNetV2 | 94.7 | 89.3 ( ) | KB | 91.5 ( ) | KB | |
| ViT-Ti | 90.9 | 85.3 ( ) | KB | 88.0 ( ) | KB | |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Layer / operator | Primitives used | Ref. |
|---|---|---|
| Convolution (incl. 1 1, depthwise) | Product | Equations 5 and 3 |
| Linear / fully-connected | Product | Equations 5 and 3 |
| Patch embedding (strided conv) | Product | Equations 5 and 3 |
| Residual add, gradient merge | Sum | Equation 6 |
| Average pool ( ) | Divide-by-constant | Equations 7 and 8 |
| ReLU / ReLU6 | Clip | Section B.1 |
| Activation | Forward (on ) | Backward (grad) | LUT |
|---|---|---|---|
| ReLU | — | ||
| ReLU6 | — | ||
| GELU | ( Equation 19 ) | INT8 |
| LUT | Entry | Domain | Scale | Shape | Size |
|---|---|---|---|---|---|
| , exponents | KB | ||||
| B |
| Configuration | (M) | (M/sample) | |
|---|---|---|---|
| ResNet-18 / CIFAR-10 (32 2 ) | 11.2 | 1.29 | 256 |
| MobileNetV2 / CIFAR-10 (32 2 ) | 2.24 | 1.88 | 256 |
| ViT-Ti / CIFAR-10 (32 2 ) | 5.36 | 7.91 | 256 |
| ViT-B / CIFAR-10 fine-tune (224 2 ) | 86.0 | 35.1 | 64 |
| ResNet-18 / CIFAR-100 (32 2 ) | 11.2 | 1.29 | 256 |
| ResNet-34 / CIFAR-100 (32 2 ) | 21.3 | 2.01 | 256 |
| RN-18 C10/C100 | MNv2 C10 | ViT-Ti C10 | ViT-B C10 | RN-18 INet | |
| Batch size | 256 | 256 | 256 | 64 | 256 |
| Epochs | 200 | 200 | 400 | 50 | 90 |
| Base LR | 0.1 | 0.05 | 0.05 | 0.001 | 0.1 |
| Warmup epochs | 5 | 5 | 5 | 0 | 5 |
| Momentum | 0.9 | 0.9 | 0.9 | 0.9 | 0.9 |
| Weight decay |
| Softmax | GELU | LayerNorm | Linear | Acc. (%) | vs. float |
| float | float | float | float | 99.1 | (float baseline) |
| float | float | float | INT8 | 95.9 | |
| float | float | INT8 | INT8 | 95.8 | |
| float | INT8 | INT8 | INT8 | 95.9 | |
| INT8 | INT8 | INT8 | INT8 | 96.1 | |
| Ghaffari et al. [2022] (float softmax, FP32 weights) | 98.8 | ||||