Compressed Nonnegative Matrix Factorization Is Fast and Accurate

Mariano Tepper, Guillermo Sapiro

Abstract: Nonnegative Matrix Factorization (NMF) is a cornerstone of interpretable data analysis, yet it faces significant computational and memory hurdles when applied to large-scale datasets. We present a framework that utilizes structured random compression to project high-dimensional matrices into lower-dimensional subspaces before factorization. This approach significantly reduces computational costs and memory footprints, enabling "out-of-core" processing for datasets that exceed a machine's RAM capacity. Experimental results across diverse domains—including medical imaging, climate science, and high-resolution video—demonstrate that our compressed NMF framework achieves massive speedups with negligible loss in reconstruction accuracy.

Introduction

Nonnegative Matrix Factorization (NMF) is widely used in data science to decompose complex datasets into meaningful, human-interpretable components. However, as datasets grow to gigabyte and terabyte scales, traditional NMF algorithms encounter a "Big Data" wall. Iterative solvers become prohibitively slow, and memory bottlenecks often prevent large matrices from being processed on standard hardware. Furthermore, the communication overhead in parallel systems frequently outweighs the actual computational time. This paper introduces a framework designed to overcome these challenges by integrating structured random projections with existing NMF solvers, facilitating efficient out-of-core processing.

Methods

The core of our approach is the use of structured random projections to "sketch" the input matrix $A$ into a smaller, representative version. The framework consists of several key stages:

  1. Structured Compression: The input matrix is multiplied by a random Gaussian matrix to identify a low-rank basis that captures the essential structural information of the data.
  2. Power Iterations: To handle data with slowly decaying singular values, we employ a power scheme $(AA^T)^w$ to refine the compression quality.
  3. Algorithmic Integration: The compression framework is modular, allowing it to be "plugged into" popular NMF algorithms such as Multiplicative Updates, Active Set methods, and ADMM.
  4. Out-of-Core Processing: By utilizing Tall-and-Skinny QR (TSQR) decompositions, the algorithm can process data in blocks. This ensures that only a small portion of the data needs to be held in RAM at any given time, allowing the rest to reside on disk.
Processing time scales linearly with the number of rows for both in-core and out-of-core implementations, demonstrating the efficiency of the TSQR-based approach.

Results

The proposed framework was validated on a variety of datasets, ranging from synthetic matrices to a 391 GB high-resolution video.

  • Computational Efficiency: The out-of-core implementation demonstrates linear scaling with respect to the number of rows. For instance, a 1080p video dataset was processed in approximately 5.7 hours on a standard laptop, a task previously requiring high-performance server clusters.
  • Accuracy and Speed Trade-offs: Structured compression (SC) variants consistently provide a superior balance between speed and fidelity compared to data-agnostic methods. Performance comparisons reveal that SC methods achieve significant speedups—often an order of magnitude—while maintaining reconstruction errors nearly identical to uncompressed baselines.
Comparison of error metrics and processing times across various NMF solvers. Structured compression (SC) variants achieve the best performance-to-accuracy ratio.

Conclusion

By shifting the focus from raw floating-point operations to minimizing data movement, our compressed NMF framework enables the analysis of massive datasets on modest hardware. The use of structured random projections ensures that this efficiency does not come at the cost of accuracy. Future research will focus on extending this framework to non-Frobenius norm constraints and exploring alternative projection techniques for robust NMF.

Summary updated

BibTeX
@article{tepper2015compressed,
  author = {Mariano Tepper and Guillermo Sapiro},
  title = {{Compressed Nonnegative Matrix Factorization Is Fast and Accurate}},
  journal = {IEEE Trans. Signal Process.},
  year = {2015},
  doi = {10.1109/tsp.2016.2516971},
}
Figure