Batch-efficient EigenDecomposition for Small and Medium Matrices

Yue Song, Nicu Sebe, Wei Wang
7/9/2022
3 citations
cs.CVcs.LGmath.NA

Official code: KingJamesSong/BatchED (20 stars, Python, MIT, PyTorch, last commit 2023-02-04).

Abstract

EigenDecomposition (ED) is at the heart of many computer vision algorithms and applications. One crucial bottleneck limiting its usage is the expensive computation cost, particularly for a mini-batch of matrices in the deep neural networks.

Show full abstract

In this paper, we propose a QR-based ED method dedicated to the application scenarios of computer vision. Our proposed method performs the ED entirely by batched matrix/vector multiplication, which processes all the matrices simultaneously and thus fully utilizes the power of GPUs. Our technique is based on the explicit QR iterations by Givens rotation with double Wilkinson shifts. With several acceleration techniques, the time complexity of QR iterations is reduced from $O{(}n^5{)}$ to $O{(}n^3{)}$. The numerical test shows that for small and medium batched matrices (\emph{e.g.,} $dim{<}32$) our method can be much faster than the Pytorch SVD function. Experimental results on visual recognition and image generation demonstrate that our methods also achieve competitive performances.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

ECCV22 Paper "Batch-efficient EigenDecomposition for Small and Medium Matrices"

200PythonJul 4, 20223 years agoMIT
eigendecompositionpytorchsvd

Similar Papers

Cite this paper

@article{song2022batchefficient,
  title  = {Batch-efficient EigenDecomposition for Small and Medium Matrices},
  author = {Yue Song and Nicu Sebe and Wei Wang},
  year   = {2022},
  eprint = {2207.04228},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.04228v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.04228.svg)](https://codeofpaper.com/paper/2207.04228)

Discussion