Abstract
Determining the optimal number of latent features ($K$) in Non-negative Matrix Factorization (NMF) is a persistent challenge in unsupervised learning. This study introduces a supervised machine learning approach to automate rank selection. By training a Multi-Layer Perceptron (MLP) on stability and reconstruction metrics derived from an ensemble of NMF solutions, the proposed method achieves over 95% accuracy on synthetic datasets, significantly outperforming traditional heuristic methods like ARD and AIC.
Introduction
Non-negative Matrix Factorization (NMF) is a powerful tool for decomposing complex datasets into interpretable, parts-based representations. It is widely applied in fields ranging from facial recognition to cancer genomics. However, NMF requires the user to specify the number of latent features, $K$, a priori. Selecting an incorrect $K$ leads to either underfitting (failing to capture complexity) or overfitting (modeling noise). While heuristics such as Automatic Relevance Determination (ARD) or the Akaike Information Criterion (AIC) exist, they often require subjective human interpretation of "elbow" plots. This paper presents a deep learning approach to automate this decision-making process.
Methodology
The researchers developed a robust framework that combines an ensemble NMF approach with a deep learning classifier to remove human subjectivity from the loop.
The NMFk Framework
The foundation of the method is NMFk, which utilizes bootstrapping to generate an ensemble of resampled matrices. NMF is performed on each resampled matrix, and the resulting features are clustered. The stability of these clusters across different runs serves as a primary indicator of the "correctness" of a given $K$.
Feature Engineering and Classification
For each candidate $K$, three key statistics are calculated to characterize the factorization quality:
- Minimum Silhouette Score: Indicates the separation of feature clusters.
- Mean Silhouette Score: Reflects overall cluster stability.
- AIC: Quantifies the trade-off between reconstruction accuracy and model complexity.
A three-layer MLP (300-200-100 neurons) is trained on these metrics. To handle varying data scales, the model employs a sliding window approach, analyzing seven sequential $K$ values at a time. A voting system aggregates predictions from these windows to produce a final estimate for $K$.
Results
The NMFk/MLP approach was evaluated against synthetic and real-world datasets. On a held-out test set of synthetic matrices, the model achieved 95.3% exact accuracy.
Benchmarking Against Heuristics
The MLP's ability to "fuse" conflicting signals—such as recognizing when a drop in stability is offset by a significant improvement in AIC—allows it to vastly outperform traditional methods.
In direct comparisons, the MLP reached 99% accuracy on specific subsets, while ARD and AIC achieved only 71% and 52%, respectively. Real-world tests further validated the model: it correctly identified all 16 features in the Swimmer dataset and found 13 features for the MIT Face data, aligning with established literature standards.
Discussion and Limitations
While highly effective, the model encountered challenges with high-dimensional data like MNIST, where the AIC continued to decrease indefinitely, complicating the MLP's decision-making process. Future work will focus on diversifying the synthetic training data to include more varied noise types and exploring alternative distance metrics beyond Euclidean distance to enhance robustness across diverse physical and biological data distributions.
Summary updated