TL;DR
This paper introduces a new algorithm, Subsampled Online Matrix Factorization (SOMF), that significantly speeds up matrix factorization for massive datasets with both many rows and columns. By strategically subsampling rows during the learning process, SOMF achieves substantial speedups (up to 13x) while maintaining convergence guarantees, making it practical for previously intractable problems.
What Problem Does This Paper Address?
Matrix factorization is a powerful technique for uncovering latent structures in data, with applications ranging from dictionary learning to dimensionality reduction. However, existing methods struggle with "huge" matrices – those with both a very large number of samples (columns) and a very large number of features (rows). Traditional streaming algorithms, while good for many samples, become computationally prohibitive when the number of features is also massive (e.g., terabytes of fMRI data). This paper tackles the challenge of making matrix factorization scalable to such high-dimensional, large-scale datasets.
Methods
The core contribution is the Subsampled Online Matrix Factorization (SOMF) algorithm. It builds upon the Stochastic Majorization-Minimization (SMM) framework, a popular approach for online learning. The key innovation is stochastic subsampling: at each iteration, instead of processing an entire data sample (a column of the matrix), SOMF randomly selects a subset of its rows. This subsampling is applied strategically to reduce the computational cost of several key steps:
- Code Computation: Estimating the sparse code for a given data sample is made faster by using subsampled data.
- Dictionary Update: The algorithm updates only a fraction of the dictionary atoms corresponding to the subsampled rows, effectively "freezing" the rest. This is a significant departure from standard methods that update the entire dictionary.
- Surrogate Computation: The aggregated surrogate, which approximates the objective function, is also updated using subsampled information.
To handle the approximations introduced by subsampling, the authors extend the SMM framework to Stochastic Approximate Majorization-Minimization (SAMM). This generalized framework provides theoretical convergence guarantees even when the majorization and minimization steps are inexact, which is precisely the case with subsampling. They also propose different strategies for subsampling code computation (masked loss vs. averaged estimators) to balance speed and accuracy.
Datasets
The authors evaluate their method on two large-scale, real-world datasets:
- Functional Magnetic Resonance Imaging (fMRI) data:
- HCP dataset: 2 TB of data, with approximately $n=2.4 \times 10^6$ samples and $p=2 \times 10^5$ features.
- ADHD200 dataset: A smaller public dataset for comparison, with $n=7000$ samples and $p=6 \times 10^4$ features.
- Hyperspectral Imaging data:
- Patches extracted from the AVIRIS project: 103 GB of data, with approximately $n=2 \times 10^6$ samples and $p=6 \times 10^4$ features.
These datasets are characterized by their massive size and the need for sparse factorizations, making them ideal testbeds for SOMF.
Key Insights and Ideas
- Subsampling as a Scalability Lever: The paper demonstrates that strategically subsampling rows during online matrix factorization is a highly effective way to tackle datasets with both high sample counts and high feature dimensions, a problem that has been a bottleneck for existing methods.
- Partial Dictionary Updates are Key: The most significant speedup comes from updating only a subset of the dictionary atoms at each iteration. This "freezing" of dictionary parts drastically reduces the computational cost, especially for large feature dimensions.
- Theoretical Guarantees for Approximations: By extending SMM to SAMM, the authors provide a theoretical framework that justifies the use of approximations (like subsampling) and guarantees convergence, which is crucial for practical adoption.
- Trade-offs in Code Computation: The paper highlights that while subsampling the dictionary update is the primary driver of speedup, subsampling the code computation also becomes important for very high reduction factors, with different strategies (masked vs. averaged estimators) offering different trade-offs between speed and theoretical guarantees.
Key Results
- Significant Speedups: SOMF achieves substantial speedups across all tested datasets. For the 2 TB HCP fMRI dataset, convergence is reached up to 13 times faster than state-of-the-art methods. For hyperspectral data, speedups of 7x (dictionary learning) and 3x (non-negative setting) were observed.
- Comparable Performance: Despite the speedups and approximations, SOMF finds dictionaries with objective function values very close to those found by the original OMF algorithm, indicating that the subsampling does not significantly degrade the quality of the factorization.
- Scalability Demonstrated: The method's effectiveness is shown on datasets ranging from gigabytes to terabytes, demonstrating its practical utility for massive data.
- Validation of SAMM: The empirical results strongly support the theoretical framework of SAMM, showing that approximate majorization and minimization steps can lead to efficient and convergent algorithms.
Limitations and Future Work
- Approximation vs. Precision: The paper notes that for very high precision convergence (e.g., 0.01%), the speedup advantage of SOMF diminishes. This is expected, as SOMF trades some precision for speed. The authors suggest that for high precision, the reduction ratio could be decreased after initial epochs.
- Optimal Reduction Ratio: There exists an optimal subsampling ratio (r) for each problem. Using too high a ratio can lead to performance degradation. This suggests that finding the right balance is problem-dependent and might require empirical tuning.
- Future Work: The authors suggest that their approach is promising for learning more complex models and calls for further adaptation of their methods to handle more sophisticated model structures.
Summary updated