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 条
  • [21] Computing enclosures for the inverse square root and the sign function of a matrix
    Frommer, Andreas
    Hashemi, Behnam
    Sablik, Thomas
    LINEAR ALGEBRA AND ITS APPLICATIONS, 2014, 456 : 199 - 213
  • [22] AN ITERATIVE METHOD FOR THE COMPUTATION OF A MATRIX INVERSE-SQUARE ROOT
    LAKIC, S
    ZEITSCHRIFT FUR ANGEWANDTE MATHEMATIK UND MECHANIK, 1995, 75 (11): : 867 - 873
  • [23] A Lanczos approach to the inverse square root of a large and sparse matrix
    Boriçi, A
    JOURNAL OF COMPUTATIONAL PHYSICS, 2000, 162 (01) : 123 - 131
  • [24] The square root of a certain matrix
    Corn, Patrick
    AMERICAN MATHEMATICAL MONTHLY, 2008, 115 (05): : 466 - 467
  • [25] On the Square Root of a Bell Matrix
    Donatella Merlini
    Results in Mathematics, 2021, 76
  • [26] On the Square Root of a Bell Matrix
    Merlini, Donatella
    RESULTS IN MATHEMATICS, 2021, 76 (01)
  • [27] Schrodinger equations for the square root density of an eigenmixture and the square root of an eigendensity spin matrix
    Giraud, B. G.
    Moussa, P.
    PHYSICAL REVIEW C, 2010, 82 (02):
  • [28] Hardware architecture design and mapping of 'Fast Inverse Square Root' algorithm
    Zafar, Saad
    Adapa, Raviteja
    2014 INTERNATIONAL CONFERENCE ON ADVANCES IN ELECTRICAL ENGINEERING (ICAEE), 2014,
  • [29] A novel approximation scheme for floating-point square root and inverse square root for FPGAs
    Pennestri, Pietro
    Huang, Yanqiu
    Alachiotis, Nikolaos
    2022 11TH INTERNATIONAL CONFERENCE ON MODERN CIRCUITS AND SYSTEMS TECHNOLOGIES (MOCAST), 2022,
  • [30] Reciprocation, square root, inverse square root, and some elementary functions using small multipliers
    Ercegovac, MD
    Lang, T
    Muller, JM
    Tisserand, A
    ADVANCED SIGNAL PROCESSING ALGORITHMS, ARCHITECTURES, AND IMPLEMENTATIONS VIII, 1998, 3461 : 543 - 554