AI Wiki中文/EN

Front-door adjustment: going around a hidden confounder

前门调整

When a hidden common cause rules out back-door adjustment, Pearl's front-door formula can still recover a causal effect through a measured mediator that carries the whole effect. Learn the three conditions, compute the formula by hand, and see on synthetic models how it fails when a condition is broken.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

Going around a hidden confounder

Front-door adjustment estimates a causal effect even when a hidden factor that affects both treatment and outcome distorts the data and cannot be measured. It works if the treatment acts on the outcome only through a measured intermediate step. You measure how the treatment moves that step, then how the step moves the outcome, and combine the two. Front-door criterion

Here is a made-up example. An app adds a feature, and the feature can help retention only by sending users to a tutorial screen. Motivated users both try the feature more and stay longer, and motivation is not recorded. Comparing feature users with non-users mixes the feature’s effect with motivation. But if motivation does not drive screen visits except through feature use, the two halves of the chain can each be measured cleanly.

Some vocabulary. The treatment XX is the cause of interest, the outcome YY is what it may change, and a mediator ZZ is a variable on the way from XX to YY. A confounder UU is a common cause of XX and YY. The causal effect P(y∣do(x))P(y\mid do(x)) is the outcome distribution if XX were set to xx by hand; see structural causal models for this notation.

The usual fix for confounding is back-door adjustment: measure the common causes and compare like with like (see back-door adjustment). That fails when UU is hidden. No measured variable can block the path X←U→YX\leftarrow U\rightarrow Y. Pearl showed that a mediator can still identify the effect, if it meets three conditions. Setting

The three conditions, in plain words, are these. The mediator carries the whole effect of XX on YY. Nothing confounds the step from XX to ZZ. And whatever confounds the step from ZZ to YY runs through XX, so adjusting for XX removes it. Each step is then an easy problem, and the formula chains them. Theorem 2

The conditions are strong, and their plausibility in real problems was disputed from the start. The rest of the article states the formula, shows why it works, runs synthetic examples in which it succeeds and fails, and reports the 1995 debate. Discussion Other assumptions

The criterion, the formula and why it works

This section states the three conditions and the formula, derives the formula from two back-door steps, gives the linear special case, and contrasts it with neighbouring methods.

The setting

Pearl’s 1995 paper starts from a graph with X→Z→YX\rightarrow Z\rightarrow Y and an unobserved UU that affects both XX and YY. ZZ satisfies no back-door condition. Yet measuring ZZ allows a consistent estimate of P(y∣do(x))P(y\mid do(x)). §3.2, Fig. 3 Peters, Janzing and Schölkopf use the same graph: no valid adjustment set exists, but the effect is still identifiable. Observing the “channel” ZZ that carries the signal from XX to YY reveals causal information. Example 6.46

Hernán and Robins describe the same setting with AA for treatment and MM for the mediator. MM fully mediates the effect of AA on YY and shares no unmeasured causes with AA or YY. They note why Pearl called it “front-door”: it uses a path through a descendant of the treatment, in contrast to a back-door path. Technical Point 7.4 This article writes ZZ in formulas, as Pearl and Peters do, and MM in the code.

The front-door criterion

Pearl’s Theorem 2 says a set ZZ satisfies the front-door criterion relative to (X,Y)(X,Y) if three conditions hold. (i) ZZ intercepts every directed path from XX to YY. (ii) There is no back-door path from XX to ZZ. (iii) Every back-door path from ZZ to YY is blocked by XX. Then the effect of XX on YY is identifiable. Theorem 2 A back-door path from XX to ZZ is a path between them that starts with an arrow into XX; “block” is used as in causal graphs.

P(y∣do(x))=∑zP(z∣x)∑x′P(y∣x′,z) P(x′)P(y\mid do(x))=\sum_{z}P(z\mid x)\sum_{x'}P(y\mid x',z)\,P(x')

In words: first see how treatment xx shifts the mediator, P(z∣x)P(z\mid x). Then, for each mediator value zz, find the outcome rate averaged over the population’s treatment mix P(x′)P(x'). Multiply and sum over zz. Here x′x' is just a counter that runs over all treatment levels. Eq. (9) Eq. (6.23)

Pearl first obtained this formula from the factorization P(x,y,z,u)=P(u)P(x∣u)P(z∣x)P(y∣z,u)P(x,y,z,u)=P(u)P(x\mid u)P(z\mid x)P(y\mid z,u) by eliminating uu. Eqs. (7)–(9) Peters and colleagues add a requirement: p(x,z)>0p(x,z)>0, so that every treatment level occurs with every mediator level. Example 6.46

Why it works: two back-door steps

Each condition buys one simple step.

P(z∣do(x))=P(z∣x),P(y∣do(z))=∑x′P(y∣x′,z) P(x′)P(z\mid do(x))=P(z\mid x),\qquad P(y\mid do(z))=\sum_{x'}P(y\mid x',z)\,P(x')

In words: for the first step, XX and ZZ share no confounding path, so seeing X=xX=x tells us the same as setting it. For the second step, the only confounding of ZZ and YY runs through XX, so a back-door adjustment for XX gives the effect of ZZ on YY.

Condition (ii) licenses the first identity. Condition (iii) makes XX a valid back-door set for the pair (Z,Y)(Z,Y), which licenses the second. Condition (i) then joins them.

P(y∣do(x))=∑zP(y∣do(z)) P(z∣do(x))P(y\mid do(x))=\sum_{z}P(y\mid do(z))\,P(z\mid do(x))

In words: because the mediator carries the whole effect, setting XX matters only through the value of ZZ it produces. So the effect of XX is the effect of ZZ, weighted by how XX moves ZZ. Substituting the two identities gives the front-door formula.

Pearl derived exactly these three steps in his 1995 paper, as Tasks 1 to 3. He checked each step with a rule of his symbolic calculus of interventions, now called do-calculus. §4.4, eqs. (13)–(21) The three rules let one insert or delete an observation, exchange an action for an observation, and insert or delete an action. Each rule applies when a d-separation condition holds in a modified graph. Theorem 3 Rules 1–3

Hernán and Robins’ proof

Hernán and Robins give a counterfactual proof with single-world intervention graphs (SWIGs). Because treatment and mediator are unconfounded, the distribution of MaM^a equals that of MM among units with A=aA=a. Because AA blocks the confounding of MM and YY, the distribution of YmY^m follows from a back-door adjustment for AA. Their proof requires that the counterfactual YmY^m, the outcome under an intervention on MM, be well defined. They mention alternative proofs in later technical points, which we did not read. Technical Point 7.4

The linear special case

In linear models the formula becomes a product of two slopes. Pearl states this for a two-stage example in his 2009 overview, assuming Gaussian zero-mean disturbances and additive relations. §3.3.3

∂∂xE[Y∣do(x)]=a b\frac{\partial}{\partial x}E[Y\mid do(x)]=a\,b

In words: the effect of one unit of XX on YY is aa, the slope from regressing ZZ on XX, times bb, the slope of ZZ when YY is regressed on ZZ and XX together.

bb must control for XX. The plain slope of YY on ZZ would pick up the confounding path Z←X←U→YZ\leftarrow X\leftarrow U\rightarrow Y.

In the same overview, Pearl describes a graph where the only observed covariate is a variable on the way from XX to YY. He estimates the effect in two stages through it and calls it a “mediating instrumental variable”. Eq. (26) For the term he cites a 1993 technical report of his own, which we did not read. The name mixes two ideas. An instrumental variable affects the treatment, while a front-door variable is affected by it; see instrumental-variables. Pearl also quotes a result of Tian and Pearl (2002), which we did not read. In it, the key to identification is blocking the paths between XX and its immediate successors on the way to YY. Theorem 2

Cinelli, Forney and Pearl note that, beyond plain covariate adjustment, do-calculus lets one exploit variables affected by treatment. The front door is their example. Beyond adjustment This turns around the textbook warning never to adjust for variables affected by treatment. Pearl’s 1995 paper makes the same point, adding that the adjustment then has to be done in two or more stages. §5.2 (vi)

Whether do-calculus can find every identifiable effect was an open question in 1995. p. 678 Peters, Janzing and Schölkopf state that it is complete: every identifiable intervention distribution can be derived by repeated use of the three rules. They credit this to Huang and Valtorta (2006) and to Shpitser and Pearl (2006), which we did not read. Theorem 6.45 The general rules belong to do-calculus.

Synthetic models: when the formula works and when it breaks

This section runs the formula on original synthetic models: one where the conditions hold, two where one added arrow breaks the conditions, and a linear version. Nothing here is real data.

In Part A all variables are binary. UU is hidden, with P(U=1)=0.5P(U=1)=0.5. Treatment follows P(X=1∣U)=0.2+0.6UP(X=1\mid U)=0.2+0.6U, the mediator P(M=1∣X)=0.1+0.7XP(M=1\mid X)=0.1+0.7X, and the outcome P(Y=1∣M,U)=0.1+0.5M+0.3UP(Y=1\mid M,U)=0.1+0.5M+0.3U. So U→XU\rightarrow X, U→YU\rightarrow Y and X→M→YX\rightarrow M\rightarrow Y, and all three conditions hold. The program enumerates the joint distribution exactly, then draws a sample of 200,000 and discards UU. Part B adds one arrow at a time. Part C is a linear Gaussian version. It uses numpy and the standard library, with seed 1995.

# Front-door adjustment on synthetic models with a hidden confounder (original toy, not real data).
import itertools

import numpy as np


def model(u_to_m=0.0, x_to_y=0.0):
    # U hidden; X treatment; M mediator; Y outcome (all binary)
    def p(v, s):
        if v == "U":
            return 0.5
        if v == "X":
            return 0.2 + 0.6 * s["U"]
        if v == "M":
            return 0.1 + 0.7 * s["X"] + u_to_m * s["U"]
        if v == "Y":
            return 0.1 + 0.5 * s["M"] + 0.3 * s["U"] + x_to_y * s["X"]
    return p


ORDER = ["U", "X", "M", "Y"]


def joint(p, do_x=None):
    tab = []
    for bits in itertools.product((0, 1), repeat=4):
        s = dict(zip(ORDER, bits))
        pr = 1.0
        for v in ORDER:
            if v == "X" and do_x is not None:
                pr *= 1.0 if s["X"] == do_x else 0.0
            else:
                q = p(v, s)
                pr *= q if s[v] == 1 else 1 - q
        tab.append((s, pr))
    return tab


def P(tab, **c):
    return sum(pr for s, pr in tab if all(s[k] == v for k, v in c.items()))


def cond(tab, y, **c):
    return P(tab, Y=y, **c) / P(tab, **c)


def front_door(tab, x):
    # sum_m P(m|x) sum_x' P(Y=1|m,x') P(x')  -- uses only X, M, Y
    tot = 0.0
    for m in (0, 1):
        pm = P(tab, M=m, X=x) / P(tab, X=x)
        inner = sum(cond(tab, 1, M=m, X=xp) * P(tab, X=xp) for xp in (0, 1))
        tot += pm * inner
    return tot


def report(label, p):
    obs = joint(p)
    true = P(joint(p, 1), Y=1) - P(joint(p, 0), Y=1)
    naive = cond(obs, 1, X=1) - cond(obs, 1, X=0)
    fd = front_door(obs, 1) - front_door(obs, 0)
    adj_m = sum((cond(obs, 1, X=1, M=m) - cond(obs, 1, X=0, M=m)) * P(obs, M=m) for m in (0, 1))
    print(f"  {label}")
    print(f"    true effect {true:+.4f} | naive {naive:+.4f} | front-door {fd:+.4f} | "
          f"'adjust for M' {adj_m:+.4f}")
    return obs


print("Part A. Front-door conditions hold: U -> X, U -> Y, X -> M -> Y, U hidden")
print("  P(U=1)=0.5; P(X=1|U)=0.2+0.6U; P(M=1|X)=0.1+0.7X; P(Y=1|M,U)=0.1+0.5M+0.3U")
obs = report("exact, on the joint distribution:", model())
print("  pieces of the formula (exact):")
print(f"    P(X=1) = {P(obs, X=1):.4f}")
for x in (0, 1):
    print(f"    P(M=1|X={x}) = {P(obs, M=1, X=x) / P(obs, X=x):.4f}")
for m in (0, 1):
    vals = [cond(obs, 1, M=m, X=xp) for xp in (0, 1)]
    inner = sum(v * P(obs, X=xp) for xp, v in zip((0, 1), vals))
    print(f"    P(Y=1|M={m},X=0) = {vals[0]:.4f}, P(Y=1|M={m},X=1) = {vals[1]:.4f}, "
          f"averaged over P(x') = {inner:.4f}")
print(f"    P(Y=1|do(X=1)) via front door = {front_door(obs, 1):.4f}; via do = {P(joint(model(), 1), Y=1):.4f}")
print(f"    P(Y=1|do(X=0)) via front door = {front_door(obs, 0):.4f}; via do = {P(joint(model(), 0), Y=1):.4f}")

print("\n  finite sample, n = 200000 draws from the same model (U discarded):")
rng = np.random.default_rng(1995)
n = 200_000
U = (rng.random(n) < 0.5).astype(int)
X = (rng.random(n) < 0.2 + 0.6 * U).astype(int)
M = (rng.random(n) < 0.1 + 0.7 * X).astype(int)
Y = (rng.random(n) < 0.1 + 0.5 * M + 0.3 * U).astype(int)
px1 = X.mean()


def fd_hat(x):
    tot = 0.0
    for m in (0, 1):
        pm = np.mean(M[X == x] == m)
        inner = sum(Y[(M == m) & (X == xp)].mean() * (px1 if xp else 1 - px1) for xp in (0, 1))
        tot += pm * inner
    return tot


print(f"    naive {Y[X == 1].mean() - Y[X == 0].mean():+.4f} | front-door {fd_hat(1) - fd_hat(0):+.4f}")

print("\nPart B. What breaks it (exact)")
report("hidden U also affects M: P(M=1|X,U) = 0.1+0.7X+0.15U", model(u_to_m=0.15))
report("X also affects Y directly: P(Y=1|X,M,U) = 0.1+0.5M+0.3U+0.15X", model(x_to_y=0.15))

print("\nPart C. Linear version: effect = (slope of M on X) * (slope of Y on M given X)")
print("  U ~ N(0,1); X := U + e; M := 0.8 X + e; Y := 1.5 M + 1.0 U + e;  true effect 0.8 * 1.5 = 1.2")
U = rng.standard_normal(n)
X = U + rng.standard_normal(n)
M = 0.8 * X + rng.standard_normal(n)
Y = 1.5 * M + 1.0 * U + rng.standard_normal(n)


def ols(y, *cols):
    Z = np.column_stack([np.ones_like(y)] + list(cols))
    return np.linalg.lstsq(Z, y, rcond=None)[0][1:]


a = ols(M, X)[0]
b = ols(Y, M, X)[0]
print(f"  slope of Y on X (naive) = {ols(Y, X)[0]:.4f}  (exact 1.7000)")
print(f"  a = {a:.4f} (exact 0.8000), b = {b:.4f} (exact 1.5000), a*b = {a * b:.4f}  (exact 1.2000)")

The program prints:

Part A. Front-door conditions hold: U -> X, U -> Y, X -> M -> Y, U hidden
  P(U=1)=0.5; P(X=1|U)=0.2+0.6U; P(M=1|X)=0.1+0.7X; P(Y=1|M,U)=0.1+0.5M+0.3U
  exact, on the joint distribution:
    true effect +0.3500 | naive +0.5300 | front-door +0.3500 | 'adjust for M' +0.1800
  pieces of the formula (exact):
    P(X=1) = 0.5000
    P(M=1|X=0) = 0.1000
    P(M=1|X=1) = 0.8000
    P(Y=1|M=0,X=0) = 0.1600, P(Y=1|M=0,X=1) = 0.3400, averaged over P(x') = 0.2500
    P(Y=1|M=1,X=0) = 0.6600, P(Y=1|M=1,X=1) = 0.8400, averaged over P(x') = 0.7500
    P(Y=1|do(X=1)) via front door = 0.6500; via do = 0.6500
    P(Y=1|do(X=0)) via front door = 0.3000; via do = 0.3000

  finite sample, n = 200000 draws from the same model (U discarded):
    naive +0.5311 | front-door +0.3506

Part B. What breaks it (exact)
  hidden U also affects M: P(M=1|X,U) = 0.1+0.7X+0.15U
    true effect +0.3500 | naive +0.5750 | front-door +0.4588 | 'adjust for M' +0.1162
  X also affects Y directly: P(Y=1|X,M,U) = 0.1+0.5M+0.3U+0.15X
    true effect +0.5000 | naive +0.6800 | front-door +0.3500 | 'adjust for M' +0.3300

Part C. Linear version: effect = (slope of M on X) * (slope of Y on M given X)
  U ~ N(0,1); X := U + e; M := 0.8 X + e; Y := 1.5 M + 1.0 U + e;  true effect 0.8 * 1.5 = 1.2
  slope of Y on X (naive) = 1.7040  (exact 1.7000)
  a = 0.8011 (exact 0.8000), b = 1.5008 (exact 1.5000), a*b = 1.2024  (exact 1.2000)

Part A, exact. The true effect is +0.3500+0.3500. By hand: setting X=1X=1 instead of 00 raises P(M=1)P(M=1) by 0.8−0.1=0.70.8-0.1=0.7, and MM adds 0.5 to the outcome probability, so 0.5×0.7=0.350.5\times0.7=0.35. The naive difference is +0.5300+0.5300, too large by 0.18 because UU pushes up both XX and YY. The front-door formula, using only XX, MM and YY, gives exactly +0.3500+0.3500.

“Adjust for M” means treating MM as if it were a back-door set. It gives +0.1800+0.1800, which is wrong. It is in fact the confounding part alone. MM blocks the whole effect, and within each level of MM the treated have P(U=1∣X=1)=0.8P(U=1\mid X=1)=0.8 against 0.2 for the untreated, so the remaining gap is 0.3×(0.8−0.2)=0.180.3\times(0.8-0.2)=0.18. Simply adding the mediator as a control is not the front-door formula.

The pieces, by hand. The printed pieces reproduce the formula. For m=0m=0 the inner average is 0.5×0.16+0.5×0.34=0.250.5\times0.16+0.5\times0.34=0.25. For m=1m=1 it is 0.5×0.66+0.5×0.84=0.750.5\times0.66+0.5\times0.84=0.75. Then P(Y=1∣do(X=1))=0.2×0.25+0.8×0.75=0.65P(Y=1\mid do(X=1))=0.2\times0.25+0.8\times0.75=0.65 and P(Y=1∣do(X=0))=0.9×0.25+0.1×0.75=0.30P(Y=1\mid do(X=0))=0.9\times0.25+0.1\times0.75=0.30. Both match the direct intervention. The inner rates can be checked against the model too. For example, P(Y=1∣M=0,X=1)=0.1+0.3×P(U=1∣X=1)=0.1+0.3×0.8=0.34P(Y=1\mid M=0,X=1)=0.1+0.3\times P(U=1\mid X=1)=0.1+0.3\times0.8=0.34.

Part A, finite sample. With 200,000 draws and UU thrown away, the naive difference is +0.5311+0.5311 and the front-door estimate +0.3506+0.3506. The formula works from observable data alone.

Part B, broken conditions.

modeltrue effectnaivefront-door“adjust for M”
conditions hold (Part A)+0.3500+0.5300+0.3500+0.1800
hidden UU also affects MM+0.3500+0.5750+0.4588+0.1162
XX also affects YY directly+0.5000+0.6800+0.3500+0.3300

In the first broken model, P(M=1∣X,U)=0.1+0.7X+0.15UP(M=1\mid X,U)=0.1+0.7X+0.15U. This creates the path X←U→MX\leftarrow U\rightarrow M, a back-door path from treatment to mediator, so condition (ii) fails. It also creates M←U→YM\leftarrow U\rightarrow Y, a back-door path from mediator to outcome that XX does not block, so condition (iii) fails too. The formula gives 0.4588 against a true 0.3500. Pearl’s 1995 paper states that a confounding path between XX and any of its children on a path from XX to YY is a sufficient condition for non-identifiability. This graph has one, X←U→MX\leftarrow U\rightarrow M. By that result the effect is not identifiable here: no formula in XX, MM and YY gives the right answer for every model with this graph. §5.3 (ii)

In the second broken model, P(Y=1∣X,M,U)P(Y=1\mid X,M,U) gains a term 0.15X0.15X, a direct arrow X→YX\rightarrow Y. Now MM no longer intercepts every directed path from XX to YY, so condition (i) fails. The true effect is 0.35+0.15=0.500.35+0.15=0.50. The formula still returns 0.3500. Our reading: in this additive model, 0.35 is exactly the part that flows through MM, so the formula misses the direct part. The direction and size of the error depend on the model; these two cases show only that the error can go either way.

Part C, linear. The model is X:=U+eX:=U+e, M:=0.8X+eM:=0.8X+e, Y:=1.5M+1.0U+eY:=1.5M+1.0U+e, with standard normal UU and independent standard normal noise terms ee. The true effect is 0.8×1.5=1.20.8\times1.5=1.2. The naive slope of YY on XX should be 1.7 by hand. Var(X)=2\mathrm{Var}(X)=2, and Cov(X,Y)=1.5×0.8×2+1.0×Cov(U,X)=2.4+1=3.4\mathrm{Cov}(X,Y)=1.5\times0.8\times2+1.0\times\mathrm{Cov}(U,X)=2.4+1=3.4, so the slope is 3.4/2=1.73.4/2=1.7. The sample gives 1.7040. The two front-door slopes are a=0.8011a=0.8011 and b=1.5008b=1.5008, and their product is 1.2024, close to 1.2.

Where the front door stays shut

This section covers the strength of the assumptions, the famous smoking example and the debate it caused, and practical limits.

All three conditions are needed. Part B shows two different failures. A confounded mediator broke conditions (ii) and (iii) and biased the result upward here. A direct path broke condition (i) and biased it downward here. The data alone cannot tell which, if either, has happened.

The smoking–tar–cancer illustration. Pearl illustrated the criterion with a hypothetical case. XX is smoking, YY lung cancer, ZZ the amount of tar deposited in the lungs, and UU an unobserved carcinogenic genotype. He added that, according to some, this genotype also induces an inborn craving for nicotine. If smoking affected cancer only through tar, the formula would let one estimate the effect of smoking from non-experimental data. §3.2 This is a textbook illustration, not a finding. Pearl analysed no data, and no numbers exist for it. The example’s numbers in this article are generic and say nothing about smoking.

The 1995 debate. The paper was published with discussions. Imbens and Rubin called the smoking claim misleading, because other assumptions hide in the missing link between smoking and tar. Smokers might live in cities and get tar from air pollution, or be exposed to second-hand smoke. Then tar would be confounded with smoking. Imbens and Rubin, p. 695 Cox and Wermuth noted that the criterion needs an observed variable through which alone XX affects YY, and a hidden UU with no direct effect on it. They judged that such “situations … seem likely to be exceptional”. Cox and Wermuth, pp. 688–689

Pearl replied that the no-confounding of tar and smoking is not hidden: the graph shows it as a missing dashed arc between XX and ZZ. He apologised that his short summary had suggested the missing smoking-to-cancer arrow was the only assumption. In fact the graph encodes six. Rejoinder, p. 708 The reply shows that a graph makes the assumptions explicit and open to argument. It does not show that they hold.

Unverifiable like the alternatives. Hernán and Robins list the front door with instrumental variables, difference-in-differences and proximal inference. These methods avoid the conditional-exchangeability assumption of back-door adjustment. They rely instead on other assumptions that are also unverifiable. Which method to use depends on which assumptions are more credible in the problem. §7.6

Positivity. The formula needs p(x,z)>0p(x,z)>0. Example 6.46 If treatment fully determines the mediator, some cells are empty, and P(y∣x′,z)P(y\mid x',z) is undefined for them.

Linear shortcut only when linear. The product a ba\,b relies on linear, additive relations. §3.3.3 With interactions or binary variables, use the full formula, as Part A does.

Not a mediation analysis. The front door gives the total effect. Splitting it into direct and indirect parts is a different question, handled with counterfactuals.

The examples are toys. All models are synthetic and were built so that the conditions hold or fail by design.

Exercises

These exercises cover the three conditions, a hand calculation, a counterexample, how to present the smoking example, and a transfer to a product setting.

  1. State the three front-door conditions for a mediator ZZ. Say in one sentence what each buys in the derivation.

    Answer: (i) ZZ intercepts every directed path from XX to YY: the whole effect flows through ZZ, so the effect of XX is the effect of ZZ weighted by how XX shifts ZZ. (ii) There is no back-door path from XX to ZZ: so P(z∣do(x))=P(z∣x)P(z\mid do(x))=P(z\mid x). (iii) XX blocks every back-door path from ZZ to YY: so P(y∣do(z))=∑x′P(y∣x′,z)P(x′)P(y\mid do(z))=\sum_{x'}P(y\mid x',z)P(x'), a back-door adjustment. This is Pearl’s Theorem 2, with the derivation in his Tasks 1 to 3.

  2. Use Part A’s pieces: P(X=1)=0.5P(X=1)=0.5; P(M=1∣X=0)=0.1P(M=1\mid X=0)=0.1 and P(M=1∣X=1)=0.8P(M=1\mid X=1)=0.8; P(Y=1∣M,X)P(Y=1\mid M,X) equal to 0.16 for (M=0,X=0)(M=0,X=0), 0.34 for (0,1)(0,1), 0.66 for (1,0)(1,0) and 0.84 for (1,1)(1,1). Compute P(Y=1∣do(X=1))P(Y=1\mid do(X=1)), P(Y=1∣do(X=0))P(Y=1\mid do(X=0)) and the effect.

    Answer: Inner averages: for m=0m=0, 0.5×0.16+0.5×0.34=0.250.5\times0.16+0.5\times0.34=0.25; for m=1m=1, 0.5×0.66+0.5×0.84=0.750.5\times0.66+0.5\times0.84=0.75. Then do(X=1)do(X=1) gives 0.2×0.25+0.8×0.75=0.650.2\times0.25+0.8\times0.75=0.65, and do(X=0)do(X=0) gives 0.9×0.25+0.1×0.75=0.300.9\times0.25+0.1\times0.75=0.30. The effect is 0.35. It equals the model’s true effect, 0.5×(0.8−0.1)=0.350.5\times(0.8-0.1)=0.35, while the naive contrast is 0.53.

  3. Someone applies the front-door formula with tar deposits as the mediator. You suspect that city air pollution raises both smoking rates and tar. Which condition fails, and what does Part B suggest about the error?

    Answer: Condition (ii): pollution opens a back-door path from smoking to tar. This is Imbens and Rubin’s objection. If pollution also affects cancer, condition (iii) fails as well. In Part B the analogous violation (U→MU\rightarrow M) makes the formula give 0.4588 against a true 0.3500, an upward error in that model. The sign depends on the model, so no general direction can be claimed. A direct path, the failure of condition (i), instead gave 0.3500 against a true 0.5000.

  4. Cox and Wermuth wrote that front-door situations seem likely to be exceptional. Pearl replied that the graph displays every needed assumption. How should an article present the smoking–tar–cancer example in light of this exchange?

    Answer: As a hypothetical teaching illustration from Pearl’s 1995 paper, not as an empirical result. No data were analysed. The needed assumptions are strong and were disputed: no direct path from smoking to cancer, no confounding of tar with smoking, and a genotype that does not affect tar. Pearl’s reply shows that a graph makes these assumptions explicit, as missing arrows and missing dashed arcs, so they can be argued over. It does not show that they hold. Hernán and Robins group the front door with instrumental variables and difference-in-differences as methods resting on alternative, unverifiable assumptions.

  5. A web company cannot randomise a feature and suspects that user motivation confounds feature use and retention. It logs whether users open a specific screen that the feature always leads to. (a) When could front-door adjustment be used? (b) How would you estimate it if relations are roughly linear? (c) What would you consider if users can reach retention-relevant actions without the screen?

    Answer: (a) Three things must hold. The screen visit carries the whole effect of the feature on retention (condition i). Motivation affects screen visits only through feature use (ii). Nothing else confounds screen visits and retention once feature use is accounted for (iii). Every feature level must also occur with every screen level, so p(x,z)>0p(x,z)>0. (b) Regress screen visits on feature use to get aa. Regress retention on screen visits and feature use together to get bb. The effect is about a ba\,b; in Part C, 0.8011×1.5008=1.20240.8011\times1.5008=1.2024 against a naive 1.7040. (c) Then condition (i) fails, and the front door would miss the direct part (Part B: 0.3500 against 0.5000). Consider an instrument such as a randomised encouragement (instrumental-variables), a back-door set if motivation can be measured (back-door adjustment), or a sensitivity analysis (confounding).

History and further reading

This section places the front-door criterion in its original paper and suggests what to read next.

Judea Pearl presented the front-door criterion in his 1995 Biometrika paper “Causal diagrams for empirical research”. The paper’s roadmap presents it as a criterion that uses covariates affected by the treatment, which opens new possibilities for causal inference. Roadmap The same paper set out the three rules of do-calculus and used them to rederive the front-door formula symbolically. §4 It was printed with discussions by several statisticians and a rejoinder by Pearl; the exchanges on the front door are summarised in the limitations section above.

For a short modern statement, read Example 6.46 in Peters, Janzing and Schölkopf, next to their summary of the do-calculus rules. §6.7 Hernán and Robins’ Technical Point 7.4 gives the formula and a counterfactual proof. Technical Point 7.4 Pearl’s 2009 overview shows the two-stage idea and the linear product of slopes. §3.3.2–3.3.3 The back-door formula that the front door reuses twice is explained in back-door adjustment.

Make a prediction, then check

An unobserved U affects both X and Y, and X affects Y only through a mediator Z. Which situation makes the front-door formula invalid?

Choose one answer

Learning objectives

  • State the three conditions of the front-door criterion and the front-door formula, explain how it chains two back-door adjustments, and compute an interventional effect by hand from a small table.
  • Judge whether the front-door conditions are credible in a real problem (using the textbook smoking–tar–cancer example and the 1995 discussion), and describe how the result goes wrong when a condition fails.

Prerequisites & connections

Explore related knowledge →

References

  1. Causal diagrams for empirical research (with discussions and rejoinder; technical report R-218-B) — scoped
    Judea Pearl · 1995
  2. Causal Inference: What If (online version of 19 August 2026) — scoped
    Miguel A. Hernán; James M. Robins · 2026
  3. Elements of Causal Inference: Foundations and Learning Algorithms — scoped
    Jonas Peters; Dominik Janzing; Bernhard Schölkopf · 2017
  4. Causal inference in statistics: An overview
    Judea Pearl · 2009
  5. A Crash Course in Good and Bad Controls (technical report R-493, revised March 2022) — scoped
    Carlos Cinelli; Andrew Forney; Judea Pearl · 2022

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Claude · 2026-12-03 · Independent AI check (Claude subagent, not the author; not a human or expert review). These articles did not get a Gemini style pass; I did the D012 readability pass on the intuition sections myself in both languages. Research was done by a separate research subagent (facts.md) and the prose by a writer subagent. I ran example.py with the pinned interpreter (numpy 1.26.4) and diffed it against example.stdout.txt (identical), confirmed the python block in en.mdx and zh.mdx is byte-identical to example.py, and matched every quoted number (Part A exact and pieces, n = 200000 sample, Part B table, Part C slopes). I re-derived the four display equations, the 0.35 true effect, the 0.18 'adjust for M' gap from P(U=1|X) = 0.8/0.2, the hand calculation 0.25/0.75/0.65/0.30, the linear naive slope 3.4/2 = 1.7, and checked that U -> M breaks condition (ii) (X <- U -> M) and condition (iii) (M <- U -> Y not blocked by X) and that the formula's 0.35 in the direct-path model equals the part through M. I re-read the sources from the same PDFs the writer used (local copies of the cited URLs): Pearl 1995 R-218-B roadmap p. 671, §3.2 pp. 675-676 (Fig. 3, eqs (7)-(9), Theorem 2, the hypothetical smoking-tar-genotype illustration with no data), §4 pp. 677-678 (open question on completeness, p. 678), §5.2 (vi) and §5.3 (i)-(ii) pp. 682-683, Cox & Wermuth pp. 688-689 (the one direct quote verified verbatim, shortened with an ellipsis), Imbens & Rubin p. 695, Pearl's rejoinder p. 708; Hernán & Robins §7.6 p. 104 and Technical Point 7.4 p. 107; ECI Theorem 6.45 p. 119 and Example 6.46 p. 120; Pearl 2009 pp. 116-117; Cinelli-Forney-Pearl p. 13. I checked en/zh parity, citations, MDX safety, inline-code status of unpublished topics, aliases and the lint stock-phrase list. Not checked: Pearl 1993 and the 1993 technical report, Pearl 1994 'A probabilistic calculus of actions', Tian & Pearl 2002, Huang & Valtorta 2006, Shpitser & Pearl 2006 (credited only as cited); site validator and build not run on the staged files.

  • Example re-run matches, code byte-identical, all numbers match output; hand calculations and the linear slope derivation are correct.
  • Smoking-tar-cancer appears only as Pearl's hypothetical illustration with no data; the 1995 discussion (Imbens & Rubin p. 695; Cox & Wermuth pp. 688-689) and Pearl's rejoinder (p. 708) are reported accurately; the one direct quote matches the source.
  • Do-calculus completeness is credited via Peters et al. (Theorem 6.45) and Pearl 1995 is shown leaving it open (p. 678).
  • U -> M breaks both conditions (ii) and (iii); the non-identifiability wording matches Pearl 1995 §5.3 (ii); the direct-path model's 0.35 equals the part through M and is labelled as our reading.
  • en/zh correspond section by section; unpublished topics are inline code; aliases unique and collision-free; no lint stock phrases.

Source locations checked:

  • Causal diagrams for empirical research (with discussions and rejoinder; technical report R-218-B) — scoped · pdftotext of R-218-B (Biometrika 82(4): 669-710 with discussions), journal pages from running heads. For this topic: pp. 669-671 (summary; roadmap: front-door criterion involves covariates affected by treatment); p. 675 (§3.2 opening, Fig. 3); p. 676 (eqs (7)-(9), Theorem 2 conditions (i)-(iii), smoking/tar/genotype illustration with no data); pp. 676-678 (§4.1-4.3 notation, Theorem 3 Rules 1-3, Corollary 1, completeness left open, Fig. 4 subgraphs); pp. 678-679 (§4.4 Tasks 1-3, eqs (13)-(21), eq. (21) identical to (9)); pp. 682-683 (§5.2 (vi), §5.3 (i)-(ii)); pp. 688-689 (Cox & Wermuth discussion: front-door situations 'likely to be exceptional'); p. 695 (Imbens & Rubin discussion: smoking-tar-cancer claim misleading; pollution, second-hand smoke); p. 708 (Pearl's rejoinder: missing dashed arc between X and Z; six provisions). NOT read: other discussions (Dawid, Fienberg, Freedman, Robins, Rosenbaum, Shafer, Sobel) except headers, §§2, 4.5-5.1, 6, appendix.
  • Causal Inference: What If (online version of 19 August 2026) — scoped · pdftotext of hernanrobins_WhatIf_19aug26.pdf; printed page = PDF page - 9. For this topic: p. 104 (§7.6: front door among methods needing other unverifiable assumptions); p. 107 (Technical Point 7.4: Fig. 7.14 setting, front-door formula sum_m Pr[M=m|A=a] sum_a' Pr[Y=1|M=m,A=a'] Pr[A=a'], naming, SWIG proof, need for well-defined Y^m). NOT read: Technical Points 21.11-21.12 (alternative proofs).
  • Elements of Causal Inference: Foundations and Learning Algorithms — scoped · pdftotext of the MIT Press open-access PDF, printed pages. For this topic: p. 118 (§6.7 opening); p. 119 (identifiability; do-calculus Rules 1-3; Theorem 6.45 (i)-(iii) completeness, Tian's algorithm, hedges, as cited); p. 120 (Example 6.46 front-door adjustment, eq. (6.23), requires p(x,z) > 0; 'channel' remark); p. 134 (§6.12 Problem 6.65 proof hint). NOT read: Huang & Valtorta 2006, Shpitser & Pearl 2006, Tian 2002.
  • Causal inference in statistics: An overview · pdftotext of R-350, journal page numbers. For this topic: p. 116 (§3.3.2: no sufficient set when W3 is the only observed covariate; two-step estimation, eq. (26), 'mediating instrumental variable'; Tian-Pearl Theorem 2); p. 117 (§3.3.3: under Gaussian zero-mean disturbances and additive interactions, eq. (26) becomes a product of regression coefficients). NOT read for this topic: other sections.
  • A Crash Course in Good and Bad Controls (technical report R-493, revised March 2022) — scoped · pdftotext of R-493 (March 2022), report page numbers. For this topic: p. 13 ('Beyond adjustment': do-calculus gives a complete solution for nonparametric identification; front-door criterion allows exploiting post-treatment variables). NOT read for this topic: the rest beyond what is listed for backdoor-adjustment.

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.