NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ML-assisted Randomization Tests for A/B Experiments

Wenxuan Guo, JungHo Lee, Panos ToulisNeurIPS 2026

TL;DR

Standard A/B tests—even modern ones supercharged with machine learning—often go blind when a new feature delights one group of users while annoying another, causing the average effect to wash out to zero. This paper introduces an ML-assisted randomization test that directly asks: does knowing who got the treatment help a flexible ML model make better out-of-sample predictions? By combining cross-validation with classical permutation testing, this method reliably catches subtle, tangled treatment effects with exact finite-sample guarantees, no matter how black-box your ML model is.

What Problem Does This Paper Address?

Imagine running an A/B test on a new website layout. Classic $t$-tests often struggle here because user behavior is noisy and real-world effects are tiny. To boost sensitivity, industry data scientists commonly use "residualization": they train an ML model to predict the outcome (say, revenue) from user features alone, subtract those predictions to remove baseline noise, and run a standard test on the leftovers (residuals).

Here is the catch: residualization implicitly hunts for an average treatment effect. In modern platforms, treatments interact wildly with user context. If a new pricing strategy boosts rides in the suburbs by 5% while tanking downtown rides by 5%, the average effect is zero. Residualization-based tests lose massive statistical power in these heterogeneous settings, completely missing that the treatment actually did something profound. We need a rigorous way to detect any treatment impact, even when positive and negative effects cancel out.

Methods

The authors marry a century-old statistical idea—the Fisher Randomization Test (FRT)—with modern machine learning, naming their procedure ML-FRT.

Instead of stripping out feature noise first, they pit two ML models head-to-head using $k$-fold cross-validation (CV):

  1. A baseline model trained to predict the outcome using only user features ($X$).
  2. A full model trained on both user features ($X$) and the treatment assignment ($Z$).

What is new here is the test statistic: the contrast in out-of-sample CV squared error between the baseline and full models. If the treatment actually matters—even only through complex feature interactions—the full model should predict better, yielding a positive error reduction.

To get a $p$-value, they rely on the known experimental design: they repeatedly re-shuffle (permute) the treatment labels $Z$, refit the models on the fixed CV folds, and recompute the CV error difference. Comparing the real error drop to this shuffled reference distribution yields an exact, finite-sample valid $p$-value—meaning zero reliance on large-sample asymptotics or assuming your ML model is "correctly specified."

Datasets

  • Synthetic Simulations: Simulated Bernoulli A/B experiments ($n = 100$, $p = 2$) with correlated normal features and non-linear, heterogeneous treatment effects.
  • Criteo Uplift Prediction Dataset: A real-world benchmark from a massive randomized advertising experiment (~13 million user-ad impressions, 84.6% treatment rate). It includes 12 anonymized features and tracks two binary outcomes: website visits and conversions. (No new benchmarks were introduced.)

Key Insights and Ideas

  • Variance over Averages: Classic residualization only "sees" the treatment effect squared after averaging: $[\mathbb{E}h(X)]^2$. ML-FRT captures the average of the squared effect: $\mathbb{E}[h^2(X)]$. Because squares are never negative, opposing effects across user subgroups add to the signal rather than canceling each other out!
  • Better ML = More Statistical Power: The authors prove theoretically that the test's Type II error (false negative rate) drops exponentially with $\Delta^2$, where $\Delta$ is the population predictive gain of using real vs. shuffled treatments. Plugging in a smarter ML model directly buys you higher statistical power, without ever risking inflated false positives.
  • Variable Importance Meets Causal Inference: If you swap CV error for random forest "out-of-bag" error, this causal test statistic mathematically mirrors Leo Breiman’s classic Mean Decrease Accuracy (MDA) and the total Sobol index.

Key Results

  • Simulations: When testing across linear models, interaction models, and random forests (RF), test power tracked the empirical predictive gain ($\widehat{\Delta}$) tightly. As the richest function class, RF achieved both the largest $\widehat{\Delta}$ and near-1.0 rejection rates as interaction strength grew, leaving simpler models behind.
  • Criteo Benchmark: On raw Criteo data, naive linear ML-FRT missed the visit effect ($p = 0.9840$), whereas GLM and xgboost ML-FRT easily caught significant effects for both visits and conversions ($p \le 0.0205$), matching the residualized baseline.
  • Isolating Pure Heterogeneity: When the authors artificially subtracted out the average treatment effect from the Criteo data to test purely for subgroup heterogeneity (using xgboost), residualization went completely blind ($p = 1.0000$ for visits; $p = 0.9082$ for conversions). Meanwhile, ML-FRT cleanly detected significant heterogeneity in user visits ($p = 0.0011$).

Limitations and Future Work

  • Detection, Not Estimation: ML-FRT is an "omnibus" alarm bell. It tells you whether a treatment had an effect, not how big it is or even whether it was net positive or negative. Adapting variable importance metrics to estimate effect magnitudes is a key next step.
  • Theoretical Guardrails: The formal power guarantees rely on bounded outcomes, i.i.d. Bernoulli randomization, and a technical condition requiring the ML model class to be rich enough that baseline feature effects don't overwhelm and flip the sign of the learned treatment signal.
  • Complex Designs: The authors assume no interference between users (SUTVA) and highlight extending ML-FRT to trickier setups—like switchback or factorial experiments where carryover effects vary over time—as promising future work.

Summary updated

BibTeX
@inproceedings{guo2026ml,
  author = {Wenxuan Guo and JungHo Lee and Panos Toulis},
  title = {{ML-assisted Randomization Tests for A/B Experiments}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=jSH9fXOyOf},
}
Figure