Neural Network Quantization via Adaptive Bit Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current neural network-based video coding methods face challenges in efficiently quantizing parameters and activations for optimal performance, particularly in determining optimal quantization precision and bit allocation for neural networks, which affects compression efficiency and decoding quality.

Innovation Solution

The proposed solution involves determining quantization parameters based on mean or maximum absolute values of neural network parameters and activations, and signaling these parameters to a decoder for optimal quantization, including scaling factors and zero points, to achieve precise quantization and efficient encoding.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If higher quantization precision is used for neural network parameters and activations, then decoding quality is improved, but compression efficiency deteriorates due to increased bit allocation

Engineering Contradiction:
Improvedecoding qualityVSAvoidbit allocation
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent applies parameter changes by dynamically adjusting quantization parameters (precision levels) for different neural network components based on their statistical properties. Specifically, it computes mean and standard deviation for each layer's parameters and activations, then determines optimal quantization bit depths that balance quality and compression ratio. This resolves the contradiction by making precision adaptive rather than uniform, improving compression efficiency while maintaining necessary decoding quality.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements local quality by applying different quantization precision levels to different layers and components of the neural network based on their individual importance and characteristics. Critical layers receive higher precision while less critical layers use lower precision, optimizing the overall system performance. This localized approach to quality allocation directly addresses the contradiction by ensuring high decoding quality where needed while reducing bit allocation where possible.

Inventive Principle:
Principle #3Local quality

2Device complexity

If uniform quantization precision is applied to all neural network layers, then device complexity is reduced, but performance deteriorates due to suboptimal bit allocation across different layers

Engineering Contradiction:
Improvequantization process complexityVSAvoidcompression efficiency
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent changes the quantization precision parameter dynamically for each layer based on computed statistics (mean, standard deviation) and importance metrics. Rather than using a fixed uniform precision, the system adapts precision levels to match the actual data distribution and significance of each layer, improving compression efficiency without significantly increasing device complexity through automated statistical analysis.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent performs preliminary analysis of neural network parameters and activations during the encoding phase, computing statistical properties and determining optimal quantization parameters before actual quantization occurs. This preliminary action allows the system to optimize bit allocation across layers in advance, achieving better compression efficiency while keeping the actual quantization process relatively simple.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If more bits are allocated to quantize neural network parameters, then quantization accuracy is improved, but compression ratio deteriorates

Engineering Contradiction:
Improvequantization accuracyVSAvoidcompression ratio
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies parameter changes by computing optimal bit allocation for each layer based on the variance and importance of parameters and activations. Layers with high variance or importance receive more bits for accurate quantization, while layers with low variance receive fewer bits. This adaptive parameter adjustment maintains quantization accuracy where needed while improving overall compression ratio through efficient bit distribution.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies partial action by allocating quantization bits selectively rather than uniformly to all layers. Critical layers that most impact reconstruction quality receive sufficient bit allocation for high accuracy, while less critical layers receive minimal allocation. This partial focus on essential components achieves acceptable quantization accuracy overall while maximizing compression ratio.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20230412806A1Apparatus, method and computer program product for quantizing neural networks
Publication Date: 2023.12.21 NOKIA TECHNOLOGIES OY
  • US20230412806A1 patent drawing
  • US20230412806A1 patent drawing
  • US20230412806A1 patent drawing

AI summary

Various embodiments provide an apparatus, a method, and a computer program product. An example method includes determining one or more quantization parameters (quantizers) based at least on one or more of the following: a mean absolute value computed based on a set of parameters of a neural network comprising a parameter; a maximum absolute value computed based on a set of activations of the neural network comprising an activation; a number of parameters in the set of parameters of the neural network comprising the parameter; or a maximum absolute value computed based on an output value computed based on the parameter and the activation; and quantizing at least one of the parameter or the activation based at least on the one or more quantization parameters.