recbole.BPR
Matrix factorization recommender trained with the BPR pairwise ranking loss on implicit feedback.
Tabular and recommender · 2 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 168.1K
- Operations
- 2
- Framework
- PyTorch
- Recurrent
- No
- Published
- UAI 2009
- Cited by
- 4,602 (as of 19 October 2026)
- Authors
- Steffen Rendle, Christoph Freudenthaler, Zeno Gantner, Lars Schmidt-Thieme
- Source
- recbole 1.2.1
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m8590
- Graph hash
- c807b5aa897c025c1054ac96c3192b6fa25c039d9acfc677e11919407ad042dd
- Skeleton hash
- e2dbafeb166669399728b3ce34accbd3cb219745f4d496b1f1bbbd6ee7406ed6
- Architecture hash
- 1d92949ccc8fff9e4faac806e4eec6aebd50fa32c696887a1155c4512bb1b780
- Diagram SHA-256
- ec2c6c63c43b9bf2cad22c0d37e146c9e0fd6b8f2882fbe5e8446f5850d82ff2
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
BPR, Bayesian Personalized Ranking, is a method for learning a recommender from implicit feedback such as clicks and purchases. The paper's point is that matrix factorization and nearest-neighbor models were designed for the personalized ranking task but none of them was directly optimized for ranking. BPR-Opt is a generic optimization criterion for personalized ranking, derived as the maximum posterior estimator from a Bayesian analysis of the problem. It works on item pairs: if a user has viewed item i but not item j, the user is assumed to prefer i over j.
The criterion sums the log sigmoid of the score difference between the preferred and the non-preferred item, with a zero-mean normal prior on the parameters that acts as regularization. Learning uses LearnBPR, stochastic gradient descent that draws training triples by bootstrap sampling. The paper shows how to apply the method to matrix factorization and to adaptive k-nearest-neighbor.
The network on this page is the matrix factorization form, BPR-MF, which RecBole describes as a basic matrix factorization model trained in the pairwise way. It holds a user embedding table and an item embedding table, and the preference score is their dot product. On the Rossmann online-shop data and a Netflix subsample the paper reports that the two BPR-optimized models beat all other methods in AUC. On Netflix, a matrix factorization model with 8 dimensions trained with BPR-MF matched one with 128 dimensions trained with WR-MF.
Key idea. BPR derives a pairwise ranking criterion from a Bayesian analysis of implicit feedback and trains matrix factorization with bootstrap-sampled stochastic gradient descent.
- bpr
- bayesian personalized ranking
- bpr-mf
- matrix factorization
- implicit feedback
- personalized ranking
- pairwise ranking loss
- recbole bpr
- collaborative filtering
- learnbpr
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{rendle2012bprbayesianpersonalizedranking,
title={BPR: Bayesian Personalized Ranking from Implicit Feedback},
author={Steffen Rendle and Christoph Freudenthaler and Zeno Gantner and Lars Schmidt-Thieme},
year={2012},
eprint={1205.2618},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/1205.2618},
}