Croci Matteo, Fasi Massimiliano, Higham Nicholas J, Mary Theo, Mikaitis Mantas
Oden Institute, University of Texas at Austin, Austin, TX, 78712, USA.
Department of Computer Science, Durham University, Durham, DH1 3LE, UK.
R Soc Open Sci. 2022 Mar 9;9(3):211631. doi: 10.1098/rsos.211631. eCollection 2022 Mar.
Stochastic rounding (SR) randomly maps a real number to one of the two nearest values in a finite precision number system. The probability of choosing either of these two numbers is 1 minus their relative distance to . This rounding mode was first proposed for use in computer arithmetic in the 1950s and it is currently experiencing a resurgence of interest. If used to compute the inner product of two vectors of length in floating-point arithmetic, it yields an error bound with constant with high probability, where is the unit round-off. This is not necessarily the case for round to nearest (RN), for which the worst-case error bound has constant . A particular attraction of SR is that, unlike RN, it is immune to the phenomenon of stagnation, whereby a sequence of tiny updates to a relatively large quantity is lost. We survey SR by discussing its mathematical properties and probabilistic error analysis, its implementation, and its use in applications, with a focus on machine learning and the numerical solution of differential equations.
随机舍入(SR)将实数随机映射到有限精度数制中最接近的两个值之一。选择这两个数中任何一个的概率是1减去它们与该实数的相对距离。这种舍入模式在20世纪50年代首次被提出用于计算机算术,目前正重新受到关注。如果在浮点算术中用于计算两个长度为 的向量的内积,它很可能产生一个常数为 的误差界,其中 是单位舍入误差。对于向最接近值舍入(RN)则不一定如此,其最坏情况误差界的常数为 。SR的一个特别吸引人之处在于,与RN不同,它不受停滞现象的影响,在停滞现象中,对相对较大数量的一系列微小更新会丢失。我们通过讨论其数学性质和概率误差分析、实现方法以及在应用中的使用来综述随机舍入,重点是机器学习和微分方程的数值解。