Fast Differentiable Matrix Square Root and Inverse Square Root

被引:3
|
作者
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 条
  • [1] Fast Differentiable Matrix Square Root and Inverse Square Root
    Song, Yue
    Sebe, Nicu
    Wang, Wei
    [J]. arXiv, 2022,
  • [2] Fast enclosure for a matrix inverse square root
    Miyajima, Shinya
    [J]. LINEAR ALGEBRA AND ITS APPLICATIONS, 2015, 467 : 116 - 135
  • [3] POLYNOMIAL PRECONDITIONING FOR THE ACTION OF THE MATRIX SQUARE ROOT AND INVERSE SQUARE ROOT
    Frommer, Andreas
    Ramirez-Hidalgo, Gustavo
    Schweitzer, Marcel
    Tsolakis, Manuel
    [J]. Electronic Transactions on Numerical Analysis, 2024, 60 : 381 - 404
  • [4] A Fast FPGA Based Architecture for Computation of Square Root and Inverse Square Root
    Hasnat, Abul
    Bhattacharyya, Tanima
    Dey, Atanu
    Halder, Santanu
    Bhattacharjee, Debotosh
    [J]. PROCEEDINGS OF 2ND INTERNATIONAL CONFERENCE ON 2017 DEVICES FOR INTEGRATED CIRCUIT (DEVIC), 2017, : 383 - 387
  • [5] ON THE COMPUTATION OF A MATRIX INVERSE SQUARE ROOT
    SHERIF, N
    [J]. COMPUTING, 1991, 46 (04) : 295 - 305
  • [6] Square Root and Inverse Square Root Computation Using a Fast FPGA Based Architecture
    Hasnat, Abul
    Dey, Atanu
    Halder, Santanu
    Bhattacharjee, Debotosh
    [J]. JOURNAL OF ACTIVE AND PASSIVE ELECTRONIC DEVICES, 2018, 13 (2-3): : 135 - 147
  • [7] A Modification of the Fast Inverse Square Root Algorithm
    Walczyk, Cezary J.
    Moroz, Leonid, V
    Cieslinski, Jan L.
    [J]. COMPUTATION, 2019, 7 (03)
  • [8] Fast Inverse Square Root Based Matrix Inverse For MIMO-LTE Systems
    Mahapatra, Chinmaya
    Mahboob, Saad
    Leung, Victor C. M.
    Stouraitis, Thanos
    [J]. 2012 INTERNATIONAL CONFERENCE ON CONTROL ENGINEERING AND COMMUNICATION TECHNOLOGY (ICCECT 2012), 2012, : 321 - 324
  • [9] Efficient Quantum Circuits for Square -Root and Inverse Square -Root
    Dutta, Srijit
    Tavva, Yaswanth
    Bhattacharjee, Debjyoti
    Chattopadhyay, Anupam
    [J]. 2020 33RD INTERNATIONAL CONFERENCE ON VLSI DESIGN AND 2020 19TH INTERNATIONAL CONFERENCE ON EMBEDDED SYSTEMS (VLSID), 2020, : 55 - 60
  • [10] The problem of Inverse Square Law and Inverse Square Root
    Babic, Matej
    [J]. ELEKTROTEHNISKI VESTNIK, 2023, 90 (05): : 272 - 276