Elevating Guest Repurchasing Behavior Using Buy It Again Recommendations – Part 2

30 Apr 2025

Problem

Target shows "Buy It Again" (BIA) recommendations: items a guest has bought before and is likely to buy again. Repurchase cycles differ: strawberries have a shorter cycle than shampoo, so one decay curve fits neither. The deployed baseline, a personalized category model plus an item model inside categories (PCIC), is a category-level model. Item-level models such as short- and long-term repeat consumption (SLRC) reach good quality. Their collaborative-filtering part pushes training to about 1300 hours, too slow for billions of transactions.

Illustrative example: a guest buys strawberries and shampoo. The model should rank strawberries high soon after purchase and shampoo high only around its usual repurchase gap.

Solution in brief

Model each purchase as an event that raises the chance of the same item and category being bought again, using a Hawkes process whose kernel mixes an Exponential (short-term) and a Normal (long-term) distribution. The excitation value is the repurchase score used for ranking. Collaborative filtering is dropped. Spark data parallelism, per-item sampling and a purchase-frequency filter on the catalog cut training cost.

Questions this case answers
  • How to score which previously consumed items a user will want again when repeat intervals range from days to months and the catalog is too large for collaborative filtering
  • How to cut training time and inference latency of a per-item temporal model on billions of events without hurting ranking quality
  • How to rank previously bought items by how likely a customer is to buy them again, for products with both short and long repurchase cycles?
  • How to train a repeat-purchase model on billions of transactions within a daily training window?

Tools and methods

  • Hawkes process (SLH-BIA) — item- and category-level self-excitation scores as repurchase ranking
  • Apache Spark (Scala) — data-parallel training
  • Samples Per Item (SPI) sampling — cap on training transactions per item
  • N threshold — drops items bought rarely in a year, shrinking the model
Continue reading — it's free

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