Predictive Model for Neural Network Quantization Parameters
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing neural network quantization methods face challenges in balancing computational efficiency and accuracy, particularly in devices with limited resources, where dynamic quantization is computationally expensive but static quantization may produce inaccuracies due to changes in data distributions.
Innovation Solution
A method and system for generating a predictive model to estimate quantization parameters for neural network layers, using feature vectors and target vectors from training datasets to evaluate and modify a predictive model, which adjusts quantization parameters based on input samples, thereby improving stability and accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If dynamic quantization is used to improve output accuracy, then quantization precision is improved, but computational overhead increases
Solution Approach 1:
The patent pre-computes quantization parameters during the training phase using feature vectors extracted from training data. These parameters are stored and reused during inference, eliminating the need for real-time computation of quantization parameters during deployment. This preliminary action transfers computational burden from the inference stage to the training stage, resolving the contradiction between accuracy and computational overhead.
Solution Approach 2:
The patent creates a predictive model that copies the quantization parameter computation logic from dynamic quantization but implements it as a static lookup table during inference. The model learns the mapping between input features and optimal quantization parameters during training, then uses this learned mapping during inference without real-time computation, effectively copying the accuracy benefits while eliminating the computational cost.
2Use of energy by moving object
If static quantization is used to reduce computational overhead, then energy consumption is reduced, but output accuracy deteriorates due to data distribution changes
Solution Approach 1:
The patent introduces dynamic adaptability into static quantization by training a predictive model that adjusts quantization parameters based on input feature vectors. Although the model is trained offline, it captures the relationship between input data characteristics and optimal quantization parameters, enabling the static model to adapt to different data distributions without real-time computation. This resolves the contradiction by making static quantization dynamically adaptive.
Solution Approach 2:
The patent changes the quantization parameters based on learned patterns from training data. Instead of using fixed static parameters, the system learns optimal parameters for different input conditions during training and stores these in the predictive model. During inference, the appropriate parameters are selected based on the input features, maintaining accuracy while preserving computational efficiency of static quantization.
3Manufacturing precision
If quantization parameters are dynamically selected for each layer to improve accuracy, then manufacturing precision is improved, but device complexity increases
Solution Approach 1:
The patent segments the quantization parameter selection process into two distinct phases: training phase where the predictive model is trained using feature vectors from each layer, and inference phase where the trained model is used for parameter prediction. This segmentation allows complex learning to occur during training while keeping the inference phase simple and efficient, resolving the contradiction between accuracy and system complexity.
Solution Approach 2:
The patent introduces a predictive model as an intermediary between input data and quantization parameters. This intermediary learns the complex mapping during training and encapsulates the complexity within itself, allowing simple parameter selection during inference. The model acts as a mediator that handles the complexity of adaptive parameter selection while presenting a simple interface during deployment.
Data Source
AI summary
A method for generating a predictive model for quantization parameters of a neural network is described. The method comprises accessing a first vector of data values corresponding to input values to a first layer implemented in a neural network, generating a feature vector of one or more features extracted from the data values of the first vector, accessing a second vector of data values corresponding to the input values of a second layer implemented in the neural network, subsequent to the first layer, generating a target vector of data values comprising one or more quantization parameters for the second layer, from the data values of the second vector, evaluating, on the basis of the feature vector and the target vector, a predictive model for predicting the one or more quantization parameters of the second layer and modifying the predictive model on the basis of the evaluation.


