Griffin: How Wayfair Leverages Reinforcement Learning to Send Customers Relevant Communications

Tony Cheng17 Aug 2023

Problem

Wayfair sends millions of emails and push messages daily: batch-scheduled sales updates and real-time notifications triggered by customer behavior. Each combination of channel and notification type had its own supervised model making send decisions. Four separate models were hard to manage, sometimes sent duplicate content to the same customer, and did not coordinate across channels. Each also needed periodic retraining and a new A/B test whenever its architecture or business rules changed.

Example from the article: a customer leaves products in the cart, and a triggered email is scored in real time. The model decides send or no send, using real-time features such as how many emails the customer received in the past hour.

Solution in brief

Griffin is one governance model that makes the final send decision for every notification. It is a contextual bandit trained on email engagement, with a share of deliberately randomized decisions that keep generating fresh feedback. New policies are compared with the previous one by offline policy evaluation instead of a new A/B test.

Questions this case answers
  • How to choose, for each user and each candidate message, whether to deliver it when several siloed models make conflicting or duplicated decisions
  • How to keep a decision policy adapting to a changing environment without scheduled retraining and repeated online tests
  • How to optimize a long-term outcome that takes weeks to measure by using a fast proxy reward
  • How to decide per customer and per message whether to send an email or push notification?

Tools and methods

  • Contextual bandit (reinforcement learning) — picks send or no send per notification, mixing optimized and randomized decisions
  • Offline policy evaluation (OPE) — estimates how an updated model compares with the previous one without a live test
  • Apache Airflow — builds batch features and runs model updates
  • Reward logging table and monitors — store outcomes for retraining and track KPIs
Continue reading — it's free

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