The best predictor is not the best adjustment

Regression adjustment for experiments on networks

In a randomized experiment on a network, the variance of a regression-adjusted estimator weights units very unequally. So the outcome model that predicts best is generally not the one that estimates the effect most precisely. We show how to recalibrate any predictor, from a linear model to a graph neural network, toward the variance itself, and we report where this helps and where it does not.

Prediction error and estimator SD as functions of the adjustment coefficient
Prediction error and estimator variance prefer different adjustments. Left: in a toy network experiment (an illustration, not a paper result), the coefficient that minimizes prediction error (gray, $b=1.13$) is far from the one that minimizes the variance of the effect estimator (blue, $b=2.23$). Right: across 1,000 simulated experiments, a standard least-squares fit lands near the left minimum; our calibration (GER, orange) is noisier but centred much closer to the right one, and its effect estimates have 20% smaller standard deviation (0.244 vs. 0.306).

Suppose you run a randomized experiment on a social network: some people receive an intervention, and you want to know how much it matters, for them and for their friends. Because outcomes spill over along edges, the analysis has to account for each person's exposure, a summary of their own and their neighbours' treatments. Randomization still gives you an unbiased estimator for free. What it does not give you is precision, and with a few hundred or a few thousand units, precision is usually the binding constraint.

The standard way to buy precision is regression adjustment: predict each unit's outcome from covariates, and let the estimator correct only the part the model gets wrong. The natural instinct is to make the prediction as good as possible. Under interference this instinct is subtly wrong, and the figure above shows why: the coefficient that minimizes prediction error and the coefficient that minimizes estimator variance can be far apart.

In this article we explain where that gap comes from, describe a simple calibration step that closes it without needing the unknown optimum, and walk through five experiments, including two where the calibration does not help and one where it fails outright.

1. Randomization makes any adjustment unbiased

We have $n$ units on a graph $G$, each randomly treated ($A_i \in \{0,1\}$). An exposure mapping turns the treatment vector into a discrete exposure $D_i$ for each unit, for example "the share of my neighbourhood that is treated, cut into low, medium, high". We assume each unit's outcome depends on treatments only through $D_i$, so unit $i$ has one potential outcome $Y_i^{(d)}$ per exposure level, and we want the average contrast $\tau = \frac1n\sum_i \big(Y_i^{(d_1)} - Y_i^{(d_2)}\big)$.1

Because the treatment is randomized by us, the probability $\pi_i^{(d)} = \Pr(D_i = d)$ is known (we compute it by simulating the design). That makes the augmented inverse-probability-weighted (AIPW) estimator available:

$$ \hat\mu^{(d)} \;=\; \frac1n \sum_{i=1}^n \Big\{ \underbrace{f_i^{(d)}}_{\text{prediction}} \;+\; \underbrace{\frac{\mathbb 1(D_i = d)}{\pi_i^{(d)}}\big(Y_i - f_i^{(d)}\big)}_{\text{reweighted correction}} \Big\}, \qquad \hat\tau = \hat\mu^{(d_1)} - \hat\mu^{(d_2)}. $$

The correction term has expectation $Y_i^{(d)} - f_i^{(d)}$ under the design, whatever $f$ is, so $\hat\tau$ is unbiased for any prediction $f$: a linear model, a random forest, a graph neural network, or zero. No modelling assumption is needed for validity. The prediction only decides how noisy the estimate is.

With a randomized design, the outcome model is not about bias. It is purely a variance-reduction device.

So which prediction gives the smallest variance?

2. The variance weights residuals by the design, not equally

Write $f_i^{(d)} = F_i^{(d)\top}\beta$ for some features $F$ (covariates, or a model's predictions, or a network's learned representation). Stack the residuals at the two exposure levels into one vector $r(\beta)$ of length $2n$. The variance of the AIPW estimator is then exactly a quadratic form:

$$ n^2\,\mathrm{Var}(\hat\tau) \;=\; r(\beta)^\top \,\Lambda\, r(\beta), \qquad r(\beta) = \begin{pmatrix} Y^{(d_1)} - F^{(d_1)}\beta_1 \\ Y^{(d_2)} - F^{(d_2)}\beta_2 \end{pmatrix}. $$

The matrix $\Lambda$ is the covariance of the reweighted exposure indicators $\mathbb 1(D_i=d)/\pi_i^{(d)}$; it depends only on the graph and the randomization. Two features of it matter:

Prediction error, by contrast, is $r^\top r$: every unit counts once and pairs do not interact. The two objectives coincide only when $\Lambda$ is proportional to the identity, which is roughly the no-interference, equal-probability case. On a network it is far from that.

Variance weight versus number of neighbours
The design puts most of its weight on well-connected units. In the toy network, a unit with many neighbours rarely has a "high" share of treated neighbours, so its probability $\pi_i$ of reaching $d=2$ is small and its weight $(1-\pi_i)/\pi_i$ is large; note the log scale. We made the covariate $x$ matter more for exactly these units (orange). A least-squares fit averages over everyone; the variance cares mostly about the orange units.

That is the whole mechanism behind the hero figure. Our toy experiment has $995$ units on a sparse random graph (mean degree $2.8$), Bernoulli(1/3) treatment, and the outcome $Y_i = s_i x_i + \text{noise}$, where the slope $s_i$ is $3.0$ for units with at least four neighbours and $0.3$ otherwise. We adjust with $f_i = b\,x_i$ and sweep $b$. Least squares wants the average slope; the variance wants the slope of the heavily weighted units.

Try it. Drag the slider. The gray curve is prediction error and the blue curve is the exact design standard deviation of $\hat\tau$, both computed from the same toy population (toy illustration). Moving from the prediction-optimal $b$ to the variance-optimal $b$ makes predictions worse and the estimate more precise.

Under interference, prediction error and estimator variance are two different weighted sums of the same residuals. Minimizing one does not minimize the other.

The obvious fix is to choose $\beta$ to minimize $r(\beta)^\top\Lambda\, r(\beta)$ directly. Can we?

3. Calibrating toward a variance we cannot compute

The variance-optimal coefficient is a weighted least-squares solution,

$$ \beta^\star = \big(F^\top \Lambda F\big)^{\dagger} F^\top \Lambda\, Y, $$

but it involves every unit's potential outcomes at both exposure levels, and we observe each unit at only one. We cannot compute $\beta^\star$. We can, however, estimate the two matrices it is built from.

The trick is to reweight what we do observe. For each feature, form the residualized, inverse-probability-weighted version $\hat R_k = F^{(d_k)}\,\mathrm{diag}\{\mathbb 1(D_i = d_k)/\pi_i^{(d_k)}\} - F^{(d_k)}$, and similarly a reweighted outcome contrast $\hat y$. These are noisy, but their products have the right expectation on the right pairs: for units $i,j$ whose exposures are dependent, $\mathbb E[\hat R_i \hat R_j]$ equals the corresponding entry of $F^\top\Lambda F$. So we sum products only over those pairs, which are recorded in a 0/1 dependency graph $\Delta$ (for exposures that depend on one-hop neighbours under Bernoulli assignment, $\Delta$ is just "within two hops"). This gives the graph-weighted exposure residualization (GER) equation:

$$ \underbrace{\hat X^\top \Delta\, \hat X}_{\textstyle \hat A \;\approx\; F^\top\Lambda F}\;\hat\beta \;=\; \underbrace{\hat X^\top \Delta\, \hat y}_{\textstyle \hat b \;\approx\; F^\top \Lambda Y}, \qquad \hat X = (\hat R_1,\, -\hat R_2). $$

Two properties make this practical. First, it needs only first-order probabilities $\pi_i^{(d)}$ and the graph, not the dense $n\times n$ matrix of joint probabilities. Second, it plugs into any predictor. We use it in two ways:2

In code, the calibration step is a few lines on top of whatever model produced the features:

def ger(F1, F2, pi1, pi2, D, Y, Delta, d1, d2, rcond=1e-2):
    """F1, F2: n x p features at levels d1, d2; pi: known exposure probabilities."""
    w1, w2 = (D == d1) / pi1, (D == d2) / pi2         # reweighted indicators
    X = np.hstack([(w1[:, None] - 1) * F1, -(w2[:, None] - 1) * F2])
    y = w1 * Y - w2 * Y                                # reweighted outcome contrast
    A, b = X.T @ Delta @ X, X.T @ Delta @ y
    return np.linalg.lstsq(A, b, rcond=rcond)[0]       # truncated pseudoinverse

(Illustrative; our implementation follows the same steps.)

What we can prove. Under positivity (every $\pi_i^{(d)}$ bounded below at a polylogarithmic rate), bounded outcomes, a dependency graph whose maximum degree grows at most polylogarithmically, and a stability condition on the weighted second moments, $\hat\beta$ is consistent for $\beta^\star$; the calibrated estimator is asymptotically normal; and its asymptotic variance is no larger than that of any fixed coefficient on the same features, including the least-squares one and the "use the predictions as they are" choice $\beta = (0,1)$. A conservative variance estimator gives valid confidence intervals.3 These are asymptotic statements about a fixed feature set; they say nothing about how large the gain is in a given experiment, which is what the experiments below measure.

Back in the toy: across 1,000 simulated experiments the least-squares coefficient sits at $\hat b \approx 0.92$, while the GER coefficient has median $1.67$ (interquartile range $1.17$–$2.24$), noisier but pulled toward the variance optimum at $2.23$. The resulting effect estimates have standard deviation $0.244$ with GER and $0.306$ with least squares.

That is a constructed example. Does the gap show up in realistic settings, and does it survive a strong graph neural network?

4. Experiment 1: synthetic networks, and a rerun

Question. Starting from the same features, does calibrating reduce the error of the effect estimate, and how does that depend on how good the predictor already is?

Setup. $n = 2{,}000$ units on a synthetic graph with mean degree 3 (sparse) or 5 (denser), Bernoulli(1/3) treatment, exposure = share of treated neighbours in three bins, and the contrast "high vs. zero" (true $\tau = -0.594$). Outcomes depend nonlinearly on covariates, on degree and on neighbours' covariates; the adjustment sees only one of the three covariates plus the graph. We compare three backbones (a linear model, a graph attention network, and a principal neighbourhood aggregation network, PNA), each used uncalibrated (plug in the MSE-trained predictions) and calibrated with GER. Filled dots are the runs reported in the paper (100 randomizations). Because a single training run of a neural network can be lucky or unlucky, we later reran the main rows independently: 50 new randomizations, PNA trained with five seeds, median reported (hollow dots).4

RMSE of each estimator in two synthetic settings
Calibration mostly rescues weak or misaligned predictors. RMSE of the effect estimate; further left is better. Filled: paper runs. Hollow: independent rerun. Read each backbone as a pair: the gray dot is the predictor used as is, the blue dot is the same predictor after GER. Differences of about 10% are within Monte Carlo noise at these sample sizes; compare the two Hájek dots in the right panel.

What we see.

Coverage of the 95% intervals for the calibrated estimators was 0.92–0.98 in the paper runs and 0.96–1.00 in the rerun.

GER behaves like a safeguard: it reliably repairs an adjustment that is badly aligned with the design, and it costs little when the predictor is already good. It does not turn a good GNN into a much better one.

These graphs are synthetic. What happens on a real social network?

5. Experiment 2: a real friendship network

Question. Do the same patterns hold on a real network, and does cross-fitting the GNN (training it on units whose exposures are independent of the ones it adjusts) cost precision?

Setup. The friendship network of 2,983 students from a school-climate field experiment (ICPSR 37070), mean degree about 2.5. Covariates are real; outcomes are simulated from them with spillovers through one- and two-hop neighbours (true $\tau \approx 0.46$). 50 randomizations, Bernoulli(1/3), contrast "high vs. zero".5

RMSE on the student network
On a real network, the GNN does the heavy lifting; calibration helps the linear model and is neutral for PNA. RMSE of the effect estimate over 50 randomizations. Cross-fitting the PNA model (orange) costs almost nothing here.

So far the networks have been sparse with modest degrees. Our theory requires exposure probabilities bounded away from zero, which hubs violate. How much does that matter?

6. Experiment 3: hubs and vanishing probabilities

Question. When some units have hundreds of neighbours, the probability that, say, none of them is treated becomes astronomically small. Do the inverse weights blow up the calibrated estimator?

Setup. Heavy-tailed random graphs ($n = 2{,}000$, mean degree 3) with the maximum degree capped at 10, 30, 100 or 300; two exposure mappings (share of treated neighbours; "any neighbour treated"); 200 randomizations each. The smallest exposure probability falls to $7\times 10^{-20}$ and $5\times10^{-32}$, so our positivity assumption fails badly.

SD relative to Hajek across degree caps
Calibration keeps the estimator stable even where our assumptions fail. Standard deviation relative to Hájek (dotted line at 1); lower is better. The uncalibrated linear adjustment (gray) is 8–79% noisier than Hájek; both calibrated versions (blue) are 28–56% of Hájek at every degree cap.

The calibrated intervals covered 0.955–1.00 of the time, while Hájek's covered only 0.80–0.90. Calibration cannot remove the huge inverse weights, but it shrinks the residuals they multiply. This is outside what our theorems cover, so it is an empirical finding about these graphs, not a guarantee.

Hubs in an otherwise sparse graph are fine. What if every unit is well connected?

7. Experiment 4: where calibration breaks, dense graphs

Question. On graphs where the average unit has dozens of neighbours, is the two-hop dependency graph $\Delta$ still a good stand-in for $\Lambda$?

Setup. Two standard attributed social graphs, BlogCatalog (5,196 nodes, mean degree 66) and Flickr (7,575 nodes, mean degree 63), with simulated outcomes as in Experiment 2 and the contrast "medium vs. zero" (which has good support: every unit has $\pi \geq 0.27$). 30 randomizations.6

RMSE and bias on BlogCatalog and Flickr
On dense graphs, calibration with the two-hop weight fails, and a positive semidefinite weight only partly repairs it. RMSE as a percentage of the true effect (log scale), with bias annotated. GER with the two-hop $\Delta$ (red) is biased toward zero by 30% and 46%. Replacing $\Delta$ by a positive semidefinite bound (blue) removes most of the bias, but the uncalibrated PNA estimate (gray) is better still.

Here two-hop neighbourhoods cover 48–58% of all pairs, and $\Delta$ is strongly indefinite (smallest eigenvalue $-330$ and $-891$). The GER equation is then a stationary point of an indefinite quadratic rather than a minimum, and the noisy estimate $\hat A$ no longer resembles $F^\top\Lambda F$. One possibility, which we have not verified, is that the error in $\hat A$ grows with the number of pairs it sums over and overwhelms the signal once that number is a constant fraction of $n^2$.

A simple repair is to replace $\Delta$ by the diagonal matrix of two-hop degrees, $\mathrm{diag}(\Delta\mathbf 1)$, which upper-bounds $\Delta$ in the positive semidefinite order.7 It removes the bias (−1% to −3% of $\tau$), but it gives up the cross-unit information that made calibration useful, and the uncalibrated PNA estimate, already three times more accurate than Hájek, remains the better choice.

GER is a method for sparse dependence. When two-hop neighbourhoods cover a sizeable fraction of the graph, use a positive semidefinite weight or the learned predictions as they are.

8. Experiment 5: a real field experiment, and how stable it is

Question. In a real randomized experiment, does calibrating a GNN give narrower confidence intervals than standard estimators, and is that conclusion robust to the GNN's random seed?

Setup. The GiveDirectly cash-transfer experiment in Kenya (Egger et al., 2022): 653 villages, a two-stage randomized-saturation design, and a geographic network linking each village to its nearest neighbours within 8 km. Exposure combines a village's own treatment with whether more than a third of its neighbours were treated, giving four levels and four contrasts (two direct effects, two spillover effects). We trained PNA with 50 different seeds, including the seed used in our paper for the wage-bill outcome.8

Average CI width over 50 seeds
The substantive conclusions are stable across seeds; the efficiency gain is not. Each dot is one random seed's average 95% confidence-interval width over the four contrasts; the dotted and dashed lines mark Hájek and the linear adjustment. The orange ring is the seed reported in the paper.

In this application GER reproduces the standard estimators' conclusions with comparable precision. It does not deliver the narrower intervals a single favourable seed suggested.

What we take away

Under interference, an adjustment's quality is measured by a design-weighted quadratic form, not by prediction error, and the two can disagree a lot. GER estimates that quadratic form from data using only first-order probabilities and the dependency graph, and it fits any predictor's output or representation toward it, with asymptotic guarantees on a fixed feature set.

In practice it acts as a safeguard more than a booster. It repairs adjustments that are misaligned with the design, sometimes dramatically (linear models on denser graphs, hub-heavy graphs). It leaves a strong GNN about where it was. And it should not be used with the two-hop weight on graphs where two-hop neighbourhoods are a large fraction of the network.

Several questions remain open: a finite-sample analysis that predicts when the gain is worth the extra noise in $\hat\beta$; a principled positive semidefinite weight that keeps cross-unit information on dense graphs; cross-fitting that works when the two-hop graph is one giant component; and a formal statement of our guarantees for the cross-fitted estimator, which we expect to follow by adapting the conditional cross-fitting argument of Lu, Shi, Liu and Ding (2025).

  1. The exposure mapping is a modelling choice. If it is misspecified, the estimator still targets a well-defined average of expected outcomes at each exposure value (Leung, 2022). ↩
  2. The GNNs are trained with mean squared error plus an optional representation-balancing penalty; their training objective does not see the design weights. That is the gap GER fills. ↩
  3. The guarantees assume features that do not depend on the realized assignment. Learned GNN features violate this unless the model is cross-fitted; see Experiment 2. The truncated pseudoinverse (relative threshold $10^{-2}$) matters for representation features, whose dimensions are linearly dependent; for calibrating predictions the system is well conditioned (median condition number 12–24). ↩
  4. The rerun draws new treatment assignments, so it also re-samples Monte Carlo noise; the Hájek estimator, which has no learned component, moved from 0.368 to 0.310 in the denser design. Differences smaller than this between paper run and rerun should not be over-interpreted. ↩
  5. The data are restricted-use and not redistributed. The study code was rebuilt from the paper's description; the numbers here come from that rebuilt pipeline and are close to the paper's Table 2 (e.g. calibrated PNA 0.011 vs. Hájek 0.054 there). ↩
  6. The contrast "high vs. zero" used elsewhere has no support on these graphs: almost no unit can reach the top exposure bin. The main effect in the outcome model was increased so that the "medium vs. zero" contrast is comparable in size. Graph attention networks behave like PNA here (20 randomizations). ↩
  7. For any vector $e$, $\sum_{ij}\Delta_{ij}e_ie_j \le \sum_i (\Delta\mathbf 1)_i e_i^2$ by $2e_ie_j \le e_i^2 + e_j^2$; equivalently, the graph Laplacian $\mathrm{diag}(\Delta\mathbf 1) - \Delta$ is positive semidefinite. This is the same device as Aronow and Samii's (2017) conservative variance bound. ↩
  8. Inference is conditional on the first-stage sublocation saturations, under which villages are independent draws with probability 2/3 or 1/3 and the two-hop graph is a valid dependency graph. Exposure probabilities come from 100,000 simulated assignments. "Calibrated" here means GER on the PNA predictions. ↩

References

  1. Aronow, P. M. and Samii, C. (2017). Estimating average causal effects under general interference, with application to a social network experiment. Annals of Applied Statistics.
  2. Chen, L. H. Y. and Shao, Q.-M. (2004). Normal approximation under local dependence. Annals of Probability.
  3. Corso, G., Cavalleri, L., Beaini, D., Liò, P. and Veličković, P. (2020). Principal neighbourhood aggregation for graph nets. NeurIPS.
  4. Egger, D., Haushofer, J., Miguel, E., Niehaus, P. and Walker, M. (2022). General equilibrium effects of cash transfers: experimental evidence from Kenya. Econometrica.
  5. Leung, M. P. (2022). Causal inference under approximate neighborhood interference. Econometrica.
  6. Lu, X., Shi, L., Liu, H. and Ding, P. (2025). Conditional cross-fitting for unbiased machine-learning-assisted covariate adjustment in randomized experiments. arXiv:2508.15664.
  7. Paluck, E. L., Shepherd, H. and Aronow, P. M. (2016). Changing climates of conflict: a social network experiment in 56 schools. PNAS. Data: ICPSR 37070.
  8. Shi, L., Lyu, R. and Lu, S. (2026). GAUGER: Generalized regression adjustment via graph-weighted exposure-level residualization for design-based inference under interference. arXiv:2607.19627.
  9. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Liò, P. and Bengio, Y. (2018). Graph attention networks. ICLR.

Reproducibility. The toy example in Figures 1–2 is self-contained and runs in about a minute on a CPU. Figures 3–7 are re-plotted from the outputs of our experiments; no values were entered by hand.