Skip to main content
QUICK REVIEW

[Paper Review] Accurate Neural Training with 4-bit Matrix Multiplications at Standard Formats

Brian Chmiel, Ron Banner|arXiv (Cornell University)|Dec 19, 2021
Advanced Neural Network ApplicationsComputer Science6 citations
TL;DR

This paper proposes Logarithmic Unbiased Quantization (LUQ), a method for 4-bit training of deep neural networks using standard floating-point formats. LUQ enables unbiased quantization of neural gradients via stochastic rounding to zero or the smallest representable magnitude, achieving state-of-the-art accuracy in 4-bit training—1.1% top-1 error on ImageNet with ResNet50, and 0.32% after fine-tuning—without hardware-specific formats or significant overhead.

ABSTRACT

Quantization of the weights and activations is one of the main methods to reduce the computational footprint of Deep Neural Networks (DNNs) training. Current methods enable 4-bit quantization of the forward phase. However, this constitutes only a third of the training process. Reducing the computational footprint of the entire training process requires the quantization of the neural gradients, i.e., the loss gradients with respect to the outputs of intermediate neural layers. Previous works separately showed that accurate 4-bit quantization of the neural gradients needs to (1) be unbiased and (2) have a log scale. However, no previous work aimed to combine both ideas, as we do in this work. Specifically, we examine the importance of having unbiased quantization in quantized neural network training, where to maintain it, and how to combine it with logarithmic quantization. Based on this, we suggest a $ extit{logarithmic unbiased quantization}$ (LUQ) method to quantize both the forward and backward phases to 4-bit, achieving state-of-the-art results in 4-bit training without the overhead. For example, in ResNet50 on ImageNet, we achieved a degradation of 1.1%. We further improve this to a degradation of only 0.32% after three epochs of high precision fine-tuning, combined with a variance reduction method -- where both these methods add overhead comparable to previously suggested methods.

Motivation & Objective

  • To enable full 4-bit training of deep neural networks by quantizing both forward and backward passes using standard numerical formats.
  • To address the critical issue of gradient bias in low-precision training, particularly for backpropagated errors.
  • To eliminate reliance on non-standard or proprietary numerical formats (e.g., radix-4 floating point) that hinder hardware portability.
  • To maintain high model accuracy while reducing computational and memory overhead during training.
  • To demonstrate that unbiased quantization is essential for the backward pass, unlike the forward pass, where bias is less detrimental.

Proposed method

  • Proposes Logarithmic Unbiased Quantization (LUQ) for 4-bit quantization of neural gradients using a standard FP4 format: [1 sign bit, 3 exponent bits, 0 mantissa bits].
  • Applies stochastic quantization to gradients below the minimum representable magnitude α, mapping them either to zero or to α to preserve unbiased gradient estimates.
  • Dynamically adjusts α during training to ensure the maximum gradient magnitude is always representable.
  • Uses stochastic rounding within the representable range to eliminate bias in gradient estimation.
  • Combines LUQ with existing INT4 quantization for weights and activations (e.g., SAWB) to enable full 4-bit GEMM computation.
  • Introduces two complementary methods: variance reduction via re-sampling of stochastic gradients (SMP), and high-precision fine-tuning (FNT) for improved convergence.

Experimental results

Research questions

  • RQ1Why is unbiased gradient quantization critical for 4-bit training, and how does it differ from forward pass quantization?
  • RQ2Can a standard numerical format (e.g., radix-2 FP4) be used effectively for 4-bit backpropagation without sacrificing accuracy?
  • RQ3How does stochastic rounding compare to round-to-nearest in terms of gradient bias and model accuracy during low-precision training?
  • RQ4What is the impact of variance in stochastic gradient quantization, and how can it be reduced without breaking unbiasedness?
  • RQ5Can high-precision fine-tuning effectively recover accuracy lost during 4-bit training, and what is the computational cost relative to prior methods?

Key findings

  • LUQ achieves 1.1% top-1 error on ImageNet using ResNet50 with full 4-bit training, outperforming prior SOTA methods that used non-standard formats.
  • After three epochs of high-precision fine-tuning (FNT), the error is reduced to just 0.32%, demonstrating strong recovery capability.
  • The proposed variance reduction method (SMP) with two samples achieves similar computational overhead to prior methods like two-phase rounding in [23].
  • The throughput of 4-bit training with LUQ is approximately 8x faster than FP16 training, indicating significant efficiency gains.
  • LUQ enables multiplication-free backpropagation with a 5x reduction in GEMM hardware area through specialized handling of exponent-only and mantissa-only operands.
  • The FP32 accumulator, previously the most expensive component in low-bit training, can be reduced in width, suggesting further optimization potential.

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.