CUR Decomposition: A low-rank approximation with column/row subsets
An intuitive introduction to CUR approximation using actual matrix columns and rows, its practical advantages, and tips for constructing and stabilizing it.
CUR approximation has become a popular topic in numerical linear algebra, and it has a particularly clean structure compared with other low-rank approximations. There are a few neat connections between CUR and other areas of numerical analysis as well: Yuji Nakatsukasa explained to me that polynomial interpolation can be viewed as CUR approximation; and the Nyström approximation (very popular in kernel methods) is a CUR approximation using a subsampling sketch. In this post, I hope to give a simple and intuitive explanation of this method, as well as why we might choose it over other low-rank methods in some situations.
Recap: Column subset selection
In our previous post, we introduced the column subset selection problem: the mathematics of how to choose representative columns from a large matrix. Given an matrix , we want to choose an column submatrix of , called , so that the projection error is as small as possible. Since contains the exact columns of , it corresponds to choosing the representative data in applications, making it much easier to get a handle on than PCA/SVD. The number of columns is often small, like , making it much easier to store and analyze than the whole matrix .
Now, if represents measurements from experimental data, then we can do better than only selecting columns. For example, suppose is a table of gene-expression measurements from tumor samples. A column in would contain the gene measurements from one tumor specimen, and a row would contain measurements of a specific gene from different specimens. In this case, choosing both representative rows and columns would be of interest to a scientist and serves as one of the early motivations for CUR approximation [2].
What is CUR and how do we construct it?
To define CUR, consider a column submatrix and a row submatrix . Let represent the intersection between and . Then the CUR approximation is , where . As before, denotes the pseudoinverse. Note that is an matrix, which is very small, so its pseudoinverse can be computed very quickly.
We construct the CUR approximation by applying column subset selection followed by row subset selection. Given a matrix , we first select the column submatrix , with being the indices selected. We then apply column selection again on , which gives us a row selection . We are now ready to construct the CUR approximation:
and are exact column and row submatrices of , and is the pseudoinverse of the intersection between and , known as the CUR core.
Why CUR instead of truncated SVD, randomised SVD, Nyström, etc.?
CUR is not a strictly better method than other popular low-rank methods, such as the ones listed in the title. In fact, there are many cases where CUR would be less accurate than those methods. However, CUR does have its own edge in some scenarios.
First of all, while approximating using only a few exact rows and columns might seem crude, CUR actually has surprisingly good approximation quality [3]. The key theorem1 is the following: given ANY matrix , let be the best rank- approximation to 2; then there exists a rank- CUR approximation such that
As before, is the number of columns/rows used and is quite small, e.g., around . Therefore, CUR can achieve an accuracy quite close to the optimal approximation, even though many other methods would require the entire matrix and CUR only requires a small column/row subset3.
The structure of CUR makes it particularly easy to update. For example, if we already have and now we append an additional column to , we can often keep the same and , while just updating to include the new column. This quick update would not be as fast if you used SVD instead.
Preserving sparsity is also a good motivation. In many applications, is very sparse, i.e., it contains a lot of 0s. If you apply SVD to , the resulting decomposition is likely dense and does not contain a lot of 0s. However, as and are the exact data from , they could potentially both be as sparse as is. Modern matrix operations are often optimized for sparsity, and using CUR can make use of these optimizations.
Tips and tricks when applying CUR
In the final section, I want to give some tips and tricks for implementing CUR for approximating matrices. These tips are not exhaustive and often come from my own coding experiences.
- Is there low-rank structure? CUR is ultimately a low-rank approximation method; therefore, it is necessary to have sufficient decay in the singular values.
- Pivoting methods: The previous blog has a short section on which methods are available to select the columns and rows. It should also be said that it is important to select rows based on the existing columns, not the entire matrix .
- Truncate the core: If CUR is not as accurate as you hope for, in many cases the issue is not the CUR itself, but the numerical error from the ill-conditioning of . Specifically, if the minimum singular value of is too small, taking the pseudoinverse might create a large numerical error in computation. An easy fix is to instead truncate the singular values of that are less than some , say for a suitably scaled matrix4. [1] is a great reference if you want to have a better understanding of the -pseudoinverse.
- Oversampling: Another useful tip from [1] is oversampling, which means choosing a few more rows than your target column rank. This can be understood to improve your approximation in two ways: first, oversampling incorporates more row information; secondly, oversampling can improve the core conditioning.
References
- Park, T. and Nakatsukasa, Y., 2025. Accuracy and stability of CUR decompositions with oversampling. SIAM Journal on Matrix Analysis and Applications, 46(1), pp.780-810.
- Mahoney, M.W. and Drineas, P., 2009. CUR matrix decompositions for improved data analysis. Proceedings of the National Academy of Sciences, 106(3), pp.697-702.
- Zamarashkin, N.L. and Osinsky, A.I., 2018, March. On the existence of a nearly optimal skeleton approximation of a matrix in the Frobenius norm. In Doklady Mathematics (Vol. 97, No. 2, pp. 164-166). Moscow: Pleiades Publishing.
Comments
Comments are hosted by FastComments. No account or email address is required.