arXiv:2610.28103cs.AIOct 2026

Manuscript Offprint

arXiv:2610.28103

A Semi-Analytical Inference Framework for Structural Causal Models

Tatiana Boura, Robert Peharz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Structural Causal Models (SCMs) provide a principled framework for observational, interventional, and counterfactual reasoning, all of which rely on probabilistic inference. Existing frameworks either transform SCMs into alternative tractable representations or rely on approximate inference with expressive generative models. We instead perform inference using a message passing scheme directly on the SCM by representing structural mechanisms and probability densities in a common finite-dimensional function space. Forward propagation combines a numerical realization of the Law of the Unconscious Statistician, while propagated densities are recovered by spline projection from LOTUS moments. The same representation naturally yields backward message passing for conditioning, providing a unified framework for causal inference. Using tensor-product B-spline bases, the resulting algorithm expresses inference through numerical quadrature and linear algebra without explicitly constructing conditional distributions. Experiments on randomly generated continuous SCMs demonstrate accurate approximation of Monte Carlo reference solutions and systematic improvement with increasing basis resolution.

1 Introduction

The notion of causality has been central to philosophical discourse since antiquity. Structural Causal Models (SCMs) provide one of the most widely used mathematical frameworks for causal reasoning (Pearl 2009). Under the assumption that the modeled system is causally closed, uncertainty is confined to exogenous variables and endogenous variables are related deterministically (Peters, Janzing, and Schölkopf 2017). SCMs support three levels of reasoning, known as Pearl's causal hierarchy: association, intervention, and counterfactuals (Pearl and Mackenzie 2018). Although these three query types differ in their semantics, each ultimately requires evaluating probability distributions induced by the SCM. Efficient probabilistic inference therefore forms the computational core of causal reasoning. Observational queries require probabilistic inference in the observational distribution, i.e. the pushforward distribution of the exogenous distribution under the hierarchical causal mechanism, interventional queries require inference after modifying the structural equations, and counterfactual reasoning combines conditioning with hypothetical interventions (Han, Chen, and Darwiche 2023; Pearl 2009). Specifically, counterfactual inference can be formulated using a twin SCM or, equivalently, an abduct-intervene-infer procedure (Pearl 2009).

While much of the causal modeling literature focuses on causal discovery, identification, and effect estimation from data (Peters, Janzing, and Schölkopf 2017), comparatively less attention has been devoted to efficiently evaluating queries in a given SCM (Darwiche 2022; Wang and Kwiatkowska 2023; Zečević et al. 2021; Pawlowski, Castro, and Glocker 2020). These directions are complementary: discovery and identification determine the causal model and identifiable effects, whereas causal inference assumes a given SCM and answers causal queries. This setting naturally arises when the model is provided by expert knowledge or a preceding learning stage.

Causal inference appears closely related to inference in Bayesian networks (BNs) (Koller and Friedman 2009), where algorithms such as variable elimination, belief propagation, and junction-tree message passing enable efficient exact and approximate inference (Pearl 1982; Zhang and Poole 1996; Wainwright and Jordan 2008). Since every acyclic SCM induces a BN, it is natural to ask whether these methods apply directly. However, BN inference requires explicit conditional distributions, whereas SCMs define them only implicitly through deterministic structural mechanisms and exogenous noise. Thus, inference depends both on the graph structure and the representation of the structural mechanisms.

Several approaches have addressed this challenge. One line of work compiles SCMs into alternative representations that support tractable inference, including tractable circuits and related representations (Darwiche 2022; Wang and Kwiatkowska 2023; Zečević et al. 2021). Another employs expressive structural mechanisms based on deep generative models (Pawlowski, Castro, and Glocker 2020), where inference is typically performed approximately. Existing methods therefore either transform the SCM into a tractable representation or perform inference approximately using sampling or learned generative models.

In this work, we instead perform inference directly on the original SCM representation. We formulate message passing in a common finite-dimensional function space for structural mechanisms and probability densities. Forward propagation evaluates the Law of the Unconscious Statis-

∗^{*}Corresponding author.

tician (LOTUS) integrals numerically and recovers propagated densities through spline projection, yielding a semianalytical inference procedure that avoids SCM compilation and sampling-based inference. The same representation naturally extends to backward message passing, providing a unified framework for observational, interventional, and counterfactual inference.

We instantiate the framework using tensor-product B-spline bases, whose approximation properties, numerical stability, and efficient quadrature algorithms (de Boor 2001; Schumaker 2007; Cottrell, Hughes, and Bazilevs 2009) allow inference to be expressed through linear algebra and numerical quadrature while representing highly nonlinear mechanisms. Specifically, we model both densities and structural mechanisms using tensor-product B-splines. Restricting structural mechanisms is not itself new (Hoyer et al. 2008; Bühlmann, Peters, and Ernest 2014; Morville and Park 2025; Zhang and Hyvärinen 2009). Previous work, however, does so primarily to facilitate causal discovery or parameter estimation. In contrast, we employ a restricted mechanism family to perform efficient inference in fully specified continuous SCMs. The main contributions of this work are as follows:

• We formulate probabilistic inference in continuous SCMs as message passing in a common finite-dimensional approximate functional space, avoiding the explicit construction of the distributions induced by nonlinear structural mechanisms.

• We derive forward and backward message-passing operators based on LOTUS and spline projection, reducing inference to linear algebra and numerical quadrature in this common function space.

• We instantiate the framework using tensor-product B-spline representations for both structural mechanisms and probability densities, resulting in a practical semianalytical inference algorithm for continuous SCMs.

References (37)