Neural Network Inference via Codebook Lookup Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks (DNNs) are computation-hungry workloads that stress limited hardware resources, particularly on mobile devices, and existing methods for efficient neural network inference require redesigning model structures or accelerators, which is resource-intensive and inefficient.

Innovation Solution

The solution involves determining centroids in codebooks for each layer of a neural network during training, using product quantization to precompute and store computation results in a lookup table, allowing for efficient table lookup-based inference by aggregating target computation results, thereby reducing computational load while maintaining model accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional neural network computation is used, then model accuracy is maintained, but computational resources and energy consumption increase significantly

Engineering Contradiction:
Improvemodel accuracyVSAvoidcomputational resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent precomputes the product of codebook centroids and weight matrices during the training phase, storing results in lookup tables. This preliminary computation eliminates the need for expensive matrix multiplications during inference, reducing computational resource consumption while maintaining model accuracy through efficient table lookup operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates compressed representations (codebooks) that copy essential feature information from the original data in a simplified format. By storing and manipulating these compact codebook representations instead of full-dimensional inputs, the system reduces computational load while preserving the information necessary for accurate predictions.

Inventive Principle:
Principle #26Copying

2Use of energy by moving object

If model structure redesign is performed to reduce computation, then resource usage decreases, but development complexity and time increase

Engineering Contradiction:
Improveresource usageVSAvoiddevelopment complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The patent changes the computational parameters by transforming the standard neural network operation into a lookup-based operation. Instead of modifying the overall model architecture or creating custom hardware accelerators, the approach changes the computational method from matrix multiplication to table lookup, reducing resource usage without increasing development complexity.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If existing efficient inference methods are applied, then computation speed improves, but model accuracy deteriorates

Engineering Contradiction:
Improvecomputation speedVSAvoidmodel accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

By precomputing and storing the results of centroid-weight matrix products in lookup tables during training, the system enables fast inference through simple table lookups and aggregations. This preliminary action ensures that both speed (through efficient lookup) and accuracy (through learned centroid representations) are optimized simultaneously.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent incorporates a learning phase where the centroids and lookup tables are trained to minimize prediction error. This feedback mechanism ensures that the compressed representations in the lookup tables are optimized for accuracy while maintaining the computational efficiency of the lookup-based inference approach.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250005365A1Neural network inference based on table lookup
Publication Date: 2025.01.02 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250005365A1 patent drawing
  • US20250005365A1 patent drawing
  • US20250005365A1 patent drawing

AI summary

According to implementations of the subject matter described herein, a solution for neural network inference based on table lookup is provided. According to this solution, respective centroids in a first plurality of codebooks for a first layer of a neural network are determined along with a first weight matrix through a training procedure of the neural network. A first input for the first layer is divided into a first plurality of input sub-vectors, and target centroids are determined for the input sub-vectors based on respective distances between the input sub-vectors and the centroids. Target computation results of the target centroids with the first weight matrix are selected from a lookup table. A first output for the first layer is determined based on aggregation of the target computation results. In this way, better model accuracy can be achieved while leveraging the computation acceleration in table lookup-based model inference.