Abstract
Nonnegative Matrix Factorization (NMF) is a fundamental technique in machine learning, prized for its ability to produce interpretable, parts-based representations of data. However, as datasets scale into the millions of dimensions, traditional NMF algorithms like Hierarchical Alternating Least Squares (HALS) become computationally prohibitive. This paper introduces a randomized HALS framework that leverages random projections to "sketch" large matrices into a manageable size. The resulting algorithm achieves speedups of up to 25x over deterministic baselines while maintaining near-identical reconstruction accuracy and classification performance.
Introduction: The Scalability Challenge of NMF
In fields ranging from hyperspectral imaging to document clustering, NMF is preferred over techniques like Principal Component Analysis (PCA) because it enforces nonnegativity. This constraint ensures that the resulting factors represent additive components—such as individual facial features or distinct topics in a corpus—making the results physically meaningful.
Despite its utility, NMF faces a significant "big data" hurdle. Standard optimization routines require multiple passes over the entire dataset, leading to high memory consumption and long execution times. To address this, the authors propose a randomized approach that bridges the gap between high-fidelity interpretability and modern computational demands.
Methodology: Randomized HALS
The proposed method utilizes a two-stage probabilistic framework for matrix approximation.
1. Sketching via QB Decomposition
Instead of optimizing directly on the massive input matrix $X$, the algorithm first computes a compressed surrogate matrix $B$. This is achieved through random projections that capture the essential range of $X$. By incorporating oversampling and power iterations, the authors ensure that this smaller matrix $B$ remains a high-quality approximation of the original data.
2. Optimization via Randomized HALS
The core of the optimization relies on the Hierarchical Alternating Least Squares (HALS) algorithm. HALS is a coordinate descent method that updates one variable at a time to minimize the reconstruction error. In this randomized framework, the HALS updates are reformulated to run on the sketched matrix $B$. Since the dimensions of $B$ are significantly smaller than $X$, each iteration is performed at a fraction of the original cost.
The authors also extend this framework to support $\ell_1$ and $\ell_2$ regularization, allowing for the enforcement of sparsity (LASSO) or the prevention of overfitting (Ridge) within the randomized space.
Experimental Results
The randomized HALS algorithm was evaluated against deterministic baselines across several benchmarks:
- Computational Speed: On large synthetic "tall-and-skinny" matrices, the randomized approach was up to 25x faster than standard HALS. On the Yale Face Database B, it achieved a 6x speedup.
- Accuracy and Convergence: Unlike previous attempts using Multiplicative Updates (MU) which often struggled to converge in compressed spaces, the randomized HALS demonstrated stable convergence. Reconstruction errors were nearly identical to deterministic versions (e.g., 0.239 on Yale Faces for both).
- Downstream Tasks: On the MNIST digit classification task, features extracted via randomized NMF maintained a 95-97% accuracy using a k-nearest-neighbors classifier, matching the performance of the full-scale algorithm in significantly less time.
- Interpretability: In hyperspectral unmixing tasks, the addition of $\ell_1$ regularization to the randomized solver produced cleaner, more distinct abundance maps for materials like asphalt and grass, proving that interpretability is not sacrificed for speed.
Conclusion and Future Directions
The randomized HALS framework offers a robust solution for scaling NMF to massive datasets without losing the "parts-based" clarity that makes the method valuable. While the approach assumes an underlying low-rank structure in the data, its performance on real-world datasets like MNIST and Yale Faces suggests broad applicability. Future work includes porting the framework to GPUs and extending the randomized sketching logic to Nonnegative Tensor Factorization for multi-dimensional data analysis.
Summary updated