arXiv:2611.08682cs.AINov 2026

Manuscript Offprint

arXiv:2611.08682

Transporting the Past: An Optimal Transport View of Backtracking Counterfactuals

Zhangyi Liu, Pouria Fatemi, Suvrit Sra

Abstract

We study backtracking counterfactual inference for Structural Causal Models (SCMs) through the lens of optimal transport. In SCMs, a factual observation generally induces a posterior distribution over exogenous variables, making counterfactual inference inherently distributional. We introduce two complementary frameworks that transport this posterior onto the set of exogenous configurations satisfying a desired counterfactual query. The first constructs a natural pointwise projection and is suitable when the transported exogenous distribution can be used directly. The second enforces mutual independence among counterfactual exogenous variables, so that the transported variables remain interpretable as genuine exogenous noises of the same SCM. We show that both frameworks are consistent with the original backtracking counterfactual principle, and we propose marginal, penalty-based, and hard-constrained solvers for finite-posterior settings. Synthetic experiments on non-bijective SCMs illustrate the geometry of the problem and reveal trade-offs among transport cost, counterfactual constraint satisfaction, and preservation of exogenous independence.

1 Introduction

Counterfactual reasoning asks how a realized system would have evolved under alternative circumstances (Pearl, 2009; Pearl et al., 2016). In Structural Causal Models (SCMs), the classical abduction–action–prediction procedure gives rise to interventional counterfactuals: the exogenous background inferred from the factual evidence is retained, while the structural assignments of the intervened variables are replaced by constants. This semantics is appropriate for questions about the consequences of hypothetical manipulations. Other questions concern the background conditions under which a different event could have occurred without changing the system's mechanisms. For such questions, an intervention on a non-root variable severs its ordinary dependence on its causes and may fail to express the intended alternative history. In the terminology of Lewis (Lewis, 1979), the intervention can be understood as permitting a local "small miracle."

Backtracking counterfactuals offer a complementary, mechanism-preserving semantics. They retain the structural assignments and ask which alternative exogenous conditions could have generated a specified counterfactual antecedent (von Kügelgen et al., 2023; Vandenburgh, 2023). The distinction matters because intervening on an event and explaining how that event could have differed need not produce the same answers. Consider, for example, a simplified industrial safety system with a common stop signal S and two production-line stop indicators A and B. Suppose the deterministic operating mechanisms are A = S and B = S, and in the factual situation S = A = B = 1.

∗^{*}Authors contributed equally.

†^{\dagger}This work was carried out while Zhangyi Liu was an intern at the Technical University of Munich.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

If we ask, “Had line AA continued operating, would line BB also have continued?”, an intervention do(A=0A=0) leaves S=1S=1 and hence B=1B=1. Under a backtracking interpretation, A=0A=0 must instead arise through a different background condition that makes S=0S=0, which also yields B=0B=0. Both answers follow from their respective assumptions; the choice depends on whether the question concerns an external manipulation or an alternative history under unchanged mechanisms. Such history-oriented queries are relevant to retrospective explanation and some forms of fairness analysis and counterfactual recourse (Bynum et al., 2024).

In this work, we study backtracking counterfactual inference in non-bijective SCMs. In such models, a factual observation may correspond to multiple exogenous configurations, so abduction yields a posterior distribution over latent causes rather than a single latent state. Backtracking inference must therefore transform an entire distribution over exogenous variables while preserving the original structural mechanisms. We formulate this problem as a constrained optimal transport problem in exogenous space and study variants with and without an independence constraint.