Indexable Probabilistic Matrix Factorization for Maximum Inner Product Search

Marco Fraccaro, Ulrich Paquet, Ole Winther

Abstract

Modern recommender systems often rely on Maximum Inner Product Search (MIPS) to retrieve relevant items for users. However, MIPS is computationally expensive at scale. This paper introduces Indexable Probabilistic Matrix Factorization (IPMF), a novel approach that ensures models are "search-ready" by design. By constraining item vectors to a hypersphere during training, IPMF transforms the MIPS problem into a fast Nearest Neighbor Search (NNS). Experimental results on large-scale datasets show that IPMF achieves a 50% speedup in retrieval time over state-of-the-art post-processing methods while maintaining the predictive accuracy of standard Bayesian Probabilistic Matrix Factorization (BPMF).

The Challenge of Real-Time Retrieval

In collaborative filtering, the goal is to find items that maximize the dot product between a user vector and item vectors. Naively, this requires $O(M)$ calculations, where $M$ is the number of items. As catalogs grow into the millions, this linear scan becomes a bottleneck.

Existing solutions typically rely on "post-processing" transformations to convert MIPS into Euclidean distance problems. However, these methods often result in unbalanced vectors where specific dimensions dominate, reducing the efficiency of standard search data structures like kd-trees or k-means trees.

Methodology: Native Indexability

IPMF shifts the complexity from post-processing to the training phase by baking geometric constraints directly into the probabilistic model.

1. Hyperspherical Constraints

Instead of standard Gaussian priors, IPMF uses a Von Mises-Fisher (vMF) distribution for item vectors. This forces all item vectors $v_j$ to lie on a unit hypersphere ($||v_j|| = 1$). When vectors are normalized to the same length, maximizing the inner product is mathematically equivalent to minimizing Euclidean distance. This makes the model "natively indexable" for Approximate Nearest Neighbor Search (ANNS).

2. Geodesic Monte Carlo (GMC)

Sampling from a distribution constrained to a manifold is challenging for standard algorithms like Metropolis-Hastings, which often struggle with high rejection rates or slow mixing on curved surfaces. The authors utilize Geodesic Monte Carlo (GMC), an extension of Hamiltonian Monte Carlo that performs efficient sampling by following the geodesics of the hypersphere.

Comparison of Metropolis-Hastings and Geodesic Monte Carlo sampling on a sphere. GMC (right) explores the manifold more efficiently than standard MH (left).

Experimental Results

The model was evaluated on the Netflix (100M ratings) and Yahoo! Music (283M ratings) datasets.

Accuracy Preservation

A key concern with adding constraints is the potential loss of expressiveness. However, results indicate that forcing items onto a hypersphere does not significantly degrade performance. On the Netflix dataset with $D=20$ latent features, IPMF achieved an RMSE of 0.9067, nearly identical to BPMF's 0.9059.

Test RMSE across different item popularity levels for Netflix and Yahoo! Music datasets. IPMF closely tracks the performance of the unconstrained BPMF.

Retrieval Efficiency

IPMF demonstrated a 50% improvement in retrieval time compared to "BPMF+" (BPMF with post-processing) for the same level of precision. By avoiding the "large dimension trap" of post-processing—where one added dimension dominates the vector space—IPMF creates better-balanced search trees, allowing ANNS algorithms to partition the space more effectively.

Conclusion and Future Work

IPMF demonstrates that indexability should be a first-class citizen in model design rather than an afterthought. While the training phase is more computationally intensive due to the complexity of GMC (taking roughly 3x longer than BPMF on Yahoo! Music), the gains in real-time retrieval speed and the preservation of accuracy make it a compelling choice for large-scale production systems. Future research may explore tighter integration between the inference process and the construction of indexing structures to further streamline the deployment pipeline.

Summary updated

BibTeX
@inproceedings{fraccaro2016indexable,
  author = {Marco Fraccaro and Ulrich Paquet and Ole Winther},
  title = {{Indexable Probabilistic Matrix Factorization for Maximum Inner Product Search}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2016},
  doi = {10.1609/aaai.v30i1.10234},
}
Figure