Nonlinear Data Transformation for Quantization Error Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing quantization techniques struggle with transforming floating-point values into integer values efficiently, especially when dealing with unevenly distributed data, which leads to increased quantization errors and reduced quality of quantized models.
Innovation Solution
A novel data transformation method that performs a nonlinear transformation on input image pixels, followed by a quantization process using a quantized model, and then applies a reverse transformation to the output, effectively making the input data distribution closer to uniform, thus reducing quantization errors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If quantization technique is applied to transform floating point values into integer values, then inference speed and hardware efficiency are improved, but quantization errors increase when data is unevenly distributed
Solution Approach 1:
The patent applies a preliminary nonlinear transformation to the input data before quantization to reshape the data distribution. This preprocessing step redistributes the data values to better match the quantization intervals, reducing quantization errors while maintaining the speed benefits of integer arithmetic in the main model execution
Solution Approach 2:
The patent transforms the parameters of the data distribution through a learnable nonlinear function. By changing the distribution parameters (shape, scale, location) of the input data, the quantization process can more effectively map floating-point values to integer values, improving accuracy without sacrificing inference speed
2Adaptability or versatility
If data distribution is uneven, then model training may be more challenging, but quantization quality deteriorates significantly
Solution Approach 1:
The nonlinear transformation is applied as a preliminary step before quantization to normalize the data distribution. This preprocessing adapts the unevenly distributed data to a more uniform distribution, enabling higher quality quantization while preserving the model's ability to handle diverse data types
Solution Approach 2:
The patent introduces a nonlinear transformation function as an intermediary between the raw input data and the quantization process. This intermediary component bridges the gap between unevenly distributed data and the requirements of integer quantization, improving quantization quality without constraining model training flexibility
3Ease of manufacture
If traditional quantization methods are used, then implementation is simpler, but quantization errors are higher for unevenly distributed data
Solution Approach 1:
The patent adds a preliminary nonlinear transformation step before the standard quantization pipeline. This additional step improves quantization accuracy for unevenly distributed data while maintaining relatively simple implementation through reusable transformation modules that can be integrated into existing quantization frameworks
Data Source
AI summary
Embodiments of this application provide a method method for transforming data and a related device. The method includes: obtaining an input image, wherein the input image includes N pixels, Nis a positive integer; performing a nonlinear transformation on values of the N pixels to obtain N first pixel values; obtaining, according to a quantized model and the N first pixel values, M second pixel values, wherein M is a positive integer; performing a reverse transformation corresponding to the nonlinear transformation on the M second pixel values to obtain M third pixel values; determining, according to the M third pixels values, an output image.


