Bayesian Statistics

Recommender Systems

Bayesian recommender systems use probabilistic matrix factorization, collaborative filtering, and hierarchical priors to predict user preferences — providing calibrated uncertainty that distinguishes confident recommendations from exploratory suggestions.

P(r_ui | U, V) = N(r_ui | u_i^T v_j, σ²)

Recommender systems predict what items a user will enjoy based on past behavior and the behavior of similar users. The core challenge is a massive missing data problem: the user-item rating matrix is overwhelmingly sparse, with users having rated only a tiny fraction of available items. Bayesian methods address this sparsity by treating unknown ratings as random variables, placing structured priors on user and item representations, and computing posterior predictive distributions that quantify confidence in each recommendation.

Bayesian Matrix Factorization

Probabilistic matrix factorization (PMF) models each rating as the inner product of a user latent factor vector and an item latent factor vector, plus noise. The Bayesian version places priors on the latent factors, typically Gaussian priors with hyperpriors on the precision, and infers the full posterior distribution using MCMC or variational inference. This provides uncertainty estimates for each predicted rating — a critical advantage over point-estimate methods that cannot distinguish between a confidently predicted 4-star rating and an uncertain prediction that could be anywhere from 2 to 5 stars.

Bayesian Probabilistic Matrix Factorization r_{ij} ~ N(u_i^T v_j, σ²)
u_i ~ N(μ_U, Λ_U⁻¹),   v_j ~ N(μ_V, Λ_V⁻¹)
(μ_U, Λ_U) ~ N-Wishart(μ₀, κ₀, W₀, ν₀)

where u_i and v_j are latent factor vectors for user i and item j.

Collaborative Filtering with Bayesian Priors

Bayesian collaborative filtering extends beyond matrix factorization to include neighborhood methods with Bayesian smoothing, Bayesian clustering models that group users into preference types, and nonparametric models where the number of latent factors or user clusters is inferred from the data. The Indian Buffet Process prior allows each user to express an unknown number of latent preferences, automatically adapting model complexity to the data.

The Exploration-Exploitation Tradeoff

A fundamental tension in recommendation is between exploitation (recommending items predicted to score highest) and exploration (recommending uncertain items to learn user preferences). Bayesian uncertainty enables principled exploration through Thompson sampling: sample from the posterior predictive distribution and recommend the item with the highest sampled rating. This naturally explores uncertain items while mostly recommending high-quality items, and is provably optimal in a multi-armed bandit sense.

Content-Based and Hybrid Models

Bayesian methods seamlessly integrate content features (item descriptions, user demographics, contextual information) with collaborative signals. Bayesian regression with user-item interaction features, Bayesian deep learning models that learn content representations with uncertainty, and Bayesian meta-learning for cold-start users (who have few or no ratings) all leverage the prior to inject structural knowledge about how content features relate to preferences.

Sequential and Session-Based Recommendation

User preferences evolve over time, and the order of interactions carries information. Bayesian state-space models and recurrent Bayesian models track the evolution of user preferences, with the posterior updating as new interactions arrive. This temporal Bayesian filtering enables real-time personalization that adapts to changing interests while maintaining uncertainty about the degree of change.

"The difference between a good recommendation and a great one is often not prediction accuracy but knowing when to be bold and when to be cautious — and that requires uncertainty." — Ruslan Salakhutdinov, co-creator of Bayesian Probabilistic Matrix Factorization

Current Frontiers

Bayesian methods for fairness-aware recommendation ensure that uncertainty does not disproportionately affect marginalized groups. Causal Bayesian models distinguish between items a user would enjoy and items that merely correlate with their history. And Bayesian approaches to multi-stakeholder recommendation balance the interests of users, content creators, and platforms within a decision-theoretic framework.

Related Topics