Floating-Point Mantissa Rounding for Unbiased Precision Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for converting floating-point numbers between different precision levels do not adequately account for statistical errors introduced by rounding, leading to significant biases when performing operations in lower precision formats.
Innovation Solution
A hardware module and method that implement stochastic rounding by applying a random number to the mantissa of a floating-point number to generate a carry, which is then added to the least significant bit of the truncated mantissa, effectively reducing bias and maintaining an unbiased distribution during conversion from higher to lower precision.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If floating-point numbers are converted from single-precision to half-precision format to reduce memory space, then storage efficiency is improved, but rounding errors and statistical bias increase
Solution Approach 1:
The patent applies preliminary action by performing stochastic rounding during the conversion process from single-precision to half-precision format. A random number is generated and added to the mantissa before truncation, which preliminarily distributes the rounding error statistically rather than deterministically. This preliminary randomization prevents systematic bias accumulation in subsequent neural network operations while achieving the desired memory compression.
2Ease of operation
If deterministic rounding is used for precision conversion, then conversion simplicity is maintained, but statistical bias accumulates in neural network operations
Solution Approach 1:
The patent applies parameter changes by modifying the rounding behavior from deterministic to stochastic. A random parameter (random number) is introduced into the rounding process, changing the nature of the operation from fixed to probabilistic. This parameter change ensures that rounding errors follow a statistical distribution with zero mean, preventing systematic bias while maintaining computational efficiency through hardware-friendly random number generation.
3Measurement precision
If single-precision format is used for neural network calculations, then computational accuracy is improved, but memory bandwidth and storage requirements increase
Solution Approach 1:
The patent applies local quality by using different precision formats for different parts of the neural network system. Critical operations that require high accuracy maintain single-precision format, while storage and less critical computations use half-precision format. The stochastic rounding conversion enables this heterogeneous precision approach, allowing the system to optimize memory bandwidth efficiency in data storage and transfer while preserving computational accuracy where needed.
Data Source
AI summary
A hardware module comprising at least one of: one or more field programmable gate arrays and one or more application specific integrated circuits configured to: receive a number in floating-point representation at a first precision level, the number comprising an exponent and a first mantissa; apply a first random number to the first mantissa to generate a first carry; truncate the first mantissa to a level specified by a second precision level; add the first carry to the least significant bit of the mantissa truncated to the level specified by the second precision level to form a mantissa for the number in floating-point representation at the second precision level.


