论文标题
改进的随机舍入
Improved stochastic rounding
论文作者
论文摘要
由于浮点或定点算术中的位数量有限,因此在许多计算中,舍入是必要的步骤。尽管可以针对不同的应用定制舍入方法,但圆形错误通常不可避免。当实现一系列计算时,可以放大或累积圆形误差。圆形错误的放大可能会导致严重失败。将随机舍入(SR)作为一种公正的圆形方法引入,例如,在神经网络(NNS)的训练中广泛使用,即使在低精确计算中也显示出有希望的训练结果。尽管SR在训练NNS中的使用始终增加,但SR的误差分析仍有待改进。此外,SR的公正舍入结果总是伴随着较大的差异。在这项研究中,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.