Deviance Matrix Factorization

Liang Wang, Luis CarvalhoarXiv 2021

Abstract

Matrix factorization is a cornerstone of modern data analysis, yet traditional methods like Singular Value Decomposition (SVD) and Non-negative Matrix Factorization (NMF) often rely on rigid distributional assumptions. We present Deviance Matrix Factorization (DMF), a framework that generalizes these techniques to any distribution within the exponential family. By leveraging Generalized Linear Model (GLM) theory, DMF provides a robust methodology for dimensionality reduction that includes efficient fitting via Iteratively Reweighted Least Squares (IRLS), theoretical consistency guarantees, and statistical tests for distribution and rank selection.

Introduction

Standard matrix factorization techniques are implicitly tied to specific noise models. SVD minimizes squared error, corresponding to a Gaussian assumption, while NMF often minimizes Kullback-Leibler divergence, corresponding to a Poisson model. However, real-world data—such as over-dispersed counts in genomics or binary adjacency matrices in network analysis—frequently violates these assumptions. When the model mismatch is significant, the resulting factors may fail to capture the true underlying structure. Deviance Matrix Factorization (DMF) addresses this by providing a statistically principled framework for diverse data types.

The DMF Framework

DMF models an input data matrix $X$ by assuming that a link function $g$ of the expected value $E[X]$ can be decomposed into a low-rank product: $g(E[X]) = \Lambda V^\top$. Instead of minimizing a generic distance metric, DMF minimizes the deviance, a measure derived from the log-likelihood of a chosen exponential family distribution. This allows the loss function to be tailored to the specific nature of the data (e.g., Bernoulli for binary data, Negative Binomial for over-dispersed counts).

Table 1: Summary of distributions, domains, link functions, variance functions, and loss functions supported by the DMF framework.

Statistical Inference and Algorithms

The optimization is performed using a specialized Iteratively Reweighted Least Squares (IRLS) algorithm. By employing alternating Fisher scoring updates, the algorithm efficiently finds the factor matrices $\Lambda$ and $V$. To ensure identifiability and avoid the "rotation" problem common in matrix factorization, the authors enforce orthogonality constraints similar to those in SVD.

Beyond optimization, DMF introduces rigorous statistical tools:

  • Family Determination: A generalized Hosmer-Lemeshow test allows for objective comparison between different distributional models (e.g., testing if a Negative Binomial fit is significantly better than a Poisson fit).
  • Rank Determination: A maximum eigenvalue gap method provides a data-driven approach to selecting the number of factors $q$, moving beyond heuristic "elbow" rules.
  • Consistency: The framework provides theoretical proofs for strong consistency, ensuring that estimates converge to true factors as data volume increases.

Experimental Validation

The efficacy of DMF was validated across multiple domains. In biomedical studies, DMF using a Negative Binomial distribution successfully separated cancer types in a leukemia gene expression dataset where NMF produced ambiguous results. In natural language processing (20Newsgroup) and network analysis (political blogs), DMF models—particularly those using Binomial and Negative Binomial links—consistently achieved higher classification accuracy (AUC) than standard baselines.

One key insight is the importance of modeling over-dispersion. In many real-world count datasets, the variance exceeds the mean, violating Poisson assumptions. DMF's ability to incorporate the Negative Binomial family allows it to capture this additional variability, leading to more interpretable and predictive factors.

Conclusion

Deviance Matrix Factorization bridges the gap between classical regression theory and modern dimensionality reduction. By providing a unified framework with strong statistical foundations, it offers a more flexible and reliable tool for analyzing complex, non-Gaussian datasets. Future work includes extending the model to handle zero-inflated data and scaling the algorithm for massive datasets. To support the community, the authors have provided an R package (dmf) to implement these methods.

Summary updated

BibTeX
@misc{wang2021deviance,
  author = {Liang Wang and Luis Carvalho},
  title = {{Deviance Matrix Factorization}},
  year = {2021},
  eprint = {2110.05674},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.05674},
}
Figure