NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

NITI: Training Integer Neural Networks Using Integer-Only Arithmetic

Maolin Wang, Seyedramin Rasoulinezhad, Philip H. W. Leong, Hayden Kwok-Hay SoIEEE TPDS 2020 · DOI

Abstract

Training deep neural networks (DNNs) has traditionally relied on high-precision floating-point arithmetic (FP32 or FP16) to accommodate the high dynamic range required for gradient updates and non-linear functions like Softmax. This requirement poses a significant barrier for energy-efficient training on edge devices. We present NITI, a framework that enables end-to-end DNN training using exclusively low-bitwidth integer arithmetic. By employing per-layer block exponentiation, pseudo-stochastic rounding, and integer-only loss functions, NITI achieves accuracy comparable to floating-point baselines while significantly improving hardware efficiency and speed.

Introduction

While 8-bit integer (INT8) quantization is widely used for efficient inference, training remains a "floating-point only" domain. The necessity for high dynamic range to handle minute gradient updates usually forces a return to power-hungry floating-point units (FPUs). NITI (Integer-only Training) challenges this status quo by replacing floating-point dependencies with bit-shifting, scaling schemes, and "in-situ" stochastic rounding.

The Challenge of Integer-Only Training

The transition to integer-only training faces three primary hurdles:

  1. Weight Updates: Gradients are often too small for 8-bit representation, leading to "vanishing" updates.
  2. Loss Functions: Functions like Softmax and Cross-Entropy involve exponentials and logarithms, which are computationally expensive for integer units.
  3. Rounding Bias: Standard rounding techniques introduce systematic errors that hinder model convergence.

The NITI Framework

NITI addresses these challenges through a hardware-software co-design approach. The framework performs forward and backward passes using low-bitwidth integer arithmetic, as illustrated in the overall training flow.

NITI training flow using integer-only matrix multiplication and scaling.

Key innovations include:

  • Per-Layer Block Exponentiation: Each layer is assigned a scaling exponent ($2^s$), allowing the network to dynamically adjust its precision window as values fluctuate across orders of magnitude.
  • Integer-Only Loss Function: Using Taylor expansions and base-2 approximations, NITI computes Softmax and Cross-Entropy gradients using only additions and bit-shifts, skipping difficult divisions.

Innovations in Rounding

Stochastic rounding is critical for low-precision training but typically requires expensive on-chip random number generation. NITI introduces Pseudo-Stochastic Rounding, which repurposes the lower bits of 32-bit intermediate accumulation results—bits that are normally discarded—as a "free" source of pseudo-randomness.

Comparison between standard stochastic rounding and NITI's pseudo-stochastic rounding.

This approach eliminates the need for a dedicated random number generator while maintaining the benefits of stochastic rounding for convergence.

Experimental Evaluation

NITI was evaluated on MNIST (LeNet-5), CIFAR-10 (VGG-small), and ImageNet (AlexNet).

  • Accuracy Parity: On MNIST and CIFAR-10, NITI achieved zero accuracy degradation compared to FP32. On ImageNet, NITI reached 48.3% top-1 accuracy, trailing the FP32 baseline by only 0.7%.
  • Massive Speedups: Utilizing GPU Tensor Cores for the backward pass, NITI achieved speedups of 6.7x to 8.5x for specific convolutional layers on an RTX 2080 Ti.
  • Hardware Efficiency: On FPGAs, NITI consumed 5x fewer DSP blocks and reduced memory footprint by up to 1.84x compared to equivalent floating-point designs.

Discussion and Conclusion

NITI demonstrates that the floating-point requirement for training is more of a habit than a necessity. By leveraging dense weight distributions and hardware-optimized integer operations, NITI paves the way for efficient on-device learning. Future work will explore extending these techniques to modern architectures like Transformers and optimizing for a wider variety of kernel shapes. For the future of edge AI, the path seems to be paved in integers.

Summary updated

BibTeX
@article{wang2020niti,
  author = {Maolin Wang and Seyedramin Rasoulinezhad and Philip H. W. Leong and Hayden Kwok-Hay So},
  title = {{NITI: Training Integer Neural Networks Using Integer-Only Arithmetic}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2020},
  doi = {10.1109/tpds.2022.3149787},
}
Figure