Bayesian Nonparametric Poisson Factorization for Recommendation Systems

Prem Gopalan, Francisco J. R. Ruiz, Rajesh Ranganath, David M. BleiAISTATS 2014

Abstract

We develop a Bayesian nonparametric Poisson factorization model for recommendation systems. Poisson factorization implicitly models each user’s limited budget of attention (or money) that allows collaborative filtering to scale to massive, sparse datasets. However, choosing the number of latent features $K$ remains a challenge. Our proposed model, BNPPF, uses a Gamma process prior to automatically determine the optimal number of latent features, matching or exceeding the performance of fixed-dimension models without expensive manual tuning.

Introduction

In collaborative filtering, user preferences are predicted by decomposing a massive matrix of user-item interactions into latent factors. A significant challenge in these models is determining the dimensionality ($K$) of these factors. Underfitting occurs if $K$ is too small, while overfitting occurs if it is too large. Traditionally, finding the "right" $K$ requires training multiple models and comparing them via cross-validation—a process that is computationally prohibitive for industrial-scale datasets like Netflix or MovieLens.

Methods

We introduce Bayesian Nonparametric Poisson Factorization (BNPPF). The model leverages the Poisson distribution to naturally handle sparse, non-negative data, treating user behavior as a "budget of attention." Unlike Gaussian models, Poisson factorization treats zeros not just as missing values, but as evidence of limited resources.

To address the dimensionality problem, we employ a Gamma process prior. This allows for a theoretically infinite number of latent components, using a size-biased ordering to ensure the total contribution to a user's budget remains finite. We derive a mean-field variational inference algorithm using nested variational families. By setting a truncation level $T$, the BNPPF adapts the effective dimensionality within that limit during a single training run. Crucially, the algorithm exploits sparsity by only iterating over non-zero entries, maintaining a computational complexity of $O(Tr)$, where $r$ is the number of ratings.

Results

The model was evaluated on MovieLens 1M, MovieLens 10M, and Netflix 100M datasets.

Predictive Performance and Model Selection

BNPPF consistently matched or outperformed the best-tuned parametric Poisson Factorization models across all benchmarks. For instance, on MovieLens 1M, the model automatically identified an effective dimensionality of 92, even when the truncation limit was set much higher. This demonstrates the model's ability to "shut off" unnecessary components automatically.

BNPPF (red dashed line) matches or exceeds the log-likelihood of optimally tuned fixed-dimension models across three datasets.

Scalability and Efficiency

Despite its nonparametric nature, BNPPF demonstrates efficiency parity with fixed-$K$ models. On the Netflix 100M dataset, it converged in roughly the same time as a single run of a fixed-dimension model. This provides model selection "for free" during the training process, as it avoids the need for multiple runs to find the optimal $K$.

Convergence of BNPPF compared to fixed-K models. BNPPF achieves competitive performance in similar timeframes without manual tuning.

Conclusion and Future Work

BNPPF offers a scalable solution for recommendation systems that eliminates the need for manual hyperparameter tuning of latent dimensionality. It successfully captures increasingly complex patterns in user behavior as datasets grow. Future work includes extending the model to Stochastic Variational Inference (SVI) for streaming datasets and exploring more flexible posterior distributions for stick proportions to mitigate potential overfitting.

Summary updated

BibTeX
@inproceedings{gopalan2014bayesian,
  author = {Prem Gopalan and Francisco J. R. Ruiz and Rajesh Ranganath and David M. Blei},
  title = {{Bayesian Nonparametric Poisson Factorization for Recommendation Systems}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2014},
  url = {https://openreview.net/forum?id=NA430w1oMLW},
}
Figure