PDF
\(\newcommand{\footnotename}{footnote}\) \(\def \LWRfootnote {1}\) \(\newcommand {\footnote }[2][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\newcommand {\footnotemark }[1][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\let \LWRorighspace \hspace \) \(\renewcommand {\hspace }{\ifstar \LWRorighspace \LWRorighspace }\) \(\newcommand {\mathnormal }[1]{{#1}}\) \(\newcommand \ensuremath [1]{#1}\) \(\newcommand {\LWRframebox }[2][]{\fbox {#2}} \newcommand {\framebox }[1][]{\LWRframebox } \) \(\newcommand {\setlength }[2]{}\) \(\newcommand {\addtolength }[2]{}\) \(\newcommand {\setcounter }[2]{}\) \(\newcommand {\addtocounter }[2]{}\) \(\newcommand {\arabic }[1]{}\) \(\newcommand {\number }[1]{}\) \(\newcommand {\noalign }[1]{\text {#1}\notag \\}\) \(\newcommand {\cline }[1]{}\) \(\newcommand {\directlua }[1]{\text {(directlua)}}\) \(\newcommand {\luatexdirectlua }[1]{\text {(directlua)}}\) \(\newcommand {\protect }{}\) \(\def \LWRabsorbnumber #1 {}\) \(\def \LWRabsorbquotenumber "#1 {}\) \(\newcommand {\LWRabsorboption }[1][]{}\) \(\newcommand {\LWRabsorbtwooptions }[1][]{\LWRabsorboption }\) \(\def \mathchar {\ifnextchar "\LWRabsorbquotenumber \LWRabsorbnumber }\) \(\def \mathcode #1={\mathchar }\) \(\let \delcode \mathcode \) \(\let \delimiter \mathchar \) \(\def \oe {\unicode {x0153}}\) \(\def \OE {\unicode {x0152}}\) \(\def \ae {\unicode {x00E6}}\) \(\def \AE {\unicode {x00C6}}\) \(\def \aa {\unicode {x00E5}}\) \(\def \AA {\unicode {x00C5}}\) \(\def \o {\unicode {x00F8}}\) \(\def \O {\unicode {x00D8}}\) \(\def \l {\unicode {x0142}}\) \(\def \L {\unicode {x0141}}\) \(\def \ss {\unicode {x00DF}}\) \(\def \SS {\unicode {x1E9E}}\) \(\def \dag {\unicode {x2020}}\) \(\def \ddag {\unicode {x2021}}\) \(\def \P {\unicode {x00B6}}\) \(\def \copyright {\unicode {x00A9}}\) \(\def \pounds {\unicode {x00A3}}\) \(\let \LWRref \ref \) \(\renewcommand {\ref }{\ifstar \LWRref \LWRref }\) \( \newcommand {\multicolumn }[3]{#3}\) \(\require {textcomp}\) \(\newcommand {\intertext }[1]{\text {#1}\notag \\}\) \(\let \Hat \hat \) \(\let \Check \check \) \(\let \Tilde \tilde \) \(\let \Acute \acute \) \(\let \Grave \grave \) \(\let \Dot \dot \) \(\let \Ddot \ddot \) \(\let \Breve \breve \) \(\let \Bar \bar \) \(\let \Vec \vec \) \(\newcommand {\LWRsubmultirow }[2][]{#2}\) \(\newcommand {\LWRmultirow }[2][]{\LWRsubmultirow }\) \(\newcommand {\multirow }[2][]{\LWRmultirow }\) \(\newcommand {\mrowcell }{}\) \(\newcommand {\mcolrowcell }{}\) \(\newcommand {\STneed }[1]{}\) \(\newcommand {\clb }[1]{{\color {blue} #1}}\) \(\newcommand {\Abar }{\skew 7\bar A}\) \(\newcommand {\Bbar }{\bar B}\) \(\newcommand {\Pbar }{\skew 5\bar P}\) \(\newcommand {\Qbar }{\bar Q}\)

Streaming the Bidiagonal Factorization

Johannes J. Brust and Michael A. Saunders

Abstract

Frequently in online or data-driven applications, new information becomes available in the form of a stream (Syamantak et al. [KS24]). Because processing the data for analysis or inference often involves matrix factorizations like the SVD or an eigendecomposition, we develop new updating methods. As repeatedly refactoring a large matrix is expensive, we propose low-rank updates to a previous factorization. Thus we consider the model

\begin{equation*} \Abar = A + C W^T, \end{equation*}

where the previous data \(A\) is \(m \times n\), and the updates \(C\) and \(W\) are \(m \times t\) and \(n \times t\). Simply computing \(\Abar \) costs \(m n t \) multiplications, which we therefore regard as an optimal complexity. For some well known factorizations, efficient updating methods are known. For instance, the methods of Gill et al. [GGMS74] update the Cholesky or LDL\(\null ^\textrm {T}\) factorization in \(\mathcal {O}(mnt) \) flops, while Golub and Van Loan [GV13, Sec 12.5] describe a method for updating the QR factorization. Also, Bunch et al. [BNS78] describe an algorithm for updating the eigendecomposition, while Brand [Bra06] and Moonen et al. [MVDV92] develop methods for the SVD. The complexity of the latter methods also scales as \(\mathcal {O}(mnt)\), but updating an eigendecomposition or SVD typically involves iterative nonlinear equation solves. In SVD computation, the first step is to reduce the matrix to (upper) bidiagonal form before computing the singular values of the bidiagonal (e.g., implemented in LAPACK’s bdsqr and gebrd [ABB+99]). Since the bidiagonalization and SVD are closely related, it is not surprising that attempts have been made to replace the SVD with the bidiagonalization for low-rank matrix approximations (Simon and Zha [SZ00]). Even though the SVD guarantees the best low-rank approximation, the bidiagonalization can be computed with a predetermined number of orthogonal transformations, making it computationally attractive.

The most stable method for computing a bidiagonal factorization uses sequences of orthogonal Householder reflectors. Because this requires and overwrites the matrix elements in memory, it is best suited for dense systems. Its complexity scales as \(\mathcal {O}(mn^2)\) flops and \(mn\) memory and it is therefore limited to small or medium problems. A second approach accesses the data only via matrix-vector products within a short two-vector recursion. This Golub-Kahan bidiagonalization (GKB) produces a partial bidiagonalization after \(k\) iterations. For a general \(A\) the GKB complexity is \(\mathcal {O}(kmn)\). When the data is sparse or otherwise structured, GKB can exploit the structure with potentially much fewer flops (but without further modifications suffers from rapid loss of orthogonality). Our algorithms reuse an existing bidiagonal factorization \(A = Q B P^T\) to compute the next factorization

\begin{equation*} \Qbar \Bbar \Pbar ^T = Q B P^T + C W^T \end{equation*}

at reduced cost. To exploit previous information fully, we develop sparsity-exploiting bidiagonalization algorithms. One method is gk-bidiag, which we compare to LAPACK’s bidiagonalization functions (Table 1). We also propose methods such as a compact representation of products of Householder matrices combined with the GKB iteration.

.
Problem \(m\) \(n\) gk-bidiag LAPACK
error secs error secs
\(\texttt {GL7d12}\) 8899 1019 0.96 0.031 0.97 26
\(\texttt {ch6-6-b2}\) 2400 450 1.6 0.0051 0.94 1.2
\(\texttt {ch7-6-b2}\) 4200 630 1.1 0.012 0.95 3.9
\(\texttt {ch7-7-b2}\) 7350 882 1.3 0.023 0.97 16
\(\texttt {cis-n4c6-b2}\) 1330 210 2.7 0.0017 0.91 0.3
\(\texttt {mk11-b2}\) 6930 990 1.2 0.02 0.97 16
\(\texttt {n4c6-b2}\) 1330 210 2.9 0.0017 0.91 0.3
\(\texttt {rel6}\) 2340 157 0.7 0.0028 0.71 0.56
\(\texttt {relat6}\) 2340 157 0.74 0.0029 0.74 0.71

Table 1: Updating a rank \(r=50\) truncated bidiagonal factorization \(\Qbar _{1:r} \Bbar _{1:r} {\Pbar ^{T}_{1:r}} \) when a rank-one update is added to a previous factorization. LAPACK subroutines and the sparsity-preserving solver gk-bidiag are applied to 9 SuiteSparse matrices [DH11]. The error is \(\| \Abar - \Qbar _{1:r} \Bbar _{1:r} {\Pbar ^{T}_{1:r}} \|_F / \| A \|_F \).

References