26/36
Part 4 of 5 · Position bias and evaluationLearn and do

Position bias, in training and in evaluation

Labels come from what the old ranker showed

This is where that Airbnb interviewer "really dug into" position bias (1 report), and it's the push to prepare for. Your labels come from what the previous ranker showed, and guests mostly book what they see near the top. A listing that sat on page three for a year has few bookings because few people looked, not because it's bad. Train on those labels as they are, and the new model learns the old model's order.

Airbnb's 2020 paper says the same thing. A model trained to predict bookings learns a chance that depends on the position. The position was a decision of the previous model, so the current model ends up depending on the previous ones.

Fix one: weight each example by one over its propensity

PositionChance a guest looksWeight, 1 / chance
11.01
30.52
100.110

A propensity is the chance that a guest looks at a position at all. Estimate it from randomized swaps, or harvest it from past A/B tests. Then weight each training example by one over its position's propensity. A booking at a slot few guests see counts for more, because it happened against the odds.

Big weights also make the estimate noisy. The ranking metrics lesson works through this method and that cost.

In the editor, write weighted_rates(log, propensity): each listing's booking rate, with every booking weighted by one over its slot's propensity. Each log row is (listing, slot, impressions, bookings), and L2 has two rows because it was shown at two slots.