Neural Network Weight Block Compression for Embedded Memory Limits

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks require significant memory for activation maps and weights, which hinders their execution on embedded devices with limited memory, necessitating a reduction in memory footprint.

Innovation Solution

A system and method for lossless encoding and decoding of neural network weights using various compression modes such as Exponential-Golomb, Sparse-Exponential-Golomb, Golomb-Rice, and Fixed length encoding, allowing for independent compression and decompression of weight blocks to reduce memory requirements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If weights are stored in full precision format, then model accuracy is maintained, but memory consumption increases

Engineering Contradiction:
Improveweight precisionVSAvoidmemory consumption
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The weight tensor is divided into multiple blocks, where some blocks are marked as sparsified (containing only non-zero values) and others as non-sparsified (stored in full). This segmentation allows the system to apply different storage strategies to different portions of the weights, reducing overall memory consumption while maintaining accuracy for critical weight blocks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the storage parameter of weight blocks from full precision to sparse representation by identifying and marking blocks with low importance or high sparsity. This parameter change reduces the amount of data stored while maintaining the essential functionality of the neural network through selective precision reduction.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If memory footprint is reduced through compression, then embedded device compatibility is improved, but decompression complexity increases

Engineering Contradiction:
Improvememory footprintVSAvoiddecompression complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

During the training phase, the system performs preliminary analysis to identify which weight blocks can be sparsified and marks them accordingly. This preliminary action creates a compression map that guides the decompression process, allowing the decompression algorithm to efficiently reconstruct only the necessary blocks without requiring complex analysis during inference.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The decompression process is segmented into two simple phases: first, reading the compression map to identify which blocks are sparsified, and second, selectively decompressing only those blocks. This segmentation avoids the need for complex global optimization during decompression, reducing device complexity while maintaining compression efficiency.

Inventive Principle:
Principle #1Segmentation

3Ease of manufacture

If all weight blocks are compressed uniformly, then implementation simplicity is maintained, but compression efficiency decreases

Engineering Contradiction:
Improveimplementation simplicityVSAvoidcompression efficiency
Core Design Contradiction:
Ease of manufactureVSQuantity of substance

Solution Approach 1:

Instead of applying uniform compression to all weight blocks, the system applies different compression strategies to different blocks based on their local characteristics. Blocks identified as having low importance or high sparsity are compressed using sparse representation, while other blocks maintain full precision. This local quality approach maximizes compression efficiency without requiring complex adaptive algorithms.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11588499B2Lossless compression of neural network weights
Publication Date: 2023.02.21 SAMSUNG ELECTRONICS CO LTD
  • US11588499B2 patent drawing
  • US11588499B2 patent drawing
  • US11588499B2 patent drawing

AI summary

A system and a method provide compression and decompression of weights of a layer of a neural network. For compression, the values of the weights are pruned and the weights of a layer are configured as a tensor having a tensor size of H×W×C in which H represents a height of the tensor, W represents a width of the tensor, and C represents a number of channels of the tensor. The tensor is formatted into at least one block of values. Each block is encoded independently from other blocks of the tensor using at least one lossless compression mode. For decoding, each block is decoded independently from other blocks using at least one decompression mode corresponding to the at least one compression mode used to compress the block; and deformatted into a tensor having the size of H×W×C.