Tutorials › Propensity Score Matching and Instrumental Variables › Comparing AIPW and TMLE Estimates in Finite Samples

Doubly Robust Estimation · Tutorial 323 of 699

Comparing AIPW and TMLE Estimates in Finite Samples

Learn how AIPW and TMLE use the same nuisance fits differently, and how to interpret finite-sample differences in their estimates, uncertainty, and predictions.

Advanced 12 min read

What You'll Learn

  • Write the AIPW and TMLE plug-in estimates for a binary-outcome average treatment effect.
  • Explain why targeting does not generally make the two finite-sample estimates identical.
  • Compare their standard errors using estimated influence-function values.
  • Distinguish TMLE’s updated counterfactual predictions from AIPW’s residual-corrected estimate.
  • Recognize when bounded TMLE estimates and unbounded AIPW estimates can diverge.
  • Identify implementation choices that can produce apparent differences between the methods.

Why Two Doubly Robust Estimates Can Differ

AIPW and targeted maximum likelihood estimation (TMLE) use outcome and treatment models to estimate the same causal quantity. Under suitable conditions, both can be consistent and asymptotically efficient. Yet on a particular finite data set, their estimates, standard errors, and implied predictions need not match. A difference is not, by itself, evidence that one calculation is wrong: the estimators combine the fitted nuisance quantities differently.

To make the comparison precise, consider a binary treatment \(A\), a binary outcome \(Y\), and baseline covariates \(W\). The target is the average treatment effect (ATE), the mean outcome under treatment minus the mean outcome under control. Let \(g(W)=P(A=1\mid W)\) be the propensity score, and let \(Q(a,W)=E(Y\mid A=a,W)\) be the outcome regression. With \(Q\) and \(g\) estimated, write their estimates as \(\hat Q\) and \(\hat g\).

Definition: The AIPW estimate combines the plug-in contrast from \(\hat Q\) with inverse-probability-weighted outcome residuals. TMLE first updates \(\hat Q\) using a fluctuation model informed by \(\hat g\), then estimates the ATE by averaging the updated counterfactual predictions. Both target the ATE, but they need not give the same finite-sample number.

The standard assumptions for a causal interpretation are consistency of the observed outcome with the potential outcome under the received treatment; conditional exchangeability, meaning treatment is independent of the potential outcomes given \(W\); and positivity, meaning \(0<P(A=1\mid W)<1\) in the target population. The nuisance estimates must also be suitable for the estimator and inference procedure being used. These assumptions do not ensure that the two finite-sample calculations are equal.

The Two Estimates and Their Predictions

For \(n\) observations, the AIPW estimate is

$$ \hat\psi_{\mathrm{AIPW}} = \frac{1}{n}\sum_{i=1}^n \left[ \hat Q(1,W_i)-\hat Q(0,W_i) +\frac{A_i}{\hat g(W_i)}\{Y_i-\hat Q(1,W_i)\} -\frac{1-A_i}{1-\hat g(W_i)}\{Y_i-\hat Q(0,W_i)\} \right]. $$

The first part averages the fitted treatment-versus-control contrast. The residual terms correct that contrast using the observed outcomes, weighted by the estimated treatment probabilities. AIPW therefore need not correspond to a single set of updated counterfactual predictions: its residual correction is part of the estimate itself.

For a common binary-outcome TMLE, define the clever covariates \(H_1(A,W)=A/\hat g(W)\) and \(H_0(A,W)=(1-A)/\{1-\hat g(W)\}\). Fit a logistic fluctuation with the initial outcome prediction as an offset and these covariates as fluctuation terms. Denote the resulting updated predictions by \(\hat Q^*(a,W)\). The TMLE is the plug-in contrast

$$ \hat\psi_{\mathrm{TMLE}} = \frac{1}{n}\sum_{i=1}^n \{\hat Q^*(1,W_i)-\hat Q^*(0,W_i)\}. $$

This description uses a fluctuation that targets the two treatment-specific means. Implementations can differ in the fluctuation parameterization, fitting details, and use of cross-fitting, so a comparison must specify how each estimate was produced. Logistic updating keeps the updated predictions between zero and one, but does not force the two ATE estimates to coincide.

Why the Estimates Are Not Generally Equal

AIPW inserts residual corrections directly into the average. TMLE instead changes the outcome predictions through a fitted fluctuation and then uses those predictions in a plug-in average. In a linear fluctuation, or under special conditions, the change in the plug-in estimate can reproduce the AIPW correction exactly. A logistic fluctuation is nonlinear: the change in each prediction depends on the updated probability, so a zero fluctuation score does not generally imply equality with the AIPW formula.

1
Start with common nuisance fits.
Use the same \(\hat Q\), \(\hat g\), sample, and target population if the goal is to isolate the estimator difference.
2
Apply the residual correction or target the predictions.
AIPW adds weighted residuals to its initial contrast. TMLE fits its fluctuation using clever covariates and updates \(\hat Q\).
3
Compare the resulting quantities.
AIPW’s residual-corrected average and TMLE’s updated plug-in contrast can differ at finite \(n\), even if both use the same initial fits.

The targeting step is motivated by the efficient influence function. In the usual notation, its estimated observation-level value at nuisance estimates is

$$ \hat D_i = \frac{A_i}{\hat g(W_i)}\{Y_i-\hat Q(1,W_i)\} -\frac{1-A_i}{1-\hat g(W_i)}\{Y_i-\hat Q(0,W_i)\} +\hat Q(1,W_i)-\hat Q(0,W_i)-\hat\psi. $$

AIPW sets the sample mean of this expression to zero when \(\hat\psi\) is its displayed estimate. TMLE chooses an update that makes the relevant residual part of the estimating equation small or zero, then uses the updated plug-in estimate. This link explains their shared large-sample rationale, not a general finite-sample identity.

Worked Example: A Case Where the Estimates Coincide

Suppose four hypothetical participants have \(\hat g(W_i)=0.5\) for all \(i\), and initial outcome predictions \(\hat Q(1,W_i)=\hat Q(0,W_i)=0.5\). The treated participants have outcomes 1 and 0; the control participants have outcomes 0 and 1. These predictions are the observed outcome averages in each treatment group.

The initial average contrast is \(0.5-0.5=0\). In the AIPW correction, the two treated residual contributions are \(2(1-0.5)=1\) and \(2(0-0.5)=-1\). The two control contributions, including the minus sign in the formula, are \(-2(0-0.5)=1\) and \(-2(1-0.5)=-1\). Thus

$$ \hat\psi_{\mathrm{AIPW}} =0+\frac{1-1+1-1}{4}=0. $$

For the treatment-specific logistic fluctuations, the score in each arm is proportional to the sum of its weighted outcome residuals. The treated residuals sum to \(0.5-0.5=0\), and the control residuals also sum to \(0.5-0.5=0\). With these initial predictions, the fitted fluctuation has zero coefficients; the updated predictions remain 0.5 in both arms. Therefore \(\hat\psi_{\mathrm{TMLE}}=0.5-0.5=0\). This equality follows from the special fitted predictions and balanced scores, not from a rule that AIPW and TMLE are always identical.

Comparing Standard Errors

A common influence-function standard error for either estimator is calculated from its estimated influence-function values. If \(\hat D_i\) denotes the value for observation \(i\), calculate its sample standard deviation \(s_{\hat D}\) and use \(SE=s_{\hat D}/\sqrt{n}\). For TMLE, evaluate the influence-function expression using the updated outcome predictions and the TMLE estimate. For AIPW, use the nuisance estimates and AIPW estimate. Cross-fitted procedures use the appropriate out-of-fold nuisance predictions in these calculations.

Even when both procedures use the same formula, the values \(\hat D_i\) can differ because the estimates, predictions, or nuisance fits differ. Consequently the standard errors can differ too. There is no general finite-sample rule that TMLE must have the smaller standard error. These standard errors are based on an asymptotic approximation; small samples, extreme weights, or unstable nuisance fits can make that approximation unreliable.

Worked Example: Different Influence-Function Standard Errors

Suppose a hypothetical analysis of \(n=6\) observations gives \(\hat\psi_{\mathrm{AIPW}}=0.12\) and the following centered influence-function values: \(-0.30,-0.20,-0.10,0.10,0.20,0.30\). Their sum is zero, as expected for values centered by the estimate. The sum of squared values is \(0.28\), so

$$ s_{\hat D,\mathrm{AIPW}} =\sqrt{\frac{0.28}{6-1}} =0.2366, \qquad SE_{\mathrm{AIPW}} =\frac{0.2366}{\sqrt{6}} =0.0966. $$

Suppose the TMLE estimate is \(0.10\), with centered influence-function values \(-0.25,-0.15,-0.05,0.05,0.15,0.25\). Their squared values sum to \(0.175\), giving

$$ s_{\hat D,\mathrm{TMLE}} =\sqrt{\frac{0.175}{5}} =0.1871, \qquad SE_{\mathrm{TMLE}} =\frac{0.1871}{\sqrt{6}} =0.0764. $$

Here the two point estimates differ by \(0.02\), and the estimated standard errors differ because the influence-function values differ. These hypothetical standard errors do not establish that TMLE is generally more precise; they describe the variability estimated for these particular fitted results.

Predictions, Bounds, and Finite-Sample Behavior

For a binary outcome, logistic TMLE produces updated predictions \(\hat Q^*(a,W_i)\) between zero and one. Consequently its empirical plug-in ATE lies between \(-1\) and \(1\). AIPW is not constrained to that range: residual terms can move its estimate beyond the possible range of an individual treatment contrast. That feature can make AIPW numerically unstable in a small sample with extreme weights. It does not mean a value outside the range is a plausible individual effect; it signals that the residual-corrected estimator is not a bounded plug-in average.

Worked Example: AIPW Can Exceed the Outcome Bound

Consider two hypothetical observations, one treated with \(Y=1\) and one control with \(Y=0\). Suppose both have initial predictions \(\hat Q(1,W)=0.8\), \(\hat Q(0,W)=0.2\); their estimated propensities are 0.1 for the treated person and 0.9 for the control person. The initial contrast is \(0.8-0.2=0.6\). The treated residual correction is \(0.2/0.1=2\). The control correction is \(-\{0-0.2\}/(1-0.9)=2\). Averaging the two observation-level contributions gives

$$ \hat\psi_{\mathrm{AIPW}} = \frac{(0.6+2)+(0.6+2)}{2} =2.6. $$

This estimate exceeds the binary-outcome ATE range. The calculation is internally consistent, but the extreme estimated propensities create very large residual corrections. A logistic TMLE plug-in estimate remains in \([-1,1]\); this bound alone does not show that its estimate is accurate. The example illustrates a failure mode, not a recommendation to rely on TMLE whenever the AIPW estimate is unbounded.

When results differ, first check that the comparison is genuinely like-for-like. Common causes include using different samples or target populations; inconsistent coding of treatment or outcome; different propensity-score truncation; different initial outcome fits; different cross-fitting folds; or comparing standard errors computed from different influence-function values. A failed or nearly separated logistic fluctuation can also lead to numerical instability. These checks help distinguish a meaningful estimator difference from an implementation mismatch.

AIPW’s residual-correction form is direct and can be convenient to inspect, but its finite-sample estimate is not outcome-bounded. TMLE’s update provides targeted predictions and, with a bounded-outcome link, a bounded plug-in estimate; its results depend on the fluctuation fit and parameterization. Both methods rely on adequate overlap and appropriate nuisance estimation. Neither removes bias from unmeasured confounding, repairs a lack of positivity, or guarantees reliable inference in a small sample.

Common Mistake

Wrong reasoning: “AIPW and TMLE are both doubly robust, so they must return the same estimate and standard error when they use the same data.” Correction: Double robustness is a consistency property under specified nuisance-model conditions, not a finite-sample equality theorem. AIPW adds weighted residuals to an initial contrast; TMLE changes predictions through a fluctuation and forms a plug-in contrast. Their influence-function values, estimates, and standard errors can therefore differ. Compare the formulas, nuisance fits, and implementation choices before interpreting the difference.

Key takeaway: AIPW and TMLE share a causal target and related influence-function foundations, but they construct finite-sample estimates differently. Compare point estimates, standard errors, and predictions separately, and interpret discrepancies in light of overlap, nuisance fits, targeting, and the outcome scale.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Which component of AIPW is not represented as an updated counterfactual prediction?
  2. Why does a zero fluctuation score not generally prove that logistic TMLE equals AIPW?
  3. If the two procedures have different estimated influence-function values, what can happen to their standard errors?
  4. Why can a binary-outcome AIPW estimate fall outside \([-1,1]\), while a logistic TMLE plug-in estimate cannot?
  5. Name two implementation differences that could make a reported AIPW–TMLE comparison unfair.

Solutions. (1) The weighted outcome-residual correction is added directly to the AIPW contrast. (2) Logistic updating is nonlinear, so the score condition does not generally make the change in the plug-in contrast equal the AIPW residual correction. (3) Their estimated standard errors can differ because each is calculated from the spread of its influence-function values. (4) AIPW adds weighted residuals without a bound on their sum; logistic TMLE averages predictions between zero and one, so its contrast lies between \(-1\) and \(1\). (5) Examples include different samples, folds, nuisance fits, propensity truncation rules, treatment coding, or target populations.

Clinical Biostats