Skip to main content
QUICK REVIEW

[Paper Review] Training and Inference with Integers in Deep Neural Networks

Shuang Wu, Guoqi Li|arXiv (Cornell University)|Feb 13, 2018
Advanced Neural Network ApplicationsComputer Science24 references200 citations
TL;DR

WAGE discretizes both training and inference to low-bitwidth integers, enabling a pure integer dataflow for DNNs with competitive accuracy on multiple datasets.

ABSTRACT

Researches on deep neural networks with discrete parameters and their deployment in embedded systems have been active and promising topics. Although previous works have successfully reduced precision in inference, transferring both training and inference processes to low-bitwidth integers has not been demonstrated simultaneously. In this work, we develop a new method termed as "WAGE" to discretize both training and inference, where weights (W), activations (A), gradients (G) and errors (E) among layers are shifted and linearly constrained to low-bitwidth integers. To perform pure discrete dataflow for fixed-point devices, we further replace batch normalization by a constant scaling layer and simplify other components that are arduous for integer implementation. Improved accuracies can be obtained on multiple datasets, which indicates that WAGE somehow acts as a type of regularization. Empirically, we demonstrate the potential to deploy training in hardware systems such as integer-based deep learning accelerators and neuromorphic chips with comparable accuracy and higher energy efficiency, which is crucial to future AI applications in variable scenarios with transfer and continual learning demands.

Motivation & Objective

  • Motivate and enable training in low-bitwidth integer hardware for embedded AI systems.
  • Develop a full integer dataflow (W,A,G,E) that supports both forward and backward passes.
  • Propose shift-based quantization and stochastic rounding to control bitwidth while preserving orientation information.
  • Eliminate dependency on floating-point batch normalization by introducing a layer-wise constant scaling factor.

Proposed method

  • Four quantization operators Q_W, Q_A, Q_G, Q_E constrain weights, activations, gradients, and errors to low-bitwidth integers.
  • Shift-based linear mapping Q(x,k) with saturation to implement uniform quantization.
  • A layer-wise shift-based scaling factor alpha to attenuate weight amplification and replace batch normalization.
  • Stochastic rounding applied to gradient updates to bound their bitwidth while preserving directional information.
  • Training uses mini-batch SGD without momentum or adaptive learning rates to match integer dataflow constraints.
  • Evaluation on MNIST, SVHN, CIFAR-10, and ImageNet with default 2-8-8-8 bit configuration.

Experimental results

Research questions

  • RQ1Can end-to-end training and inference be performed using pure low-bitwidth integer dataflow?
  • RQ2What are the necessary bitwidths for W, A, G, E to maintain accuracy across standard datasets?
  • RQ3How does replacing batch normalization with a constant scaling layer affect training and accuracy?
  • RQ4What regularization effects arise from integer-based training and quantization of backpropagation?

Key findings

  • WAGE achieves comparable accuracy to inference-time discretization baselines and provides regularization benefits.
  • Using 2-8-8-8 bit configuration enables ternary weights during inference while maintaining 8-bit representations for activations, errors, and gradients during training.
  • On MNIST, SVHN, CIFAR-10, WAGE shows competitive error rates (e.g., MNIST 0.40%, SVHN 1.92%, CIFAR-10 6.78%).
  • For ImageNet with AlexNet, WAGE patterns yield top-1/top-5 errors around 51.6/27.8 (for the 2888 pattern) and related variants, illustrating scalability to large datasets.
  • Bitwidth analysis shows error bitwidth k_E around 4–8 bits can be sufficient for CIFAR-10, and gradient bitwidth k_G around 6–8 bits balances convergence and accuracy.
  • Quantization of gradients allows communication-efficient training and reduces memory footprint without sacrificing final performance under appropriate hyperparameters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.