Neural Network Weight Matrix Scaling for ADC Range Precision
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing Computer-In-Memory (CIM) chip architecture faces issues with neural network weight matrix distribution, leading to output values exceeding the analog-to-digital converter (ADC) limits, resulting in reduced operation precision due to poor quantization precision for extreme input values.
Innovation Solution
A method that adjusts the neural network weight matrix by multiplying or dividing weight values based on preset thresholds, truncating excess bits, and storing or processing the adjusted weights within the CIM chip to maintain ADC effective ranges, thereby improving operation precision.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If weight values are directly written into memory cell array without adjustment, then the neural network computation can be performed using CIM architecture, but the output current may exceed ADC input range leading to poor quantization precision
Solution Approach 1:
The patent applies preliminary action by adjusting the weight matrix distribution before writing into the memory cell array. The system calculates a distribution adjustment value based on the maximum absolute weight value and applies it to scale all weight values, ensuring the output current falls within the ADC's effective input range. This pre-processing step prevents quantization precision loss without requiring complex real-time adjustments during computation.
2Measurement precision
If weight distribution is adjusted by multiplying or dividing by constants, then the output current falls within ADC effective range, but additional processing steps are required
Solution Approach 1:
The patent applies parameter changes by dynamically adjusting the weight matrix distribution parameter (scaling factor) based on the maximum absolute weight value in the matrix. The system calculates the distribution adjustment value as the reciprocal of the maximum absolute weight value and applies it to scale all weight values. This parameter transformation ensures the output current falls within the ADC's effective input range while maintaining a unified and efficient processing approach.
3Measurement precision
If weight values are scaled to fit ADC range, then quantization precision is improved, but the weight matrix requires additional processing steps
Solution Approach 1:
The patent applies parameter changes by transforming the weight matrix distribution to match the ADC's effective input range. The system calculates a distribution adjustment value based on the maximum absolute weight value and applies it to scale all weight values before writing into the memory cell array. This ensures the output current falls within the ADC's linear conversion range, improving conversion precision while maintaining implementation simplicity through a unified scaling approach.
Applied Scientific Principles
This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.
Function Achieved in This Case
The method ensures that the signal processed by the CIM chip remains within the effective range of the ADC, enhancing operation precision by adjusting the weight matrix distribution, ensuring accurate digital signal conversion.
Implementation Method 1
based on the Ohm's Law and the Kirchhoffs Law, the signal to be processed and corresponding weight are directly subjected to vector-matrix multiply and add operations in the memory cell array
Implementation Method 2
based on the Ohm's Law and the Kirchhoffs Law, the signal to be processed and corresponding weight are directly subjected to vector-matrix multiply and add operations in the memory cell array
Implementation Method 3
an output current/current signal of the memory cell array is quantized by an Analog-to-Digital Converter (ADC) as an output result
Data Source
AI summary
The present disclosure provides a neural network weight matrix adjusting method, a writing control method and a related apparatus, The method comprises: judging whether a weight distribution of a neural network weight matrix is lower than a first preset threshold; if yes, multiplying all weight values in the neural network weight matrix by a first constant; if no, judging whether the weight distribution of the neural network weight matrix is higher than a second preset threshold, wherein the second preset threshold is greater than the first preset threshold; and dividing all weight values in the neural network weight matrix by a second constant, if the weight distribution of the neural network weight matrix is higher than the second preset threshold; wherein the first constant and the second constant are both greater than 1, thereby improving the operation precision.


