Neural Network Weight Quantization with Trainable Codebooks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing scale and complexity of neural networks lead to high storage and computational demands due to large weights, necessitating a more effective method to reduce weights and computation while maintaining precision.

Innovation Solution

A data quantization method involving retraining the neural network with a weight codebook, using clustering algorithms like K-means or K-medoids to group weights into classes, and replacing them with center weights, encoded in a dictionary, allowing low-bit quantization and reducing storage and memory access overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If low-rank matrix decomposition or hash techniques are used to reduce weights, then storage capacity requirement is reduced, but the amount of computation that can be reduced is limited and neural network precision deteriorates

Engineering Contradiction:
Improveweight storage capacityVSAvoidneural network precision
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent applies quantization by changing the precision parameter of weight representation from high-precision floating-point to low-precision discrete levels. By clustering weights into multiple classes and representing them with fewer bits, the patent reduces storage requirements while maintaining acceptable computational accuracy through optimized quantization levels and clustering algorithms.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent creates a simplified copy of the original weight data through clustering and quantization. Instead of storing and processing exact weight values, the patent uses clustered center points and quantization tables that approximate the original weights, thereby reducing storage and computation while preserving the essential functional characteristics of the neural network.

Inventive Principle:
Principle #26Copying

2Measurement precision

If large-scale weight data is used to maintain neural network precision, then measurement precision is improved, but memory access energy consumption increases

Engineering Contradiction:
Improveweight precisionVSAvoidmemory access energy consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent changes the precision parameter of weight representation from high-precision to low-precision formats. By quantizing weights to fewer bits and using clustering to represent weight distributions with compact codes, the patent significantly reduces memory access requirements and energy consumption while maintaining sufficient precision for accurate neural network operation.

Inventive Principle:
Principle #35Parameter changes

3Power

If more operation units are added to handle large weights, then computing capability is improved, but computing time and energy consumption increase

Engineering Contradiction:
Improvecomputing capabilityVSAvoidcomputing time
Core Design Contradiction:
PowerVSLoss of time

Solution Approach 1:

The patent changes the computational parameter by quantizing weight values to discrete levels and using lookup tables for activation functions. This transformation enables the use of simpler, faster computation operations such as table lookups and integer arithmetic instead of complex floating-point operations, thereby reducing computing time and energy consumption while maintaining computational capability.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3657398B1Processing method and accelerating device
Publication Date: 2025.10.08 SHANGHAI CAMBRICON INFORMATION TECH CO LTD
  • EP3657398B1 patent drawingFigure 1~2
  • EP3657398B1 patent drawingFigure 3~4
  • EP3657398B1 patent drawingFigure 5~6

AI summary

The present disclosure provides a data quantization configured to perform the following steps: grouping the weights of a neural network; performing a clustering operation on each group of weights by using a clustering algorithm, dividing a group of weights into m classes, computing a center weight for each class, and replacing all the weights in each class by the center weights, where m is a positive integer; encoding the center weight to get a weight codebook and a weight dictionary; and retraining the neural network, where only the weight codebook is trained, and the weight dictionary remains unchanged.