Definition

Bayesian personalized ranking (BPR) is a metric that help evaluate the performance of recommendation system. It focuses on the relative order of items rather than absolute scores.

Let be a set of all users, be a set of all items, be a set of observed user-item interactions, and be a set of negative edges.

For each user , the rooted positive and negative edges are defined as The BPR loss for user is defined as

The final BPR loss is the average of them. where:

  • is a Sigmoid Function
  • and are the embedding vectors of and .
  • is the score between and .