Modeladvanced
Probabilistic matrix factorization
Also called PMF.
Models ratings as Gaussian noise around the dot product of user and item factors with Gaussian priors, so MAP estimation is regularized MF.
Probabilistic matrix factorization (PMF) is a statistical model for a partly observed table of ratings. Each user and each item has a hidden vector of factors, and . Each observed rating is the dot product plus Gaussian noise, and the factor vectors have zero-mean Gaussian priors. Salakhutdinov and Mnih (2007) introduced it to give matrix factorization for ratings a probabilistic reading. The main fact about the model is that its maximum a posteriori estimate is the minimizer of squared error on the observed ratings plus Frobenius norm penalties on the factors, which is the usual regularized matrix factorization. So the model explains the penalty weights as ratios of variances, and it opens the way to choosing them from data and to fully Bayesian treatments. How well a fitted model predicts ratings is measured on held-out data, never proved.
The machine
Let there be users, items and ratings in . Let be the rating matrix, with if user rated item and otherwise. The parameters are a matrix and a matrix , with columns and . The model is (Salakhutdinov and Mnih 2007, Section 2):
Likelihood (Equation 1). The observed ratings are independent given the factors, with
Missing entries contribute nothing, which is the same as assuming that they are missing at random.
Priors (Equation 2). The factor vectors are independent with spherical Gaussian priors, and .
Posterior (Equation 3). By Bayes' theorem, equals
plus terms that depend on the variances and the counts but not on or .
Bounded variant (Equation 5). In their experiments the authors pass the dot product through the logistic function , so the mean is , and they map the ratings to by . This keeps predictions in the range of valid ratings.
What it counts
MAP estimation is regularized matrix factorization. Multiply the log posterior by . Maximizing it over and , with the variances fixed, is the same as minimizing (Equation 4)
A strong prior (small ) or noisy ratings (large ) give a large penalty. The step is exact: the two objectives differ by a positive factor and a constant.
Cost. One evaluation of or of its gradient takes work per observed rating plus per user and per item, so in total, where . The authors note that steepest descent takes time linear in the number of observations, and that one sweep through the Netflix data with 30 factors took under an hour in Matlab (Section 2). In Section 5 they train with mini-batches of 100,000 ratings and momentum.
What it does not give. is not convex in jointly, so gradient descent and alternating least squares are only known to approach a stationary point, which need not be a local minimum, let alone a global one: the all-zero factors are already a stationary point. The MAP estimate is a point estimate; it does not use the posterior spread.
A small example. Take , one item with held fixed, and one user who rated it . The terms of that involve are . The derivative is , which is zero at . With (a flat prior) the prediction is , the observed rating. With it is and the prediction is : the prior pulls the factor toward 0. This one-user step is ridge regression, which is why alternating least squares on solves a ridge problem per user and per item.
Relation to other models
- Singular value decomposition. If every rating is observed and , the penalties vanish and is the squared error of a rank- approximation, which the truncated singular value decomposition minimizes (Section 2). With missing entries, no such closed form is known, and the problem is hard in general (see matrix completion).
- Adaptive priors (Section 3, Equation 6). Put priors on the hyperparameters and maximize the log posterior over parameters and hyperparameters together. For Gaussian priors the best hyperparameters have a closed form when the factors are fixed, so the method alternates between the two. This chooses and from the training data instead of by a grid search.
- Constrained PMF (Section 4, Equation 7). Each user vector is , an offset plus the mean of vectors of the items the user rated. Users who rated similar sets of items get similar priors, which helps users with few ratings. The same idea, items rated as evidence about the user, appears in SVD++.
- Bayesian PMF. Instead of a MAP point, put hyperpriors on the hyperparameters and average over the posterior of and , by sampling methods such as Gibbs sampling or by variational inference. The 2007 paper names a fully Bayesian treatment with Markov chain Monte Carlo only as future work (Section 6); it is not part of PMF as defined there.
- Implicit feedback. For clicks and purchases instead of ratings, the Gaussian likelihood on observed entries is replaced by a weighted loss on all entries; see implicit feedback and ALS for implicit feedback.
- Pairwise ranking. Bayesian personalized ranking keeps the factor model and the Gaussian prior but replaces the rating likelihood by a likelihood of pairwise preferences.
Known results in the model
These are reported measurements on one data set, not theorems.
- Netflix Prize data (Section 5). The training set has 100,480,507 ratings from 480,189 users on 17,770 movies. Netflix's own system, Cinematch, had a test RMSE of 0.9514. A linear combination of several PMF models reached 0.8970, and a combination of PMF models with restricted Boltzmann machine models reached 0.8861, which the authors describe as nearly 7% better than Cinematch.
- Users with few ratings. On the full data, constrained PMF reached a validation RMSE of 0.9016, and the authors report that it generalizes considerably better than plain PMF for users with very few ratings, with the gap closing as the number of ratings grows (Section 5.4, Figure 4).
- Capacity control. On a smaller and harder subset (50,000 users, 1,850 movies) with 10 factors, PMF with adaptive priors reached a validation RMSE of 0.9197, against 0.9253 and 0.9430 for two fixed-penalty PMF models and 0.9258 for an unregularized factorization that then overfit (Section 5.3).
References
- Ruslan Salakhutdinov and Andriy Mnih, Probabilistic matrix factorization, Advances in Neural Information Processing Systems 20 (NIPS 2007), Section 2, Equations 1 to 5 (the likelihood, the priors, the log posterior and the regularized objective with lambda_U = sigma^2 / sigma_U^2); Section 3, Equation 6 (adaptive priors); Section 4, Equation 7 (constrained PMF); Section 5 (Netflix results)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag XH65PN Edit this page History Report an error Markdown