Neural Network Average Pooling Scaling and Accumulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing average pooling algorithms in neural networks do not efficiently utilize hardware resources, as they often require two multiplier-accumulator (MAC) units for scaling and accumulating values, which is sub-optimal and can lead to error growth due to premature scaling of values before accumulation.

Innovation Solution

Reversing the order of operations in average pooling by scaling values before accumulation using a single MAC, where each value is multiplied by the reciprocal of the total number of values in the face, and using high-precision scaling factors stored in memory to minimize error, allowing for parallel processing across multiple faces.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If two MAC units are used for scaling and accumulating values separately, then hardware resource utilization is improved, but device complexity increases and error growth occurs due to premature scaling

Engineering Contradiction:
Improvehardware resource utilizationVSAvoidnumber of MAC units
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent combines the scaling and accumulating operations into a single MAC unit by reversing the traditional order of operations. Instead of scaling first then accumulating (which requires two MAC units), the patent accumulates values first and then scales the final sum, achieving the same mathematical result with only one MAC unit. This merging eliminates redundant hardware resources while maintaining computational accuracy.

Inventive Principle:
Principle #5Merging (Combining)

2Device complexity

If values are scaled before accumulation, then hardware implementation is simplified, but measurement precision deteriorates due to error growth

Engineering Contradiction:
Improvehardware implementation complexityVSAvoidaccuracy of average pooling
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent inverts the traditional order of operations in average pooling. Instead of scaling each value before accumulation (value * scale_factor + sum), it performs accumulation first and then scaling (sum * scale_factor). This inversion prevents premature scaling errors from propagating through multiple accumulation operations, thereby maintaining measurement precision while still using a single MAC unit for implementation.

Inventive Principle:
Principle #13The other way round (Inversion)

3Device complexity

If a single MAC is used for average pooling, then device complexity is reduced, but processing speed decreases due to sequential operations

Engineering Contradiction:
Improvenumber of MAC unitsVSAvoidprocessing speed of average pooling
Core Design Contradiction:
Device complexityVSSpeed

Solution Approach 1:

The patent enables continuous processing by having the single MAC unit perform accumulation operations continuously without waiting for scaling to complete. The accumulator continuously sums incoming values while the scaler operates on the final result, creating a pipelined continuous operation flow. This maintains high processing speed despite using only one MAC unit, as the useful action (accumulation) continues uninterrupted.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10963746B1Average pooling in a neural network
Publication Date: 2021.03.30 XILINX INC
  • US10963746B1 patent drawing
  • US10963746B1 patent drawing
  • US10963746B1 patent drawing

AI summary

Embodiments herein describe, when executing an average pooling operation in a neural network, scaling input operands before performing an accumulate operation. Performing average pooling in a neural network averages the values in each face of a 3D volume, thereby downsampling or subsampling the data. This can be performed by adding all the values in a face and then dividing the total accumulated value by the total values in the face. However, the order of operations in a multiply-accumulator (MAC) is reversed from the order of operations for performing average pooling. To more efficiently use the MAC, the order of operations when performing average pooling is reversed so that determining the average value for a face can be performed on a single MAC. To do so, the values in the face are first scaled by a multiplier before being summed by an accumulator.