Causal Mediation-Based Debiasing Framework
- Causal mediation-based debiasing frameworks are methods that decompose bias into direct and indirect effects using structural causal models and counterfactual reasoning.
- They isolate bias pathways by intervening on mediator variables, enabling targeted adjustments in applications such as language models and recommendation systems.
- The approach guides model corrections by preserving useful signals while mitigating bias, balancing prediction accuracy with fairness.
Across this literature, a causal mediation-based debiasing framework denotes a family of methods that treats bias as a causal effect transmitted through one or more mediators rather than as a purely correlational artifact. The common construction is to specify an exposure or intervention, define mediator variables that carry potentially biased influence, and decompose the resulting outcome into direct and indirect components by using potential outcomes, counterfactuals, or structural causal models. In LLMs, visually-aware recommendation, aspect-based sentiment analysis, scene graph generation, multimodal LLMs, and epidemiologic mediation, this decomposition is used either to inspect which internal components or contextual channels carry bias, or to construct adjusted predictions that retain useful signal while suppressing spurious pathways (Jeoung et al., 2022).
1. Causal formulation and estimands
The canonical mediation setup uses a treatment or exposure, a mediator, and an outcome. In the potential-outcomes notation used by Imai et al.-style mediation analyses, for unit , the treatment is , the mediator is , and the outcome is , with potential mediator and outcome variables
Consistency is written as
Under this setup, unit-level natural indirect and direct effects are
with corresponding average effects and , and total effect
The decomposition identities
0
formalize the split between mediated and non-mediated pathways (Rene et al., 2021).
In the counterfactual graphical tradition associated with Pearl, Robins, and Shpitser, the natural direct effect is defined through the nested counterfactual 1. For binary treatment, the total effect is
2
the direct effect is
3
and the indirect effect is
4
This formulation makes explicit that mediation is a causal estimand, not a regression coefficient decomposition, and that its identification depends on cross-world assumptions such as 5 (Shpitser, 2012).
A central complication for debiasing is that natural effects are generally unidentifiable when mediator–outcome confounding is induced by treatment. In that setting, recent proximal mediation work replaces natural effects with interventional effects based on
6
where 7 is a random draw from the distribution of 8 given baseline covariates 9. This preserves a direct/indirect decomposition while avoiding cross-world counterfactuals of the form 0 (Zhang et al., 3 Jul 2026).
2. General workflow and representative instantiations
A generalized mediation-based debiasing workflow is explicit in the analysis of debiasing in pretrained LLMs. The sequence is: choose a pretrained model, apply a debiasing method, optionally fine-tune on a downstream task, measure intrinsic bias, perform causal mediation analysis with a bias-related intervention as treatment and internal model components as mediators, inspect which components change, and compare those causal findings with downstream performance (Jeoung et al., 2022). This same pattern reappears, with different mediators and different adjustment operators, in recommendation, ABSA, scene graph generation, and multimodal reasoning.
| Setting | Mediator or pathway | Debiasing operation |
|---|---|---|
| LLMs | neurons, layers, attention heads | estimate total, direct, and indirect effects (Jeoung et al., 2022) |
| Visually-aware recommendation | item visual feature 1 | debiased prediction by Total Indirect Effect at test time (Qiu et al., 2021) |
| Aspect-based sentiment analysis | context confounding and aspect shortcut | backdoor adjustment for review branch and counterfactual reasoning for aspect branch (Wu et al., 2024) |
| Scene graph generation | co-occurrence distribution 2 | triplet-level adjustment factors from MCCM and CAModule (Liu et al., 22 Mar 2025) |
| Multimodal LLMs | spurious textual and visual context | Natural Direct Effect, Total Indirect Effect, counterfactual training, and expert routing (Wu et al., 18 Sep 2025) |
In visually-aware recommendation, CausalRec treats the item visual feature 3 as a mediator that can introduce a spurious relationship between user and item. The method uses intervention and counterfactual inference over the mediator, and applies the Total Indirect Effect during testing. Its debiased prediction subtracts a counterfactual or no-treatment term while retaining the supportive significance of visual information (Qiu et al., 2021).
In DINER for ABSA, the review branch is modeled as indirect confounding from context and is handled with backdoor adjustment, whereas the aspect branch is modeled as a direct shortcut correlation with labels and is handled with counterfactual reasoning. The final prediction is based on the Total Indirect Effect
4
because the interaction term is set to 5 in the stated SCM (Wu et al., 2024).
3. Pathway localization in model internals and complex systems
A defining feature of mediation-based debiasing is that it localizes bias to specific mechanisms rather than treating the model as a black box. In the gender-debiasing study of pretrained LLMs, the treatment is a gender intervention on the input, the mediator 6 can be a neuron, a layer, or an attention head, and the bias score is defined by
7
The strongest gender-bias-related indirect effects are concentrated in the first two layers, including the word embedding layer (layer index 0), and fine-tuned models show mitigated indirect effects compared to non-fine-tuned models. Attention intervention analysis further shows that top attention heads differ across models and that debiasing and fine-tuning change which heads matter and how they distribute attention over gender-associated terms (Jeoung et al., 2022).
This localization logic is mirrored in recommender systems. CausalRec separates the true preference-related path 8 from the visual-mediated path 9. Its design explicitly models three components,
0
and combines them as
1
The subsequent subtraction of the counterfactual term via TIE is therefore a pathway-specific correction rather than a removal of visual information altogether (Qiu et al., 2021).
In multimodal LLMs, spurious textual and visual context are explicitly defined as the bias variable 2, and the Natural Direct Effect is used for unbiased estimation. The framework constructs text and image counterfactuals, computes Total Effect, Natural Direct Effect, and Total Indirect Effect, and then either corrects inference with
3
or embeds the correction into training with counterfactual objectives and a Mixture-of-Experts architecture with dynamic routing. This preserves the distinction between semantic and spurious modality-specific pathways (Wu et al., 18 Sep 2025).
A broader generalization appears in large operational DAGs for root cause analysis. There, mediation is reframed as a scalable decomposition problem over multiple treatments and multiple mediators, with generalized natural indirect effects assigned to treatment–mediator pairs 4. This suggests a direct continuity between fairness-style debiasing and root-cause attribution: both rely on isolating a target causal path while holding nuisance or non-target paths fixed (Casadei et al., 16 Dec 2025).
4. Identification, estimation, and debiased learning
Because mediation estimands depend on high-dimensional nuisance regressions, several frameworks treat debiasing as an estimation problem as well as a pathway problem. DeepMed estimates natural direct and indirect effects through the cross-world mean functional
5
uses deep neural networks for the nuisance functions 6, 7, and 8, and then applies an efficient-influence-function score with cross-fitting. Its central claim is that the EIF correction removes first-order bias, leaving only second-order products of nuisance estimation errors, and that semiparametric efficiency can be achieved without imposing sparsity constraints on the DNN architecture (Xu et al., 2022).
A more general version of the same idea appears in Automatic Debiased Machine Learning, where mediation is written as the nonlinear functional
9
The orthogonal score adds one correction term per nuisance regression, and the needed Riesz representers are learned automatically by minimum-distance Lasso. This separates the causal estimand from the machine-learning model used to approximate the nuisance structure (Chernozhukov et al., 2018).
The same concern with model misspecification motivates mediation methods for mixed-scale data. When outcomes and mediators are bounded, skewed, or have excess mass at the endpoints, normal/Bernoulli models are inadequate. A zero-one inflated beta model,
0
accommodates continuous values on 1 while separately modeling mass at 2 and 3, and Monte Carlo 4-computation under fitted observed-data models is then used to estimate both average and quantile mediation effects (Rene et al., 2021).
Sampling itself can be another source of bias. Under case-control sampling, the observed distribution is distorted by the outcome-dependent mechanism 5, so population mediation targets such as 6 or 7 are not identified from the retrospective sample alone. The unified three-stage weighting framework first estimates the unknown population prevalence using density-ratio learning and label-shift correction, then reconstructs the target population with design weights, and finally applies stabilized causal and mediation weights within a marginal structural modeling framework (Islam et al., 25 Jun 2026).
A different route to deconfounding uses multiple mediators themselves as a source of information. In the latent multiple-mediator pathway framework, a structured latent factor or autoencoder recovers a surrogate confounder 8 from the shared residual structure of treatment, mediators, and outcome. Conditioning on 9 is then used to restore sequential ignorability and identify direct and indirect effects without external proxies for the hidden confounder (Yuan et al., 2023).
5. Hidden confounding, recanting witnesses, and partial identification
The central theoretical difficulty in mediation-based debiasing is that the mediated path is often confounded precisely by variables created by treatment. In longitudinal mediation with unobserved confounders, Shpitser’s recanting district criterion states that a path-specific effect is expressible as a functional of interventional densities if and only if there is no recanting district for that effect. If such a district exists, the path-specific effect is not identifiable, even from interventional data (Shpitser, 2012).
Proximal mediation analysis addresses one important failure mode: treatment-induced mediator–outcome confounding that is itself unmeasured. One framework uses proxy variables 0 and 1, outcome and treatment bridge functions, and four proximal identification results for the interventional mean
2
It then constructs a multiply robust, semiparametric locally efficient estimator that remains valid if any one of four nuisance-model combinations is correct (Zhang et al., 3 Jul 2026).
A related proximal framework handles hidden recanting witnesses. There, the target path-specific effect runs along 3, but the recanting witness 4 is unobserved and only proxy variables 5 and 6 are available. Three identification strategies—Proximal Outcome Regression, Proximal Hybrid Estimation, and Proximal Inverse Probability Weighting—lead to a Proximal Multiply Robust estimator with an efficient influence function and cross-fitted minimax estimation of bridge functions (Wu et al., 16 Jun 2026).
When point identification is not credible, bounds replace point estimates. Under treatment randomization only, bounds for natural direct and indirect effects and bounds for separable direct and indirect effects can still be derived. In the one-mediator and two-sequential-mediator settings studied in the bounds literature, the sharp symbolic bounds for separable effects coincide with existing bounds for the analogous natural effects. This does not eliminate the identification problem, but it prevents overclaiming precision that depends on unverifiable assumptions (Breum et al., 12 Dec 2025).
Multiple mediators create an additional complication when they are causally unrelated but correlated because of an unobserved common cause. Under the Sequential Ignorability for Multiple Mediators Assumption (SIMMA), the natural direct effect and the joint indirect effect are non-parametrically identifiable, and mediator-specific indirect effects can be estimated by simulation of counterfactual distributions. This setting is especially relevant when repeated one-mediator-at-a-time analyses would distort the direct effect or mediator-specific contributions (Jerolon et al., 2018).
6. Evaluation, limitations, and scope
A consistent empirical theme is that debiasing success is metric-dependent and task-dependent. In pretrained LLMs, bias metrics and downstream performance are not perfectly aligned: debiasing generally lowers CrowS-Pairs stereotype scores for both BERT and GPT2, but SEAT results are mixed, and accuracy on toxicity detection does not move in a single direction. Lower bias scores do not guarantee better downstream performance, and better downstream performance does not guarantee lower bias scores (Jeoung et al., 2022).
The same caution appears in recommendation and multimodal systems. In CausalRec, performance improves as 7 increases up to a point, confirming that removing a moderate amount of visual bias helps, but over-removing can hurt performance because some visual signal is useful (Qiu et al., 2021). In multimodal LLMs, the router is identified as a bottleneck, the dataset is highly imbalanced across debiasing categories, and the trained router tends to over-predict the “No Debias” class; an oracle router performs substantially better (Wu et al., 18 Sep 2025). These cases indicate that mediation-based debiasing is often a selective suppression problem rather than a pure elimination problem.
Methodological limitations are equally explicit. Natural effects rely on cross-world assumptions that are untestable, mixed-scale mediation models remain sensitive to hidden mediator–outcome confounding, and proximal identification requires informative proxies and completeness conditions (Rene et al., 2021). The bounds literature therefore recommends reporting point estimates together with bound sets under weaker assumptions, while application papers recommend using multiple bias benchmarks, inspecting internal mechanisms such as early layers, embeddings, and attention heads, and testing generalization across downstream tasks (Breum et al., 12 Dec 2025).
Taken together, these works define a broad but coherent research program. The framework is causal because it targets pathway-specific effects under interventions; it is mediation-based because it attributes bias to specific intermediate variables or mechanisms; and it is debiasing-oriented because it uses that attribution either to adjust predictions, alter training objectives, reconstruct target populations, or constrain interpretation under partial identification. This suggests that the main contribution of causal mediation-based debiasing is not a single algorithm but a shift in problem formulation: bias is analyzed as a structured pathway question about which causal routes should be preserved, which should be removed, and under what assumptions that distinction is identifiable.