Conference paper Open Access

FAST DIFFERENTIABLE MATRIX SQUARE ROOT

Yue Song; Nicu Sebe; Wei Wang

Computing the matrix square root or 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 in the backward pass. In this paper, we propose two more efficient variants to compute the differentiable matrix square root. For the forward propagation, one method is to use Matrix Taylor Polynomial (MTP), and the other method is to use Matrix Pad´e Approximants (MPA). The backward gradient is computed by iteratively solving the continuous-time Lyapunov equation using the matrix sign function. Both methods yield considerable speed-up compared with the SVD or the Newton-Schulz iteration. Experimental results on the de-correlated batch normalization and second-order vision transformer demonstrate that our methods can also achieve competitive and even slightly better performances. The code is available at https://github.com/KingJamesSong/FastDifferentiableMatSqrt.

Files (13.7 MB)
Name Size
fast_differentiable_matrix_squ.pdf
md5:d2bff932b6fcf548d90b146a299d3d34
13.7 MB Download
331
68
views
downloads
All versions This version
Views 331331
Downloads 6868
Data volume 932.2 MB932.2 MB
Unique views 204204
Unique downloads 6060

Share

Cite as