Adaptive Quantization for Neural Network Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Artificial neural networks (ANNs) face inefficiencies in training time due to the need for full precision in data and link weights, which can be slowed by the time required for 32-bit floating-point operations and data transfer, especially when implemented across multiple cores or devices.

Innovation Solution

Implement adaptive quantization in ANNs by calculating the distribution of ANN information and selecting appropriate quantization functions to reduce bit width, allowing for the use of lower precision instructions and faster data transfer, with dynamic recalculations based on output correlation with known correct outputs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If full precision (32-bit floating-point) is used for ANN data and link weights, then measurement precision is improved, but productivity deteriorates due to slower operations and data transfer

Engineering Contradiction:
Improveprecision of ANN data and link weightsVSAvoidtraining time
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies parameter changes by dynamically adjusting the precision (bit width) of ANN data and link weights based on their distribution characteristics. Instead of using fixed 32-bit floating-point precision throughout, the system calculates the actual distribution of values in each layer and selects appropriate quantization levels, thereby reducing precision where high precision is not needed while maintaining accuracy where required.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements local quality by applying different quantization strategies to different layers of the neural network based on their specific distribution characteristics. Each layer can have its own quantization parameters tailored to its data distribution, allowing high precision in layers that require it and lower precision in layers where it is unnecessary, thus optimizing the trade-off between precision and training speed.

Inventive Principle:
Principle #3Local quality

2Productivity

If adaptive quantization is applied to reduce bit width, then productivity is improved through faster operations and data transfer, but measurement precision deteriorates

Engineering Contradiction:
Improvetraining timeVSAvoidprecision of ANN data and link weights
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent employs dynamics by making the quantization parameters adaptive rather than static. The system continuously monitors the distribution of ANN information during training and dynamically adjusts the quantization function and bit width accordingly. This allows the precision to be optimized in real-time based on the actual data characteristics, maintaining measurement precision while maximizing productivity gains.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements feedback mechanisms where the output correlation with known correct outputs is used to evaluate the effectiveness of the current quantization scheme. Based on this feedback, the system can recalibrate the quantization parameters to ensure that precision is maintained at levels that preserve model accuracy, thus preventing precision deterioration while benefiting from reduced bit width.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If quantization function is selected based on distribution calculation, then adaptability is improved, but device complexity increases due to additional calculation requirements

Engineering Contradiction:
Improveadaptability of quantization to data distributionVSAvoidcomplexity of quantization process
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by pre-calculating or pre-determining the distribution characteristics of ANN data before applying quantization. By analyzing the distribution in advance and selecting appropriate quantization functions beforehand, the system reduces the computational burden during actual training operations. This preliminary analysis enables high adaptability without significantly increasing the complexity of the main training process.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20240054332A1Adaptive quantization for neural networks
Publication Date: 2024.02.15 ADVANCED MICRO DEVICES INC
  • US20240054332A1 patent drawing
  • US20240054332A1 patent drawing
  • US20240054332A1 patent drawing

AI summary

Methods, devices, systems, and instructions for adaptive quantization in an artificial neural network (ANN) calculate a distribution of ANN information; select a quantization function from a set of quantization functions based on the distribution; apply the quantization function to the ANN information to generate quantized ANN information; load the quantized ANN information into the ANN; and generate an output based on the quantized ANN information. Some examples recalculate the distribution of ANN information and reselect the quantization function from the set of quantization functions based on the resampled distribution if the output does not sufficiently correlate with a known correct output. In some examples, the ANN information includes a set of training data. In some examples, the ANN information includes a plurality of link weights.