Improved stochastic rounding

05/31/2020
by   Lu Xia, et al.
0

Due to the limited number of bits in floating-point or fixed-point arithmetic, rounding is a necessary step in many computations. Although rounding methods can be tailored for different applications, round-off errors are generally unavoidable. When a sequence of computations is implemented, round-off errors may be magnified or accumulated. The magnification of round-off errors may cause serious failures. Stochastic rounding (SR) was introduced as an unbiased rounding method, which is widely employed in, for instance, the training of neural networks (NNs), showing a promising training result even in low-precision computations. Although the employment of SR in training NNs is consistently increasing, the error analysis of SR is still to be improved. Additionally, the unbiased rounding results of SR are always accompanied by large variances. In this study, some general properties of SR are stated and proven. Furthermore, an upper bound of rounding variance is introduced and validated. Two new probability distributions of SR are proposed to study the trade-off between variance and bias, by solving a multiple objective optimization problem. In the simulation study, the rounding variance, bias, and relative errors of SR are studied for different operations, such as summation, square root calculation through Newton iteration and inner product computation, with specific rounding precision.

READ FULL TEXT
research
07/21/2022

Stochastic rounding variance and probabilistic bounds: A new approach *

Stochastic rounding (SR) offers an alternative to the deterministic IEEE...
research
10/30/2020

Effects of round-to-nearest and stochastic rounding in the numerical solution of the heat equation in low precision

Motivated by the advent of machine learning, the last few years saw the ...
research
03/24/2021

A Simple and Efficient Stochastic Rounding Method for Training Neural Networks in Low Precision

Conventional stochastic rounding (CSR) is widely employed in the trainin...
research
04/11/2023

Bounds on non-linear errors for variance computation with stochastic rounding *

The main objective of this work is to investigate non-linear errors and ...
research
01/06/2020

Stochastic Rounding: Algorithms and Hardware Accelerator

Algorithms and a hardware accelerator for performing stochastic rounding...
research
01/23/2023

On the Convergence of the Gradient Descent Method with Stochastic Fixed-point Rounding Errors under the Polyak-Lojasiewicz Inequality

When training neural networks with low-precision computation, rounding e...
research
04/09/2020

Efficient Reasoning About Stencil Programs Using Selective Direct Evaluation

We present FPDetect, a low overhead approach for detecting logical error...

Please sign up or login with your details

Forgot password? Click here to reset