Skip to main content
AboutWorkExperienceLogHireResume
  1. Home
  2. /
  3. Log
  4. /
  5. The bandit looked profitable because of how I scored it

10 Nov 2026/Criteo Uplift

The bandit looked profitable because of how I scored it

A replay estimator overstated the Criteo bandit. Scored with inverse-propensity weights on every event, it earns the same as showing no one the ad.

+$0.0012bandit minus showing no one the ad, interval −$0.0008 to +$0.0030

Written up 10 Nov 2026, revised 22 Nov 2026

Symptom

The Criteo bandit was reported with a profit per user well above every other policy I had scored. Then I ran the uplift model comparison with inverse-propensity weighting, and the best policy in that table came out at roughly +$0.024 per user. The bandit figure from the pipeline was far higher than anything in the same table, on the same test rows.

Two numbers for the same kind of quantity, from the same data, cannot both be right.

Hypothesis

The pipeline scored the bandit with a replay estimator, which averages profit over the events where the bandit’s choice matched the logged action. Treatment was logged for 85% of users and withheld from 15%. A user the bandit would treat matches the log far more often than one it would skip, so the matched events over-represent the cases where it treats.

If that was the cause, scoring every event with inverse-propensity weights should lower the bandit’s number, and the gap should show up in a test where the true value is known.

Evidence

I wrote the extra question into docs/phase4_protocol.md as a logged deviation, because I added it after seeing the main table. Then I replayed the identical 1,000,000-event stream once, recorded the arm the bandit chose on every event, and scored it on all events with the inverse-propensity formula. 1,000 bootstrap resamples, seed 0.

Profit per user on 1,000,000 logged events, inverse-propensity weighted (95% interval)
PolicyProfit per user
LinUCB bandit+$0.0224 (+$0.0207 to +$0.0243)
Show no one the ad+$0.0212 (+$0.0189 to +$0.0237)
Show everyone the ad−$0.0679 (−$0.0691 to −$0.0667)
Bandit minus show no one+$0.0012 (−$0.0008 to +$0.0030)

Source: A-B-Testing/results/phase4/bandit_ipw.json.

The bandit chooses to treat on 3.1% of events. At $0.10 an ad, nearly every ad loses money, and it learned to stay out of the way.

The same phase compared targeting models on a 60/20/20 split (2.80 million test rows, 10% budget, paired bootstrap). The X-Learner beats the T-Learner by $0.0011 per user (interval 0.0003 to 0.0018) and random targeting by $0.0084. It loses to a plain response model that ignores treatment, by $0.0006 (interval −0.0011 to −0.0001).

Root cause

The estimator was biased. Replay on a skewed logging policy favours the arm that was logged more often, and the bandit’s profit was partly that bias. Underneath the bias, there was little to find: a policy that rarely treats cannot beat one that never does by much.

Fix

I scored the bandit with inverse-propensity weights on every event and removed every figure that depended on the replay estimator from the site: the headline, the seeding comparison, the cost sweep, and the profit audit of the distilled tree. What remains of the distillation section is latency, about 2,667 times faster than the ensemble, and fidelity, R² of 0.66. The homepage card and the case study now say the bandit is level with doing nothing.

Regression guard

Two tests in tests/test_ipw_profit.py pin this down. One checks that the inverse-propensity estimate matches the true value of a policy whose value is known. The other builds a case where the replay average is biased and the weighted estimate is not. If someone swaps the estimator back, the second test is where it shows.

Status

Open. The bandit is not shown to beat showing no one the ad, and a response model matches the X-Learner. I have not re-scored the distilled tree’s profit with the weighted estimator, so the page makes no profit claim for it. That would take the same test rows and a written protocol first.

Sources

  • Commit 4556ab4: inverse-propensity scoring, protocol and tests
  • docs/phase4_protocol.md, with the deviation dated 10 Nov 2026
  • tests/test_ipw_profit.py

Read the Criteo Uplift case study

OlderHybrid retrieval did not beat BM25, and the reranker did the work
HomeProjectsAboutExperienceLogHireContactResumeGitHubLinkedIn
© 2026 Bhargav Kr Nath