Abstract
Low-rank approximation in data streams is a fundamental and significant task in computing science, machine learning and statistics. Multiple streaming algorithms have emerged over years and most of them are inspired by randomized algorithms, more specifically, sketching methods. However, many algorithms are not able to leverage information of data streams and consequently suffer from low accuracy. Existing data-driven methods improve accuracy but the training cost is expensive in practice. In this paper, from a subspace perspective, we propose a tensor-based sketching method for low-rank approximation of data streams. The proposed algorithm fully exploits the structure of data streams and obtains quasi-optimal sketching matrices by performing tensor decomposition on training data. A series of experiments are carried out and show that the proposed tensor-based method can be more accurate and much faster than the previous work.
Introduction
Low-rank approximation (LRA) is a cornerstone of data science, used to compress massive data streams (like video or sensor feeds) into manageable forms while preserving essential information. The standard tool for this is sketching, which uses a "sketching matrix" to project high-dimensional data into a lower-dimensional subspace.
Traditional sketching methods use random matrices (e.g., Gaussian). While fast, these "blind" matrices often result in high approximation errors because they don't exploit the underlying structure of the data. Recent "data-driven" methods (like IVY) try to "learn" better sketching matrices from past data using Stochastic Gradient Descent (SGD). However, SGD is computationally expensive, requires many iterations, and can be difficult to tune. This paper proposes a data-driven method that is non-iterative, faster to train, and more accurate.
Methodology
The authors shift the perspective from iterative learning to subspace analysis through a tensor-based approach:
- Tensorization: A collection of training matrices from a data stream is treated as a single third-order tensor $\mathcal{A}$.
- Tucker Decomposition: Instead of using SGD to minimize a complex loss function, the authors show that the optimal sketching matrix can be found by performing a Tucker1 decomposition (essentially an SVD on the matricized tensor). This captures the dominant row-subspace shared across the data stream.
- Two-Sided Sketching: This is extended to a "two-sided" version using Tucker2 decomposition (via the HOOI algorithm) to produce two matrices ($S$ and $W$) that compress both rows and columns simultaneously.
- Integration: These quasi-optimal matrices are then plugged into the standard Sarlos-Clarkson-Woodruff (SCW) algorithm to perform the actual low-rank approximation on new, unseen data.
Mathematically, the tensor-based loss function is a relaxation of the loss functions used in iterative methods like IVY. Crucially, this version can be solved exactly and globally via SVD, bypassing the local minima and noise of SGD.
Experimental Results
The researchers evaluated their approach on three diverse real-world datasets: HSI (Hyperspectral images), Logo (Video), and MRI (Magnetic resonance imaging).
Superior Accuracy and Efficiency
The tensor-based method achieved test errors that were 0.27x to 0.64x lower than the best baseline methods (IVY, Few-Shot, and Butterfly) across all datasets. Training was significantly faster; for the "Logo" dataset, the tensor-based method trained in 4.76 seconds, while iterative methods required significantly more time to converge.
Key Insights
- Subspace Alignment: The core realization is that a perfect sketching matrix should align with the top-$k$ singular vectors of the data. Since data streams are often highly correlated, the "average" top subspace of the training set is an excellent proxy for future data.
- Dense is Faster: While previous methods focused on sparse sketching matrices, the authors found that dense matrices are actually faster in modern frameworks like PyTorch. Dense matrices leverage highly optimized BLAS libraries (
torch.matmul), whereas sparse operations often lack equivalent hardware acceleration. - Sample Efficiency: The method is robust; using even a tiny fraction of training data (a 2% sample ratio) was enough to achieve high accuracy.
Conclusion
The proposed tensor-based sketching method provides a significant leap in both accuracy and training speed for streaming low-rank approximation. By replacing iterative SGD with direct tensor decomposition, the method achieves global optima efficiently. Future work includes addressing memory constraints for extremely large-scale streams and applying this logic to other streaming operations like solving linear systems.
Summary updated