Lune

ICLR2022Top-tier venue

Fast Differentiable Matrix Square Root

Yue Song, Nicu Sebe, Wei Wang

Abstract

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é 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Investigation Into the Stochasticity of Batch Whitening cites Switchable Whitening for Deep Representation Learning
  • Why Approximate Matrix Square Root Outperforms Accurate SVD in Global Covariance Pooling? cites An Investigation Into the Stochasticity of Batch Whitening
  • DropCov: A Simple yet Effective Method for Improving Deep Architectures cites Why Approximate Matrix Square Root Outperforms Accurate SVD in Global Covariance Pooling?
  • DropCov: A Simple yet Effective Method for Improving Deep Architectures cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Grouping Matrix Based Graph Pooling with Adaptive Number of Clusters cites Why Approximate Matrix Square Root Outperforms Accurate SVD in Global Covariance Pooling?
  • Understanding Matrix Function Normalizations in Covariance Pooling through the Lens of Riemannian Geometry cites Why Approximate Matrix Square Root Outperforms Accurate SVD in Global Covariance Pooling?
  • Understanding Matrix Function Normalizations in Covariance Pooling through the Lens of Riemannian Geometry cites DropCov: A Simple yet Effective Method for Improving Deep Architectures
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. DropCov: A Simple yet Effective Method for Improving Deep ArchitecturesQilong Wang, Mingze Gao, Zhaolin Zhang, Jiangtao Xie et al.NeurIPS 2022 · 13 citations
  2. Grouping Matrix Based Graph Pooling with Adaptive Number of ClustersSung Moon Ko, Sungjun Cho, Dae-Woong Jeong, Sehui Han et al.AAAI 2023 · 12 citations
  3. Enhancing LLM Training via Spectral ClippingXiaowen Jiang, Andrei Semenov, Sebastian StichICML 2026 · 4 citations
  4. MuonSSM: Orthogonalizing State Space Models for Sequence ModelingThai Khanh Nguyen, Uyen N.B. Vo, Thieu Vo, Tan Nguyen et al.ICML 2026 · 1 citation
  5. Understanding Matrix Function Normalizations in Covariance Pooling through the Lens of Riemannian GeometryZiheng Chen, Yue Song, Xiaojun Wu, Gaowen Liu et al.ICLR 2025 · 1 citation

Builds on8

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Whitening for Self-Supervised Representation LearningAleksandr Ermolov, Aliaksandr Siarohin, Enver Sangineto, Nicu SebeICML 2021 · 378 citations
  3. Switchable Whitening for Deep Representation LearningXingang Pan, Xiaohang Zhan, Jianping Shi, Xiaoou Tang et al.ICCV 2019 · 204 citations
  4. Why Approximate Matrix Square Root Outperforms Accurate SVD in Global Covariance Pooling?Yue Song, Nicu Sebe, Wei WangICCV 2021 · 39 citations
  5. An Investigation Into the Stochasticity of Batch WhiteningLei Huang, Lei Zhao, Yi Zhou, Fan Zhu et al.CVPR 2020

Related papers

  1. SPAN: A Stochastic Projected Approximate Newton MethodXunpeng Huang, Xianfeng Liang, Zhengyang Liu, Lei Li et al.AAAI 2020 · 4 citations
  2. QT-ViT: Improving Linear Attention in ViT with Quadratic Taylor ExpansionYixing Xu, Chao Li, Dong Li, Xiao Sheng et al.NeurIPS 2024 · 7 citations
  3. What if Neural Networks had SVDs?Alexander Mathiasen, Frederik Hvilshøj, Jakob Rødsgaard Jørgensen, Anshul Nasery et al.NeurIPS 2020 · 12 citations
  4. Collapsing Taylor Mode Automatic DifferentiationFelix Dangel, Tim Siebert, Marius Zeinhofer, Andrea WaltherNeurIPS 2025 · 1 citation
  5. SOFT: Softmax-free Transformer with Linear ComplexityJiachen Lu, Jinghan Yao, Junge Zhang, Xiatian Zhu et al.NeurIPS 2021 · 232 citations
Dusk over the sea between two cliffs drawn in fine vertical lines