Neural Network Weight Quantization via Adaptive Block Partitioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current neural network model compression techniques for multimedia content description and analysis face challenges in efficient storage and computation due to high bit depth requirements, leading to memory wastage and reduced inference speed, especially on mobile and edge devices, and lack effective adaptive block partitioning and codebook coding methods.

Innovation Solution

The method involves determining a saturated maximum value for weight coefficients in neural network layers, clipping them to a specific range, quantizing based on the bit depth, and using adaptive block partitioning and codebook coding to optimize storage and computation, including entropy encoding and raster scan ordering for efficient memory access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If high bit depth is used to represent weight coefficients, then measurement precision is improved, but memory usage increases and inference speed decreases

Engineering Contradiction:
Improveweight coefficient precisionVSAvoidmemory usage
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent applies parameter changes by dynamically adjusting the bit depth of weight coefficients based on their statistical distribution. Instead of using a fixed high bit depth for all coefficients, the system analyzes the actual range and distribution of weights in each layer, then selects an optimal bit depth that maintains sufficient precision while minimizing memory consumption. This resolves the contradiction by adapting the precision parameter to the actual needs of each neural network layer.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements local quality by applying different bit depths to different layers or blocks of the neural network based on their specific characteristics. Important layers that require high precision maintain higher bit depths, while less critical layers use lower bit depths. This selective approach ensures that memory is allocated efficiently according to the actual precision requirements of each part of the network, rather than uniformly across all layers.

Inventive Principle:
Principle #3Local quality

2Measurement precision

If high bit depth is used to represent weight coefficients, then measurement precision is improved, but productivity decreases due to reduced inference speed

Engineering Contradiction:
Improveweight coefficient precisionVSAvoidinference speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent changes the bit depth parameter dynamically based on the computational requirements and performance constraints. By reducing bit depth where high precision is not critical, the system decreases the computational complexity of matrix operations, thereby improving inference speed without significantly compromising overall model accuracy. This resolves the productivity-precision contradiction by adapting precision to functional requirements.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies partial action by using high precision only where necessary and lower precision elsewhere. Instead of maintaining high bit depth throughout the entire network, the system identifies critical paths and layers that benefit most from high precision and applies reduced precision in other areas. This selective precision strategy maintains adequate performance while improving overall inference speed.

Inventive Principle:
Principle #16Partial or excessive action

3Device complexity

If uniform quantization is used, then device complexity is reduced, but manufacturing precision worsens due to loss of information

Engineering Contradiction:
Improvequantization complexityVSAvoidweight coefficient accuracy
Core Design Contradiction:
Device complexityVSManufacturing precision

Solution Approach 1:

The patent applies local quality by using different quantization strategies for different layers or blocks of the neural network. Instead of a single uniform quantization approach, the system analyzes the distribution characteristics of weights in each layer and applies tailored quantization methods. This allows each layer to maintain optimal precision while keeping the overall system manageable in complexity.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes quantization parameters such as step size and number of levels based on the statistical properties of each layer's weight coefficients. By adapting these parameters locally rather than using fixed uniform quantization, the system reduces information loss in critical layers while maintaining reasonable complexity. This resolves the contradiction by making quantization adaptive rather than rigid.

Inventive Principle:
Principle #35Parameter changes

4Manufacturing precision

If adaptive block partitioning is implemented, then manufacturing precision is improved through better optimization, but device complexity increases

Engineering Contradiction:
Improvemodel compression efficiencyVSAvoidpartitioning complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent applies segmentation by dividing the neural network into multiple blocks or layers and applying different quantization and compression strategies to each segment. This allows the system to optimize each block independently based on its characteristics, improving overall compression efficiency. The segmentation approach manages complexity by breaking down the large-scale optimization problem into smaller, more manageable sub-problems.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by applying different partitioning granularities and optimization techniques to different blocks of the network. Critical blocks receive more detailed partitioning and optimization, while less important blocks use coarser partitioning. This selective approach improves compression efficiency where needed while limiting the increase in overall system complexity.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12010310B2Method and apparatus for quantization, adaptive block partitioning and codebook coding for neural network model compression
Publication Date: 2024.06.11 TENCENT AMERICA LLC
  • US12010310B2 patent drawing
  • US12010310B2 patent drawing
  • US12010310B2 patent drawing

AI summary

A method of quantization, adaptive block partitioning and codebook coding for neural network model compression, is performed by at least one processor and includes determining a saturated maximum value of a multi-dimensional tensor in a layer of a neural network, and a bit depth corresponding to the saturated maximum value, and clipping weight coefficients in the multi-dimensional tensor to be within a range of the saturated maximum value. The method further includes quantizing the clipped weight coefficients, based on the bit depth, and transmitting, to a decoder, a layer header including the bit depth.