Neural Network Pruning with Zero Padding for Tensor Dimension Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing neural network (NN) pruning methods face challenges in maintaining inference accuracy while reducing model size and calculation times, especially when applied to convolutional layers without Batch Normalization (BN) layers or fully connected layers, and can mismatch tensor dimensions in concatenating operations, leading to incorrect results or reduced pruning rates.

Innovation Solution

A method that calculates a reduction ratio for each layer in a neural network, inserts a zero padding layer between preceding layers and the concatenating process to ensure tensor dimensions match after pruning, and uses L1 regularization to identify channels for pruning, ensuring accurate inference and efficient model downsizing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If pruning is applied to reduce model size and calculation duration, then the data size and calculation times are reduced, but inference accuracy degrades

Engineering Contradiction:
Improvecalculation durationVSAvoidinference accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies L1 regularization to modify the optimization parameters of the neural network, encouraging sparse weight matrices. This parameter change allows the model to achieve compression while maintaining inference accuracy by systematically identifying and pruning near-zero weights that contribute minimally to the output.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent performs preliminary identification of channels and layers for pruning using L1 regularization before actual pruning execution. This preliminary action involves calculating reduction ratios for each channel based on regularization weights, allowing the system to plan the pruning strategy in advance and maintain accuracy by preserving critical channels.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If excessive pruning is performed to reduce model size, then the data size is reduced, but inference accuracy significantly degrades

Engineering Contradiction:
Improvemodel data sizeVSAvoidinference accuracy
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent implements a feedback mechanism where L1 regularization weights are continuously monitored and used to determine pruning thresholds. The system calculates reduction ratios based on regularization weights and adjusts the pruning strategy accordingly, providing feedback control to prevent excessive pruning that would degrade inference accuracy below acceptable levels.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent applies different pruning strategies to different parts of the neural network based on their specific characteristics. Convolutional layers with Batch Normalization use one approach, while other layers use alternative methods. This local quality approach ensures that each layer is pruned appropriately without uniformly degrading the overall model accuracy.

Inventive Principle:
Principle #3Local quality

3Quantity of substance

If pruning is applied to convolutional layers without Batch Normalization or fully connected layers, then model size is reduced, but tensor dimension mismatches occur in concatenating operations

Engineering Contradiction:
Improvemodel data sizeVSAvoidtensor dimension consistency
Core Design Contradiction:
Quantity of substanceVSManufacturing precision

Solution Approach 1:

The patent segments the neural network into different layer types and applies specific pruning strategies to each segment. Concatenation layers are identified and handled separately, with the system calculating reduction ratios for preceding layers while accounting for the concatenation operation's dimension requirements. This segmentation prevents dimension mismatches by ensuring compatible pruning across concatenated tensors.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary calculation step that determines reduction ratios for layers preceding concatenation operations. This intermediary process ensures that the pruning of preceding layers maintains dimension compatibility with the concatenation layer, acting as a mediator between the pruning objective and the structural requirements of the network.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If layers inputting to concatenation units are excluded from pruning targets, then dimension mismatches are avoided, but the overall pruning rate of the model is lowered

Engineering Contradiction:
Improvecalculation correctnessVSAvoidpruning rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a universal pruning framework that handles multiple layer types uniformly through L1 regularization. Instead of excluding certain layers from pruning, the system applies a unified approach that calculates reduction ratios for all layers including those preceding concatenation units, maintaining both calculation correctness and high pruning rates through the regularization-based methodology.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20230281440A1Computer-readable recording medium having stored therein machine learning program, method for machine learning, and information processing apparatus
Publication Date: 2023.09.07 FUJITSU LTD
  • US20230281440A1 patent drawing
  • US20230281440A1 patent drawing
  • US20230281440A1 patent drawing

AI summary

A method including: obtaining a reduction ratio of each element of layers in a trained model of a neural network; when the neural network includes a process that outputs a tensor as a result of a given calculation on tensors and when tensors from first layers preceding the process are inputted, inserting a second layer that performs a zero padding between the first layers and the process, the first layers including a preceding layer of the process and including one or more layers preceding the preceding layer and being shortcut-connected to the process; and padding tensors inputted into second layers associated one with each first layer with one or more zero matrices such that a number of elements of each tensor inputted into the process from the first layers after reducing of elements of each first layer in accordance with the reduction ratio comes to be a first number.