Doubly robust estimation: understanding IPW, influence functions and orthogonality through sample reweighting

Study notesCausal inferenceFoundationsCredit policies

Start with course selection and compensating for underrepresented samples, then work through IPW, AIPW, influence functions, TMLE, orthogonality and cross-fitting, including their limits in credit applications.

Contents · 14 sections
Likes and comments ↓

Why do causal inference formulas so often combine an outcome model, an action probability model and an unfamiliar weighted residual term?

This note starts with course selection. We first see how mixing populations misleads comparisons, then explain IPW and double robustness. Influence functions, functionals and orthogonality follow; the formulas are easier to read after the example. All numbers and diagrams are constructed for teaching and can be recalculated.

First, which average are we asking about?

Think of A=1 as taking a tutoring class and A=0 as not taking it. X describes students before enrollment, and Y indicates whether they later pass the exam. Each student actually follows only one path: attending or not attending.

Y(1) and Y(0) are potential outcomes: what would happen to the same student on each path. The observed record reveals only one; the other cannot be observed simultaneously.

Target Question being asked Notation
Mean outcome if everyone uses the new option What would the pass rate be if all students took tutoring? ψ₁=E[Y(1)]
ATE: average treatment effect Across all students, what is the average difference between attending and not attending? E[Y(1)−Y(0)]
CATE: conditional average treatment effect What is the average difference for students with a particular background? τ(x)=E[Y(1)−Y(0)|X=x]
ATT: average treatment effect on the treated For students who enrolled, how much did attending change their outcomes on average? E[Y(1)−Y(0)|A=1]

The mean pass rate if everyone attended is not the mean gain among those who actually attended. Averaging effects at fixed X over the whole population takes us from CATE to ATE. Unconditional sample averages later in this note mainly concern ATE.

Causal interpretation requires additional conditions: consistent definitions of actions and outcomes; no relevant interference; no omitted common causes conditional on pre-treatment X; and positive probability of both actions within the study population. Under the appropriate conditions, conditional means in observational data identify potential outcome means.Treatment effect setup in DML

This also defines the analogy's limit. If motivation affects both enrollment and exam results, and X does not record it, reweighting alone may not recover the causal effect of tutoring.

A paradox: improvement in every group, a decline in the aggregate

Construct two groups of 100 students each. Students with weaker backgrounds are more likely to enroll:

Background Students attending Attendees passing / Pass rate Students not attending Non-attendees passing / Pass rate
Weaker 80 32 / 40% 20 6 / 30%
Stronger 20 16 / 80% 80 56 / 70%

Within each group, attendees have a pass rate 10 percentage points higher. But pooling everyone directly gives:

上课组通过率 = (32+16)/(80+20) = 48%
未上课组通过率 = (6+56)/(20+80) = 62%
直接相减 = −14 个百分点

The groups have different compositions: attendees include more weaker students, and non-attendees more stronger students. Direct subtraction mixes course differences with population differences. This is a teaching example of Simpson's paradox. Interpreting the within-group differences causally still requires the conditions above.

Attendees include eighty weaker and twenty stronger students; non-attendees have the reverse mix. After reweighting, both groups represent one hundred weaker and one hundred stronger students. No new observations have been created.
Comparing with the same population mix. Original teaching illustration.

With sufficient adjustment features, a correct conditional outcome model can still be used for standardization. Unequal action assignment probabilities do not make every conditional mean model biased. The error here is directly comparing two populations with different compositions.

IPW: upweight underrepresented students so both groups represent the same population

e(X)=P(A=1|X) is the propensity score. It describes how likely this type of student historically was to enroll. That is different from how much the course helps them.

In the example, e=0.8 for weaker students and e=0.2 for stronger students. Attendees receive weight 1/e; non-attendees receive 1/(1−e).

Type Weight for an attendee Weight for a non-attendee
Weaker background 1/0.8=1.25 1/0.2=5
Stronger background 1/0.2=5 1/0.8=1.25

Stronger students are rare among attendees, so each gets more representative votes. Weaker students are rare among non-attendees and are upweighted similarly. Both weighted groups can then represent 100 weaker and 100 stronger students.

IPW 新方案均值 = [32/0.8 + 16/0.2] / 200 = 60%
IPW 对照均值 = [ 6/0.2 + 56/0.8] / 200 = 50%
IPW 效应 = +10 个百分点

A standard binary ATE IPW estimator is mean{AY/e(X)−(1−A)Y/[1−e(X)]}. Its overall-mean denominator is the total sample size. Self-normalized IPW instead uses each group's sum of weights. The two need not give identical finite-sample values; do not mix their calculations.

Reweighting creates no real observations. If a group has enrollment probability 0.001, one attendee can receive weight 1000, magnifying chance outcomes. At probability zero there is no observation to upweight. Weight clipping can reduce variation but can also introduce bias or change the target; it does not automatically retain every original guarantee.

AIPW / DR: start with predictions, then correct using sampled residuals

IPW weights outcomes directly. AIPW adds an outcome model μₐ(X)=E[Y|A=a,X], predicts the mean for each group under each option, and weights only prediction residuals.

An accounting analogy helps: first predict each store's results, then check how actual observations differ from the predictions. Stores with a lower chance of inspection receive larger residual weights. The analogy explains the structure; it does not mean two errors always cancel.

DR 信号 Γ̂
= μ̂₁(X)−μ̂₀(X)
+ A/ê(X) · [Y−μ̂₁(X)]
− (1−A)/(1−ê(X)) · [Y−μ̂₀(X)]
ATE 估计 = mean(Γ̂)

The model supplies conditional means for unobserved options; residuals under the action actually taken provide correction. Regressing this signal on X in a second stage can learn CATE, as in DR-Learner. Taking the overall average alone still estimates ATE.Constructing DR-Learner

Γ̂ is not an individual's true gain label. Exam outcomes are random, individual residuals are noisy, and the signal can exceed the outcome's range. It cannot be treated directly as a default probability or a known individual effect.

What makes it doubly robust? Two chances, viewed in expectation

To see the structure, first hold the fitted functions fixed. Let μ₁, μ₀ and e be the true functions, and let δ₁=μ̂₁−μ₁ and δ₀=μ̂₀−μ₀ denote estimation errors. Expanding the conditional expectation gives:

E[Γ̂ | X]−τ(X)
= (ê−e) · [δ₁/ê + δ₀/(1−ê)]

If the propensity score is correct, or the outcome means for both actions are correct, the right-hand side is zero. This is the double robustness of the binary ATE score: two opportunities through the nuisance functions. Statistical estimation still requires appropriate consistency, overlap, moment conditions and data arrangements.

Two details are easy to misstate:

  • A correct outcome model gives the correct conditional mean; it does not predict every realized Y exactly. With a true pass probability of 70%, a student who fails still has residual −0.7. Residuals vanish in conditional expectation.
  • A correct action probability does not make every individual's A/e equal to 1. Cancellation also occurs in an appropriate conditional expectation. It does not make both potential outcomes observed in the same row.

If both models are wrong, bias generally remains. Improving one prediction metric need not improve effect estimation. Error directions, weight tails, second-stage learning and sampling variation all matter.

Robustness does not mean unconditional finite-sample unbiasedness. More precisely, under stated identification and regularity conditions, the estimator may remain consistent despite particular nuisance-model misspecification.

Functionals and influence functions: how much does a small population change move the target?

An ordinary function takes a number, such as f(x)=x². A functional takes a distribution and returns a number, such as Ψ(P), the mean score under P. Think of P as the full population recipe and the empirical distribution Pₙ as a simplified recipe assigning each observed student weight 1/n.

Another constructed example: the current mean is 60. Replace 1% of the population weight with a point mass at score 90. The new mean becomes:

μ(ε) = (1−ε)×60 + ε×90 = 60 + 30ε
ε=0.01 时,平均分上升 0.3
在 ε=0 处的导数 = 90−60 = 30

The influence function of the mean is φ(y;P)=y−μ. It measures how giving a little more weight to this type of observation changes the target—a sensitivity scale for the population recipe.Visual intuition for influence functions

The original mean is sixty. Mixing in a one-percent point mass at ninety changes it to sixty point three. Sensitivity per unit perturbation is thirty: ninety minus sixty.
Constructed influence-function example for the mean. Original teaching illustration.

Formal analysis often differentiates along a smooth path of distributions. The path parameter describes a small perturbation, not a customer's treatment. If the path score s(O) represents the change, an influence function must satisfy the corresponding derivative relation:

目标沿路径的变化率 = E[φ(O;P) · s(O)]

E[φ]=0 is a standard centering property, but it is not sufficient. An arbitrary mean-zero function need not represent the target's derivative. Efficient in EIF refers to the efficiency bound and variance properties within a statistical model, not computational speed.Definition and derivation of the EIF

The point mass δᵧ places all probability at y. It is not an ordinary continuous density equal to 1 at that point. Point contamination gives useful intuition, but continuous models also require checks of admissible paths, integrability and regularity. Not every target has an ordinary square-integrable EIF.

From sensitivity to AIPW: the role of each term

For ψ₁, the mean outcome if everyone takes the new option, the EIF in a standard nonparametric model is:

φ₁(O) = A/e(X) · [Y−μ₁(X)] + μ₁(X)−ψ₁

The first part captures residual variation under the new option; the second captures variation in target-population composition. Subtracting the control-option expression gives the EIF for ATE. These are potential outcome means and their difference, not CATE at a fixed x.EIF for a potential outcome mean, Example 5

The formula also shows why a complex network alone is insufficient: the target is sensitive to both outcome prediction and action assignment, and the correction is built around that target.

For fixed, discrete subgroups with enough samples, corresponding average effects can be studied within each group. A pointwise conditional effect at continuous, high-dimensional X has different regularity and learning challenges in a general nonparametric model. The EIF and root-n theory for overall ATE do not promise identical precision for every customer.

One-step and TMLE: correct the aggregate or target an update to predictions

Think of the initial model as a prediction ledger. One-step adds an influence-function correction to the aggregate. TMLE updates fitted predictions toward the target, then aggregates the updated predictions. These update estimates, not observed records.

One-step:ψ̂ = Ψ(P̂) + mean{φ(Oᵢ;P̂)}
TMLE:先构造 P̂*,使目标对应的样本矩接近零,
再报告 Ψ(P̂*)

P̂ is a fitted distribution or the required nuisance functions, not the empirical distribution Pₙ. Actual corrections use sample averages. Replacing an unknown population expectation with a sample average adds error, controlled through cross-fitting or suitable complexity conditions, among other requirements.

For binary outcomes, a common targeted update adds εH to the logit of predicted probabilities and minimizes Bernoulli loss, with H constructed for the target. Updated probabilities remain in [0,1], and the stationary condition yields a weighted residual moment.

Under suitable conditions, TMLE and one-step can have the same first-order asymptotic behavior without identical finite-sample values. A zero sample residual moment does not prove zero finite-sample causal bias or calibration in every group.Comparing one-step and targeted estimation

The analysis often uses a von Mises expansion: a first-order approximation in distribution space, with a higher-order remainder. One-step refers to one statistical correction, not one gradient descent update.

Orthogonality: keep small nuisance-model errors from moving the target to first order

A target equation often takes the form E[ψ(O;θ,η)]=0. θ is the parameter of interest; η contains nuisance functions introduced to estimate it. This is a moment condition. Score here means a function in an estimating equation, not necessarily a classification score or likelihood derivative.

Imagine θ as a ruler that must stay level and η as adjustment knobs beneath it. In an ordinary design, a small turn immediately moves the reading. An orthogonal design makes this first-order sensitivity zero near the truth, so small errors enter more through second-order terms.

The analogy concerns local perturbations near the truth; it does not make arbitrary knob settings harmless. Neyman orthogonality examines the first directional derivative of the target moment with respect to nuisance functions.Locally robust estimation framework

A partially linear model makes residualization concrete. Let D be a possibly continuous action and θ₀ a constant slope:

Y = θ₀D + g₀(X) + U,E[U|X,D]=0
e₀(X)=E[D|X],ℓ₀(X)=E[Y|X]
Y−ℓ₀(X) = θ₀[D−e₀(X)] + U

As with running results, first remove what terrain and wind explain; then use extra action variation to explain extra outcome variation. For continuous D, e₀ is a conditional mean, not an assignment probability between 0 and 1. g₀ differs from ℓ₀: the latter already includes the effect of the mean action.Two partially linear scores in DML

Small action residuals mean historical actions have little remaining variation conditional on X. A numerically stable formula can still lack effective information for estimating effects.

An important distinction: orthogonality does not automatically imply double robustness

Partially linear models admit different nuisance-function parameterizations. For example:

结构残差分数:(D−ê) · (Y−θD−ĝ)
双重残差分数:(D−ê) · [Y−ℓ̂−θ(D−ê)]

Both can be orthogonal under their respective conditions, but separately estimated nuisance functions do not share the same automatic one-correct guarantee. At the true θ, the first has population error E[(ê−e₀)(ĝ−g₀)]; the second also contains:

E[(ê−e₀)(ℓ̂−ℓ₀) − θ₀(ê−e₀)²]

Thus, the second can remain biased even with an exactly correct ℓ̂ when ê has fixed misspecification. A constructed counterexample takes D equally likely to be −1 or 1, Y=2D, and true ℓ₀=e₀=0. With ℓ̂=0 and ê=1, residual regression has population-optimal slope 1, while the true slope is 2.

This example distinguishes two properties:Orthogonality is local first-order insensitivity. Double robustness is a global property that can hold when one of specified nuisance models is correct. The scores do not contradict each other; their parameterizations and estimation objects differ. A new loss must be checked against its own formula.Distinguishing local robustness and double robustness

Convergence notation compares how quickly errors shrink

A useful rate intuition: if error scales as 1/√n, four times the data roughly halves it. If it scales as n⁻¹ᐟ⁴, that generally takes sixteen times the data. This illustrates rates, not the actual learning curve of every model.

Notation How to read it Misinterpretation to avoid
f(n)=O(aₙ) Eventually bounded by a constant multiple of aₙ Need not have exactly the same rate; a constant can also be O(n)
f(n)=o(aₙ) f/aₙ tends to 0 This compares ratios; n⁻¹ decays faster than n⁻¹ᐟ²
Zₙ=Oₚ(aₙ) Zₙ/aₙ is bounded in probability A random quantity need not converge to a fixed value
Zₙ=oₚ(aₙ) Zₙ/aₙ converges to 0 in probability More than merely looking small most of the time
Root-n consistent θ̂−θ₀=Oₚ(n⁻¹ᐟ²) Does not by itself establish asymptotic normality

For i.i.d. sample means with finite variance, the central limit theorem gives √n(Ȳ−μ) converging to N(0,σ²). The unscaled error tends to 0, not a standard normal distribution. Standardization also requires division by the appropriate standard deviation.

A key feature of DR estimators is that nuisance-model errors can enter the remainder as a product. Under overlap and other regularity conditions, an oₚ(n⁻¹ᐟ²) product of the two L₂ errors can permit root-n inference for a low-dimensional target. Each side being oₚ(n⁻¹ᐟ⁴) is one common sufficient case, not a universal rate for all CATE models.Second-order remainders and convergence conditions

Cross-fitting: do not let the examiner memorize the test

Residuals calculated on samples the model has already seen can reflect memorized answers. Cross-fitting gives each observation used for target estimation a nuisance model that was not trained on it.

Within the training region, nuisance models do not see the observations used to calculate their residuals. Final independent policy evaluation data are excluded from tuning, segmentation, threshold setting and action selection.
Separating cross-fitting from final policy evaluation. Original teaching illustration.

Split training data into folds. Fit nuisance functions on the remaining folds, generate Γ̂ on the held-out fold, and aggregate out-of-fold signals to estimate ATE. CATE requires a second-stage learning design and corresponding analysis; merely having out-of-fold predictions is insufficient.

Feature processing, calibration and tuning must stay within their respective training regions. Repeated customer records should be grouped by randomization unit or customer; out-of-time testing needs a separate window. Cross-fitting suits complex machine learning but is not the only possible form of every regular estimator.What cross-fitting does

Reserve policy evaluation data at the outermost level. Repeatedly inspecting the same report to choose segments, thresholds and offers can contaminate the final best result with selection bias. Out-of-fold nuisance predictions do not automatically solve data reuse throughout policy search.

Back to credit: establish an identifiable contrast before correcting it

I would first state the business question clearly: compare two fully specified offers with actual coverage in a predefined segment, using outcomes in mature windows. An offer includes limit, term and pricing. If an experiment changes several fields at once, it identifies the combined action's effect.

Observation What these methods can help with What still needs separate work
Accurate risk predictions among disbursed loans Supply an outcome model for factual prediction Does not directly establish accurate effects of changing the limit
Unstable average response estimates between two offers Use known experimental probabilities or a reasonable propensity model for a DR reference Label maturity, weight tails and population scope
Calibrated overall mean but poor segment ranking Learn and evaluate conditional effects Second-stage sample size and independent ranking validation
Many candidate offers Study policy value for supported discrete actions Extrapolation to untested combinations and continuous point interventions
Rejected applicants lack loan default labels Makes the target and label-selection problem explicit Do not fill in non-borrowers as non-defaults

In the earlier workflow, I would separate the current-offer baseline, candidate scoring and final adjusted offer. A different calibration model changing predictions for the same offer is a model-definition change. A difference after changing the offer concerns an action change. The final complete offer still needs independent evaluation; this note does not revalidate the production implementation.

When reading a new causal model, first check whether it targets overall or conditional effects, which assignment mechanism supplies weights, whether the claim concerns orthogonality, double robustness or a convergence rate, and which actions and populations have support. Only then is it easier to assess complex networks and losses.

Further reading

Related reading

Read alongside

Responses elsewhere

No public responses have been added yet. I will check the original before adding a submitted link.

Include a public link in your comment
LEAVE A NOTE

Thoughts after reading?

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    Ask Max Ask about this site
    Ask Max ↗

    Opening the assistant…

    Paper figure

    Photo comments

    LEAVE A NOTE

    About this photograph

    Connecting to the discussion board…

      Comments become public after moderation. You can delete your own comments from this browser.
      No email is required. Clearing cookies prevents this browser from claiming earlier comments.

      MAX WANG / INDEX

      Find something

      Enter a keyword, or explore the directory below.