Fast Differentiable Matrix Square Root and Inverse Square Root

被引:6
|
作者
Song, Yue [1 ]
Sebe, Nicu [1 ]
Wang, Wei [1 ]
机构
[1] Univ Trento, Dept Informat Engn & Comp Sci, I-38123 Trento, Italy
关键词
Covariance matrices; Matrix decomposition; Decorrelation; Transforms; Computer vision; Deep learning; Task analysis; Differentiable matrix decomposition; decorrelated batch normalization; global covariance pooling; neural style transfer; EQUATION;
D O I
10.1109/TPAMI.2022.3216339
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Computing the matrix square root and its inverse in a differentiable manner is important in a variety of computer vision tasks. Previous methods either adopt the Singular Value Decomposition (SVD) to explicitly factorize the matrix or use the Newton-Schulz iteration (NS iteration) to derive the approximate solution. However, both methods are not computationally efficient enough in either the forward pass or the backward pass. In this paper, we propose two more efficient variants to compute the differentiable matrix square root and the inverse square root. For the forward propagation, one method is to use Matrix Taylor Polynomial (MTP), and the other method is to use Matrix Pade Approximants (MPA). The backward gradient is computed by iteratively solving the continuous-time Lyapunov equation using the matrix sign function. A series of numerical tests show that both methods yield considerable speed-up compared with the SVD or the NS iteration. Moreover, we validate the effectiveness of our methods in several real-world applications, including de-correlated batch normalization, second-order vision transformer, global covariance pooling for large-scale and fine-grained recognition, attentive covariance pooling for video recognition, and neural style transfer. The experiments demonstrate that our methods can also achieve competitive and even slightly better performances. Code is available at https://github.com/KingJamesSong/FastDifferentiableMatSqrt.
引用
收藏
页码:7367 / 7380
页数:14
相关论文
共 50 条
  • [41] Stable iterations for the matrix square root
    Nicholas J. Higham
    Numerical Algorithms, 1997, 15 : 227 - 242
  • [42] A note on computing the matrix square root
    B. Iannazzo
    CALCOLO, 2003, 40 : 273 - 283
  • [43] Stable iterations for the matrix square root
    Higham, NJ
    NUMERICAL ALGORITHMS, 1997, 15 (02) : 227 - 242
  • [44] FAST AND STABLE ALGORITHMS FOR COMPUTING THE PRINCIPAL SQUARE ROOT OF A COMPLEX MATRIX
    SHIEH, LS
    LIAN, SR
    MCINNIS, BC
    IEEE TRANSACTIONS ON AUTOMATIC CONTROL, 1987, 32 (09) : 820 - 822
  • [45] THE GALOIS STRUCTURE OF THE SQUARE ROOT OF THE INVERSE DIFFERENT
    EREZ, B
    MATHEMATISCHE ZEITSCHRIFT, 1991, 208 (02) : 239 - 255
  • [46] Fast calculation of inverse square root with the use of magic constant - analytical approach
    Moroz, Leonid V.
    Walczyk, Cezary J.
    Hrynchyshyn, Andriy
    Holimath, Vijay
    Cieslinski, Jan L.
    APPLIED MATHEMATICS AND COMPUTATION, 2018, 316 : 245 - 255
  • [47] The square root
    Ginzburg A.S.
    Russian Journal of Mathematical Physics, 2011, 18 (1) : 3 - 9
  • [48] Algorithms for Calculating the Square Root and Inverse Square Root Based on the Second-Order Householder's Method
    Moroz, Leonid
    Samotyy, Volodymyr
    Horyachyy, Oleh
    Dzelendzyak, Ulyana
    PROCEEDINGS OF THE 2019 10TH IEEE INTERNATIONAL CONFERENCE ON INTELLIGENT DATA ACQUISITION AND ADVANCED COMPUTING SYSTEMS - TECHNOLOGY AND APPLICATIONS (IDAACS), VOL. 1, 2019, : 436 - 442
  • [49] Realization of Area Efficient QR Factorization Using Unified Division, Square Root, and Inverse Square Root Hardware
    Aslan, Semih
    Oruklu, Erdal
    Saniie, Jafar
    2009 IEEE INTERNATIONAL CONFERENCE ON ELECTRO/INFORMATION TECHNOLOGY, 2009, : 243 - 248
  • [50] High-speed double-precision computation of reciprocal, division, square root, and inverse square root
    Piñeiro, JA
    Bruguera, JD
    IEEE TRANSACTIONS ON COMPUTERS, 2002, 51 (12) : 1377 - 1388