Piecewise Quantization for Neural Network Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks (DNNs) face challenges in resource-constrained applications due to high computational complexity and energy consumption, with traditional quantization techniques introducing errors that degrade performance, especially in low bit-width deployments.

Innovation Solution

A piecewise linear quantization method that divides the quantization range into non-overlapping regions, applying different quantization functions to each region to minimize quantization error, allowing for efficient deployment in resource-constrained environments without requiring access to the full training dataset.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If uniform quantization with INT8 numbers is used, then near-original FP32 pre-trained model performance is preserved, but resource requirements remain too high for widespread deployment in resource-constrained applications

Engineering Contradiction:
Improvemodel performance accuracyVSAvoidresource requirements
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The quantization range is divided into multiple non-uniform regions with different quantization granularities. High-precision regions are applied where tensor values have high density (e.g., around zero), while low-precision regions are applied where values are sparse. This segmentation allows the system to use more bits where needed for accuracy and fewer bits where acceptable, reducing overall resource requirements while maintaining model performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different quantization parameters (bit-width, scale factors) are applied locally to different regions of the tensor value distribution rather than using a single uniform quantization scheme. This allows each region to have the quality appropriate for its characteristics, optimizing the trade-off between precision and resource usage in different parts of the data distribution.

Inventive Principle:
Principle #3Local quality

2Quantity of substance

If low bit-width quantization (e.g., 4-bit) is used to reduce resource requirements, then deployment in resource-constrained applications becomes feasible, but quantization error increases and performance degrades to unacceptable levels

Engineering Contradiction:
Improveresource requirementsVSAvoidmodel performance accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The quantization process is segmented into multiple regions where the first region uses low bit-width quantization (e.g., 4-bit) and the second region uses higher bit-width quantization (e.g., 8-bit or full precision). This allows the system to achieve low resource requirements overall while preserving accuracy in critical regions where high precision is needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The quantization parameters (bit-width, scale factors, offsets) are changed across different regions of the tensor distribution. By adapting these parameters locally rather than using fixed uniform quantization, the system can maintain acceptable performance even when using low bit-width representations in some regions.

Inventive Principle:
Principle #35Parameter changes

3Use of energy by moving object

If quantization is applied to reduce computational complexity and energy consumption, then resource demands are reduced, but quantization errors are introduced that reduce DNN performance

Engineering Contradiction:
Improveenergy consumptionVSAvoidDNN performance accuracy
Core Design Contradiction:
Use of energy by moving objectVSMeasurement precision

Solution Approach 1:

Different quantization strategies are applied to different regions of the tensor distribution based on their characteristics. Regions with high value density receive finer quantization to minimize information loss, while sparse regions use coarser quantization. This local adaptation minimizes overall quantization error while achieving energy savings.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The quantization parameters are optimized and varied across different regions rather than using fixed parameters. This allows the system to adapt the quantization precision to the actual data distribution, reducing quantization error in critical regions while maintaining energy efficiency in less critical regions.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11775611B2Piecewise quantization for neural networks
Publication Date: 2023.10.03 SAMSUNG ELECTRONICS CO LTD
  • US11775611B2 patent drawing
  • US11775611B2 patent drawing
  • US11775611B2 patent drawing

AI summary

In some embodiments, a method of quantizing an artificial neural network includes dividing a quantization range for a tensor of the artificial neural network into a first region and a second region, and quantizing values of the tensor in the first region separately from values of the tensor in the second region. In some embodiments, linear or nonlinear quantization are applied to values of the tensor in the first region and the second region. In some embodiments, the method includes locating a breakpoint between the first region and the second region by substantially minimizing an expected quantization error over at least a portion of the quantization range. In some embodiments, the expected quantization error is minimized by solving analytically and/or searching numerically.