arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2006.00489math.NAcs.LGcs.NA
收藏

改进的随机舍入

Improved stochastic rounding

Eindhoven University of Technology(埃因霍温理工大学)

Lu Xia, Martijn Anthonissen, Michiel Hochstenbach, Barry Koren

摘要:

由于浮点或定点运算中的位数有限,舍入是许多计算中的必要步骤。虽然舍入方法可以针对不同的应用进行调整,但舍入误差通常是不可避免的。当执行一系列计算时,可能会放大或累积舍入误差。舍入误差的放大可能导致严重的故障。随机舍入(SR)是一种无偏舍入方法,广泛应用于神经网络(NN)训练等领域,即使在低精度计算中也有良好的训练效果。尽管在训练神经网络中使用随机共振的情况不断增加,但随机共振的误差分析仍有待改进。此外,SR的无偏舍入结果总是伴随着大的方差。在这项研究中,SR的一些一般性质的陈述和证明。此外,引入并验证了舍入方差的上界。通过求解多目标最优化问题,提出了两种新的随机共振的概率分布,研究了方差和偏差之间的权衡。在仿真研究中,研究了在特定舍入精度下,求和、牛顿迭代平方根计算和内积计算等不同操作下SR的舍入方差、偏差和相对误差。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑