KatInterview

Targeting Discounts with Causal ML on Logged Data

Machine LearningModel answer
HardModel answerMachine Learningcausal-inferenceuplift-modelingoff-policy-evaluation

Last updated

Design a causal ML pipeline that learns who should receive a standing promotion from observational logs, covering estimators, overlap, off-policy evaluation, fairness and a safe rollout.

A product has run a discount that is effectively always available to users. You only have historical logs, with no randomized experiment. For each user you observe pre-exposure features, whether they received the discount, and the revenue that followed. The business wants to spend the discount only where it creates extra revenue.

Describe an end-to-end causal ML approach that estimates how the discount effect varies across users and turns those estimates into a targeting rule. Your answer should cover:

  1. Estimator choice. Compare S-, T-, X- and DR-learners. Justify your pick using bias-variance trade-offs and the assumption that the logged assignment is unconfounded given the features.
  2. Modeling details. Which models do you use for the nuisance functions and for the final effect model? How does cross-fitting reduce overfitting and nuisance-induced bias?
  3. Overlap problems. How do you detect and handle poor overlap, extreme propensity scores, and deterministic eligibility rules?
  4. Evaluation. Which metrics would you use (policy value, uplift or Qini curves, a proxy for effect-estimation error)? How do you implement off-policy evaluation with inverse propensity weighting and doubly robust estimators?
  5. Fairness. Suppose the policy must satisfy demographic parity in who gets treated. How is that enforced, and what does it cost in value?
  6. Safe rollout. How would you test the learned policy online before deploying it fully?

State your assumptions explicitly, and mention the pitfalls you would watch for.

Hints

Hint 1

Start with the potential-outcomes setup: what is the effect function, what is the optimal rule when treating costs money, and which three assumptions (unconfoundedness, overlap, no interference) let you identify it from logs?

Hint 2

A pseudo-outcome that combines outcome-model predictions with an inverse-propensity-weighted residual is orthogonal to nuisance errors. Fit the nuisances on other folds so each user's pseudo-outcome is not contaminated by their own data.

Hint 3

You cannot observe individual effects, so evaluate with quantities that can be estimated: doubly robust policy value, cumulative uplift of top-ranked users, and calibration by score bin. For rollout, think holdout, ramp-up, and guardrail metrics.

Hint 4

Parity of treatment rates can be achieved with group-specific cutoffs on the net benefit score. Quantify the value you give up by comparing constrained and unconstrained policies on the same evaluation folds.