A Sharp Oracle Inequality for Bayesian Non-Negative Matrix Factorization

Pierre Alquier, Benjamin Guedj

Abstract

This paper provides a theoretical foundation for Bayesian non-negative matrix factorization (NMF) methods, bridging the gap between high-level statistical theory and practical implementation. We derive a sharp oracle inequality for a quasi-Bayesian estimator—specifically the exponentially weighted aggregate—demonstrating how prior distributions influence convergence rates. We further evaluate two primary algorithmic approaches: the asymptotically exact Gibbs sampler and a more computationally efficient blockwise gradient descent for Maximum A Posteriori (MAP) estimation. Our findings suggest that while matrix reconstruction is remarkably robust to hyperparameter selection, the identification of the true underlying rank is highly sensitive and requires precise tuning.

Introduction

Non-Negative Matrix Factorization (NMF) has become a cornerstone of modern data science, utilized to decompose complex, non-negative signals into their constituent parts. Whether identifying topics in a text corpus or isolating spectral components in audio, NMF provides an interpretable framework for dimensionality reduction. However, NMF is notoriously difficult to analyze theoretically due to the non-uniqueness of the decomposition and the challenge of determining the optimal "rank" (the number of latent components).

Bayesian NMF addresses these challenges by treating the matrix factors as random variables governed by prior distributions. While practitioners have long used these methods, rigorous mathematical guarantees regarding their convergence rates have been scarce. This paper addresses this void by providing the first sharp oracle inequality for Bayesian NMF, proving that these estimators can perform nearly as well as an "oracle" that knows the true rank of the data.

Theoretical Framework: PAC-Bayesian Analysis

The study focuses on a quasi-Bayesian estimator, known as the exponentially weighted aggregate. Unlike standard Bayesian methods that assume a perfectly specified model, the quasi-Bayesian approach uses a likelihood-like function to update beliefs, offering more flexibility in the face of model misspecification.

Using "Probably Approximately Correct" (PAC) Bayesian theory, we derive a sharp oracle inequality. This mathematical bound proves that the reconstruction error of our estimator is limited by the error of the best possible low-rank approximation, plus a penalty term determined by the choice of prior. Our analysis reveals that the error bound is approximately $\sigma^2(m_1 \vee m_2)r$, where $\sigma^2$ represents noise variance, $m_1$ and $m_2$ are the matrix dimensions, and $r$ is the rank. This matches the optimal rates found in non-Bayesian matrix completion literature.

The Role of Prior Selection

A significant portion of our work examines how different prior distributions—Exponential, Truncated Gaussian, and Heavy-tailed—impact the rate of convergence.

  • Heavy-tailed Priors: Theoretically, these priors offer superior performance in high-dimensional settings, leading to better error bounds. However, they introduce significant computational complexity, making them difficult to implement in sampling-based algorithms.
  • Automatic Shrinkage: One of the most powerful features of the Bayesian framework is its adaptivity. If the initial rank $K$ is set too high, the model naturally pushes unneeded columns toward zero, effectively "discovering" the true, simpler structure of the data.

Algorithmic Implementations

We compare two distinct paths for implementing Bayesian NMF:

  1. Gibbs Sampler: This is an "exact" method that draws samples from the posterior distribution. While it provides a full picture of uncertainty, its convergence can be prohibitively slow when applied to massive datasets.
  2. Blockwise Gradient Descent: For large-scale applications, we describe an optimization-based approach to find the MAP estimate. This method is a Bayesian adaptation of the algorithm by Xu et al. (2012) and is significantly faster, making it suitable for modern "big data" contexts.

Numerical Studies and Applications

Synthetic Data

We tested our algorithms on $100 \times 100$ synthetic matrices with a known rank of 2, corrupted by Gaussian noise. The results confirmed the theoretical robustness of the reconstruction; the Mean Squared Error (MSE) remained consistently low (between $0.0007$ and $0.002$) across a vast range of hyperparameter values ($b=1$ to $b=10^6$). However, identifying the true rank of 2 was only successful when the hyperparameter $b$ was tuned to a specific range (approximately $10^7$).

Financial Asset Prices

To test the model in a real-world setting, we analyzed daily prices for 993 financial assets from 2006 to 2011. The Bayesian NMF successfully extracted three distinct "regimes" or underlying trends that explained the movement of the nearly 1,000 different stocks, demonstrating its utility in identifying latent structures in volatile markets.

Conclusion

Our research highlights a critical distinction in Bayesian NMF: the difference between reconstruction and identification. If the primary goal is denoising or reconstructing a matrix, the choice of hyperparameters is quite forgiving. However, if the goal is to identify the true latent rank of the system, practitioners must exercise extreme care in hyperparameter tuning. Future work should focus on developing automated methods for this tuning and exploring global optimization techniques to avoid the local minima inherent in biconvex algorithms.

Summary updated

BibTeX
@inproceedings{alquier2017sharp,
  author = {Pierre Alquier and Benjamin Guedj},
  title = {{A Sharp Oracle Inequality for Bayesian Non-Negative Matrix Factorization}},
  booktitle = {HAL},
  year = {2017},
}
Figure