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.
翻译:由于浮动点或固定点计算中的位数有限,四舍五入是许多计算中的必要步骤。尽管四舍五入方法可以针对不同的应用量量度,但圆差通常是不可避免的。在实施一系列计算时,圆差可能会放大或累积。圆差的放大可能会造成严重的失败。圆差的放大可能是一种不带偏见的四舍五入(SR)方法,在神经网络的培训中广泛采用这种不偏颇的四舍五入(SR)方法,显示有希望的培训结果,甚至低精确度计算。尽管在培训NNP方面使用SR的情况持续增加,但是对SR的错误分析仍然有待改进。此外,SR的不偏差四舍四入结果总是伴随着很大的差异。在本研究中,对SR的一些一般特性作了说明和证明。此外,引入并验证了四舍五入差异的上限。两种新的概率分布建议,通过解决一个多重目标优化问题,研究差异和偏差之间的平衡,SR的四舍五入式计算、具体深度计算结果和新一轮计算结果。