Beyond Matrix Factorization: Using hybrid features for user-business recommendations

Srivathsan Rajagopalan25 Apr 2022

Problem

Yelp recommends local businesses in push notifications, emails, the home feed and Collections. Its old model was Spark ALS matrix factorization. It learns one vector per user and per business, so it needs many interactions for each ID. Users with few interactions (tail users) had to be excluded, and the model could not use content such as review text, ratings or business categories. So tail users got no model-based recommendations, and new signals could not be added.

Illustrative example: a "Hot & New" push campaign needs a short list of new restaurants near each user, and many recipients have almost no interaction history.

Solution in brief

Keep matrix factorization, but turn its user-business score into one feature of a supervised ranker. Add interaction aggregates and content features, including a review-text similarity feature. Train XGBoost with an NDCG ranking objective on candidates chosen by a recall step, and use the same recall step at prediction time.

Questions this case answers
  • How to recommend items to users with sparse interaction history when a latent-factor model only covers users with rich history
  • How to combine collaborative scores with content features in one ranking model when the logs contain no explicit negatives
  • How to recommend businesses to users who have too few interactions for matrix factorization?
  • How to add content features such as review text and ratings to a collaborative-filtering recommender?

Tools and methods

  • Matrix factorization (Spark ALS) — gives a collaborative affinity score for head users
  • XGBoost with rank:ndcg (LambdaMART) — ranks recalled candidates per user and location
  • Universal Sentence Encoder — encodes reviews for the text-similarity feature
  • Recall step — shortlists candidates by location, popularity or product rules, in training and in prediction
  • Partial dependence plots — check which signal the model relies on for each user group
Continue reading — it's free

Google or a one-time email code. No password.