Floating-Point Mantissa Rounding for Unbiased Precision Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvememory spaceVSAvoidrounding error
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

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.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If deterministic rounding is used for precision conversion, then conversion simplicity is maintained, but statistical bias accumulates in neural network operations

Engineering Contradiction:
Improveconversion simplicityVSAvoidcomputational accuracy
Core Design Contradiction:
Ease of operationVSReliability

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.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If single-precision format is used for neural network calculations, then computational accuracy is improved, but memory bandwidth and storage requirements increase

Engineering Contradiction:
Improvecomputational accuracyVSAvoidmemory bandwidth efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

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.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11169778B2Converting floating point numbers to reduce the precision
Publication Date: 2021.11.09 GRAPHCORE LTD
  • US11169778B2 patent drawing
  • US11169778B2 patent drawing
  • US11169778B2 patent drawing

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.