Pruning Batch Normalization Layers in Deep Neural Networks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks with batch normalization layers face challenges in deployment on resource-limited devices due to high computational intensity and memory requirements, making it difficult to implement on devices like mobile phones and embedded systems.

Innovation Solution

A method to prune batch normalization layers from pre-trained deep neural networks by removing them and adjusting corresponding linear operation layer weights, ensuring inference accuracy remains unchanged.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If batch normalization layers are included in deep neural networks to improve training convergence, then training performance is improved, but inference time and computational complexity increase

Engineering Contradiction:
Improvetraining convergenceVSAvoidinference speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and removes batch normalization layers from the deep neural network during the inference stage. By taking out these layers that are no longer needed for inference, the model achieves faster processing speed while maintaining the training benefits that were already incorporated into the weights during the training phase.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs weight adjustment in advance during the training phase to compensate for the future removal of batch normalization layers. By preliminarily adjusting the weights of adjacent layers to account for the absence of batch normalization, the model is prepared for efficient inference without needing batch normalization layers during deployment.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If batch normalization layers are added to deep neural networks to improve training performance, then model accuracy is improved, but model size and memory requirements increase

Engineering Contradiction:
Improveinference accuracyVSAvoidmodel size
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent removes batch normalization layers from the final deployed model, extracting only the essential computational components. This reduction in model components directly decreases model size and memory requirements while maintaining inference accuracy through preliminary weight adjustments.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs weight adjustment during training to preliminarily incorporate the effect of batch normalization into the adjacent layer weights. This preliminary action allows the model to achieve the same accuracy without retaining the batch normalization layers, thereby reducing model size.

Inventive Principle:
Principle #10Preliminary action

3Stability of the object's composition

If batch normalization layers are included in deep neural networks to stabilize training, then training stability is improved, but computational intensity and processing time increase

Engineering Contradiction:
Improvetraining stabilityVSAvoidinference latency
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent extracts batch normalization layers from the inference pipeline, removing the computational overhead associated with these layers. By taking out these layers that provide stability during training but add latency during inference, the model achieves faster processing while maintaining training stability benefits in the weights.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs weight adjustment in advance during training to preliminarily compensate for the removal of batch normalization layers. This preliminary weight adjustment embeds the stabilizing effect of batch normalization into the layer weights, allowing inference to proceed without the actual batch normalization computation.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11488019B2Lossless model compression by batch normalization layer pruning in deep neural networks
Publication Date: 2022.11.01 KNERON TAIWAN CO LTD
  • US11488019B2 patent drawing
  • US11488019B2 patent drawing

AI summary

A method of pruning a batch normalization layer from a pre-trained deep neural network model is proposed. The pre-trained deep neural network model is inputted as a candidate model. The candidate model is pruned by removing the at least one batch normalization layer from the candidate model to form a pruned candidate model only when the at least one batch normalization layer is connected to and adjacent to a corresponding linear operation layer. The corresponding linear operation layer may be at least one of a convolution layer, a dense layer, a depthwise convolution layer, and a group convolution layer. Weights of the corresponding linear operation layer are adjusted to compensate for the removal of the at least one batch normalization. The pruned candidate model is then output and utilized for inference.