Fast Updating Truncated SVD for Representation Learning with Sparse Matrices
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.
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.
We propose an algorithm for approximately updating the rank- truncated SVD with a theoretical guarantee (Theorem 1), which runs at the update sparsity time complexity when considering and (the rank of the updated matrix) as constants. We also propose two variants of the algorithm that can be applied to cases where is large.
-
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 -by- real data matrix is denoted by , where , are orthogonal and is a rectangular diagonal with non-negative real numbers sorted across the diagonal. The rank- truncated SVD of is obtained by keeping only the first largest singular values and using the corresponding columns of and , which is denoted by .
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 is available, our goal is to approximate the truncated SVD of which has addition of rows (or columns ) or low-rank modifications to .
In several related works, including Zha-Simon’s, a key issue often revolves around the optimization of the QR decomposition of the matrix. Specifically, given an orthonormal matrix and a sparse matrix , we refer to as the Augmented Matrix with respect to , where its column space is orthogonal to .
Notations. In this paper, we use the lowercase letter , bold lowercase letter and bold uppercase letter to denote scalars, vectors, and matrices, respectively. Moreover, denotes the number of non-zero entries in a matrix, denotes the updated matrix, denotes the rank- approximation of a matrix, and 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.
Augment the singular vector and by adding extra columns (or rows), resulting in and , respectively. This augmentation is performed so that and can effectively approximate and capture the updated singular vectors’ column space.
-
2.
Compute .
-
3.
Approximate the updated truncated SVD by .
Zha-Simon’s Scheme. For , let , where ’s columns are orthonormal and is upper trapezoidal. Zha & Simon (1999) method updates the truncate SVD after appending new columns to by
(1) |
where . The updated approximate left singular vectors, singular values and right singular vectors are , respectively.
When it comes to weight update, let the QR-decomposition of the augmented matrices be and , then the update procedure is
(2) | ||||
where . The updated approximate truncated SVD is .
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., 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 , to obtain the updated orthogonal matrix. The matrix derived from the aforementioned procedure is not only orthonormal, but its column space is also orthogonal to the column space of , implying that matrix is orthonormal.
Let be the augmented matrix, then each column of can be written as a sparse -dimensional matrix of column vectors minus a linear combination of the column vectors of the -by- orthonormal matrix i.e., . 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 be an arbitrary matrix satisfying , and let be a sparse vector. Then, the SV-LCOV form of the vector is a tuple denoted as where .
Turning columns of an augmented matrix into SV-LCOV is efficient, because the computation of can be done by extracting the rows of that correspond to the nonzero elements of , and then multiplying them by .
Lemma 1.
For an orthonormal matrix with , turning with a sparse vector into SV-LCOV can be done in time complexity of .
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 is sparse.
Lemma 2.
For an orthonormal matrix with , the following operations of SV-LCOV can be done in the following time.
-
•
Scalar multiplication: in time.
-
•
Addition: in time.
-
•
Inner product: in 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 with , let be arbitrary sparse matrix with the columns of , then the column space of 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).
Lemma 4.
Given an orthonormal matrix satisfying , there exists an algorithm that can obtain a orthonormal basis of a set of SV-LCOV in time.
Approximating the augmented matrix with SV-LCOV. The Gram-Schdmit process is less efficient when 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 of the augmented matrix in the SV-LCOV is obtained, according to Definition 1, this orthonormal basis corresponds to the matrix where the -th column of is . 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:
(3) | ||||
where denotes the submatrix consisting of the first rows of , and denotes the submatrix consisting of rows starting from the -th rows of .
Equation (3) shows that each update of the singular vectors consists of the following operations:
-
1.
A low-dimensional matrix multiplication to by a -by- matrix .
-
2.
A sparse matrix addition to by of a sparse matrix that has at most non-zero entries. While 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:
(4) |
with orthonormal and (but not or ), that is, the singular vectors will be obtained by the product of the two matrices. Initially, and are set by the -by- identity matrix, and , 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:
(5) | ||||
which is a low-dimensional matrix multiplication and a sparse matrix addition. And the update of the right singular vectors is
(6) |
where denotes the submatrix consisting of the first rows of and denotes the submatrix cosisting of rows starting from the -th rows of . Now this can be performed as
(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 and . 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 -by- 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.
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 , and the (approximate) truncated SVD of , denoted as , is updated to the rank- truncated SVD of the matrix resulting from applying this modification to (), we call it maintaining an approximate rank-k truncated SVD of .
Theorem 1 (Main result).
There is a data structure for maintaining an approximate rank- truncated SVD of with the following operations in the following time.
-
•
: Update ) in time.
-
•
: Update in time.
-
•
: Update in time.
-
•
: Return (or ) and in time.
where and 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 ), 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
Algorithm | Asymptotic complexity |
---|---|
Kalantzis et al. (2021) | |
\cdashline1-2 Zha & Simon (1999) | |
Vecharynski & Saad (2014) | |
Yamazaki et al. (2015) | |
\cdashline1-2 ours | |
ours-GKL | |
ours-RPI |
Table. 1 presents the comparison of the time complexity of our proposed algorithm with the previous algorithms when updating rows . To simplify the results, we have assumed and omitted the big- notation. denotes the rank of approximation in GKL and RPI. denotes the number of iteration RPI performed.
Our method achieves a time complexity of for updating, without any or terms when and 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 or terms in processing the augmented matrix. Additionally, our extended decomposition avoids the or 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 to , this trade-off remains acceptable considering the optimizations mentioned above.
For updates with one coarse granularity (i.e. larger ), the proposed method of approximating the augmented space with GKL or RPI in the SV-LCOV space eliminates the squared term of 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 , the spatial dimension of the approximation, to based on previous settings (Vecharynski & Saad, 2014). The required number of iterations for the RPI, denoted by , is set to . 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 batch updates, adding rows and columns each time for a -sized adjacency matrix. For a user-item matrix with columns, 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 to predict. Then a score, the inner product between the representation of the node pair
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 by randomly removing 30% of the edges from the original graph . The node pairs connected by the eliminated edges are then chosen, together with an equal number of unconnected node pairs from , to create the testing set .
-
•
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 -th user and -th item with
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 .
Datasets. The link prediction experiments are conducted on three publicly available graph datasets, namely Slashdot (Leskovec et al., 2009) with nodes and edges, Flickr (Tang & Liu, 2009) with nodes and edges, and Epinions (Richardson et al., 2003) with nodes and 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 ratings across movies. According to the dataset’s selection mechanism, all selected users rated at least movies, ensuring the dataset’s validity and a moderate level of density. All ratings in the dataset are integers ranging from to .







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 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 .
Table 3 demonstrates the results of four experiments conducted for the collaborative filtering task: batch update() and streaming update() with and . 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 or more.
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% |
Batch Update | Streaming Update | ||||||
---|---|---|---|---|---|---|---|
Method | Runtime | MSE | Runtime | MSE | |||
=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 | |||
=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 and
We conduct link prediction experiments on three datasets for and , 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 . All methods become somewhat slower as increases, consistent with the asymptotic complexity metrics in Table 1.
We experimentally evaluate the performance of each method for different batch sizes, . As shown in Fig. 2, our methods (ours-GKL and ours-RPI) outperform others when a large number of entries are updated simultaneously. For , 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.
Notation | Description |
---|---|
The data matrix | |
The update matrix (new columns / rows) | |
The update matrix (low rank update of weight) | |
The identity matrix | |
The left singular vectors | |
The singular values | |
The right singular vectors | |
The (left) augmented matrix | |
The (right) augmented matrix | |
The number of rows and columns of data matrix | |
The rank of truncated SVD | |
The rank of update matrix | |
The rank of approximate augmented space | |
The number of Random Power Iteration performed | |
A matrix with rank | |
The transpose of matrix | |
A rank- approximation of | |
The updated matrix of | |
-norm of | |
Dot product bewteen | |
A rank- truncated SVD of |
Appendix C Omitted Proofs
Proof of Lemma 2
Proof.
We prove each of the three operations as follows.
-
•
Scalar multiplication. It takes time to get and time to get , respectively. Therefore the overall time complexity for scalar multiplication is .
-
•
Addition. It takes time to get and time to get , respectively. Therefore the overall time complexity for addition is .
-
•
Inner product. It takes time to get and time to get , respectively. Therefore the overall time complexity for inner product is .
∎
Proof of Lemma 3
Proof.
Each of the three operations of SV-LCOV can be corresponded to the original space as follows.
-
•
Scalar multiplication.
(8) -
•
Addition.
(9) -
•
Inner product.
(10)
∎
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 with size is at most , the number of non-zero entries of the sparse vector in each SV-LCOV during the process of Algorithm 2 are at most .
There are a total of projections and subtractions of SV-LCOV in Algorithm 2, and by Lemma 2, the overall time complexity is .
∎
Proof of Theorem 1
Appendix D Approximating the Augmented Space
D.1 Approximating the Augmented Space via Golub-Kahan-Lanczos Process
A step-by-step description. Specifically, the 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 norm of 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 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 time. Line 6 run in time. Line 7, 8 run in time. Line 9 run in time. Line 10 run in time. Line 11, 12 run in time. Line 14, 15, 16 run in time.
The overall time complexity of Algorithm 6 is time.
D.2 Approximating the Augmented Space via Random Power Iteration Process
D.3 The Proposed Updating Truncated SVD with Approximate Augmented Matrix
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 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.

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 increases and 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 is larger (i.e., when is smaller). This is due to the fact that in the SV-LCOV framework, the sparse vectors have fewer non-zero rows when is smaller. This reduction in non-zero rows is a consequence of having fewer columns in the matrix , resulting in more significant efficiency improvements through sparse addition and subtraction operations.
Furthermore, when is smaller and 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 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 to ). 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 batches, with each batch containing an equal number of columns. The number of columns added in each batch is denoted as . The experimental results are shown in Figure 4.





Experimental results under various 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 and original matrix in the Slashdot datasets and MovieLen25M datasets in Table 5. Our proposed approach maintains a comparable precision to comparing to baselines.
Slashdot | MovieLen25M | |||||||
---|---|---|---|---|---|---|---|---|
Method | ||||||||
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 instead of .
Asymptotic complexity (big- notation is omitted) | |
---|---|
Line 1 | |
Line 2 | |
Line 3 | |
Line 4 | |
Line 5 | |
Line 6 | |
Line 7 | |
Overall |
Asymptotic complexity (big- notation is omitted) | |
---|---|
Line 1 | |
Line 2 | |
Line 3 | |
Line 4 | |
Line 5 | |
Line 6 | |
Line 7 | |
Line 8 | |
Overall |
Asymptotic complexity (big- notation is omitted) | |
---|---|
Line 1 (GKL) | |
Line 1 (RPI) | |
Line 2 | |
Line 3 | |
Line 4 | |
Line 5 | |
Line 6 | |
Line 7 | |
Overall (GKL) | |
Overall (RPI) |
Asymptotic complexity (big- notation is omitted) | |
---|---|
Line 1 (GKL) | |
Line 1 (RPI) | |
Line 2 (GKL) | |
Line 2 (RPI) | |
Line 3 | |
Line 4 | |
Line 5 | |
Line 6 | |
Line 7 | |
Line 8 | |
Overall (GKL) | |
Overall (RPI) |