卷积在深度神经网络中的误差分析及精度提升
Error Analysis and Improving the Accuracy of Winograd Convolution for Deep Neural Networks
AI总结:
本文分析了Winograd卷积算法的误差,并提出改进方法以提高其精度,通过Huffman编码优化求和误差,实验选择采样点并探索混合精度卷积等方法以减少浮点误差。
摘要:
流行的深度神经网络(DNNs)大部分执行时间用于计算卷积。Winograd算法族可以显著减少所需的算术运算次数,并存在于许多DNN软件框架中。然而,性能提升是以浮点(FP)数值精度的降低为代价。在本文中,我们分析了最坏情况下的FP误差并证明了算法的范数和条件数的估计。我们证明误差界随卷积大小的增加呈指数增长,但改进后的算法的误差界比原始算法更小。我们提出几种减少FP误差的方法。我们提出基于Huffman编码的通用评估顺序以减少求和误差。我们通过实验研究采样
英文摘要:
Popular deep neural networks (DNNs) spend the majority of their execution time computing convolutions. The Winograd family of algorithms can greatly reduce the number of arithmetic operations required and is present in many DNN software frameworks. However, the performance gain is at the expense of a reduction in floating point (FP) numerical accuracy. In this paper, we analyse the worst case FP error and prove the estimation of norm and conditioning of the algorithm. We show that the bound grows exponentially with the size of the convolution, but the error bound of the \textit{modified} algorithm is smaller than the original one. We propose several methods for reducing FP error. We propose a canonical evaluation ordering based on Huffman coding that reduces summation error. We study the selection of sampling "points" experimentally and find empirically good points for the most important sizes. We identify the main factors associated with good points. In addition, we explore other methods to reduce FP error, including mixed-precision convolution, and pairwise summation across DNN channels. Using our methods we can significantly reduce FP error for a given block size, which allows larger block sizes and reduced computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。