Error Analysis and Improving the Accuracy of Winograd Convolution for Deep Neural Networks

被引:14
作者
Barabasz, Barbara [1 ]
Anderson, Andrew [1 ]
Soodhalter, Kirk M. [2 ]
Gregg, David [1 ]
机构
[1] Trinity Coll Dublin, Sch Comp & Stat, Dublin 2, Ireland
[2] Trinity Coll Dublin, Sch Math, Dublin 2, Ireland
来源
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE | 2020年 / 46卷 / 04期
基金
爱尔兰科学基金会;
关键词
Floating point error; numerical analysis; Winograd algorithm; Toom-Cook algorithm; convolution; deep neural network; MULTIPLICATION; STABILITY; FAITHFUL;
D O I
10.1145/3412380
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 used in many DNN software frameworks. However, the performance gain is at the expense of a reduction in floating point (FP) numerical accuracy. In this article, we analyse the worst-case FP error and derive an estimation of the norm and conditioning of the algorithm. We show that the bound grows exponentially with the size of the convolution. Further, the error bound of the modified algorithm is slightly lower but still exponential. 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 to be used and reduced computation.
引用
收藏
页数:33
相关论文
共 30 条
  • [1] [Anonymous], 1997, Algorithms for Discrete Fourier Transforms and Convolution
  • [2] [Anonymous], 1980, ARITHMETIC COMPLEXIT, DOI 10.1137/1.9781611970364
  • [3] IMPROVING THE NUMERICAL STABILITY OF FAST MATRIX MULTIPLICATION
    Ballard, Grey
    Benson, Austin R.
    Druinsky, Alex
    Lipshitz, Benjamin
    Schwartz, Oded
    [J]. SIAM JOURNAL ON MATRIX ANALYSIS AND APPLICATIONS, 2016, 37 (04) : 1382 - 1418
  • [4] Biggs N., 2002, Discrete Mathematics
  • [5] STABILITY OF FAST ALGORITHMS FOR MATRIX MULTIPLICATION
    BINI, D
    LOTTI, G
    [J]. NUMERISCHE MATHEMATIK, 1980, 36 (01) : 63 - 72
  • [6] Blahut RE, 2010, Fast algorithms for signal processing
  • [7] Bodrato M, 2007, LECT NOTES COMPUT SC, V4547, P116
  • [8] Cook SA, 1966, THESIS
  • [9] Accurate and efficient floating point summation
    Demmel, J
    Hida, Y
    [J]. SIAM JOURNAL ON SCIENTIFIC COMPUTING, 2003, 25 (04) : 1214 - 1248
  • [10] Fast matrix multiplication is stable
    Demmel, James
    Dumitriu, Ioana
    Holtz, Olga
    Kleinberg, Robert
    [J]. NUMERISCHE MATHEMATIK, 2007, 106 (02) : 199 - 224