Neural Network Quantization via Layer-Dependent Shift Constants

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks are computation-intensive and memory-consuming, making it difficult to deploy them in resource-constrained settings due to high resource requirements, limiting their use in real-world tasks on low-resource devices.

Innovation Solution

A method and system for quantizing neural networks by determining a shift constant for each layer based on an input dataset to convert floating-point data to fixed-point data, reducing memory consumption and computation time, while iterating through all layers to achieve minimal accuracy loss.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If deep neural networks are deployed with full precision floating-point parameters, then model accuracy is maintained, but memory consumption and computation time increase significantly

Engineering Contradiction:
Improvemodel accuracyVSAvoidmemory consumption
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent applies parameter changes by systematically reducing the precision of neural network parameters from standard floating-point (32-bit or 64-bit) to lower precision formats (8-bit, 16-bit, or even 4-bit integers). This transformation changes the fundamental parameter representation, enabling significant memory reduction while maintaining acceptable accuracy through techniques like quantization-aware training and calibration on representative datasets

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent creates simplified copies of the original high-precision neural network by generating quantized versions that replicate the network's functionality using reduced precision. Multiple quantized copies can be created for different precision levels, allowing deployment on various hardware platforms without modifying the original high-precision model

Inventive Principle:
Principle #26Copying

2Measurement precision

If deep neural networks are deployed with full precision floating-point parameters, then model accuracy is maintained, but computation time increases

Engineering Contradiction:
Improvemodel accuracyVSAvoidcomputation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

By changing the parameter precision from floating-point to integer representations, the patent enables faster computation operations. Integer arithmetic operations are inherently faster than floating-point operations on most hardware platforms, and the quantization process optimizes parameters for efficient computation while preserving the network's predictive accuracy

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent substitutes the mechanical computation system from floating-point arithmetic to integer arithmetic. This substitution leverages the fact that integer operations can be executed more efficiently by hardware, reducing computation time while maintaining the essential computational functionality of the neural network

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Quantity of substance

If quantization is applied to reduce parameter precision, then memory consumption and computation time are reduced, but model accuracy deteriorates

Engineering Contradiction:
Improvememory consumptionVSAvoidmodel accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent implements feedback mechanisms through calibration processes where the quantized model is evaluated on a validation dataset, and the quantization parameters (such as scale and zero-point values) are adjusted based on the observed accuracy degradation. This iterative feedback loop continues until the optimal balance between precision reduction and accuracy maintenance is achieved

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent applies preliminary action by performing quantization-aware training or calibration before final deployment. During this preliminary phase, the model is trained or adjusted with knowledge of the target quantization format, allowing it to adapt its parameters and representations to the lower precision regime, thereby minimizing accuracy loss when deployed in the quantized state

Inventive Principle:
Principle #10Preliminary action

4Quantity of substance

If standard quantization methods are used, then parameter precision is reduced, but accuracy loss is significant

Engineering Contradiction:
Improveparameter precisionVSAvoidmodel accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent applies local quality by using different quantization strategies for different parts of the neural network. Instead of uniformly quantizing all parameters, the method identifies and applies higher precision to critical parameters (such as weights in important layers or bias terms) while using lower precision for less sensitive parameters, thereby maintaining overall accuracy while achieving compression

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20240404262A1Method and machine learning system to perform quantization of neural network
Publication Date: 2024.12.05 BLAIZE INC
  • US20240404262A1 patent drawing
  • US20240404262A1 patent drawing
  • US20240404262A1 patent drawing

AI summary

The present disclosure relates to a system and method of performing quantization of a neural network having multiple layers. The method comprises receiving a floating-point dataset as input dataset and determining a first shift constant for first layer of the neural network based on the input dataset. The method also comprises performing quantization for the first layer using the determined shift constant of the first layer. The method further comprises determining a next shift constant for next layer of the neural network based on output of a layer previous to the next layer, and performing quantization for the next layer using the determined next shift constant. The method further comprises iterating the steps of determining shift constant and performing quantization for all layers of the neural network to generate fixed point dataset as output.