This vignette summarizes the K-Fold Personalization Estimator.
References:
- Zhaoqi Li, Emma Brunskill, A statistical test for the benefits of personalizing interventions. Science 393, eaeb9506 (2026). DOI: 10.1126/science.aeb9506
- 2-fold variant detailed here
Target
Given tuples with known or estimated propensities , the personalization effect is defined as
where is the optimal personalized policy and the right-hand term is the expected outcome under the best single treatment applied to every individual.
Algorithm 2: per-shuffle cross-fit (kpe2 shared-nuisance variant)
Partition the
rows into
n_folds folds. Choose
n_nuisance_folds folds on which to fit the nuisances
(default
);
the evaluation block size is
and must divide
,
so the folds tile into
non-overlapping evaluation blocks. For each block
:
- Fit all nuisances β the reward model
,
the contextual policy
,
the best single arm
,
and (when
is_rct = FALSE) the propensity β on the folds outside block . - Evaluate the AIPW influence function (Eq. S17) on the folds of block :
Concatenating the per-block vectors across all blocks yields a length- vector in which each sample is evaluated exactly once; the shuffle-level summary is and .
Unlike the original Algorithm 2 (Li and Brunskill, Science 2026) β
which fits the policy and reward models on disjoint subsets of
the non-evaluation folds β kpe2 fits every nuisance on the same
folds. The default
gives
and
:
leave-one-fold-out, fitting every nuisance on
folds and evaluating on the remaining one, rotated
times (with
,
that is 5/6 of the data to fit and 1/6 to evaluate). When
is_rct = TRUE (the default),
above is the known design propensity and nothing is fit for it; when
is_rct = FALSE, the fitted
is used in both the influence evaluation and the best-arm
comparison.
Algorithm 1: aggregation across shuffles
Algorithm 2 is repeated for random shuffles, and the per-shuffle pairs are aggregated via
The first term accounts for within-shuffle influence variance; the second term accounts for across-shuffle variability introduced by sample splitting.
The one-sided upper-tail t-statistic is
,
and the reported p_value is the corresponding upper-tail
probability under
.
The confidence_interval is the 95% Wald interval
.