EconBase
← Back to paper

On the Limits of Regression Adjustment

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

9,141 characters · 4 sections · 10 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

On the Limits of Regression Adjustment

Introduction

Regression adjustment lin2013agnostic, sometimes known as Controlled-experiment Using Pre-Experiment Data (CUPED) deng2013improving, is an important technique in internet experimentation. It decreases the variance of effect size estimates, often cutting confidence interval widths in half or more while never making them worse. It does so by carefully regressing the goal metric against pre-experiment features to reduce the variance.

The tremendous gains of regression adjustment begs the question: How much better can we do by engineering better features from pre-experiment data, for example by using machine learning techniques guo2021machine,guo2023generalized or synthetic controls zhang2021regression? Could we even reduce the variance in our effect sizes arbitrarily close to zero with the right predictors?

Unfortunately, our answer is negative. A simple form of regression adjustment, which uses just the pre-experiment values of the goal metric, captures most of the benefit. Specifically, under a mild assumption that observations closer in time are easier to predict that ones further away in time, we upper bound the potential gains of more sophisticated feature engineering, with respect to the gains of this simple form of regression adjustment. The maximum reduction in variance is $50\%$ in (ref), or equivalently, the confidence interval width can be reduced by at most an additional $29\%$.

This result allows us to assess the potential value of investing in more advanced versions of regression adjustment. Furthermore, this upper bound suggests a fundamental boundary for how much analysis-based variance reduction that adjusts random imbalance from sampling can achieve. Many methods, such as inverse propensity score weighting or synthetic control, fall under this framework and suffer the same limitations. Breaking this barrier may require injecting domain knowledge on the causal mechanism which enables us to adjust for appropriate post-treatment variables deng2023variance, or changing the experimental design directly.

Main Result

When $\rho \in [0, 1]$ is the correlation between the post-experiment values and the pre-experiment values in the goal metric, the regression adjustment estimator reduces the variance by a factor of $1 - \rho^2$, i.e.\ when $\rho \approx 1$ and the post-experiment values can be nearly perfectly predicted by the pre-experiment values, then the variance of the treatment effect estimator goes to $0$. These pre-experiment covariates can be further refined via feature engineering. For example, a machine learning model can generate predictions for the post-experiment metric, which we can use as covariates guo2021machine,guo2023generalized.

While any covariates that are known to be unaffected by the treatment assignment is valid deng2013improving, practitioners often restrict themselves to “safe” covariates that are pre-treatment xie2016improving. Under a reasonable assumption ((ref)) that we cannot predict the goal metric in the post-experiment period any better than in the pre-experiment period, we show that this “safe” form of advanced regression adjustment is limited in further variance reduction. Specifically, \[ \operatorname{var}(\hat\delta_{\text{advanced r.a.}}) \ge \frac{1}{1 + \rho} \operatorname{var}(\hat\delta_{\text{basic r.a.}}). \] In particular, when basic regression adjustment is very effective ($\rho \approx 1$), advanced regression adjustment via feature engineering can only reduce it further by $50\%$; when basic regression adjustment is not effective ($\rho \approx 0$), advanced regression adjustment will not be effective either.

Mathematical setup

Suppose $Y_{\mathrm{pre}}$ and $Y_{\mathrm{post}}$ are the pre-experiment and post-experiment values in the goal metric of a randomly sampled user. Then the basic regression adjustment reduces the variance of the estimated average treatment effect by \[ \frac{\operatorname{var}(\hat\delta_{\text{basic r.a.}})}{\operatorname{var}(\hat\delta_{\text{original}})} = 1 - \rho^2 = 1 - \operatorname{cor}(Y_{\mathrm{pre}}, Y_{\mathrm{post}})^2. \]

More advanced regression adjustment methods attempt to design a covariate $X$ that is as correlated with $Y_{\mathrm{post}}$ as possible. Typical advanced regression adjustment methods include:

itemize• {\em Using multiple pre-experiment covariates.} We can consider the resulting linear combination of the multiple pre-experiment covariates as $X$. • {\em Producing predictions of $Y_{\mathrm{post}}$ based on external datasets.} While the predictions can be used directly in a diff-in-diff way, guo2023generalized recommends regressing $Y_{\mathrm{post}}$ on these predictions to maintain prediction unbiasedness, a property that gives more robustness to model misspecification. In this case, these predictions play the role of $X$. • {\em Producing predictions of $Y_{\mathrm{post}}$ using $Y_{\mathrm{post}}$.} Using post-experiment data of specifically goal metric is technically not allowed in regression adjustment. guo2021machine circumvents this by cross-fitting to avoid overfitting. We are now effectively in the previous scenario --- the model is always based on a different split, i.e.\ data external to this split.

Suppose $X$ is the best possible covariate for regression adjustment, and denote the correlation matrix of $(X, Y_{\mathrm{pre}}, Y_{\mathrm{post}})$ as follows.

equation[equation omitted — 155 chars of source]

Our assumption in (ref) can be stated more formally as (ref).

assumptionThe correlation between $X$ and $Y_{\mathrm{post}}$ is at most the correlation between $X$ and $Y_{\mathrm{pre}}$. In other words, $\tau \le \sigma$.

The variance reduction from advanced regression adjustment is $1 - \tau^2$, so the relative variance reduction compared to basic regression adjustment is given by $(1 - \tau^2) / (1 - \rho^2)$. Our main result gives a lower bound to this ratio.

theoremSuppose $X$ is the best possible covariate for regression adjustment. Under (ref), we have \[ \frac{1 - \tau^2}{1 - \rho^2} \ge \frac{1}{1+\rho}. \]
proofSince $X$ is the best possible covariate for regression adjustment, the maximum correlation between $Y_{\mathrm{post}}$ and any linear combination in form of $aX + bY_{\mathrm{pre}}$ must be attained at $(a, b) = (1, 0)$. Hence the optimization problem \[ \text{maximize } \operatorname{cov}(aX + bY_{\mathrm{pre}}, Y_{\mathrm{post}}) \text{ subject to } \operatorname{var}(aX + bY_{\mathrm{pre}}) = 1 \] is solved at $(a, b) = (1, 0)$. With (ref) and adding in $\lambda$ as a Lagrange multiplier, we can rewrite the optimization problem as \[ \text{maximize } (a\tau + b\rho) - \lambda(a^2 + b^2 - 2ab\sigma - 1). \] In particular, the partial derivatives with respect to $a$ and $b$ should be $0$ at $(a, b) = (1, 0)$, so \[ \tau - 2\lambda = 0 \text{ and } \rho - 2\sigma\lambda = 0 \Longrightarrow \rho = \sigma\tau. \] Finally, we have $\tau^2 \le \sigma\tau = \rho$ and hence \[ \frac{1 - \tau^2}{1 - \rho^2} \ge \frac{1 - \rho}{1 - \rho^2} = \frac{1}{1+\rho}. \qedhere \]

Discussion of \texorpdfstring{(ref)}{Assumption 1}

While highly intuitive, (ref) itself is not generally testable, in the sense that even if it holds for some $X$, there may be other covariates $X'$ that we can engineer where it no longer holds.

There are some heuristics why (ref) plausibly holds. For example, if we believe in some loose form of stationarity, then our ability to predict $Y_{\mathrm{post}}$ after $t$ days of treatment should be similar to predicting $Y_{\mathrm{pre}}$ using data $t$ days before the experiment begins, which in turns less than our ability to predict $Y_{\mathrm{pre}}$ using all available pre-experiment data.

We also note some cases where the assumption may reasonably fail. Seasonality can be one reason the assumption fails. Suppose our outcome is post-treatment time period is winter and our pre-treatment period is fall. If our goal metric measures home heating costs, then it is reasonable to believe that last winter's home heating costs ($X$) could be a better predictor of next winter's heating costs ($Y_{\mathrm{post}}$) than it is of the fall's ($Y_{\mathrm{pre}}$).

Another reason is if the post-treatment time period is significantly longer than the pre-treatment period. In this case, the post-treatment period has smoothed over more daily fluctuations and may be easier to predict.

\printbibliography