Joint Confounder Selection for Causal Mediation Analysis in High Dimensions

Chanmin Kim, Hyunwoo KimNeurIPS 2026

TL;DR

When trying to figure out how a treatment works—splitting its impact into direct effects and indirect effects via an intermediate "mediator" variable—hidden confounders can ruin your estimates from three different angles at once. This paper introduces a principled rule and a Bayesian tree-based model that automatically hunts down the exact variables you need to control for, even when you have thousands of candidate features and only a couple hundred data points.

What Problem Does This Paper Address?

In standard causal inference, we ask whether exposure $A$ causes outcome $Y$, while adjusting for confounders (variables that influence both $A$ and $Y$). Causal mediation analysis goes a step deeper to uncover the mechanism: how much of $A$'s impact goes directly to $Y$, and how much travels indirectly through an intermediate mediator $M$ (for example, an HIV drug $A$ improving long-term survival $Y$ by boosting short-term immune cell counts $M$)?

In modern observational studies, researchers often collect hundreds or thousands of pre-treatment variables without knowing which ones are true confounders. While data-driven confounder selection is well-studied for simple $A \to Y$ problems, mediation analysis is a three-headed hydra: confounding can simultaneously warp the $A$–$M$, $A$–$Y$, and $M$–$Y$ pathways. Adjust for too little, and your estimates are biased; adjust for the wrong things—like pure instrumental variables (which only push on $A$)—and you actually amplify bias and blow up variance. Until now, mediation analysis lacked both a formal rule for what to select in high dimensions and a unified algorithm to do it automatically.

Figure 1: Directed acyclic graph (DAG) for mediation analysis. The red solid path (through the mediator M) denotes the indirect effect, and the blue solid path denotes the direct effect; dashed lines indicate confounding relationships among A, M, and Y . (a) A high-dimensional setting with candidate covariates X1, . . . , Xp along with auxiliary variables Z, WM, and WY . (b) The subset {X3, WM, X4, X8, WY } (highlighted in green) satisfies the proposed mediation disjunctive cause criterion and is sufficient for identifying the natural direct and indirect effects.

Methods

The authors tackle this on two fronts: causal theory and Bayesian machine learning.

First, they formulate a new theoretical rule: the Mediation Disjunctive Cause Criterion. It states that to block all confounding "backdoor" pathways among $A$, $M$, and $Y$, you don't need to observe every variable on a tangled causal chain. You just need to intercept each pathway with at least one direct cause of $A$, $M$, or $Y$—while strictly excluding pure instruments for $A$.

Second, to find this set in data, they build BCMF-CS (Bayesian Causal Mediation Forest with Confounder Selection).

  • What's standard: They model the exposure, mediator, and outcome using Bayesian Additive Regression Trees (BART)—ensembles of shallow decision trees that flexibly capture nonlinearities—augmented with estimated propensity scores and "clever covariates" (predicted mediator values) to prevent regularization bias.
  • What's new: Because the mediator and outcome models take extra Clever Covariates as inputs, the three models have nested feature spaces of sizes $P$, $P+1$, and $P+3$. You can't naively slap the same variable-selection prior on vectors of different lengths. The authors solve this by placing a single sparsity-inducing Dirichlet prior on the largest vector and leveraging the neutrality property of the Dirichlet distribution—where dropping coordinates and renormalizing cleanly yields conditional Dirichlet distributions for the smaller models. This couples tree-splitting probabilities across all three models, forcing them to agree on a sparse set of true confounders.

Datasets

  • Synthetic Benchmarks: Seven simulation scenarios ($N = 250$ samples, with covariates $P$ ranging from $20$ up to $2,000$) featuring nonlinear relationships, heterogeneous effects, non-confounding predictors, and exposure/mediator instruments. No public benchmark is newly named, though these custom stress-test regimes evaluate high-dimensional mediation selection.
  • ACTG175 Clinical Trial: A real-world dataset from the R package speff2trial ($N = 1,342$ complete cases out of $2,139$ HIV-positive patients, with $15$ pretreatment covariates). It compares zidovudine monotherapy ($A=0$) against combination/didanosine therapies ($A=1$), using 20-week CD4 counts as the mediator ($M$) and 95-week CD4 counts as the outcome ($Y$).

Key Insights and Ideas

  • Ultra-high-dimensional "Oracle" guarantees: The authors prove posterior consistency even when features vastly outnumber samples ($P_N \gg N$, as long as $\log P_N = o(N)$). Asymptotically, the Dirichlet prior's sparsity penalty counteracts the combinatorial explosion of candidate subsets, concentrating on the true confounder set and yielding consistent direct and indirect effect estimates.
  • Automatic preference for proximal causes: When a confounding path has multiple ancestors (e.g., $A \leftarrow X_1 \leftarrow X_2 \to X_3 \to M$), the shared sparse prior naturally gravitates toward variables with the strongest signal—picking direct parents like $X_3$ rather than noisy upstream ancestors.
  • Self-healing variable selection: In a leave-one-out test on the HIV dataset, deleting a top selected confounder (cd40 or preanti) didn't break the effect estimates. Instead, the model automatically promoted age—a parent of both removed variables—into the active set to keep the backdoor path blocked.
  • Separating confounders from effect modifiers: In the HIV trial, patient race wasn't selected as a confounder, yet indirect drug effects were clearly stratified by race. Because BCMF-CS uses separate tree ensembles for confounding adjustment versus treatment-effect modification, it cleanly distinguishes variables that bias effects from those that moderate them.

Key Results

Across 200 simulation replicates per scenario, BCMF-CS consistently beat standard Bayesian causal mediation forests (BCMF), independent sparse Dirichlet forests (DCMF), and linear structural equation models (LSEM):

  • Extreme High Dimensions ($N=250, P=2000$): In Scenario 6, BCMF-CS achieved a Direct Effect MSE of 0.004 (vs. 0.422 for BCMF and 0.956 for DCMF) with 1.00 coverage, and an Indirect Effect MSE of 0.345 (vs. 1.787 for BCMF and 1.486 for DCMF).
  • Resisting Instruments & Extra Predictors: When pure exposure instruments were introduced (Scenario 3), DCMF's Direct Effect MSE degraded to 0.785, whereas joint selection in BCMF-CS kept MSE down at 0.167.
  • Computational Scalability: Runtime scales moderately with sample size $N$ and remains largely flat as covariate dimension $P$ grows, since the sparse prior focuses tree splits on the handful of relevant variables.
  • HIV Trial Plausibility: Out of 15 clinical covariates, BCMF-CS assigned a posterior inclusion probability (PIP) of 1.0 to baseline CD4 count (cd40) and prior antiretroviral duration (preanti)—clinically sensible common causes of 20-week and 95-week immune counts.
Simulation results showing BCMF-CS achieving substantially lower MSE and better coverage than baselines across all seven scenarios, including P = 2000.

Limitations and Future Work

  • No free lunch on unmeasured confounding: Like all observational methods, sequential ignorability still requires that at least one variable (or close proxy) along every backdoor pathway actually exists in your dataset.
  • Single-mediator theory: While the authors demonstrate in an appendix that their BART architecture can be adapted to two mediators on a toy example, the formal theoretical guarantees currently apply only to a single mediator; extending consistency proofs to multiple or sequential mediators is left for future work.

Summary updated

Abstract

The estimation of causal effects in observational research fundamentally relies on proper adjustment for confounding variables. While data-driven confounder selection is well-established for conventional exposure-outcome analyses, such methodologies remain underdeveloped in causal mediation analysis. This paper proposes a Bayesian nonparametric framework for confounder selection in mediation analysis using Bayesian Additive Regression Trees (BART). We introduce a shared sparsity-inducing prior across the exposure, mediator, and outcome models to identify the minimal sufficient adjustment set that satisfies the mediation disjunctive cause criterion. Importantly, we provide rigorous theoretical guarantees for the proposed method: we establish the posterior consistency of confounder selection even in high-dimensional regimes ($P \gg N$) and demonstrate that this selection consistency translates into the consistent estimation of natural direct and indirect effects. The proposed method demonstrates consistently strong performance across a range of simulation scenarios, offering a principled and practical approach for high-dimensional mediation analysis.
BibTeX
@inproceedings{kim2026joint,
  author = {Chanmin Kim and Hyunwoo Kim},
  title = {{Joint Confounder Selection for Causal Mediation Analysis in High Dimensions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=HsloWr8Orf},
}
Figure