Quantized Softmax Layer Using Distance-Based Lookup Table

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep learning neural networks require significant memory and processing resources for softmax operations, especially when using floating-point data types, which can exceed the capabilities of end devices like phones and cameras, and previous attempts to simplify lookup tables have resulted in increased computational costs and memory usage.

Innovation Solution

Implementing a quantized softmax layer with a single compact lookup table that uses a distance-based index instead of separate tables for each input size, reducing memory and processing resources by removing redundant entries and using fixed-point data types, which degrades accuracy by less than 1% while significantly reducing resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If floating-point data types are used for softmax operations, then accuracy is maintained, but memory and processing resources are excessively consumed

Engineering Contradiction:
Improvesoftmax calculation accuracyVSAvoidmemory resource usage
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent changes the data type parameter from floating-point to fixed-point representation, and transforms the softmax calculation into a lookup table-based approach. This parameter change reduces memory usage from multiple gigabytes to less than 100 kilobytes while maintaining acceptable accuracy through quantization and distance-based indexing.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If separate lookup tables are created for each input size, then accuracy is improved, but device complexity and memory usage increase

Engineering Contradiction:
Improvesoftmax output accuracyVSAvoidlookup table structure
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges multiple input-specific lookup tables into a single unified lookup table by using distance-based indexing. Instead of having separate tables for different input sizes, the system calculates distances from maximum values and uses these distances as indices into one compact table, reducing complexity while preserving accuracy.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a new dimension for indexing by using distance from maximum value instead of direct input value indexing. This dimensional transformation allows a single lookup table to serve multiple input sizes by indexing based on the relative distance from the maximum element, rather than requiring separate tables for each input configuration.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Quantity of substance

If lookup tables are simplified to reduce memory usage, then resource consumption decreases, but computational costs increase

Engineering Contradiction:
Improvememory resource usageVSAvoidprocessing computational cost
Core Design Contradiction:
Quantity of substanceVSPower

Solution Approach 1:

The patent performs preliminary actions by pre-calculating and storing softmax values in a compact lookup table during an offline phase. The distance-based indexing structure is pre-constructed, allowing runtime operations to simply compute distances and perform table lookups, thereby reducing online computational costs while maintaining low memory usage.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11861452B1Quantized softmax layer for neural networks
Publication Date: 2024.01.02 CADENCE DESIGN SYST INC
  • US11861452B1 patent drawing
  • US11861452B1 patent drawing
  • US11861452B1 patent drawing

AI summary

Quantized softmax layers in neural networks are described. Some embodiments involve receiving, at an input to a softmax layer of a neural network from an intermediate layer of the neural network, a non-normalized output comprising a plurality of intermediate network decision values. Then for each intermediate network decision value of the plurality of intermediate network decision values, the embodiment involves: calculating a difference between the intermediate network decision value and a maximum network decision value; requesting, from a lookup table, a corresponding lookup table value using the difference between the intermediate network decision value and the maximum network decision value; and selecting the corresponding lookup table value as a corresponding decision value. A normalized output is then generated comprising the corresponding lookup table value for said each intermediate network decision value of the plurality of intermediate network decision values.