Neural Network Quantization with Density-Based Dual Clipping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Neural network models, particularly those used for visual-related tasks, require significant memory and computing resources, making deployment on mobile devices challenging, and conventional model quantization methods compromise precision.
Innovation Solution
A model quantization method using density-based dual clipping to determine upper and lower clipping thresholds for feature maps, adapting to asymmetric distributions and removing outliers, combined with pixel-aware calibration and fine-tuning, to improve precision without requiring extensive training datasets.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If model quantization is used to compress model size, then memory occupation and computing resources are reduced, but precision of the compressed model is reduced
Solution Approach 1:
The patent changes the quantization parameters by introducing density-based clipping thresholds that adapt to the actual distribution of feature map values. Instead of using fixed or simple min-max quantization, the method dynamically adjusts quantization boundaries based on the density distribution, allowing more precise representation of critical value ranges while maintaining compression.
Solution Approach 2:
The patent applies partial precision preservation by identifying and protecting critical regions in the feature map distribution. Through density-based clipping, it focuses computational precision on the most important value ranges (where density is high) while allowing coarser quantization in less critical regions, achieving a balance between precision and compression.
2Ease of operation
If conventional quantization methods are used, then model deployment on mobile devices becomes feasible, but precision is compromised
Solution Approach 1:
The patent modifies the quantization parameters by introducing density-based clipping thresholds that adapt to the actual distribution of feature map values. Instead of using fixed or simple min-max quantization, the method dynamically adjusts quantization boundaries based on the density distribution, allowing more precise representation of critical value ranges while maintaining compression.
Solution Approach 2:
The patent performs preliminary analysis of the feature map value distribution before quantization to identify critical regions. By pre-calculating density-based clipping thresholds from the actual data distribution, it prepares an optimized quantization scheme that preserves precision for important values while enabling mobile deployment.
3Adaptability or versatility
If density-based dual clipping is applied to remove outliers, then asymmetric distribution is adapted to, but quantization parameter complexity increases
Solution Approach 1:
The patent changes the quantization parameters by introducing density-based clipping thresholds that adapt to the actual distribution of feature map values. Instead of using fixed or simple min-max quantization, the method dynamically adjusts quantization boundaries based on the density distribution, allowing more precise representation of critical value ranges while maintaining compression.
Solution Approach 2:
The quantization method performs self-adaptation by automatically analyzing the feature map value distribution and determining appropriate clipping thresholds without requiring external intervention or complex manual tuning. The density-based clipping automatically identifies and adapts to asymmetric distributions, making the system self-configuring.
Data Source
AI summary
This application discloses a model quantization method, and relates to the artificial intelligence field. The method includes: obtaining a first feature map output by a first intermediate layer of a neural network; and determining, based on numeric distribution of a plurality of first feature points in the first feature map, a first clipping interval that meets a preset condition, where the first clipping interval includes a first upper boundary threshold and a first lower boundary threshold; and the preset condition includes: numeric distribution density of feature points in the first clipping interval is greater than numeric distribution density of feature points outside the first clipping interval. In this application, an upper clipping threshold and a lower clipping threshold are used to represent quantized parameter settings, instead of a common zero-point location and range in the previous solution.


