Problem
Large experiment platforms compute results for many experiments and metrics every day. Regression adjustment (CUPED) narrows confidence intervals, but doing it in Python or R on user-level data stops working as data and experiment counts grow. Cost and latency climb. Analysts then want to tune the adjustment per metric and cohort, which clashes with the batched pipeline that keeps it cheap.
Example from the article: at Meta, regression-adjusted mean ("Mean2.0") often shrinks confidence intervals by more than 30%, so it must run reliably across hundreds of thousands of experiments.
Solution in brief
The regression coefficients come from a few aggregates, so compute those inside the query engine. Batch many experiments and metrics into one pass, pre-aggregate pre-experiment data to one row per user, and join only users who have data. Serve custom adjustments through a separate ad-hoc path for one experiment at a time.
Questions this case answers
- How to compute covariate-adjusted treatment effects for a very large number of experiments and metrics on a daily schedule within a bounded compute budget
- How to let analysts tune the covariate choice per experiment without breaking the batched pipeline or the consistency of decision data
- How to run CUPED regression adjustment daily for thousands of experiments and metrics without exploding compute cost and latency?
- How to compute regression-adjusted treatment effects inside a SQL query engine instead of a pandas data frame?
Tools and methods
- Regression adjustment (CUPED, "Mean2.0") — uses each user's pre-experiment metric to remove user-level variance from the treatment effect estimate.
- Sufficient statistics in a query engine — means, variances and covariances computed in SQL (Presto at Meta), not on a data frame.
- Batching and pre-aggregation — one pass over metric data for many experiments; per-user maps of pre-period values.
- Scheduled plus ad-hoc compute — a daily pipeline for decisions and an on-demand path for custom adjustments.
Google or a one-time email code. No password.