Part III asked how outcomes would change under sustained treatment strategies; it did not ask how treatment produces its effect. Causal mediation studies the causal pathways through which a treatment \(A\) affects an outcome \(Y\), in particular the pathways that run through an intermediate variable, the mediator \(M\).
Mediation can be viewed as a special case of causal inference with time-varying treatments: instead of one treatment taking values at several times, we have two different variables, the treatment and the mediator, at different times. This chapter develops a framework for mediation based on hypothetical interventions that can be mapped into a target trial. Unlike approaches built on pure direct and total indirect effects, this interventionist framework allows the causal estimates to be checked empirically, at least in principle.
Example 1 (The smoking cessation trial) Smokers are randomized to quit smoking (\(A = 0\)) or to keep smoking (\(A = 1\)), with perfect adherence. The trial finds that cessation lowers the 1-year risk of myocardial infarction \(Y\), i.e., \(\operatorname{E}\mathopen{}\left[Y \mid A = 1\right]\mathclose{} > \operatorname{E}\mathopen{}\left[Y \mid A = 0\right]\mathclose{}\).
The investigators then ask whether the benefit operates through reduced hypertension \(M\), measured at 6 months (assume no one has the outcome during the first 6 months). The book’s Figure 23.1 is the causal diagram \(A \to M \to Y\) with an additional arrow \(A \to Y\), assuming interventions on \(M\) are sufficiently well defined.
Decomposing the total effect of \(A\) on \(Y\) into a part through \(M\) (indirect) and a part not through \(M\) (direct) is a causal mediation analysis. Chapter 22 formalized direct effects (Technical Points 22.1 and 22.2) but not indirect effects.
Definition 1 (Pure direct effect) The pure direct effect of \(A\) on \(Y\) not through \(M\) is the average causal effect of \(A\) on \(Y\) if each individual’s mediator had been set to the value \(M^{a=0}\) it would have taken under \(a = 0\):
\[\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0, M^{a=0}}\right]\mathclose{}.\]
Definition 2 (Total indirect effect) The total indirect effect of \(A\) on \(Y\) through \(M\) is
\[\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=1}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}.\]
In the smoking example, \(M^{a=0}\) is known for those who actually quit but unknown for those who kept smoking. \(Y^{a=1, M^{a=0}}\) is a cross-world quantity: it is indexed by two treatment values, \(a = 1\) and \(a = 0\), that cannot occur simultaneously for the same individual in the same world. Both the pure direct effect and the total indirect effect are cross-world quantities.
Theorem 1 (The decomposition of the total effect) The pure direct effect and the total indirect effect sum to the total effect:
\[\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0, M^{a=0}}\right]\mathclose{} + \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=1}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} = \operatorname{E}\mathopen{}\left[Y^{a=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0}\right]\mathclose{}.\]
Proof. Adding the two contrasts, the cross-world term cancels:
\[ \begin{aligned} &\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0, M^{a=0}}\right]\mathclose{} + \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=1}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} \\ &\quad = \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=1}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0, M^{a=0}}\right]\mathclose{} && \text{(the } \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} \text{ terms cancel)} \\ &\quad = \operatorname{E}\mathopen{}\left[Y^{a=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0}\right]\mathclose{} && \text{(consistency: } Y^{a, M^{a}} = Y^{a} \text{)}. \end{aligned} \]
Figure 23.1 has no unmeasured common causes of \(M\) and \(Y\). If such common causes existed, no direct effect could be identified: neither controlled direct effects nor the pure direct and total indirect effects. Identifying the mediation effects requires identifying the cross-world mean \(\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}\), which the mediation formula does:
\[\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} = \sum_m \operatorname{E}\mathopen{}\left[Y \mid A = 1, M = m\right]\mathclose{} \Pr[M = m \mid A = 0].\]
Theorem 2 (The mediation formula (Technical Point 23.1)) Under the causal diagram in Figure 23.1, assuming exchangeability and consistency for \(A\) and \(M\) and the cross-world independence \(Y^{a=1, m} \perp\!\!\!\perp M^{a=0}\),
\[\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} = \sum_m \operatorname{E}\mathopen{}\left[Y \mid A = 1, M = m\right]\mathclose{} \Pr[M = m \mid A = 0].\]
Proof. \[ \begin{aligned} \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} &= \sum_m \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}} \mid M^{a=0} = m\right]\mathclose{} \Pr[M^{a=0} = m] && \text{(law of total expectation)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y^{a=1, m} \mid M^{a=0} = m\right]\mathclose{} \Pr[M^{a=0} = m] && \text{(on } \{M^{a=0} = m\}, \ Y^{a=1, M^{a=0}} = Y^{a=1, m} \text{)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y^{a=1, m}\right]\mathclose{} \Pr[M^{a=0} = m] && \text{(cross-world independence } Y^{a=1, m} \perp\!\!\!\perp M^{a=0} \text{)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y^{a=1, m} \mid A = 1, M = m\right]\mathclose{} \Pr[M^{a=0} = m \mid A = 0] && \text{(exchangeability for } A \text{ and for } M \text{)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y \mid A = 1, M = m\right]\mathclose{} \Pr[M = m \mid A = 0] && \text{(consistency)}. \end{aligned} \]
The fourth line uses randomization of \(A\) (so \(Y^{a=1, m}\) and \(M^{a=0}\) are independent of \(A\)) and the absence of unmeasured common causes of \(M\) and \(Y\) (so \(Y^{a=1, m}\) is independent of \(M\) given \(A = 1\)). The book compresses the last two lines into one step “by exchangeability and consistency” (Hernán and Robins 2020, 324).
The trial investigators, as advocates of the NPSEM-IE, defend the pure direct effect with a policy story (Pearl 2001 gave a similar argument):
The story decomposes treatment \(A\) into two separable components:
Each component can, in principle, be intervened on separately. For example, \(Y^{n=0, o=1}\) is the outcome under an intervention that removes only the nicotine from cigarettes.
The book’s Figure 23.2 is the FFRCISTG causal DAG for this story: bold (deterministic) arrows \(A \to N\) and \(A \to O\), and arrows \(N \to M\), \(M \to Y\), and \(O \to Y\). The arrows from \(A\) are deterministic because in the trial either \(A = N = O = 1\) (kept smoking regular cigarettes) or \(A = N = O = 0\) (quit).
Figure 23.3 is the corresponding SWIG. If \(O\) causes \(M\) for no individual, we may write \(M^{n, o}\) as \(M^{n}\).
Theorem 3 (When the mediation formula is the g-formula (Technical Point 23.2)) Under the FFRCISTG represented by Figure 23.2, with assumptions (i) and (ii),
\[\operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} = \sum_m \operatorname{E}\mathopen{}\left[Y \mid A = 1, M = m\right]\mathclose{} \Pr(M = m \mid A = 0),\]
which is the mediation formula.
Proof. Exchangeability holds for \(N\) and \(O\) in Figure 23.3 (the SWIG of Figure 23.2), so if \(N\) and \(O\) were observed, the g-formula would give
\[ \begin{aligned} \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} &= \sum_m \operatorname{E}\mathopen{}\left[Y \mid N = 0, O = 1, M = m\right]\mathclose{} \Pr(M = m \mid N = 0, O = 1) && \text{(g-formula)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y \mid O = 1, M = m\right]\mathclose{} \Pr(M = m \mid N = 0) && \text{(} N \text{ is not a parent of } Y\text{; } O \text{ is not a parent of } M \text{)} \\ &= \sum_m \operatorname{E}\mathopen{}\left[Y \mid A = 1, M = m\right]\mathclose{} \Pr(M = m \mid A = 0) && \text{(in the data, } O = 1 \iff A = 1 \text{ and } N = 0 \iff A = 0 \text{)}. \end{aligned} \]
No one in the trial has \((N = 0, O = 1)\), so positivity fails. But positivity is sufficient, not necessary: given exchangeability and consistency, identification by the g-formula only requires that the g-formula be a function of the observed data distribution, which the last line shows it is.
Proof (Why \(Y^{n=0, o=1} = Y^{a=1, M^{a=0}}\) for every individual). \[ \begin{aligned} Y^{n=0, o=1} &= Y^{o=1, M^{n=0}} && \text{(no } N \to Y \text{: } N \text{ affects } Y \text{ only through } M \text{; no } O \to M \text{)} \\ &= Y^{a=1, M^{n=0}} && \text{(with } N \text{ irrelevant for } Y \text{, setting } o = 1 \text{ acts on } Y \text{ like setting } a = 1 \text{)} \\ &= Y^{a=1, M^{a=0}} && \text{(with } O \text{ irrelevant for } M \text{, setting } n = 0 \text{ acts on } M \text{ like setting } a = 0 \text{)}. \end{aligned} \]
Definition 3 (Separable effect of the nicotine component) The separable direct effect of the component \(N\) on \(Y\) is
\[\operatorname{E}\mathopen{}\left[Y^{n=1, o=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{},\]
a controlled direct effect for the separable component \(N\).
It equals the total indirect effect:
\[ \begin{aligned} \operatorname{E}\mathopen{}\left[Y^{n=1, o=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} &= \operatorname{E}\mathopen{}\left[Y^{a=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} && \text{(} n = o = 1 \text{ is the same intervention as } a = 1 \text{)} \\ &= \operatorname{E}\mathopen{}\left[Y^{a=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} && \text{(} Y^{n=0, o=1} = Y^{a=1, M^{a=0}} \text{)} \\ &= \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=1}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} && \text{(consistency: } Y^{a=1} = Y^{a=1, M^{a=1}} \text{)}. \end{aligned} \]
Likewise the separable effect of \(O\) with nicotine removed equals the pure direct effect:
\[ \begin{aligned} \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{n=0, o=0}\right]\mathclose{} &= \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{n=0, o=0}\right]\mathclose{} && \text{(} Y^{n=0, o=1} = Y^{a=1, M^{a=0}} \text{)} \\ &= \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{} - \operatorname{E}\mathopen{}\left[Y^{a=0}\right]\mathclose{} && \text{(} n = o = 0 \text{ is the same intervention as } a = 0 \text{)}. \end{aligned} \]
The interventional reading of \(\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}\) as \(\operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{}\) is valid only if the separable-components story is correct and Figure 23.3 represents an FFRCISTG. Its advantage is that the story can be refuted by a randomized trial.
Example 2 (A three-arm trial of nicotine-free cigarettes) Once nicotine-free cigarettes exist, randomize smokers to:
Without temporal trends, arms 1 and 2 should reproduce the original trial’s arm means (assume samples large enough to ignore sampling variability). By randomization, \(\operatorname{E}\mathopen{}\left[Y \mid N = 0, O = 1\right]\mathclose{} = \operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{}\) in the new trial. If the story is correct, \(\operatorname{E}\mathopen{}\left[Y \mid N = 0, O = 1\right]\mathclose{}\) equals the mediation formula from the original trial.
If \(\operatorname{E}\mathopen{}\left[Y \mid N = 0, O = 1\right]\mathclose{}\) differs from the mediation formula, at least one assumption is false:
The new trial’s data help locate the failure:
Fine Point 23.1: Empirical falsification of the assumptions for separable effects
Telling (i) apart from (iii) needs a further trial, say with 8 arms, that also intervenes on \(M\):
How can Figure 23.2 omit a common cause of \(M\) and \(Y\) when Figure 23.1 is an FFRCISTG with no such common cause? Common causes may be active only under interventions that give \(N\) and \(O\) different values; the FFRCISTG for Figure 23.1 only considers \(A = N = O = 1\) and \(A = N = O = 0\). If such a \(U\) is the only reason for the discrepancy, \(Y^{n=0, o=1} = Y^{a=1, M^{a=0}}\) still holds for every individual, but \(\operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{} = \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}\) is no longer identified by the mediation formula. Robins et al. (2022) describe a realistic hypothetical study of treatment for river blindness with exactly this structure (Hernán and Robins 2020, 328).
Suppose the new trial reproduces the original arms but its nicotine-free arm differs from the mediation formula.
Keep assuming Figure 23.1 is an FFRCISTG and that the nicotine-free arm differs from the mediation formula. Could \(A\) always be split into other, possibly unknown, components \(N'\) and \(O'\) for which Figure 23.2 is an FFRCISTG and (i) and (ii) hold, so that \(\operatorname{E}\mathopen{}\left[Y^{n'=0, o'=1}\right]\mathclose{} = \operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}\) = the mediation formula?
No. Otherwise \(\operatorname{E}\mathopen{}\left[Y^{a=1, M^{a=0}}\right]\mathclose{}\) would always be point identified by the mediation formula, which it is not; this would contradict the sharp bounds of Robins and Richardson (2010) (Hernán and Robins 2020, 329).
The chapter’s interventionist theory of mediation reframes the mediation question as a question about the effects of interventions on substantively meaningful, separable components (\(N\) and \(O\)) of \(A\). It can stand on its own, without any reference to cross-world (nested) counterfactuals.
If \(N\) and \(O\) are separable components of \(A\), then in a future six-arm trial with arms
two statements hold:
With data on \(A\), \(M\), and \(Y\) only, the separable effects of \(N\) and \(O\) are identified if
In particular, \(\operatorname{E}\mathopen{}\left[Y^{n=0, o=1}\right]\mathclose{}\) then equals the mediation formula (Theorem 3).
Often interventions on the putative mediator \(M\) are not well defined, so counterfactuals like \(Y^{a, m}\) are not meaningful. Then neither the pure direct effect nor the controlled direct effects based on \(M\) (Technical Point 22.1) exist. The interventionist effects still exist, as long as meaningful separable components \(N\) and \(O\) can be intervened on.
Fine Point 23.2: Separable effects with a surrogate mediator
If interventions on \(M\) are not well defined, the arrow \(M \to Y\) in Figure 23.1 is not causal (Section 9.5): \(M\) is a surrogate for an unknown true mediator \(H\) (Figure 23.4: \(A \to H\), \(H \to M\), \(H \to Y\), \(A \to Y\)). Adding separable components \(N\) and \(O\) gives Figure 23.5, in which, unlike Figure 23.2, \(N\) and \(Y\) are not d-separated given \(M\) and \(O\).
Suppose the three-arm trial nevertheless shows \(N \perp\!\!\!\perp Y \mid M, O\). Four explanations are possible:
Causal-discovery advocates would tend to choose (a) if the trial was large (Technical Point 10.7) (Hernán and Robins 2020, 330).
The framework accommodates more than two components, including components that vary over time.
Technical Point 23.3: Path-specific effects and the front door formula
Take the front-door setting of Fine Point 9.5 (BMI \(L\), drug \(A\), outcome \(Y\), unmeasured \(H\) confounding \(L\) and \(Y\)), modified to include an edge \(L \to Y\) (Figure 23.6). The total effect of \(L\) on \(Y\) is then not identified, because the \(L \to Y\) path cannot be separated from confounding by \(H\). Is the effect of \(L\) along \(L \to A \to Y\) identified?
Expand the graph (Figure 23.7): \(N\) is the BMI reported to the physician who prescribes \(A\), and \(O\) is the BMI used for referral to physical therapy and diet counseling; in the data \(L = N = O\). Figure 23.8 is the SWIG for an (unethical) intervention that reports a value \(n\) to the physician while the true \(L = O\) drives referral. Because \(L \equiv O\) even in the intervened world, \(O\) can be dropped. Since \(Y^{n} \perp\!\!\!\perp N \mid L\) in Figure 23.8, the g-formula gives
\[ \begin{aligned} \operatorname{E}\mathopen{}\left[Y^{n}\right]\mathclose{} &= \sum_{l, a} \operatorname{E}\mathopen{}\left[Y \mid A = a, L = l\right]\mathclose{} \Pr[L = l] \Pr[A = a \mid N = n] && \text{(g-formula)} \\ &= \sum_{a} \mathopen{}\left\{\sum_{l} \operatorname{E}\mathopen{}\left[Y \mid A = a, L = l\right]\mathclose{} \Pr[L = l]\right\}\mathclose{} \Pr[A = a \mid N = n] && \text{(regroup the sum)} \\ &= \sum_{a} \mathopen{}\left\{\sum_{l} \operatorname{E}\mathopen{}\left[Y \mid A = a, L = l\right]\mathclose{} \Pr[L = l]\right\}\mathclose{} \Pr[A = a \mid L = n] && \text{(} L \equiv N \text{ in the data)}, \end{aligned} \]
which is the front door formula. This derivation is heuristic because of the null sets created by determinism; a rigorous proof combines determinism with the approach of Technical Point 21.12. \(N\) and \(O\) need not be separable components of \(L\); what matters is that the substantive story implies an expanded graph with an intervention variable \(N\) deterministically related to \(L\) in the actual world (Stensrud et al. 2023; Wen et al. 2023 obtained essentially equivalent results). Fulcher et al. (2020) had shown that the front door formula identifies the cross-world quantity \(\operatorname{E}\mathopen{}\left[Y^{L, A^{l=n}}\right]\mathclose{}\) under the NPSEM-IE for Figure 23.6 (Hernán and Robins 2020, 331).