Neural Network Weight Coding with Layer-Adaptive Compression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for compressing Deep Neural Networks (DNNs) lack a unified approach for encoding quantized weights, leading to inefficiencies in storage and computation.

Innovation Solution

A method for unification-based coding in neural network model compression, which involves receiving a layer uniform flag to determine whether to use uniform or non-uniform coding for quantized weights, and accordingly encoding the weights using either a 3D-Unitree or 3D-Tagtree coding method.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a unified coding method is used for all quantized weights, then device complexity is reduced, but compression efficiency deteriorates

Engineering Contradiction:
Improvecoding method complexityVSAvoidmodel size
Core Design Contradiction:
Device complexityVSLoss of substance

Solution Approach 1:

The patent implements dynamic coding method selection by introducing a layer uniform flag that adapts the coding approach based on the characteristics of each neural network layer. When the flag indicates uniform distribution, uniform coding is applied; otherwise, non-uniform coding is used. This dynamic adaptation resolves the contradiction by allowing the system to switch between coding methods rather than being fixed to one approach.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent applies different coding methods to different parts of the neural network model based on local characteristics. By examining the quantized weight distribution of each layer and selecting appropriate coding methods locally, the system optimizes compression efficiency for each specific layer while maintaining overall manageable complexity through the uniform flag mechanism.

Inventive Principle:
Principle #3Local quality

2Loss of substance

If non-uniform coding method is used, then compression efficiency is improved, but device complexity increases

Engineering Contradiction:
Improvemodel sizeVSAvoidcoding method complexity
Core Design Contradiction:
Loss of substanceVSDevice complexity

Solution Approach 1:

The system dynamically selects between uniform and non-uniform coding methods based on the layer uniform flag, avoiding the need to always implement complex non-uniform coding. This dynamic selection allows the system to achieve better compression when needed while falling back to simpler uniform coding when appropriate, thus improving compression efficiency without permanently increasing device complexity.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter that determines coding method selection from a fixed configuration to a dynamic parameter (layer uniform flag) that reflects the actual characteristics of each layer. This parameter change enables the system to adaptively choose the appropriate coding complexity level, achieving better compression ratios without requiring the device to always handle the most complex coding scenarios.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If uniform coding method is used, then device complexity is reduced, but compression efficiency deteriorates

Engineering Contradiction:
Improvecoding method complexityVSAvoidcompression efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The system uses the layer uniform flag to dynamically determine whether to apply uniform or non-uniform coding methods. This dynamic approach allows the system to achieve high compression efficiency when weight distributions are non-uniform while maintaining simple uniform coding when distributions are uniform, thus improving overall compression productivity without permanently increasing device complexity.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

By applying different coding methods to different layers based on their specific weight distribution characteristics, the system optimizes compression efficiency locally for each layer. This local optimization approach improves overall compression productivity while keeping the average device complexity manageable through the use of the simple uniform flag mechanism.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12293274B2Method and apparatus for unification based coding for neural network model compression
Publication Date: 2025.05.06 TENCENT AMERICA LLC
  • US12293274B2 patent drawing
  • US12293274B2 patent drawing
  • US12293274B2 patent drawing

AI summary

A method of unification based coding for neural network model compression is performed by at least one processor and includes receiving a layer uniform flag indicating whether a quantized weight of an input neural network is encoded using a uniform coding method, and determining whether the quantized weight is encoded using the uniform coding method, based on the received layer uniform flag. The method further includes, based on the quantized weight being determined to be encoded using the uniform coding method, encoding the quantized weight, using the uniform coding method, and based on the quantized weight being determined to not be encoded using the uniform coding method, encoding the quantized weight, using a non-uniform coding method.