25/31
Part 6 of 6 · What interviewers ask nextLearn and do

What does IPS cost in variance?

Each click is weighted 1/p1/p, so one click at a rarely seen position swings the estimate. For a single impression at a position with propensity pp:

Var⁡ ⁣(cp)=rp−r2\operatorname{Var}\!\left(\frac{c}{p}\right) = \frac{r}{p} - r^2

Var⁡\operatorname{Var} is the variance, how much one impression's weighted click spreads around rr. At r=0.3r = 0.3 that's 0.21 at the top, 2.91 at p=0.1p = 0.1 and 29.91 at p=0.01p = 0.01. So data from a position seen 10% of the time needs about 14 times as many impressions to pin down rr as data from the top.

Clipping caps the weight. Divide by max⁡(p,τ)\max(p, \tau) instead of pp, where τ\tau (tau) is the smallest propensity you allow:

Propensity p1.00.50.20.10.01
weight 1 / p12510100
clipped at τ = 0.11251010: capped

Joachims, Swaminathan and Schnabel clip small propensities to a threshold to trade bias for variance. Clipped clicks are undercounted, so the estimate is biased low. At τ=1\tau = 1 every weight is 1, and you're back to raw click-through rate.

Whether it pays depends on how much data you have. Here's one item with a true rate of 0.3, shown evenly at ranks 1 to 10, with p=1/rankp = 1/\text{rank}:

Clip at τ\tauMean estimateError (RMSE), 50 impressionsError (RMSE), 1,000 impressions
none0.3000.1770.039
0.20.2470.1420.061
0.30.2000.1420.103
0.50.1460.1690.155
1, raw CTR0.0880.2160.212

With 50 impressions, clipping at 0.2 cuts the error by a fifth. With 1,000, the bias outweighs the variance it saves, and plain IPS wins. The paper found the same: clipping improves performance on small datasets. Pick τ\tau on held-out data, and report it with the estimate.

Errors in the propensities themselves aren't symmetric either. The same paper found that overestimating small propensities is tolerable, while underestimating them can hurt, because an underestimate inflates the weights. Clipping is a deliberate overestimate.

In the editor, write variance(r, p): the variance of one weighted click, from the formula above. Then write clipped_weight(p, tau): the weight after clipping at tau.