This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Fast Updating Truncated SVD for Representation Learning with Sparse Matrices

Haoran Deng1, Yang Yang1, Jiahe Li1, Cheng Chen2, Weihao Jiang2, Shiliang Pu2
1Zhejiang University, 2Hikvision Research Institute
{denghaoran, yangya, jiaheli}@zju.edu.cn
{chencheng16, jiangweihao5, pushiliang.hri}@hikvision.com
Corresponding Author
Abstract

Updating a truncated Singular Value Decomposition (SVD) is crucial in representation learning, especially when dealing with large-scale data matrices that continuously evolve in practical scenarios. Aligning SVD-based models with fast-paced updates becomes increasingly important. Existing methods for updating truncated SVDs employ Rayleigh-Ritz projection procedures, where projection matrices are augmented based on original singular vectors. However, these methods suffer from inefficiency due to the densification of the update matrix and the application of the projection to all singular vectors. To address these limitations, we introduce a novel method for dynamically approximating the truncated SVD of a sparse and temporally evolving matrix. Our approach leverages sparsity in the orthogonalization process of augmented matrices and utilizes an extended decomposition to independently store projections in the column space of singular vectors. Numerical experiments demonstrate a remarkable efficiency improvement of an order of magnitude compared to previous methods. Remarkably, this improvement is achieved while maintaining a comparable precision to existing approaches.

1 Introduction

Truncated Singular Value Decompositions (truncated SVDs) are widely used in various machine learning tasks, including computer vision (Turk & Pentland, 1991), natural language processing (Deerwester et al., 1990; Levy & Goldberg, 2014), recommender systems (Koren et al., 2009) and graph representation learning (Ramasamy & Madhow, 2015; Abu-El-Haija et al., 2021; Cai et al., 2022). Representation learning with a truncated SVD benefits from no requirement of gradients and hyperparameters, better interpretability derived from the optimal approximation properties, and efficient adaptation to large-scale data using randomized numerical linear algebra techniques (Halko et al., 2011; Ubaru et al., 2015; Musco & Musco, 2015).

However, large-scale data matrices frequently undergo temporal evolution in practical applications. Consequently, it is imperative for a representation learning system that relies on the truncated SVD of these matrices to adjust the representations based on the evolving data. Node representation for a graph, for instance, can be computed with a truncated SVD of the adjacency matrix, where each row in the decomposed matrix corresponds to the representation of a node (Ramasamy & Madhow, 2015). When the adjacency matrix undergoes modifications, it is necessary to update the corresponding representation (Zhu et al., 2018; Zhang et al., 2018; Deng et al., 2023). Similar implementations exist in recommender systems based on the truncated SVD of an evolving and sparse user-item rating matrix (Sarwar et al., 2002; Cremonesi et al., 2010; Du et al., 2015; Nikolakopoulos et al., 2019). This requirement for timely updates emphasizes the significance of keeping SVD-based models in alignment with the ever-evolving data.

In the past twenty-five years, Rayleigh-Ritz projection methods (Zha & Simon, 1999; Vecharynski & Saad, 2014; Yamazaki et al., 2015; Kalantzis et al., 2021) have become the standard methods for updating the truncated SVD, owing to their high accuracy. Concretely, they construct the projection matrix by augmenting the columns of the current singular vector to an orthonormal matrix that roughly captures the column space of the updated singular vector. Notably, the augmentation procedure typically thickens sparse areas of the matrices, rendering the inefficiency of these algorithms. Moreover, due to the requirement of applying the projection process to all singular vectors, these methods become impractical in situations involving frequent updates or using only a portion of the representations in the downstream tasks.

In this paper, we present a novel algorithm for fast updating truncated SVDs in sparse matrices.

Contributions. We summarize major contributions of this paper as follows:

  1. 1.

    We study the orthogonalization process of the augmented matrix performed in an inner product space isometric to the column space of the augmented matrix, which can exploit the sparsity of the updated matrix to reduce the time complexity. Besides, we propose an extended decomposition for the obtained orthogonal basis to efficiently update singular vectors.

  2. 2.

    We propose an algorithm for approximately updating the rank-kk truncated SVD with a theoretical guarantee (Theorem 1), which runs at the update sparsity time complexity when considering kk and ss (the rank of the updated matrix) as constants. We also propose two variants of the algorithm that can be applied to cases where ss is large.

  3. 3.

    We perform numerical experiments on updating truncated SVDs for sparse matrices in various real-world scenarios, such as representation learning applications in graphs and recommendations. The results demonstrate that the proposed method achieves a speed improvement of an order of magnitude compared to previous methods, while still maintaining comparable accuracy.

2 Background and Notations

The singular value decomposition (SVD) of an mm-by-nn real data matrix 𝑨{\bm{A}} is denoted by 𝑨=𝑼𝚺𝑽{\bm{A}}={\bm{U}}\mathbf{\Sigma}{\bm{V}}^{\top}, where 𝑼m×m{\bm{U}}\in\mathbb{R}^{m\times m}, 𝑽n×n{\bm{V}}\in\mathbb{R}^{n\times n} are orthogonal and 𝚺m×n\mathbf{\Sigma}\in\mathbb{R}^{m\times n} is a rectangular diagonal with non-negative real numbers sorted across the diagonal. The rank-kk truncated SVD of 𝐀\mathbf{A} is obtained by keeping only the first kk largest singular values and using the corresponding kk columns of 𝐔\mathbf{U} and 𝐕\mathbf{V}, which is denoted by 𝐔k𝚺k𝐕k=SVDk(𝐀)\mathbf{U}_{k}\mathbf{\Sigma}_{k}\mathbf{V}_{k}=\text{SVD}_{k}(\mathbf{A}).

In this paper, we consider the problem of updating the truncated SVD of a sparse matrix by adding new rows (or columns) and low-rank modifications of weights. Specifically, when a truncated SVD of matrix 𝐀m×n\mathbf{A}\in\mathbb{R}^{m\times n} is available, our goal is to approximate the truncated SVD of 𝑨¯\overline{{\bm{A}}} which has addition of rows 𝑬r{\bm{E}}_{r} s×n\in\mathbb{R}^{s\times n} (or columns 𝑬c{\bm{E}}_{c} m×s\in\mathbb{R}^{m\times s}) or low-rank modifications 𝑫m×s,{\bm{D}}\in\mathbb{R}^{m\times s}, 𝑬m{\bm{E}}_{m} s×n\in\mathbb{R}^{s\times n} to 𝑨{\bm{A}}.

𝑨¯=[𝑨𝑬r],𝑨¯=[𝑨𝐄𝐜],or𝑨¯=𝑨+𝑫𝑬m\overline{{\bm{A}}}=\begin{bmatrix}{\bm{A}}\\ {{{\bm{E}}_{r}}}\end{bmatrix},\quad\overline{{\bm{A}}}=\begin{bmatrix}{\bm{A}}\ {{\mathbf{E_{c}}}}\end{bmatrix},\quad\text{or}\quad\overline{{\bm{A}}}={\bm{A}}+{\bm{D}}{{{\bm{E}}_{m}^{\top}}}

In several related works, including Zha-Simon’s, a key issue often revolves around the optimization of the QR decomposition of the (𝑰𝑼k𝑼k)𝑩({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{B}} matrix. Specifically, given an orthonormal matrix 𝑼k{\bm{U}}_{k} and a sparse matrix 𝑩{\bm{B}}, we refer to (𝑰𝑼k𝑼k)𝑩({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{B}} as the Augmented Matrix with respect to 𝑼k{\bm{U}}_{k}, where its column space is orthogonal to 𝑼k{\bm{U}}_{k}.

Notations. In this paper, we use the lowercase letter xx, bold lowercase letter 𝒙{\bm{x}} and bold uppercase letter 𝑿{\bm{X}} to denote scalars, vectors, and matrices, respectively. Moreover, nnz(𝑿)nnz({\bm{X}}) denotes the number of non-zero entries in a matrix, 𝑿¯\overline{{\bm{X}}} denotes the updated matrix, 𝑿~k\widetilde{{\bm{X}}}_{k} denotes the rank-kk approximation of a matrix, and range(𝑿)range({\bm{X}}) denotes the matrix’s column space. A table of frequently used notations in this paper is listed in Appendix B.

2.1 Related Work

Projection Viewpoint. Recent perspectives (Vecharynski & Saad, 2014; Kalantzis et al., 2021) frame the prevailing methodologies for updating the truncated SVD as instances of the Rayleigh-Ritz projection process, which can be characterized by following steps.

  1. 1.

    Augment the singular vector 𝑼k{\bm{U}}_{k} and 𝑽k{\bm{V}}_{k} by adding extra columns (or rows), resulting in 𝑼^\widehat{{\bm{U}}} and 𝑽^\widehat{{\bm{V}}}, respectively. This augmentation is performed so that range(𝑼^)range(\widehat{{\bm{U}}}) and range(𝑽^)range(\widehat{{\bm{V}}}) can effectively approximate and capture the updated singular vectors’ column space.

  2. 2.

    Compute 𝑭k,𝚯k,𝑮k=SVDk(𝑼^𝑨𝑽^){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}=\text{SVD}_{k}(\widehat{{\bm{U}}}^{\top}{\bm{A}}\widehat{{\bm{V}}}).

  3. 3.

    Approximate the updated truncated SVD by 𝑼^𝑭k,𝚯k,𝑽^𝑮k\widehat{{\bm{U}}}{\bm{F}}_{k},\mathbf{\Theta}_{k},\widehat{{\bm{V}}}{\bm{G}}_{k}.

Zha-Simon’s Scheme. For 𝑨~k=𝑼k𝚺k𝑽k\widetilde{{\bm{A}}}_{k}={\bm{U}}_{k}\mathbf{\Sigma}_{k}{\bm{V}}_{k}^{\top}, let (𝑰𝑼k𝑼k)𝑬c=𝑸𝑹({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){{{\bm{E}}_{c}}}={\bm{Q}}{\bm{R}}, where 𝑸{\bm{Q}}’s columns are orthonormal and 𝑹{\bm{R}} is upper trapezoidal. Zha & Simon (1999) method updates the truncate SVD after appending new columns 𝑬c{\bm{E}}_{c} m×s\in\mathbb{R}^{m\times s} to 𝑨m×n{\bm{A}}\in\mathbb{R}^{m\times n} by

𝑨¯[𝑨k~𝑬c]=[𝑼k𝑸][𝚺k𝑼k𝑬c𝑹][𝑽k𝑰]=([𝑼k𝑸]𝑭k)𝚯k([𝑽k𝑰]𝑮k)\displaystyle\overline{{\bm{A}}}\approx\begin{bmatrix}\widetilde{{\bm{A}}_{k}}~{}~{}{{{\bm{E}}_{c}}}\end{bmatrix}=\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}\end{bmatrix}\begin{bmatrix}\mathbf{\Sigma}_{k}&{\bm{U}}_{k}^{\top}{{{\bm{E}}_{c}}}\\ &{\bm{R}}\end{bmatrix}\begin{bmatrix}{\bm{V}}_{k}^{\top}&\\ &{\bm{I}}\end{bmatrix}=([{\bm{U}}_{k}~{}~{}{\bm{Q}}]~{}{\bm{F}}_{k})\mathbf{\Theta}_{k}(\begin{bmatrix}{\bm{V}}_{k}&\\ &{\bm{I}}\end{bmatrix}{\bm{G}}_{k})^{\top} (1)

where 𝑭k,𝚯k,𝑮k=SVDk([𝚺k𝑼k𝑬c𝑹]){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}=\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&{\bm{U}}_{k}^{\top}{{{\bm{E}}_{c}}}\\ &{\bm{R}}\end{bmatrix}). The updated approximate left singular vectors, singular values and right singular vectors are [𝑼k𝑸]𝑭k,𝚯k,[𝑽k𝑰]𝑮k\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}\end{bmatrix}{\bm{F}}_{k},\mathbf{\Theta}_{k},\begin{bmatrix}{\bm{V}}_{k}&\\ &{\bm{I}}\end{bmatrix}{\bm{G}}_{k}, respectively.

When it comes to weight update, let the QR-decomposition of the augmented matrices be (𝑰𝑼k𝑼k)𝑫=𝑸𝑫𝑹𝑫({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{D}}={\bm{Q}}_{\bm{D}}{\bm{R}}_{\bm{D}} and (𝑰𝑽k𝑽k)𝑬m=𝑸𝑬𝑹𝑬({\bm{I}}-{\bm{V}}_{k}{\bm{V}}_{k}^{\top}){{{\bm{E}}_{m}}}={\bm{Q}}_{\bm{E}}{\bm{R}}_{\bm{E}}, then the update procedure is

𝑨¯𝑨k~+𝑫𝑬m\displaystyle\overline{{\bm{A}}}\approx\widetilde{{\bm{A}}_{k}}+{\bm{D}}{{{\bm{E}}_{m}}}^{\top} =[𝑼k𝑸𝑫]([𝚺k𝟎𝟎𝟎]+[𝑼k𝑫𝑹𝑫][𝑽k𝑬m𝑹𝑬])[𝑽k𝑸𝑬]\displaystyle=\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}_{\bm{D}}\end{bmatrix}(\begin{bmatrix}\mathbf{\Sigma}_{k}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}\\ \end{bmatrix}+\begin{bmatrix}{\bm{U}}_{k}^{\top}{\bm{D}}\\ {\bm{R}}_{\bm{D}}\end{bmatrix}\begin{bmatrix}{\bm{V}}_{k}^{\top}{{{\bm{E}}_{m}}}\\ {\bm{R}}_{\bm{E}}\end{bmatrix}^{\top})\begin{bmatrix}{\bm{V}}_{k}~{}~{}{\bm{Q}}_{\bm{E}}\end{bmatrix}^{\top} (2)
=([𝑼k𝑸𝑫]𝑭k)𝚯k([𝑽k𝑸𝑬]𝑮k)\displaystyle=([{\bm{U}}_{k}~{}~{}{\bm{Q}}_{\bm{D}}]~{}{\bm{F}}_{k})\mathbf{\Theta}_{k}(\begin{bmatrix}{\bm{V}}_{k}~{}~{}{\bm{Q}}_{\bm{E}}\end{bmatrix}{\bm{G}}_{k})^{\top}

where 𝑭k,𝚯k,𝑮k=SVDk([𝚺k𝟎𝟎𝟎]+[𝑼k𝑫𝑹𝑫][𝑽k𝑬m𝑹𝑬]){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}=\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}\\ \end{bmatrix}+\begin{bmatrix}{\bm{U}}_{k}^{\top}{\bm{D}}\\ {\bm{R}}_{\bm{D}}\end{bmatrix}\begin{bmatrix}{\bm{V}}_{k}^{\top}{{{\bm{E}}_{m}}}\\ {\bm{R}}_{\bm{E}}\end{bmatrix}^{\top}). The updated approximate truncated SVD is [𝑼k𝑸𝑫]𝑭k,𝚯k,[𝑽k𝑸𝑬]𝑮k\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}_{\bm{D}}\end{bmatrix}{\bm{F}}_{k},\mathbf{\Theta}_{k},\begin{bmatrix}{\bm{V}}_{k}~{}~{}{\bm{Q}}_{\bm{E}}\end{bmatrix}{\bm{G}}_{k}.

Orthogonalization of Augmented Matrix. The above QR decomposition of the augmented matrix and the consequent compact SVD is of high time complexity and occupies the majority of the time in the whole process when the granularity of the update is large (i.e., ss is large). To reduce the time complexity, a series of subsequent methods have been developed based on a faster approximation of the orthogonal basis of the augmented matrix. Vecharynski & Saad (2014) used Lanczos vectors conducted by a Golub-Kahan-Lanczos (GKL) bidiagonalization procedure to approximate the augmented matrix. Yamazaki et al. (2015) and Ubaru & Saad (2019) replaced the above GKL procedure with Randomized Power Iteration (RPI) and graph coarsening, respectively. Kalantzis et al. (2021) suggested determining only the left singular projection subspaces with the augmented matrix set as the identity matrix, and obtaining the right singular vectors by projection.

3 Methodology

We propose an algorithm for fast updating the truncated SVD based on the Rayleigh-Ritz projection paradigm. In Section 3.1, we present a procedure for orthogonalizing the augmented matrix that takes advantage of the sparsity of the updated matrix. This procedure is performed in an inner product space that is isometric to the augmented space. In Section 3.2, we demonstrate how to utilize the resulting orthogonal basis to update the truncated SVD. We also propose an extended decomposition technique to reduce complexity. In Section 3.3, we provide a detailed description of the proposed algorithm and summarize the main findings in the form of theorems. In Section 3.4, we evaluate the time complexity of our algorithm in relation to existing methods.

3.1 Faster Orthogonalization of Augmented Matrix

In this section, we introduce an inner product space that is isomorphic to the column space of the augmented matrix, where each element is a tuple of a sparse vector and a low-dimensional vector. The orthogonalization process in this space can exploit sparsity and low dimension, and the resulting orthonormal basis is bijective to the orthonormal basis of the column space of the augmented matrix.

Previous methods perform QR decomposition of the augmented matrix with 𝑸𝑹=(𝑰𝑼k𝑼k)𝑩{\bm{Q}}{\bm{R}}=({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{B}}, to obtain the updated orthogonal matrix. The matrix 𝑸{\bm{Q}} derived from the aforementioned procedure is not only orthonormal, but its column space is also orthogonal to the column space of 𝑼k{\bm{U}}_{k}, implying that matrix [𝑼k𝑸]\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}\end{bmatrix} is orthonormal.

Let 𝒁=(𝑰𝑼k𝑼k)𝑩=𝑩𝑼k(𝑼k𝑩)=𝑩𝑼k𝑪{\bm{Z}}=({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{B}}={\bm{B}}-{\bm{U}}_{k}({\bm{U}}_{k}^{\top}{\bm{B}})={\bm{B}}-{\bm{U}}_{k}{\bm{C}} be the augmented matrix, then each column of 𝒁{\bm{Z}} can be written as a sparse mm-dimensional matrix of column vectors minus a linear combination of the column vectors of the mm-by-kk orthonormal matrix 𝑼k{\bm{U}}_{k} i.e., 𝒛i=𝒃i𝑼k𝑪[i]{\bm{z}}_{i}={\bm{b}}_{i}-{\bm{U}}_{k}{\bm{C}}[i]. We refer to the form of a sparse vector minus a linear combination of orthonormal vectors as SV-LCOV, and its definition is as follows:

Definition 1 (SV-LCOV).

Let 𝐔km×k{\bm{U}}_{k}\in\mathbb{R}^{m\times k} be an arbitrary matrix satisfying 𝐔k𝐔k=𝐈{\bm{U}}_{k}^{\top}{\bm{U}}_{k}={\bm{I}}, and let 𝐛m{\bm{b}}\in\mathbb{R}^{m} be a sparse vector. Then, the SV-LCOV form of the vector 𝐳=(𝐈𝐔k𝐔k)𝐛{\bm{z}}=({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}} is a tuple denoted as (𝐛,𝐜)𝐔k({\bm{b}},{\bm{c}})_{{\bm{U}}_{k}} where 𝐜=𝐔k𝐛{\bm{c}}={\bm{U}}_{k}^{\top}{\bm{b}}.

Turning columns of an augmented matrix into SV-LCOV is efficient, because the computation of 𝑼k𝒃{\bm{U}}_{k}^{\top}{\bm{b}} can be done by extracting the rows of 𝑼k{\bm{U}}_{k} that correspond to the nonzero elements of 𝒃{\bm{b}}, and then multiplying them by 𝒃{\bm{b}}.

Lemma 1.

For an orthonormal matrix 𝐔km×k{\bm{U}}_{k}\in\mathbb{R}^{m\times k} with 𝐔k𝐔k=𝐈{\bm{U}}_{k}^{\top}{\bm{U}}_{k}={\bm{I}}, turning (𝐈𝐔k𝐔k)𝐛({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}} with a sparse vector 𝐛m{\bm{b}}\in\mathbb{R}^{m} into SV-LCOV can be done in time complexity of O(knnz(𝐛))O(k\cdot nnz({\bm{b}})).

Furthermore, we define the scalar multiplication, addition and inner product (i.e., dot product) of SV-LCOV and show in Lemma 2 that these operations can be computed with low computational complexity when 𝒃{\bm{b}} is sparse.

Lemma 2.

For an orthonormal matrix 𝐔km×k{\bm{U}}_{k}\in\mathbb{R}^{m\times k} with 𝐔k𝐔k=𝐈{\bm{U}}_{k}^{\top}{\bm{U}}_{k}={\bm{I}}, the following operations of SV-LCOV can be done in the following time.

  • Scalar multiplication: α(𝒃,𝒄)𝑼k=(α𝒃,α𝒄)𝑼k\alpha({\bm{b}},{\bm{c}})_{{\bm{U}}_{k}}=(\alpha{\bm{b}},\alpha{\bm{c}})_{{\bm{U}}_{k}} in O(nnz(𝒃)+k)O(nnz({\bm{b}})+k) time.

  • Addition: (𝒃1,𝒄1)𝑼k+(𝒃2,𝒄2)𝑼k=(𝒃1+𝒃2,𝒄1+𝒄2)𝑼k({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}}+({\bm{b}}_{2},{\bm{c}}_{2})_{{\bm{U}}_{k}}=({\bm{b}}_{1}+{\bm{b}}_{2},{\bm{c}}_{1}+{\bm{c}}_{2})_{{\bm{U}}_{k}} in O(nnz(𝒃1+𝒃2)+k)O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})+k) time.

  • Inner product: (𝒃1,𝒄1)𝑼k,(𝒃2,𝒄2)𝑼k=𝒃1,𝒃2𝒄1,𝒄2\langle({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}},({\bm{b}}_{2},{\bm{c}}_{2})_{{\bm{U}}_{k}}\rangle=\langle{\bm{b}}_{1},{\bm{b}}_{2}\rangle-\langle{\bm{c}}_{1},{\bm{c}}_{2}\rangle in O(nnz(𝒃1+𝒃2)+k)O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})+k) time.

With the scalar multiplication, addition and inner product operations of SV-LCOV, we can further study the inner product space of SV-LCOV.

Lemma 3 (Isometry of SV-LCOV).

For an orthonormal matrix 𝐔km×k{\bm{U}}_{k}\in\mathbb{R}^{m\times k} with 𝐔k𝐔k=𝐈{\bm{U}}_{k}^{\top}{\bm{U}}_{k}={\bm{I}}, let 𝐁m×s{\bm{B}}\in\mathbb{R}^{m\times s} be arbitrary sparse matrix with the columns of 𝐁=[𝐛1,,𝐛s]{\bm{B}}=[{\bm{b}}_{1},...,{\bm{b}}_{s}], then the column space of (𝐈𝐔k𝐔k)𝐁({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{B}} is isometric to the inner product space of their SV-LCOV.

The isometry of an inner product space here is a transformation that preserves the inner product, thereby preserving the angles and lengths in the space. From Lemma 3, we can see that in SV-LCOV, since the dot product remains unchanged, the orthogonalization process of an augmented matrix can be transformed into an orthogonalization process in the inner product space.

As an example, the Modified Gram-Schmidt process (i.e. Algorithm 1) is commonly used to compute an orthonormal basis for a given set of vectors. It involves a series of orthogonalization and normalization steps to produce a set of mutually orthogonal vectors that span the same subspace as the original vectors. Numerically, the entire process consists of only three types of operations in Lemma 2, so we can replace them with SV-LCOV operations to obtain a more efficient method (i.e. Algorithm 2).

Input: 𝑬n×s,𝑼kn×k{\bm{E}}\in\mathbb{R}^{n\times s},{\bm{U}}_{k}\in\mathbb{R}^{n\times k}
Output: 𝑸n×s,𝑹s×s{\bm{Q}}\in\mathbb{R}^{n\times s},{\bm{R}}\in\mathbb{R}^{s\times s}
1 𝑸(𝑰𝑼k𝑼k)𝑬{\bm{Q}}\leftarrow({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{E}};
2
3for i=1i=1 to ss do
4       α𝒒i,𝒒i\alpha\leftarrow\sqrt{\langle{\bm{q}}_{i},{\bm{q}}_{i}\rangle};
5       𝑹i,iα{\bm{R}}_{i,i}\leftarrow\alpha;
6       𝒒i𝒒i/α{\bm{q}}_{i}\leftarrow{\bm{q}}_{i}/\alpha;
7       for j=i+1j=i+1 to ss do
8             β𝒒i,𝒒j\beta\leftarrow\langle{\bm{q}}_{i},{\bm{q}}_{j}\rangle;
9             𝑹i,jβ{\bm{R}}_{i,j}\leftarrow\beta;
10             𝒒j𝒒jβ𝒒i{\bm{q}}_{j}\leftarrow{\bm{q}}_{j}-\beta{\bm{q}}_{i};
11            
12       end for
13      
14 end for
return 𝐐=[𝐪1,,𝐪s],𝐑{\bm{Q}}=[{\bm{q}}_{1},...,{\bm{q}}_{s}],{\bm{R}}
Algorithm 1 Modified Gram-Schmidt
Input: 𝑬m×s,𝑼km×k{\bm{E}}\in\mathbb{R}^{m\times s},{\bm{U}}_{k}\in\mathbb{R}^{m\times k}
Output: 𝑩m×s,𝑪k×s,𝑹s×s{\bm{B}}\in\mathbb{R}^{m\times s},{\bm{C}}\in\mathbb{R}^{k\times s},{\bm{R}}\in\mathbb{R}^{s\times s}
1 𝑩𝑬,𝑪𝑼k𝑬{\bm{B}}\leftarrow{\bm{E}},\quad{\bm{C}}\leftarrow{\bm{U}}_{k}^{\top}{\bm{E}};
2
3for i=1i=1 to ss do
4       α𝒃i,𝒃i𝒄i,𝒄i\alpha\leftarrow\sqrt{\langle{\bm{b}}_{i},{\bm{b}}_{i}\rangle-\langle{\bm{c}}_{i},{\bm{c}}_{i}\rangle};
5       𝑹i,iα{\bm{R}}_{i,i}\leftarrow\alpha ;
6       𝒃i𝒃i/α,𝒄i𝒄i/α{\bm{b}}_{i}\leftarrow{\bm{b}}_{i}/\alpha,\quad{\bm{c}}_{i}\leftarrow{\bm{c}}_{i}/\alpha;
7       for j=i+1j=i+1 to ss do
8             β𝒃i,𝒃j𝒄i,𝒄j\beta\leftarrow\langle{\bm{b}}_{i},{\bm{b}}_{j}\rangle-\langle{\bm{c}}_{i},{\bm{c}}_{j}\rangle;
9             𝑹i,jβ{\bm{R}}_{i,j}\leftarrow\beta;
10             𝒃j𝒃jβ𝒃i,𝒄j𝒄jβ𝒄i{\bm{b}}_{j}\leftarrow{\bm{b}}_{j}-\beta{\bm{b}}_{i},\quad{\bm{c}}_{j}\leftarrow{\bm{c}}_{j}-\beta{\bm{c}}_{i};
11            
12       end for
13      
14 end for
15return 𝐐=[(𝐛1,𝐜1)𝐔k,,(𝐛s,𝐜s)𝐔k],𝐑{\bm{Q}}=[({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}},...,({\bm{b}}_{s},{\bm{c}}_{s})_{{\bm{U}}_{k}}],{\bm{R}}
Algorithm 2 SV-LCOV’s QR process
Lemma 4.

Given an orthonormal matrix 𝐔km×k{\bm{U}}_{k}\in\mathbb{R}^{m\times k} satisfying 𝐔k𝐔k=𝐈{\bm{U}}_{k}^{\top}{\bm{U}}_{k}={\bm{I}}, there exists an algorithm that can obtain a orthonormal basis of a set of SV-LCOV {(𝐛1,𝐜1)𝐔k,,(𝐛s,𝐜s)𝐔k}\{({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}},...,({\bm{b}}_{s},{\bm{c}}_{s})_{{\bm{U}}_{k}}\} in O((nnz(i=1s𝐛i)+k)s2)O((nnz(\sum_{i=1}^{s}{\bm{b}}_{i})+k)s^{2}) time.

Approximating the augmented matrix with SV-LCOV. The Gram-Schdmit process is less efficient when ss is large. To this end, Vecharynski & Saad (2014) and Yamazaki et al. (2015) approximated the orthogonal basis of the augmented matrix with Golub-Kahan-Lanczos bidiagonalization(GKL) procedure (Golub & Kahan, 1965) and Randomized Power Iteration (RPI) process. We find they consists of three operations in Lemma 2 and can be transformed into SV-LCOV for efficiency improvement. Limited by space, we elaborate the proposed algorithm of appoximating the augmented matrix with SV-LCOV in Appendix D.1 and Appendix D.2, respectively.

3.2 An Extended Decomposition to Reducing Complexity

Low-dimensional matrix mutliplication and sparse matrix addition. Suppose an orthonormal basis (𝒃1,𝒄1)𝑼k,,(𝒃s,𝒄s)𝑼k({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}},...,({\bm{b}}_{s},{\bm{c}}_{s})_{{\bm{U}}_{k}} of the augmented matrix in the SV-LCOV is obtained, according to Definition 1, this orthonormal basis corresponds to the matrix 𝑩𝑼k𝑪{\bm{B}}-{\bm{U}}_{k}{\bm{C}} where the ii-th column of 𝑩{\bm{B}} is 𝒃s{\bm{b}}_{s}. Regarding the final step of the Rayleigh-Ritz process for updating the truncated SVD by adding columns, we have the update procedure for the left singular vectors:

𝑼k¯[𝑼k𝑸]𝑭k\displaystyle\overline{{\bm{U}}_{k}}\leftarrow\begin{bmatrix}{\bm{U}}_{k}~{}~{}{\bm{Q}}\end{bmatrix}{\bm{F}}_{k} =𝑼k𝑭k[:k]+𝑸𝑭k[k:]\displaystyle={\bm{U}}_{k}{\bm{F}}_{k}[:k]+{\bm{Q}}{\bm{F}}_{k}[k:] (3)
=𝑼k𝑭k[:k]+(𝑩𝑼k𝑪)𝑭k[k:]\displaystyle={\bm{U}}_{k}{\bm{F}}_{k}[:k]+({\bm{B}}-{{{\bm{U}}_{k}}}{\bm{C}}){\bm{F}}_{k}[k:]
=𝑼k(𝑭k[:k]𝑪𝑭k[k:])+𝑩𝑭k[k:]\displaystyle={\bm{U}}_{k}({\bm{F}}_{k}[:k]-{\bm{C}}{\bm{F}}_{k}[k:])+{\bm{B}}{\bm{F}}_{k}[k:]

where 𝑭k[:k]{\bm{F}}_{k}[:k] denotes the submatrix consisting of the first kk rows of 𝑭k{\bm{F}}_{k}, and 𝑭k[k:]{\bm{F}}_{k}[k:] denotes the submatrix consisting of rows starting from the (k+1)(k+1)-th rows of 𝑭k{\bm{F}}_{k}.

Equation (3) shows that each update of the singular vectors 𝑼k{\bm{U}}_{k} consists of the following operations:

  1. 1.

    A low-dimensional matrix multiplication to 𝑼k{\bm{U}}_{k} by a kk-by-kk matrix (𝑭k[:k]𝑪𝑭k[k:])({\bm{F}}_{k}[:k]-{\bm{C}}{\bm{F}}_{k}[k:]).

  2. 2.

    A sparse matrix addition to 𝑼k{\bm{U}}_{k} by of a sparse matrix 𝑩𝑭k[k:]{\bm{B}}{\bm{F}}_{k}[k:] that has at most nnz(𝑩)knnz({\bm{B}})\cdot k non-zero entries. While 𝑩𝑭k[k:]{\bm{B}}{\bm{F}}_{k}[k:] may appear relatively dense in the context, considering it as a sparse matrix during the process of sparse matrix addition ensures asymptotic complexity.

An extended decomposition for reducing complexity. To reduce the complexity, we write the truncated SVD as a product of the following five matrices:

𝑼m×k𝑼k×k′′𝚺k×k𝑽k×k′′𝑽n×k{\bm{U}}^{\prime}_{m\times k}\cdot{\bm{U}}^{\prime\prime}_{k\times k}\cdot\mathbf{\Sigma}_{k\times k}\cdot{\bm{V}}^{\prime\prime\top}_{k\times k}\cdot{\bm{V}}^{\prime\top}_{n\times k} (4)

with orthonormal 𝑼=𝑼𝑼′′{\bm{U}}={\bm{U}}^{\prime}\cdot{\bm{U}}^{\prime\prime} and 𝑽𝑽′′{\bm{V}}^{\prime}\cdot{\bm{V}}^{\prime\prime} (but not 𝑽{\bm{V}}^{\prime} or 𝑽′′{\bm{V}}^{\prime\prime}), that is, the singular vectors will be obtained by the product of the two matrices. Initially, 𝑼′′{\bm{U}}^{\prime\prime} and 𝑽′′{\bm{V}}^{\prime\prime} are set by the kk-by-kk identity matrix, and 𝑼{\bm{U}}^{\prime}, 𝑽{\bm{V}}^{\prime} are set as the left and right singular vectors. Similar additional decomposition was used in Brand (2006) for updating of SVD without any truncation and with much higher complexity. With the additional decomposition presented above, the two operations can be performed to update the singular vector:

𝑼′′¯\displaystyle\overline{{\bm{U}}^{\prime\prime}} 𝑼′′(𝑭k[:k]𝑪𝑭k[k:])\displaystyle\leftarrow{\bm{U}}^{\prime\prime}({\bm{F}}_{k}[:k]-{\bm{C}}{\bm{F}}_{k}[k:]) (5)
𝑼¯\displaystyle\overline{{\bm{U}}^{\prime}} 𝑼+𝑩𝑭k[k:]𝑼′′¯1\displaystyle\leftarrow{\bm{U}}^{\prime}+{\bm{B}}{\bm{F}}_{k}[k:]\overline{{\bm{U}}^{\prime\prime}}^{-1}

which is a low-dimensional matrix multiplication and a sparse matrix addition. And the update of the right singular vectors is

𝑽k¯[𝑽k𝑰]𝑮k=[𝑽k𝟎]𝑮k[:k]+[𝟎𝑰]𝑮k[k:]\overline{{\bm{V}}_{k}}\leftarrow\begin{bmatrix}{\bm{V}}_{k}&\\ &{\bm{I}}\end{bmatrix}{\bm{G}}_{k}=\begin{bmatrix}{\bm{V}}_{k}\\ \mathbf{0}\end{bmatrix}{\bm{G}}_{k}[:k]+\begin{bmatrix}\mathbf{0}\\ {\bm{I}}\end{bmatrix}{\bm{G}}_{k}[k:] (6)

where 𝑮k[:k]{\bm{G}}_{k}[:k] denotes the submatrix consisting of the first kk rows of 𝑮k{\bm{G}}_{k} and 𝑮k[k:]{\bm{G}}_{k}[k:] denotes the submatrix cosisting of rows starting from the (k+1)(k+1)-th rows of 𝑮k{\bm{G}}_{k}. Now this can be performed as

𝑽′′¯𝑽′′𝑮k[:k]Append matrix 𝑮k[k:]𝑽′′¯1 to 𝑽\begin{split}\overline{{\bm{V}}^{\prime\prime}}\leftarrow&{\bm{V}}^{\prime\prime}{\bm{G}}_{k}[:k]\\ \text{Append matrix }&{\bm{G}}_{k}[k:]\overline{{\bm{V}}^{\prime\prime}}^{-1}\text{ to }{\bm{V}}^{\prime}\end{split} (7)

Above we have only shown the scenario of adding columns, but a similar approach can be used to add rows and modify weights. Such an extended decomposition reduces the time complexity of updating the left and right singular vectors so that they can be deployed to large-scale matrix with large mm and nn. In practical application, the aforementioned extended decomposition might pose potential numerical issues when the condition number of the matrix is large, even though in most cases these matrices have relatively low condition numbers. One solution to this issue is to reset the kk-by-kk matrix to the identity matrix.

3.3 Main Result

Algorithm 3 and Algorithm 4 are the pseudocodes of the proposed algorithm for adding columns and modifying weights, respectively.

Input: 𝑼k(𝑼,𝑼′′),𝚺k,𝑽k(𝑽,𝑽′′),𝑬c{\bm{U}}_{k}({\bm{U}}^{\prime},{\bm{U}}^{\prime\prime}),\mathbf{\Sigma}_{k},{\bm{V}}_{k}({\bm{V}}^{\prime},{\bm{V}}^{\prime\prime}),{{{\bm{E}}_{c}}}
1 Turn (𝑰𝑼k𝑼k)𝑬c({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){{{\bm{E}}_{c}}} into SV-LCOV and get 𝑸(𝑩,𝑪),𝑹{\bm{Q}}({\bm{B}},{\bm{C}}),{\bm{R}} with Algorithm 2;
2 𝑭k,𝚯k,𝑮kSVDk([𝚺k𝑼k𝑬c𝑹]){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&{\bm{U}}_{k}^{\top}{{{\bm{E}}_{c}}}\\ &{\bm{R}}\\ \end{bmatrix});
3 𝑼′′𝑼′′(𝑭k[:k]𝑪𝑭k[k:]){\bm{U}}^{\prime\prime}\leftarrow{\bm{U}}^{\prime\prime}({\bm{F}}_{k}[:k]-{\bm{C}}{\bm{F}}_{k}[k:]);
4 𝑼𝑼+𝑩𝑭k[k:]𝑼′′1{\bm{U}}^{\prime}\leftarrow{\bm{U}}^{\prime}+{\bm{B}}{\bm{F}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
5 𝚺k𝚯k\mathbf{\Sigma}_{k}\leftarrow\mathbf{\Theta}_{k};
6 𝑽′′𝑽′′𝑮k[:k]{\bm{V}}^{\prime\prime}\leftarrow{\bm{V}}^{\prime\prime}{\bm{G}}_{k}[:k];
7 Append new columns 𝑮[k:]𝑽′′1{\bm{G}}[k:]{\bm{V}}^{\prime\prime-1} to 𝑽{\bm{V}}^{\prime};
Algorithm 3 Add columns
Input: 𝑼k(𝑼,𝑼′′),𝚺k,𝑽k(𝑽,𝑽′′),𝑫,𝑬m{\bm{U}}_{k}({\bm{U}}^{\prime},{\bm{U}}^{\prime\prime}),\mathbf{\Sigma}_{k},{\bm{V}}_{k}({\bm{V}}^{\prime},{\bm{V}}^{\prime\prime}),{\bm{D}},{{{\bm{E}}_{m}}}
1 Turn (𝑰𝑼k𝑼k)𝑫({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{D}} into SV-LCOV and get 𝑸𝑫(𝑩𝑫,𝑪𝑫),𝑹𝑫{\bm{Q}}_{\bm{D}}({\bm{B}}_{\bm{D}},{\bm{C}}_{\bm{D}}),{\bm{R}}_{\bm{D}} with Algorithm 2;
2 Turn (𝑰𝑽k𝑽k)𝑬m({\bm{I}}-{\bm{V}}_{k}{\bm{V}}_{k}^{\top}){{{\bm{E}}_{m}}} into SV-LCOV and get 𝑸𝑬(𝑩𝑬,𝑪𝑬),𝑹𝑬{\bm{Q}}_{\bm{E}}({\bm{B}}_{\bm{E}},{\bm{C}}_{\bm{E}}),{\bm{R}}_{\bm{E}} with Algorithm 2;
3 𝑭k,𝚺k,𝑮kSVDk([𝚺k𝟎𝟎𝟎]+[𝑼k𝑫𝑹𝑫][𝑽k𝑬m𝑹𝑬]){\bm{F}}_{k},\mathbf{\Sigma}_{k},{\bm{G}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}\\ \end{bmatrix}+\begin{bmatrix}{\bm{U}}_{k}^{\top}{\bm{D}}\\ {\bm{R}}_{\bm{D}}\end{bmatrix}\begin{bmatrix}{\bm{V}}_{k}^{\top}{{{\bm{E}}_{m}}}\\ {\bm{R}}_{\bm{E}}\end{bmatrix}^{\top}) ;
4 𝑼′′𝑼′′(𝑭k[:k]𝑪𝑫𝑭k[k:]){\bm{U}}^{\prime\prime}\leftarrow{\bm{U}}^{\prime\prime}({\bm{F}}_{k}[:k]-{\bm{C}}_{\bm{D}}{\bm{F}}_{k}[k:]);
5 𝑼𝑼+𝑩𝑫𝑭k[k:]𝑼′′1{\bm{U}}^{\prime}\leftarrow{\bm{U}}^{\prime}+{\bm{B}}_{\bm{D}}{\bm{F}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
6 𝚺k𝚯k\mathbf{\Sigma}_{k}\leftarrow\mathbf{\Theta}_{k};
7 𝑽′′𝑽′′(𝑮k[:k]𝑪𝑬𝑮k[k:]){\bm{V}}^{\prime\prime}\leftarrow{\bm{V}}^{\prime\prime}({\bm{G}}_{k}[:k]-{\bm{C}}_{\bm{E}}{\bm{G}}_{k}[k:]);
8 𝑽𝑽+𝑩𝑬𝑮k[k:]𝑼′′1{\bm{V}}^{\prime}\leftarrow{\bm{V}}^{\prime}+{\bm{B}}_{\bm{E}}{\bm{G}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
Algorithm 4 Update weights

The time complexity of the proposed algorithm in this paper is summarized in Theorem 1 and a detailed examination of the time complexity is provided in Appendix F.

Definition 2.

If a modification is applied to the matrix 𝐀{\bm{A}}, and the (approximate) truncated SVD of 𝐀{\bm{A}}, denoted as [𝐔k,𝚺k,𝐕k][{\bm{U}}_{k},\bm{\Sigma}_{k},{\bm{V}}_{k}], is updated to the rank-kk truncated SVD of the matrix resulting from applying this modification to A~\widetilde{A} (A~=𝐔k𝚺k𝐕k\widetilde{A}={\bm{U}}_{k}\bm{\Sigma}_{k}{\bm{V}}_{k}^{\top}), we call it maintaining an approximate rank-k truncated SVD of 𝐀{\bm{A}}.

Theorem 1 (Main result).

There is a data structure for maintaining an approximate rank-kk truncated SVD of 𝐀m×n{\bm{A}}\in\mathbb{R}^{m\times n} with the following operations in the following time.

  • Add rows(𝑬)\textbf{Add rows}({\bm{E}}): Update 𝑼k,𝚺k,𝑽kSVDk([𝑨k~𝑬r]{\bm{U}}_{k},\mathbf{\Sigma}_{k},{\bm{V}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\widetilde{{\bm{A}}_{k}}\\ {{{\bm{E}}_{r}}}\end{bmatrix}) in O(nnz(𝑬r)(s+k)2+(s+k)3)O(nnz({{{\bm{E}}_{r}}})(s+k)^{2}+(s+k)^{3}) time.

  • Add columns(𝑬)\textbf{Add columns}({\bm{E}}): Update 𝑼k,𝚺k,𝑽kSVDk([𝑨k~𝑬c]){\bm{U}}_{k},\mathbf{\Sigma}_{k},{\bm{V}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\widetilde{{\bm{A}}_{k}}~{}~{}{{{\bm{E}}_{c}}}\end{bmatrix}) in O(nnz(𝑬c)(s+k)2+(s+k)3)O(nnz({{{\bm{E}}_{c}}})(s+k)^{2}+(s+k)^{3}) time.

  • Update weights(𝑫,𝑬)\textbf{Update weights}({\bm{D}},{\bm{E}}): Update 𝑼k,𝚺k,𝑽kSVDk(𝑨~+𝑫𝑬m){\bm{U}}_{k},\mathbf{\Sigma}_{k},{\bm{V}}_{k}\leftarrow\text{SVD}_{k}(\widetilde{{\bm{A}}}+{\bm{D}}{{{\bm{E}}_{m}}}^{\top}) in O(nnz(𝑫+𝑬m)(s+k)2+(s+k)3)O(nnz({\bm{D}}+{{{\bm{E}}_{m}}})(s+k)^{2}+(s+k)^{3}) time.

  • Query(i)\textbf{Query}(i): Return 𝑼k[i]{\bm{U}}_{k}[i] (or 𝑽k[i]{\bm{V}}_{k}[i]) and 𝚺k\mathbf{\Sigma}_{k} in O(k2)O(k^{2}) time.

where 𝐀k~=𝐔k𝚺k𝐕k\widetilde{{\bm{A}}_{k}}={\bm{U}}_{k}\mathbf{\Sigma}_{k}{\bm{V}}_{k} and ss is the rank of the update matrix.

The proposed method can theoretically produce the same output as Zha & Simon (1999) method with a much lower time complexity.

The proposed variants with the approximate augmented space. To address updates with coarser granularity (i.e., larger ss), we propose two variants of the proposed algorithm based on approximate augmented spaces with GKL and RPI (see section 3.1) in SV-LCOV, denoted with the suffixes -GKL and -RPI, respectively. The proposed variants procude theoretically the same output as Vecharynski & Saad (2014) and Yamazaki et al. (2015), repectively. We elaborate the proposed variants in Appendix D.3.

3.4 Time complexity comparing to previous methods

Table 1: Time complexity comparing to previous methods
Algorithm Asymptotic complexity
Kalantzis et al. (2021) (m+n)k2+nnz(𝑨)k+(k+s)k2(m+n)k^{2}+nnz({\bm{A}})k+(k+s)k^{2}
\cdashline1-2 Zha & Simon (1999) (m+n)k2+nks+ns2+(k+s)3(m+n)k^{2}+nks+ns^{2}+(k+s)^{3}
Vecharynski & Saad (2014) (m+n)k2+nkl+nnz(𝑬)(k+l)+(k+s)(k+l)2(m+n)k^{2}+nkl+nnz({\bm{E}})(k+l)+(k+s)(k+l)^{2}
Yamazaki et al. (2015) (m+n)k2+t(nkl+nl2+nnz(𝑬)l)+(k+s)(k+l)2(m+n)k^{2}+t(nkl+nl^{2}+nnz({\bm{E}})l)+(k+s)(k+l)^{2}
\cdashline1-2 ours nnz(𝑬)(k+s)2+(k+s)3nnz({\bm{E}})(k+s)^{2}+(k+s)^{3}
ours-GKL nnz(𝑬)(k2+sl+kl)+(k+s)(k+l)2nnz({\bm{E}})(k^{2}+sl+kl)+(k+s)(k+l)^{2}
ours-RPI nnz(𝑬)(sl+l2)t+nnz(𝑬)k2+(k+s)(k+l)2nnz({\bm{E}})(sl+l^{2})t+nnz({\bm{E}})k^{2}+(k+s)(k+l)^{2}

Table. 1 presents the comparison of the time complexity of our proposed algorithm with the previous algorithms when updating rows 𝑬rs×n{{{\bm{E}}_{r}}}\in\mathbb{R}^{s\times n}. To simplify the results, we have assumed s<ns<n and omitted the big-OO notation. ll denotes the rank of approximation in GKL and RPI. tt denotes the number of iteration RPI performed.

Our method achieves a time complexity of O(nnz(𝑬))O(nnz({\bm{E}})) for updating, without any O(n)O(n) or O(m)O(m) terms when ss and kk are constants (i.e., the proposed algorithm is at the update sparsity time complexity). This is because SV-LCOV is used to obtain the orthogonal basis, eliminating the O(n)O(n) or O(m)O(m) terms in processing the augmented matrix. Additionally, our extended decomposition avoids the O(n)O(n) or O(m)O(m) terms when restoring the SV-LCOV and eliminates the projection in all rows of singular vectors. Despite the increase in time complexity for querying from O(k)O(k) to O(k2)O(k^{2}), this trade-off remains acceptable considering the optimizations mentioned above.

For updates with one coarse granularity (i.e. larger ss), the proposed method of approximating the augmented space with GKL or RPI in the SV-LCOV space eliminates the squared term of ss in the time complexity, making the proposed algorithm also applicable to coarse granularity update.

4 Numerical Experiment

In this section, we conduct experimental evaluations of the update process for the truncated SVD on sparse matrices. Subsequently, we assess the performance of the proposed method by applying it to two downstream tasks: (1) link prediction, where we utilize node representations learned from an evolving adjacency matrix, and (2) collaborative filtering, where we utilize user/item representations learned from an evolving user-item matrix.

4.1 Experimental Description

Baselines. We evaluate the proposed algorithm and its variants against existing methods, including Zha & Simon (1999), Vecharynski & Saad (2014) and Yamazaki et al. (2015). Throughout the experiments, we set ll, the spatial dimension of the approximation, to 1010 based on previous settings (Vecharynski & Saad, 2014). The required number of iterations for the RPI, denoted by tt, is set to 33. In the methods of Vecharynski & Saad (2014) and Yamazaki et al. (2015), there may be differences in running time between 1) directly constructing the augmented matrix, and 2) accessing the matrix-vector multiplication as needed without directly constructing the augmented matrix. We conducted tests under both implementations and considered the minimum value as the running time.

Tasks and Settings. For the adjacency matrix, we initialize the SVD with the first 50% of the rows and columns, and for the user-item matrix, we initialize the SVD with the first 50% of the columns.

The experiment involves ϕ\phi batch updates, adding n/ϕn/\phi rows and columns each time for a 2n2n-sized adjacency matrix. For a user-item matrix with 2n2n columns, n/ϕn/\phi columns are added per update.

  • Link Prediction aims at predicting whether there is a link between a given node pair. Specifically, each node’s representation is obtained by a truncated SVD of the adjacency matrix. During the infer stage, we first query the representation obtained by the truncated SVD of the node pair (i,j)(i,j) to predict. Then a score, the inner product between the representation of the node pair

    𝑼[i]Σ𝑽[j]{\bm{U}}[i]^{\top}\Sigma{\bm{V}}[j]

    is used to make predictions. For an undirected graph, we take the maximum value in both directions. We sort the scores in the test set and label the edges between node pairs with high scores as positive ones.

    Following prior research, we create the training set 𝒢\mathcal{G^{\prime}} by randomly removing 30% of the edges from the original graph 𝒢\mathcal{G}. The node pairs connected by the eliminated edges are then chosen, together with an equal number of unconnected node pairs from 𝒢\mathcal{G}, to create the testing set test\mathcal{E}_{test}.

  • Collaborative Filtering in recommender systems is a technique using a small sample of user preferences to predict likes and dislikes for a wide range of products. In this paper, we focus on predicting the values of in the normalized user-item matrix.

    In this task, a truncated SVD is used to learn the representation for each user and item. And the value is predicted by the inner product between the representation of ii-th user and jj-th item with

    𝑼[i]Σ𝑽[j]{\bm{U}}[i]^{\top}\Sigma{\bm{V}}[j]

    The matrix is normalized by subtracting the average value of each item. Values in the matrix are initially divided into the training and testing set with a ratio of 8:28:2.

Datasets. The link prediction experiments are conducted on three publicly available graph datasets, namely Slashdot (Leskovec et al., 2009) with 82,16882,168 nodes and 870,161870,161 edges, Flickr (Tang & Liu, 2009) with 80,51380,513 nodes and 11,799,76411,799,764 edges, and Epinions (Richardson et al., 2003) with 75,87975,879 nodes and 1,017,6741,017,674 edges. The social network consists of nodes representing users, and edges indicating social relationships between them. In our setup, all graphs are undirected.

For the collaborative filtering task, we use data from MovieLens (Harper & Konstan, 2015). The MovieLens25M dataset contains more than 2,500,0002,500,000 ratings across 62,42362,423 movies. According to the dataset’s selection mechanism, all selected users rated at least 2020 movies, ensuring the dataset’s validity and a moderate level of density. All ratings in the dataset are integers ranging from 11 to 55.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 1: Computational efficiency of adjacency matrix w.r.t. for kk values of 16,32,64,128,25616,32,64,128,256
Refer to caption
Refer to caption
Refer to caption
Figure 2: Computational efficiency of adjacency matrix w.r.t. for ϕ\phi values of 101,102,103,10410^{1},10^{2},10^{3},10^{4}

4.2 Efficiency Study

To study the efficiency of the proposed algorithm, we evaluate the proposed method and our optimized GKL and RPI methods in the context of link prediction and collaborative filtering tasks.

Experiments are conducted on the undirected graphs of Slashdot (Leskovec et al., 2009), Flickr (Tang & Liu, 2009), and Epinions (Richardson et al., 2003) to investigate link prediction. The obtained results are presented in Table 2, Fig. 1 and Fig. 2. Our examination metrics for the Efficiency section include runtime and Average Precision (AP), which is the percentage of correctly predicted edges in the predicted categories to the total number of predicted edges. Besides, we report the Frobenius norm between the 𝑼k𝚺k𝑽k{\bm{U}}_{k}\mathbf{\Sigma}_{k}{\bm{V}}_{k}^{\top} and the train matrix. The results demonstrate that across multiple datasets, the proposed method and its variants have demonstrated significant increases in efficiency without compromising AP, reducing time consumption by more than 85%85\%.

Table 3 demonstrates the results of four experiments conducted for the collaborative filtering task: batch update(ϕ=2000\phi=2000) and streaming update(ϕ=#entries\phi=\#entries) with k=16k=16 and k=64k=64. Our evaluation metrics include runtime and mean squared error (MSE). The results show that our method significantly reduces runtime while maintaining accuracy. Existing methods struggle with updating large and sparse datasets, especially for streaming updates, making real-time updates challenging. The methodology employed in our study effectively decreases the runtime by a factor of 1010 or more.

Table 2: Experimental results on adjacency matrix
Slashdot Flickr Epinions
Method Norm AP Norm AP Norm AP
Zha & Simon (1999) 792.11 93.40% 2079.23 95.16% 1370.26 95.62%
Vecharynski & Saad (2014) 792.01 93.56% 2079.63 95.11% 1370.64 95.70%
Yamazaki et al. (2015) 792.11 93.52% 2079.28 95.14% 1370.29 95.61%
ours 792.11 93.41% 2079.23 95.16% 1370.26 95.62%
ours-GKL 792.01 93.56% 2079.63 95.11% 1370.64 95.70%
ours-RPI 792.11 93.50% 2079.28 95.14% 1370.29 95.61%
Table 3: Experimental results of user-item matrix
Batch Update Streaming Update
Method Runtime MSE Runtime MSE
kk=16 Zha & Simon (1999) 192s 0.8616 626s 0.8616
Vecharynski & Saad (2014) 323s 0.8646 2529s 0.8647
Yamazaki et al. (2015) 278s 0.8618 352s 0.8619
\cdashline2-9 ours 23s 0.8616 35s 0.8616
ours-GKL 18s 0.8646 48s 0.8647
ours-RPI 45s 0.8618 43s 0.8619
kk=64 Zha & Simon (1999) 343s 0.8526 2410s 0.8527
Vecharynski & Saad (2014) 124s 0.8572 3786s 0.8568
Yamazaki et al. (2015) 313s 0.8527 758s 0.8528
\cdashline2-9 ours 49s 0.8526 135s 0.8527
ours-GKL 45s 0.8572 147s 0.8568
ours-RPI 98s 0.8527 141s 0.8528

4.3 Varying kk and ϕ\phi

We conduct link prediction experiments on three datasets for kk and ϕ\phi, aiming to explore the selection of variants and approaches in various scenarios. The results in Fig. 1 show that our optimized methods are all significantly faster than the original ones for different choices of kk. All methods become somewhat slower as kk increases, consistent with the asymptotic complexity metrics in Table 1.

We experimentally evaluate the performance of each method for different batch sizes, ϕ\phi. As shown in Fig. 2, our methods (ours-GKL and ours-RPI) outperform others when a large number of entries are updated simultaneously. For ϕ=104\phi=10^{4}, the three methods exhibit similar runtime. These experiments provide guidance for selecting the most suitable model based on specific context. For tasks with varying requirements for single updates, it is recommended to choose the most appropriate method.

5 Conclusion

In conclusion, we introduce a novel algorithm along with two variants for updating truncated SVDs with sparse matrices. Numerical experiments show a substantial speed boost of our method compared to previous approaches, while maintaining the comparable accuracy.

References

  • Abu-El-Haija et al. (2021) Sami Abu-El-Haija, Hesham Mostafa, Marcel Nassar, Valentino Crespi, Greg Ver Steeg, and Aram Galstyan. Implicit svd for graph representation learning. Advances in Neural Information Processing Systems, 34:8419–8431, 2021.
  • Brand (2006) Matthew Brand. Fast low-rank modifications of the thin singular value decomposition. Linear algebra and its applications, 415(1):20–30, 2006.
  • Cai et al. (2022) Xuheng Cai, Chao Huang, Lianghao Xia, and Xubin Ren. Lightgcl: Simple yet effective graph contrastive learning for recommendation. In The Eleventh International Conference on Learning Representations, 2022.
  • Cremonesi et al. (2010) Paolo Cremonesi, Yehuda Koren, and Roberto Turrin. Performance of recommender algorithms on top-n recommendation tasks. In Proceedings of the fourth ACM conference on Recommender systems, pp.  39–46, 2010.
  • Deerwester et al. (1990) Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American society for information science, 41(6):391–407, 1990.
  • Deng et al. (2023) Haoran Deng, Yang Yang, Jiahe Li, Haoyang Cai, Shiliang Pu, and Weihao Jiang. Accelerating dynamic network embedding with billions of parameter updates to milliseconds. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp.  414–425, 2023.
  • Du et al. (2015) Nan Du, Yichen Wang, Niao He, Jimeng Sun, and Le Song. Time-sensitive recommendation from recurrent user activities. Advances in neural information processing systems, 28, 2015.
  • Golub & Kahan (1965) Gene Golub and William Kahan. Calculating the singular values and pseudo-inverse of a matrix. Journal of the Society for Industrial and Applied Mathematics, Series B: Numerical Analysis, 2(2):205–224, 1965.
  • Halko et al. (2011) Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011.
  • Harper & Konstan (2015) F. Maxwell Harper and Joseph A. Konstan. The movielens datasets: History and context. ACM Transactions on Interactive Intelligent Systems (TiiS), 5(4):19:1–19:19, 2015. doi: 10.1145/2827872.
  • Kalantzis et al. (2021) Vasileios Kalantzis, Georgios Kollias, Shashanka Ubaru, Athanasios N Nikolakopoulos, Lior Horesh, and Kenneth Clarkson. Projection techniques to update the truncated svd of evolving matrices with applications. In International Conference on Machine Learning, pp.  5236–5246. PMLR, 2021.
  • Koren et al. (2009) Yehuda Koren, Robert Bell, and Chris Volinsky. Matrix factorization techniques for recommender systems. Computer, 42(8):30–37, 2009.
  • Leskovec et al. (2009) J. Leskovec, K. Lang, A. Dasgupta, and M. Mahoney. Community structure in large networks: Natural cluster sizes and the absence of large well-defined clusters. Internet Mathematics, 6(1):29–123, 2009.
  • Levy & Goldberg (2014) Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. Advances in neural information processing systems, 27, 2014.
  • Musco & Musco (2015) Cameron Musco and Christopher Musco. Randomized block krylov methods for stronger and faster approximate singular value decomposition. Advances in neural information processing systems, 28, 2015.
  • Nikolakopoulos et al. (2019) Athanasios N Nikolakopoulos, Vassilis Kalantzis, Efstratios Gallopoulos, and John D Garofalakis. Eigenrec: generalizing puresvd for effective and efficient top-n recommendations. Knowledge and Information Systems, 58:59–81, 2019.
  • Ramasamy & Madhow (2015) Dinesh Ramasamy and Upamanyu Madhow. Compressive spectral embedding: sidestepping the svd. Advances in neural information processing systems, 28, 2015.
  • Richardson et al. (2003) M. Richardson, R. Agrawal, and P. Domingos. Trust management for the semantic web. In ISWC, 2003.
  • Sarwar et al. (2002) Badrul Sarwar, George Karypis, Joseph Konstan, and John Riedl. Incremental singular value decomposition algorithms for highly scalable recommender systems. In Fifth international conference on computer and information science, volume 1, pp.  27–8. Citeseer, 2002.
  • Tang & Liu (2009) Lei Tang and Huan Liu. Relational learning via latent social dimensions. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pp.  817–826, 2009.
  • Turk & Pentland (1991) Matthew Turk and Alex Pentland. Eigenfaces for recognition. Journal of cognitive neuroscience, 3(1):71–86, 1991.
  • Ubaru & Saad (2019) Shashanka Ubaru and Yousef Saad. Sampling and multilevel coarsening algorithms for fast matrix approximations. Numerical Linear Algebra with Applications, 26(3):e2234, 2019.
  • Ubaru et al. (2015) Shashanka Ubaru, Arya Mazumdar, and Yousef Saad. Low rank approximation using error correcting coding matrices. In International Conference on Machine Learning, pp.  702–710. PMLR, 2015.
  • Vecharynski & Saad (2014) Eugene Vecharynski and Yousef Saad. Fast updating algorithms for latent semantic indexing. SIAM Journal on Matrix Analysis and Applications, 35(3):1105–1131, 2014.
  • Yamazaki et al. (2015) Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, and Jack Dongarra. Randomized algorithms to update partial singular value decomposition on a hybrid cpu/gpu cluster. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, pp.  1–12, 2015.
  • Zha & Simon (1999) Hongyuan Zha and Horst D Simon. On updating problems in latent semantic indexing. SIAM Journal on Scientific Computing, 21(2):782–791, 1999.
  • Zhang et al. (2018) Ziwei Zhang, Peng Cui, Jian Pei, Xiao Wang, and Wenwu Zhu. Timers: Error-bounded svd restart on dynamic networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
  • Zhu et al. (2018) Dingyuan Zhu, Peng Cui, Ziwei Zhang, Jian Pei, and Wenwu Zhu. High-order proximity preserved embedding for dynamic networks. IEEE Transactions on Knowledge and Data Engineering, 30(11):2134–2144, 2018.

Appendix A Reproducibility

We make public our experimental code, which includes python implementations of the proposed and baseline methods, as well as all the datasets used and their preprocessing. The code is available at https://anonymous.4open.science/r/ISVDforICLR2024-7517.

Appendix B Notations

Frequently used notations through out the paper in are summarized in Table 4.

Table 4: Frequently used notations
Notation Description
𝑨{\bm{A}} The data matrix
𝑬{\bm{E}} The update matrix (new columns / rows)
𝑫,𝑬{\bm{D}},{\bm{E}} The update matrix (low rank update of weight)
𝑰{\bm{I}} The identity matrix
𝑼{\bm{U}} The left singular vectors
𝚺\bm{\Sigma} The singular values
𝑽{\bm{V}} The right singular vectors
(𝑰𝑼k𝑼k)𝑩({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}){\bm{B}} The (left) augmented matrix
(𝑰𝑽k𝑽k)𝑩({\bm{I}}-{\bm{V}}_{k}{\bm{V}}_{k}){\bm{B}} The (right) augmented matrix
m,nm,n The number of rows and columns of data matrix
kk The rank of truncated SVD
ss The rank of update matrix
ll The rank of approximate augmented space
tt The number of Random Power Iteration performed
𝑿k{\bm{X}}_{k} A matrix with rank kk
𝑿{\bm{X}}^{\top} The transpose of matrix 𝑿{\bm{X}}
𝑿k~\widetilde{{\bm{X}}_{k}} A rank-kk approximation of 𝑿{\bm{X}}
𝑿¯\overline{{{\bm{X}}}} The updated matrix of 𝑿{\bm{X}}
𝒙\|{\bm{x}}\| l2l_{2}-norm of 𝒙{\bm{x}}
𝒙1,𝒙2\langle{\bm{x}}_{1},{\bm{x}}_{2}\rangle Dot product bewteen 𝒙1,𝒙2{\bm{x}}_{1},{\bm{x}}_{2}
SVDk(𝑿)\text{SVD}_{k}({\bm{X}}) A rank-kk truncated SVD of 𝑿{\bm{X}}

Appendix C Omitted Proofs

Proof of Lemma 2

Proof.

We prove each of the three operations as follows.

  • Scalar multiplication. It takes O(nnz(b))O(nnz(b)) time to get α𝒃\alpha{\bm{b}} and O(k)O(k) time to get α𝒄\alpha{\bm{c}}, respectively. Therefore the overall time complexity for scalar multiplication is O(nnz(𝒃)+k)O(nnz({\bm{b}})+k).

  • Addition. It takes O(nnz(𝒃1)+nnz(𝒃2))=O(nnz(𝒃1+𝒃2))O(nnz({\bm{b}}_{1})+nnz({\bm{b}}_{2}))=O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})) time to get 𝒃1+𝒃2{\bm{b}}_{1}+{\bm{b}}_{2} and O(k)O(k) time to get 𝒄1+𝒄2{\bm{c}}_{1}+{\bm{c}}_{2}, respectively. Therefore the overall time complexity for addition is O(nnz(𝒃1+𝒃2)+k)O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})+k).

  • Inner product. It takes O(nnz(𝒃1)+nnz(𝒃2))=O(nnz(𝒃1+𝒃2))O(nnz({\bm{b}}_{1})+nnz({\bm{b}}_{2}))=O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})) time to get 𝒃1,𝒃2\langle{\bm{b}}_{1},{\bm{b}}_{2}\rangle and O(k)O(k) time to get 𝒄1,𝒄2\langle{\bm{c}}_{1},{\bm{c}}_{2}\rangle, respectively. Therefore the overall time complexity for inner product is O(nnz(𝒃1+𝒃2)+k)O(nnz({\bm{b}}_{1}+{\bm{b}}_{2})+k).

Proof of Lemma 3

Proof.

Each of the three operations of SV-LCOV can be corresponded to the original space as follows.

  • Scalar multiplication.

    α(𝒃,𝒄)𝑼k=(α𝒃,α𝒄)𝑼k=(α𝒃)𝑼k(𝑼kα𝒃)=α(𝑰𝑼k𝑼k)𝒃\alpha({\bm{b}},{\bm{c}})_{{\bm{U}}_{k}}=(\alpha{\bm{b}},\alpha{\bm{c}})_{{\bm{U}}_{k}}=(\alpha{\bm{b}})-{\bm{U}}_{k}({\bm{U}}_{k}^{\top}\alpha{\bm{b}})=\alpha({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}} (8)
  • Addition.

    (𝒃1,𝒄1)𝑼k+(𝒃2,𝒄2)𝑼k\displaystyle({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}}+({\bm{b}}_{2},{\bm{c}}_{2})_{{\bm{U}}_{k}} =(𝒃1+𝒃2,𝒄1+𝒄2)𝑼k\displaystyle=({\bm{b}}_{1}+{\bm{b}}_{2},{\bm{c}}_{1}+{\bm{c}}_{2})_{{\bm{U}}_{k}} (9)
    =(𝒃1+𝒃2)𝑼k𝑼k(𝒄1+𝒄2)\displaystyle=({\bm{b}}_{1}+{\bm{b}}_{2})-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}({\bm{c}}_{1}+{\bm{c}}_{2})
    =𝒃1𝑼k𝑼k𝒄1+𝒃2𝑼k𝑼k𝒄2\displaystyle={\bm{b}}_{1}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{c}}_{1}+{\bm{b}}_{2}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{c}}_{2}
    =(𝑰𝑼k𝑼k)𝒃1+(𝑰𝑼k𝑼k)𝒃2\displaystyle=({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{1}+({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{2}
  • Inner product.

    (𝒃1,𝒄1)𝑼k,(𝒃2,𝒄2)𝑼k\displaystyle\langle({\bm{b}}_{1},{\bm{c}}_{1})_{{\bm{U}}_{k}},({\bm{b}}_{2},{\bm{c}}_{2})_{{\bm{U}}_{k}}\rangle =𝒃1,𝒃2𝒄1,𝒄2\displaystyle=\langle{\bm{b}}_{1},{\bm{b}}_{2}\rangle-\langle{\bm{c}}_{1},{\bm{c}}_{2}\rangle (10)
    =𝒃1𝒃2𝒄1𝒄2\displaystyle={\bm{b}}_{1}^{\top}{\bm{b}}_{2}-{\bm{c}}_{1}^{\top}{\bm{c}}_{2}
    =𝒃1𝒃2𝒃1𝑼k𝑼k𝒃2\displaystyle={\bm{b}}_{1}^{\top}{\bm{b}}_{2}-{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2}
    =𝒃1𝒃22𝒃1𝑼k𝑼k𝒃2+𝒃1𝑼k𝑼k𝒃2\displaystyle={\bm{b}}_{1}^{\top}{\bm{b}}_{2}-2{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2}+{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2}
    =𝒃1𝒃22𝒃1𝑼k𝑼k𝒃2+𝒃1𝑼k𝑼k𝑼k𝑼k𝒃2\displaystyle={\bm{b}}_{1}^{\top}{\bm{b}}_{2}-2{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2}+{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2}
    =(𝒃1𝒃1𝑼k𝑼k)(𝒃2𝑼k𝑼k𝒃2)\displaystyle=({\bm{b}}_{1}^{\top}-{\bm{b}}_{1}^{\top}{\bm{U}}_{k}{\bm{U}}_{k}^{\top})({\bm{b}}_{2}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}{\bm{b}}_{2})
    =((𝑰𝑼k𝑼k)𝒃1)((𝑰𝑼k𝑼k)𝒃2)\displaystyle=(({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{1})^{\top}(({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{2})
    =(𝑰𝑼k𝑼k)𝒃1,(𝑰𝑼k𝑼k)𝒃2\displaystyle=\langle({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{1},({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{b}}_{2}\rangle

Proof of Lemma 4

Proof.

An orthogonal basis can be obtained by Algorithm 2, and we next analyze the time complexity of Algorithm 2.

Because the number of non-zero entries of any linear combination of a set of sparse vectors {𝒃1,𝒃2,,𝒃k}\{{\bm{b}}_{1},{\bm{b}}_{2},...,{\bm{b}}_{k}\} with size kk is at most i=1knnz(𝒃i)\sum_{i=1}^{k}nnz({\bm{b}}_{i}), the number of non-zero entries of the sparse vector (𝒃)({\bm{b}}) in each SV-LCOV during the process of Algorithm 2 are at most nnz(i=1k𝒃i)nnz(\sum_{i=1}^{k}{\bm{b}}_{i}).

There are a total of O(s2)O(s^{2}) projections and subtractions of SV-LCOV in Algorithm 2, and by Lemma 2, the overall time complexity is O((nnz(i=1k𝒃i)+k)s2)O((nnz(\sum_{i=1}^{k}{\bm{b}}_{i})+k)s^{2}).

Proof of Theorem 1

Proof.

The output of proposed method is theoretically equivalent to the output of Zha & Simon (1999), and the detailed time complexity analysis is given in Appendix F. ∎

Appendix D Approximating the Augmented Space

D.1 Approximating the Augmented Space via Golub-Kahan-Lanczos Process

Input: 𝑬m×s,𝑼km×k,l+{\bm{E}}\in\mathbb{R}^{m\times s},{\bm{U}}_{k}\in\mathbb{R}^{m\times k},l\in\mathbb{N}^{+}
Output: 𝑸n×l,𝑷s×l{\bm{Q}}\in\mathbb{R}^{n\times l},{\bm{P}}\in\mathbb{R}^{s\times l}
1 𝒁(𝑰𝑼k𝑼k)𝐄{\bm{Z}}\leftarrow({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top})\mathbf{E};
2 Choose 𝒑1s{\bm{p}}_{1}\in\mathbb{R}^{s}, 𝒑1=1\|{\bm{p}}_{1}\|=1. Set β0=0\beta_{0}=0;
3 for i=1,,li=1,...,l do
4       𝒒i𝒁𝒑iβi1𝒒i1{\bm{q}}_{i}\leftarrow{\bm{Z}}{\bm{p}}_{i}-\beta_{i-1}{\bm{q}}_{i-1};
5       αi𝒒i\alpha_{i}\leftarrow\|{\bm{q}}_{i}\|;
6       𝒒i𝒒i/αi{\bm{q}}_{i}\leftarrow{\bm{q}}_{i}/\alpha_{i};
7       𝒑i+1𝒁𝒒iαi𝒑i{\bm{p}}_{i+1}\leftarrow{\bm{Z}}^{\top}{\bm{q}}_{i}-\alpha_{i}{\bm{p}}_{i};
8       Orthogonalze 𝒑i+1{\bm{p}}_{i+1} against [𝒑1,,𝒑i][{\bm{p}}_{1},...,{\bm{p}}_{i}];
9       βi𝒑i+1\beta_{i}\leftarrow\|{\bm{p}}_{i+1}\|;
10       𝒑i+1=𝒑i+1/βi{\bm{p}}_{i+1}={\bm{p}}_{i+1}/\beta_{i};
11      
12 end for
13𝑷l+1=[𝒑1,,𝒑l+1]{\bm{P}}_{l+1}=[{\bm{p}}_{1},...,{\bm{p}}_{l+1}];
14 𝑯=diag{α1,,αl}+superdiag{β1,,βl}{\bm{H}}=\text{diag}\{\alpha_{1},...,\alpha_{l}\}+\text{superdiag}\{\beta_{1},...,\beta_{l}\};
15 𝑷𝑷l+1𝑯{\bm{P}}\leftarrow{\bm{P}}_{l+1}{\bm{H}}^{\top};
return 𝐐=[𝐪1,,𝐪l],𝐏{\bm{Q}}=[{\bm{q}}_{1},...,{\bm{q}}_{l}],{\bm{P}}
Algorithm 5 GKL
Input: 𝑬m×s,𝑼km×k,l+{\bm{E}}\in\mathbb{R}^{m\times s},{\bm{U}}_{k}\in\mathbb{R}^{m\times k},l\in\mathbb{N}^{+}
Output: 𝑩n×l,𝑪s×l,𝑷s×l{\bm{B}}\in\mathbb{R}^{n\times l},{\bm{C}}\in\mathbb{R}^{s\times l},{\bm{P}}\in\mathbb{R}^{s\times l}
1 𝑩𝑬,𝑪𝑼k𝑬{\bm{B}}\leftarrow{\bm{E}},\quad{\bm{C}}\leftarrow{\bm{U}}_{k}^{\top}{\bm{E}};
2 Choose 𝒑1s{\bm{p}}_{1}\in\mathbb{R}^{s}, 𝒑1=1\|{\bm{p}}_{1}\|=1. Set β0=0\beta_{0}=0;
3 for i=1,,li=1,...,l do
4       𝒃i(t𝒑i[t]𝒃t)βi1𝒃i1{\bm{b}}_{i}^{\prime}\leftarrow(\sum_{t}{\bm{p}}_{i}[t]\cdot{\bm{b}}_{t})-\beta_{i-1}{\bm{b}}^{\prime}_{i-1};
5       𝒄i(t𝒑i[t]𝒄t)βi1𝒄i1{\bm{c}}_{i}^{\prime}\leftarrow(\sum_{t}{\bm{p}}_{i}[t]\cdot{\bm{c}}_{t})-\beta_{i-1}{\bm{c}}^{\prime}_{i-1};
6       αibi,bi𝒄i𝒄i\alpha_{i}\leftarrow\sqrt{\langle b_{i}^{\prime},b_{i}^{\prime}\rangle-\langle{\bm{c}}_{i}^{\prime}{\bm{c}}_{i}^{\prime}\rangle};
7       𝒃i𝒃i/α{\bm{b}}_{i}^{\prime}\leftarrow{\bm{b}}_{i}^{\prime}/\alpha;
8       𝒄i𝒄i/α{\bm{c}}_{i}^{\prime}\leftarrow{\bm{c}}_{i}^{\prime}/\alpha;
9       𝒑i+1𝑩𝒃i𝑪𝒄iαi𝒑i{\bm{p}}_{i+1}\leftarrow{\bm{B}}^{\top}{\bm{b}}^{\prime}_{i}-{\bm{C}}^{\top}{\bm{c}}^{\prime}_{i}-\alpha_{i}{\bm{p}}_{i};
10       Orthogonalze 𝒑i+1{\bm{p}}_{i+1} against [𝒑1,,𝒑i][{\bm{p}}_{1},...,{\bm{p}}_{i}];
11       βi𝒑i+1\beta_{i}\leftarrow\|{\bm{p}}_{i+1}\|;
12       𝒑i+1=𝒑i+1/βi{\bm{p}}_{i+1}={\bm{p}}_{i+1}/\beta_{i};
13      
14 end for
15
16𝑷l+1=[𝒑1,,𝒑l+1]{\bm{P}}_{l+1}=[{\bm{p}}_{1},...,{\bm{p}}_{l+1}];
17 𝑯=diag{α1,,αl}+superdiag{β1,,βl}{\bm{H}}=\text{diag}\{\alpha_{1},...,\alpha_{l}\}+\text{superdiag}\{\beta_{1},...,\beta_{l}\};
18 𝑷𝑷l+1𝑯{\bm{P}}\leftarrow{\bm{P}}_{l+1}{\bm{H}}^{\top};
return 𝐐=(𝐁,𝐂),𝐏{\bm{Q}}=({\bm{B}}^{\prime},{\bm{C}}^{\prime}),{\bm{P}}
Algorithm 6 GKL with SV-LCOV

A step-by-step description. Specifically, the 𝒁𝒑i{\bm{Z}}{\bm{p}}_{i} in Line 4 of Algorithm 7 can be viewed as a linear combination of SV-LCOV with Line 4 and Line 5 in Algorithm 6. The l2l_{2} norm of 𝒒i{\bm{q}}_{i} in Line 5 of Algorithm 7 is the length of a SV-LCOV and can be transformed into inner product in Line 6 of Algorithm 6. Line 6 of Algorithm 7 is a scalar multiplication corresponding to Line 7 and Line 8 of Algorithm 6. And the 𝒁𝒒i{\bm{Z}}^{\top}{\bm{q}}_{i} in Line 7 of Algorithm 7 can be recongnized as inner product between SV-LCOV demonstarted in Line 9 of Algorithm 6.

Complexity analysis of Algorithm 6. Line 4, 5 run in O((nnz(𝑬)+k)sl)O((nnz({\bm{E}})+k)sl) time. Line 6 run in O(nnz(𝑬+k)l)O(nnz({\bm{E}}+k)l) time. Line 7, 8 run in O((nnz(𝑬)+k)l)O((nnz({\bm{E}})+k)l) time. Line 9 run in O(nnz(𝑬+k)sl)O(nnz({\bm{E}}+k)sl) time. Line 10 run in O(sl2)O(sl^{2}) time. Line 11, 12 run in O(sl)O(sl) time. Line 14, 15, 16 run in O(sl2)O(sl^{2}) time.

The overall time complexity of Algorithm 6 is O(nnz(𝑬+k)sl)O(nnz({\bm{E}}+k)sl) time.

D.2 Approximating the Augmented Space via Random Power Iteration Process

Input: 𝑬m×s,𝑼km×k,l,t+{\bm{E}}\in\mathbb{R}^{m\times s},{\bm{U}}_{k}\in\mathbb{R}^{m\times k},l,t\in\mathbb{N}^{+}
Output: 𝑸n×l,𝑷s×l{\bm{Q}}\in\mathbb{R}^{n\times l},{\bm{P}}\in\mathbb{R}^{s\times l}
1 𝒁(𝑰𝑼k𝑼k)𝐄{\bm{Z}}\leftarrow({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top})\mathbf{E};
2 Choose 𝑷s×l{\bm{P}}\in\mathbb{R}^{s\times l} with random unitary columns;
3 for i=1,,ti=1,...,t do
4       𝑷,𝑹QR(𝑷){\bm{P}},{\bm{R}}\leftarrow QR({\bm{P}});
5       𝑸𝒁𝑷{\bm{Q}}\leftarrow{\bm{Z}}{\bm{P}};
6       𝑸,𝑹QR(𝑸){\bm{Q}},{\bm{R}}\leftarrow QR({\bm{Q}});
7       𝑷𝒁𝑸{\bm{P}}\leftarrow{\bm{Z}}^{\top}{\bm{Q}};
8      
9 end for
return 𝐐,𝐏{\bm{Q}},{\bm{P}}
Algorithm 7 RPI
Input: 𝑬m×s,𝑼km×k,l,t+{\bm{E}}\in\mathbb{R}^{m\times s},{\bm{U}}_{k}\in\mathbb{R}^{m\times k},l,t\in\mathbb{N}^{+}
Output: 𝑸n×l,𝑷s×l{\bm{Q}}\in\mathbb{R}^{n\times l},{\bm{P}}\in\mathbb{R}^{s\times l}
1 𝑩𝑬,𝑪𝑼k𝑬{\bm{B}}\leftarrow{\bm{E}},\quad{\bm{C}}\leftarrow{\bm{U}}_{k}^{\top}{\bm{E}};
2 Choose 𝑷s×l{\bm{P}}\in\mathbb{R}^{s\times l} with random unitary columns;
3 for i=1,,ti=1,...,t do
4       𝑩,𝑪𝑩𝑷,𝑪𝑷{\bm{B}}^{\prime},{\bm{C}}^{\prime}\leftarrow{\bm{B}}{\bm{P}},{\bm{C}}{\bm{P}};
5       𝑩,𝑪,𝑹QR with Algorithm 2{\bm{B}}^{\prime},{\bm{C}}^{\prime},{\bm{R}}\leftarrow QR\text{ with Algorithm \ref{algo2}};
6       𝑷,𝑹QR(𝑷){\bm{P}},{\bm{R}}\leftarrow QR({\bm{P}});
7       𝑷𝑩𝑩𝑪𝑪{\bm{P}}\leftarrow{\bm{B}}^{\top}{\bm{B}}^{\prime}-{\bm{C}}^{\top}{\bm{C}}^{\prime};
8      
9 end for
return 𝐐=(𝐁,𝐂),𝐏{\bm{Q}}=({\bm{B}}^{\prime},{\bm{C}}^{\prime}),{\bm{P}}
Algorithm 8 RPI with SV-LCOV

Complexity analysis of Algorithm 8. Line 1 run in O(nnz(𝑬)k2)O(nnz({\bm{E}})k^{2}). Line 4 run in O((nnz(𝑬)+k)slt)O((nnz({\bm{E}})+k)slt) time. Line 5 run in O(nnz(𝑬)+k)l2t)O(nnz({\bm{E}})+k)l^{2}t) time. Line 6 run in O(sl2t)O(sl^{2}t) time. Line 7 run in O((nnz(E)+k)slt)O((nnz(E)+k)slt) time. The overall time complexity of Algorithm 8 is O((nnz(𝑬)+k)(sl+l2)t+nnz(𝑬)k2)O((nnz({\bm{E}})+k)(sl+l^{2})t+nnz({\bm{E}})k^{2}).

D.3 The Proposed Updating Truncated SVD with Approximate Augmented Matrix

Input: 𝑼k(𝑼,𝑼′′),𝚺k,𝑽k(𝑽,𝑽′′),𝑬{\bm{U}}_{k}({\bm{U}}^{\prime},{\bm{U}}^{\prime\prime}),\mathbf{\Sigma}_{k},{\bm{V}}_{k}({\bm{V}}^{\prime},{\bm{V}}^{\prime\prime}),{\bm{E}}
1 Turn (𝑰𝑼k𝑼k)𝑬({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{E}} into SV-LCOV and get 𝑸(𝑩,𝑪),𝑷{\bm{Q}}({\bm{B}},{\bm{C}}),{\bm{P}} with Algorithm 6 or 8;
2 𝑭k,𝚯k,𝑮kSVDk([𝚺k𝑼k𝑬𝑷]){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&{\bm{U}}_{k}^{\top}{\bm{E}}\\ &{\bm{P}}^{\top}\\ \end{bmatrix});
3 𝑼′′𝑼′′(𝑭k[:k]𝑪𝑭k[k:]){\bm{U}}^{\prime\prime}\leftarrow{\bm{U}}^{\prime\prime}({\bm{F}}_{k}[:k]-{\bm{C}}{\bm{F}}_{k}[k:]);
4 𝑼𝑼+𝑩𝑭k[k:]𝑼′′1{\bm{U}}^{\prime}\leftarrow{\bm{U}}^{\prime}+{\bm{B}}{\bm{F}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
5 𝚺k𝚯k\mathbf{\Sigma}_{k}\leftarrow\mathbf{\Theta}_{k};
6 𝑽′′𝑽′′𝑮k[:k]{\bm{V}}^{\prime\prime}\leftarrow{\bm{V}}^{\prime\prime}{\bm{G}}_{k}[:k];
7 Append new columns 𝑮[k:]𝑽′′1{\bm{G}}[k:]{\bm{V}}^{\prime\prime-1} to 𝑽{\bm{V}}^{\prime};
Algorithm 9 Add columns with approximated augmented space
Input: 𝑼k(𝑼,𝑼′′),𝚺k,𝑽k(𝑽,𝑽′′),𝑫,𝑬{\bm{U}}_{k}({\bm{U}}^{\prime},{\bm{U}}^{\prime\prime}),\mathbf{\Sigma}_{k},{\bm{V}}_{k}({\bm{V}}^{\prime},{\bm{V}}^{\prime\prime}),{\bm{D}},{\bm{E}}
1 Turn (𝑰𝑼k𝑼k)𝑫({\bm{I}}-{\bm{U}}_{k}{\bm{U}}_{k}^{\top}){\bm{D}} into SV-LCOV and get 𝑸𝑫(𝑩𝑫,𝑪𝑫),𝑷𝑫{\bm{Q}}_{\bm{D}}({\bm{B}}_{\bm{D}},{\bm{C}}_{\bm{D}}),{\bm{P}}_{\bm{D}} with Algorithm 6 or 8;
2 Turn (𝑰𝑽k𝑽k)𝑬({\bm{I}}-{\bm{V}}_{k}{\bm{V}}_{k}^{\top}){\bm{E}} into SV-LCOV and get 𝑸𝑬(𝑩𝑬,𝑪𝑬),𝑷𝑬{\bm{Q}}_{\bm{E}}({\bm{B}}_{\bm{E}},{\bm{C}}_{\bm{E}}),{\bm{P}}_{\bm{E}} with Algorithm 6 or 8;
3 𝑭k,𝚺k,𝑮kSVDk([𝚺k𝟎𝟎𝟎]+[𝑼k𝑫𝑷𝑫][𝑽k𝑬𝑷𝑬]){\bm{F}}_{k},\mathbf{\Sigma}_{k},{\bm{G}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}\\ \end{bmatrix}+\begin{bmatrix}{\bm{U}}_{k}^{\top}{\bm{D}}\\ {\bm{P}}_{\bm{D}}^{\top}\end{bmatrix}\begin{bmatrix}{\bm{V}}_{k}^{\top}{\bm{E}}\\ {\bm{P}}_{\bm{E}}^{\top}\end{bmatrix}^{\top}) ;
4 𝑼′′𝑼′′(𝑭k[:k]𝑪𝑫𝑭k[k:]){\bm{U}}^{\prime\prime}\leftarrow{\bm{U}}^{\prime\prime}({\bm{F}}_{k}[:k]-{\bm{C}}_{\bm{D}}{\bm{F}}_{k}[k:]);
5 𝑼𝑼+𝑩𝑫𝑭k[k:]𝑼′′1{\bm{U}}^{\prime}\leftarrow{\bm{U}}^{\prime}+{\bm{B}}_{\bm{D}}{\bm{F}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
6 𝚺k𝚯k\mathbf{\Sigma}_{k}\leftarrow\mathbf{\Theta}_{k};
7 𝑽′′𝑽′′(𝑮k[:k]𝑪𝑬𝑮k[k:]){\bm{V}}^{\prime\prime}\leftarrow{\bm{V}}^{\prime\prime}({\bm{G}}_{k}[:k]-{\bm{C}}_{\bm{E}}{\bm{G}}_{k}[k:]);
8 𝑽𝑽+𝑩𝑬𝑮k[k:]𝑼′′1{\bm{V}}^{\prime}\leftarrow{\bm{V}}^{\prime}+{\bm{B}}_{\bm{E}}{\bm{G}}_{k}[k:]{\bm{U}}^{\prime\prime-1};
Algorithm 10 Update weights with approximated augmented space

Appendix E Experiments

E.1 Runtime of Each Step

We present the runtime analysis of each component in the experiments, specifically focusing on the verification of ϕ\phi using the Slashdot datasets. Since all the baselines, as well as the proposed method, can be conceptualized as a three-step algorithm outlined in Section 2.1, we provide an illustration of the runtime for each step. Specifically, we break down the entire algorithm into three distinct steps: the stage prior to the execution of the compact SVD, the actual execution of the compact SVD, and the segment following the compact SVD. The experimental results are depicted in Figure 3.

Refer to caption
Figure 3: Runtime of each step on the Slashdot dataset.

Compared to the original methods, the proposed methods take approximately the same amount of time to execute the compact SVD. This similarity arises because both the proposed and original methods involve decomposing a matrix of the same shape. Furthermore, as the value of ϕ\phi increases and ss decreases, the proportion of total time consumed by step-2 (compact SVD) increases. This trend suggests a more significant improvement in efficiency for step-1 and step-3 of the algorithm.

The proposed method mainly primarily time complexity in step-1 and step-3, respectively benefiting from the structure of SV-LCOV in described in Section 3.1 and the extended decomposition in Section 3.2. The optimization in the first step is more pronounced when ϕ\phi is larger (i.e., when ss is smaller). This is due to the fact that in the SV-LCOV framework, the sparse vectors have fewer non-zero rows when ss is smaller. This reduction in non-zero rows is a consequence of having fewer columns in the matrix 𝑬{\bm{E}}, resulting in more significant efficiency improvements through sparse addition and subtraction operations.

Furthermore, when ϕ\phi is smaller and ss is larger, the utilization of the proposed variant method, which involves approximating the basis of the augmented space instead of obtaining the exact basis, tends to yield greater efficiency.

E.2 Experiments on Synthetic Matrices with Different Sparsity

We conduct experiments using synthetic matrices with varying sparsity levels (i.e., varying the number of non-zero entries) to investigate the influence of sparsity on the efficiency of updating the SVD. Initially, Specifically, we generate several random sparse matrices with a fixed size of 100,000 ×\times 100,000. The number of non-zero elements in these matrices ranges from 1,000,000 to 1,000,000,000 (i.e., density from 0.01%0.01\% to 10%10\%). We initialize a truncated SVD by utilizing a matrix comprised of the initial 50% of the columns. Subsequently, the remaining 50% of the columns are incrementally inserted into the matrix in ϕ\phi batches, with each batch containing an equal number of columns. The number of columns added in each batch is denoted as ss. The experimental results are shown in Figure 4.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 4: Computational efficiency on synthetic matrices

Experimental results under various ss values show that: 1) The proposed method exhibits more substantial efficiency improvements when the matrix is relatively sparse. 2) When the rank of the update matrix is higher, the variant using Lanczos vectors for space approximation achieves faster performance.

E.3 Effectiveness

We report the Frobenius norm beteween 𝑼kΣk𝑽k{\bm{U}}_{k}\Sigma_{k}{\bm{V}}_{k}^{\top} and original matrix in the Slashdot datasets and MovieLen25M datasets in Table 5. Our proposed approach maintains a comparable precision to comparing to baselines.

Table 5: Frobenius norm w.r.t ϕ\phi
Slashdot MovieLen25M
Method ϕ=101\phi=10^{1} ϕ=102\phi=10^{2} ϕ=103\phi=10^{3} ϕ=101\phi=10^{1} ϕ=102\phi=10^{2} ϕ=103\phi=10^{3}
Zha & Simon (1999) 784.48 792.16 792.11 4043.86 4044.23 4044.40
Vecharynski & Saad (2014) 802.61 796.26 792.01 4073.41 4111.66 4050.53
Yamazaki et al. (2015) 796.97 795.94 792.11 4098.87 4098.62 4047.87
ours 784.48 792.16 792.11 4043.86 4044.23 4044.40
ours-GKL 802.85 795.65 792.01 4076.61 4110.71 4050.36
ours-RPI 796.65 795.19 792.11 4099.11 4099.09 4047.20

Appendix F Time Complexity Analysis

A line-by-line analysis of time complexity for Algorithm 3, 4, 9, 10 is given below. Note that due to the extended decomposition, the time complexity of turing the augmented matrix into SV-LCOV is O(nnz(𝑬)k2)O(nnz({\bm{E}})k^{2}) instead of O(nnz(𝑬)k)O(nnz({\bm{E}})k).

Table 6: Asymptotic complexity of Algorithm 3
Asymptotic complexity (big-OO notation is omitted)
Line 1 nnz(𝑬)(k2+s2)nnz({\bm{E}})(k^{2}+s^{2})
Line 2 nnz(𝑬)k2+(k+s)3nnz({\bm{E}})k^{2}+(k+s)^{3}
Line 3 k3+k2sk^{3}+k^{2}s
Line 4 nnz(𝑬)(ks+k2)+k3nnz({\bm{E}})(ks+k^{2})+k^{3}
Line 5 kk
Line 6 k3k^{3}
Line 7 k2s+k3k^{2}s+k^{3}
Overall nnz(𝑬)(k+s)2+(k+s)3nnz({\bm{E}})(k+s)^{2}+(k+s)^{3}
Table 7: Asymptotic complexity of Algorithm 4
Asymptotic complexity (big-OO notation is omitted)
Line 1 nnz(𝑫)(k2+s2)nnz({\bm{D}})(k^{2}+s^{2})
Line 2 nnz(𝑬)(k2+s2)nnz({\bm{E}})(k^{2}+s^{2})
Line 3 nnz(𝑫+𝑬)k2+(k+s)3nnz({\bm{D}}+{\bm{E}})k^{2}+(k+s)^{3}
Line 4 k3+k2sk^{3}+k^{2}s
Line 5 nnz(𝑫)(ks+k2)+k3nnz({\bm{D}})(ks+k^{2})+k^{3}
Line 6 kk
Line 7 k3+k2sk^{3}+k^{2}s
Line 8 nnz(𝑬)(ks+k2)+k3nnz({\bm{E}})(ks+k^{2})+k^{3}
Overall nnz(𝑫+𝑬)(k+s)2+(k+s)3nnz({\bm{D}}+{\bm{E}})(k+s)^{2}+(k+s)^{3}
Table 8: Asymptotic complexity of Algorithm 9
Asymptotic complexity (big-OO notation is omitted)
Line 1 (GKL) nnz(𝑬)k2+nnz(𝑬+k)slnnz({\bm{E}})k^{2}+nnz({\bm{E}}+k)sl
Line 1 (RPI) (nnz(𝑬)+k)(sl+l2)t+nnz(𝑬)k2(nnz({\bm{E}})+k)(sl+l^{2})t+nnz({\bm{E}})k^{2}
Line 2 (k+s)(k+l)2(k+s)(k+l)^{2}
Line 3 k3+k2lk^{3}+k^{2}l
Line 4 nnz(𝑬)(kl+k2)+k3nnz({\bm{E}})(kl+k^{2})+k^{3}
Line 5 kk
Line 6 k3k^{3}
Line 7 k2l+k3k^{2}l+k^{3}
Overall (GKL) nnz(𝑬)(k2+sl+kl)+(k+s)(k+l)2nnz({\bm{E}})(k^{2}+sl+kl)+(k+s)(k+l)^{2}
Overall (RPI) nnz(𝑬)(sl+l2)t+nnz(𝑬)k2+(k+s)(k+l)2nnz({\bm{E}})(sl+l^{2})t+nnz({\bm{E}})k^{2}+(k+s)(k+l)^{2}
Table 9: Asymptotic complexity of Algorithm 10
Asymptotic complexity (big-OO notation is omitted)
Line 1 (GKL) nnz(𝑫)k2+nnz(𝑫+k)slnnz({\bm{D}})k^{2}+nnz({\bm{D}}+k)sl
Line 1 (RPI) (nnz(𝑫)+k)(sl+l2)t+nnz(𝑫)k2(nnz({\bm{D}})+k)(sl+l^{2})t+nnz({\bm{D}})k^{2}
Line 2 (GKL) nnz(𝑬)k2+nnz(𝑬+k)slnnz({\bm{E}})k^{2}+nnz({\bm{E}}+k)sl
Line 2 (RPI) (nnz(𝑬)+k)(sl+l2)t+nnz(𝑬)k2(nnz({\bm{E}})+k)(sl+l^{2})t+nnz({\bm{E}})k^{2}
Line 3 nnz(𝑫+𝑬)k2+(k+l)3nnz({\bm{D}}+{\bm{E}})k^{2}+(k+l)^{3}
Line 4 k3+k2lk^{3}+k^{2}l
Line 5 nnz(𝑫)(kl+k2)+k3nnz({\bm{D}})(kl+k^{2})+k^{3}
Line 6 kk
Line 7 k3+k2lk^{3}+k^{2}l
Line 8 nnz(𝑬)(kl+k2)+k3nnz({\bm{E}})(kl+k^{2})+k^{3}
Overall (GKL) nnz(𝑫+𝑬)(k2+sl+kl)+(k+s)(k+l)2nnz({\bm{D}}+{\bm{E}})(k^{2}+sl+kl)+(k+s)(k+l)^{2}
Overall (RPI) nnz(𝑫+𝑬)(sl+l2)t+nnz(𝑫+𝑬)k2+(k+s)(k+l)2nnz({\bm{D}}+{\bm{E}})(sl+l^{2})t+nnz({\bm{D}}+{\bm{E}})k^{2}+(k+s)(k+l)^{2}

Appendix G Algorithm of adding rows

Input: 𝑼k(𝑼,𝑼′′),𝚺k,𝑽k(𝑽,𝑽′′),𝑬r{\bm{U}}_{k}({\bm{U}}^{\prime},{\bm{U}}^{\prime\prime}),\mathbf{\Sigma}_{k},{\bm{V}}_{k}({\bm{V}}^{\prime},{\bm{V}}^{\prime\prime}),{{{\bm{E}}_{r}}}
1 Turn (𝑰𝑽k𝑽k)𝑬r({\bm{I}}-{\bm{V}}_{k}{\bm{V}}_{k}^{\top}){{{\bm{E}}_{r}}}^{\top} into SV-LCOV and get 𝑸(𝑩,𝑪),𝑹{\bm{Q}}({\bm{B}},{\bm{C}}),{\bm{R}} with Algorithm 2;
2 𝑭k,𝚯k,𝑮kSVDk([𝚺k𝑬r𝑽k𝑹]){\bm{F}}_{k},\mathbf{\Theta}_{k},{\bm{G}}_{k}\leftarrow\text{SVD}_{k}(\begin{bmatrix}\mathbf{\Sigma}_{k}&\\ {\bm{E}}_{r}^{\top}{\bm{V}}_{k}&{\bm{R}}^{\top}\\ \end{bmatrix});
3 𝑼′′𝑼′′𝑭k[:k]{\bm{U}}^{\prime\prime}\leftarrow{\bm{U}}^{\prime\prime}{\bm{F}}_{k}[:k];
4 Append new rows 𝑭[k:]𝑼′′1{\bm{F}}[k:]{\bm{U}}^{\prime\prime-1} to 𝑼{\bm{U}}^{\prime};
5 𝚺k𝚯k\mathbf{\Sigma}_{k}\leftarrow\mathbf{\Theta}_{k};
6 𝑽′′𝑽′′(𝑮k[:k]𝑪𝑮k[k:]){\bm{V}}^{\prime\prime}\leftarrow{\bm{V}}^{\prime\prime}({\bm{G}}_{k}[:k]-{\bm{C}}{\bm{G}}_{k}[k:]);
7 𝑽𝑽+𝑩𝑮k[k:]𝑽′′1{\bm{V}}^{\prime}\leftarrow{\bm{V}}^{\prime}+{\bm{B}}{\bm{G}}_{k}[k:]{\bm{V}}^{\prime\prime-1};
Algorithm 11 Add rows