NITRO-D: Native Integer-only Training of Deep Convolutional Neural Networks

Alberto Pirillo, Luca Colombo, Manuel RoveriarXiv 2024 · DOI

Introduction

Deep learning training typically incurs a "floating-point tax," requiring 32-bit floating-point (FP32) arithmetic to manage tiny gradients and wide-ranging values. This requirement creates a significant barrier for TinyML, where low-power microcontrollers often lack hardware support for floating-point math. NITRO-D is the first framework to enable "native" integer-only training for deep Convolutional Neural Networks (CNNs), eliminating FP math entirely from both forward and backward passes.

The NITRO-D Framework

NITRO-D overcomes the challenges of integer math—such as overflow and vanishing values—through a modular architecture and specialized layers.

Overview of the NITRO-D architecture featuring local-loss blocks and the internal structure of an Integer Conv2D Block.

Integer Local-Loss Blocks

To prevent the integer overflow common in long global backpropagation chains, NITRO-D partitions the network into local-loss blocks. Each block contains its own "learning layers" that compute a local error signal (LES). This strategy confines gradient propagation to smaller segments, keeping numerical values within manageable 8-bit or 32-bit ranges.

Specialized Normalization and Scaling

Standard Batch Normalization is computationally prohibitive for pure integer arithmetic. NITRO-D replaces it with two efficient alternatives:

  • NITRO-Scaling: Rescales pre-activations to fit the 8-bit integer range ([-127, 127]).
  • NITRO-ReLU: An activation function with built-in centering (mean subtraction), providing necessary stability without the overhead of standard normalization.

IntegerSGD Optimizer

Traditional optimizers rely on small fractional learning rates (e.g., 0.001). NITRO-D introduces IntegerSGD, which utilizes an "inverse learning rate" (e.g., 1000) and performs weight updates using integer division.

The IntegerSGD algorithm utilizing inverse learning rates and conditional weight decay.

To ensure updates remain effective, the framework employs a NITRO Amplification Factor (AF). The AF calibrates the learning rate for different parts of a block, ensuring updates are significant enough to change weights without causing divergence.

Experimental Results

The framework was evaluated on MNIST, FashionMNIST, and CIFAR-10 benchmarks, demonstrating significant advantages over existing methods:

  • Performance: NITRO-D improved test accuracy by up to +5.96% over previous integer-only methods like PocketNN. It successfully trained VGG-style CNNs on CIFAR-10 with an accuracy gap of only 0.15% to 7% compared to full FP32 training.
  • Efficiency: Compared to traditional FP32 training, NITRO-D reduced memory requirements by up to 76.14% and energy consumption by up to 32.42%.

Conclusion and Future Work

NITRO-D proves that training deep CNNs from scratch using only integer arithmetic is viable and highly efficient for edge devices. While a small accuracy gap remains on complex datasets—likely due to the use of Residual Sum of Squares (RSS) loss—future work will focus on closing this gap by exploring more sophisticated integer-compatible loss functions and modern architectures like ResNets or Transformers.

Summary updated

BibTeX
@misc{pirillo2024nitro,
  author = {Alberto Pirillo and Luca Colombo and Manuel Roveri},
  title = {{NITRO-D: Native Integer-only Training of Deep Convolutional Neural Networks}},
  year = {2024},
  eprint = {2407.11698},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.11698},
}
Figure