DNN Weight Quantization for Fixed-Point Hardware Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep Neural Networks (DNNs) face accuracy reduction when converting from floating-point to fixed-point number formats due to quantization errors, especially when retraining is not practical or possible.

Innovation Solution

A method is developed to convert DNN weights from a floating-point to a fixed-point number format by determining quantization errors, identifying a subset of weights to adjust, and generating quantized weights to minimize total quantization error, allowing the DNN to maintain accuracy without retraining.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If weights are quantized from floating-point to fixed-point number format, then silicon area and power consumption are reduced, but accuracy deteriorates due to quantization errors

Engineering Contradiction:
Improvepower consumptionVSAvoidaccuracy
Core Design Contradiction:
Loss of energyVSMeasurement precision

Solution Approach 1:

The patent applies preliminary action by calculating quantization errors for all weights before final quantization, then using these pre-calculated errors to selectively adjust weights that would otherwise cause excessive total error. This advance preparation allows the system to achieve accurate fixed-point conversion without retraining.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes parameters by selectively modifying specific weight values based on their individual quantization errors. Instead of uniformly quantizing all weights, the system identifies weights where adjusting the quantized value (even beyond standard rounding) reduces total quantization error, thereby optimizing accuracy for the given bit-width constraint.

Inventive Principle:
Principle #35Parameter changes

2Device complexity

If weights are quantized from floating-point to fixed-point number format, then device complexity is reduced, but accuracy deteriorates due to quantization errors

Engineering Contradiction:
Improvehardware complexityVSAvoidaccuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary calculation of quantization errors and identifies which weights need adjustment before the actual quantization process. This pre-computation step enables the system to achieve high accuracy with simple fixed-point hardware, as the optimal weights are determined offline without requiring complex runtime decision-making in the hardware.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent optimizes weight parameters by selectively adjusting individual weights based on their quantization characteristics. This parameter optimization allows the use of simpler fixed-point arithmetic hardware while maintaining accuracy comparable to more complex floating-point implementations.

Inventive Principle:
Principle #35Parameter changes

3Ease of manufacture

If standard quantization method is used for all weights, then conversion process is simplified, but total quantization error increases

Engineering Contradiction:
Improveconversion process simplicityVSAvoidquantization precision
Core Design Contradiction:
Ease of manufactureVSManufacturing precision

Solution Approach 1:

The patent applies local quality by treating different weights differently based on their individual quantization characteristics. Instead of applying a uniform quantization method to all weights, the system identifies specific weights that benefit from adjusted quantization and applies different quantization strategies to different weights, optimizing overall accuracy.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the quantization parameter (the quantized weight value) selectively for specific weights rather than applying a fixed quantization rule to all weights. This allows the system to improve quantization precision for critical weights while maintaining simplicity for others, achieving a balance between accuracy and process simplicity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11188817B2Methods and systems for converting weights of a deep neural network from a first number format to a second number format
Publication Date: 2021.11.30 IMAGINATION TECH LTD
  • US11188817B2 patent drawing
  • US11188817B2 patent drawing
  • US11188817B2 patent drawing

AI summary

Methods and system for converting a plurality of weights of a filter of a Deep Neural Network (DNN) in a first number format to a second number format, the second number format having less precision than the first number format, to enable the DNN to be implemented in hardware logic. The method comprising: determining, for each of the plurality of weights, a quantisation error associated with quantising that weight to the second number format in accordance with a first quantisation method; determining a total quantisation error for the plurality of weights based on the quantisation errors for the plurality of weights; identifying a subset of the plurality of weights to be quantised to the second number format in accordance with a second quantisation method based on the total quantisation error for the plurality of weights; and generating a set of quantised weights representing the plurality of weights in the second number format, the quantised weight for each weight in the subset of the plurality of weights based on quantising that weight to the second number format in accordance with the second quantisation method and the quantised weight for each of the remaining weights of the plurality of weights based on quantising that weight to the second number format in accordance with the first quantisation method.