Active Bayesian Causal Inference
Abstract
Causal discovery and causal reasoning are classically treated as separate and consecutive tasks: one first infers the causal graph, and then uses it to estimate causal effects of interventions.
However, such a two-stage approach is uneconomical, especially in terms of actively collected interventional data, since the causal query of interest may not require a fully-specified causal model.
From a Bayesian perspective, it is also unnatural, since a causal query (e.g., the causal graph or some causal effect) can be viewed as a latent quantity subject to posterior inference— other unobserved quantities that are not of direct interest (e.g., the full causal model) ought to be marginalized out in this process and contribute to our epistemic uncertainty.
In this work, we propose Active Bayesian Causal Inference (ABCI), a fully-Bayesian active learning framework for integrated causal discovery and reasoning , which jointly infers a posterior over causal models and queries of interest.
In our approach to ABCI, we focus on the class of causally-sufficient, nonlinear additive noise models, which we model using Gaussian processes.
We sequentially design experiments that are maximally informative about our target causal query, collect the corresponding interventional data, and update our beliefs to choose the next experiment.
Through simulations, we demonstrate that our approach is more data-efficient than several baselines that only focus on learning the full causal graph.
This allows us to accurately learn downstream causal queries from fewer samples while providing well-calibrated uncertainty estimates for the quantities of interest.
Introduction
Causal reasoning, that is, answering causal queries such as the effect of a particular intervention, is a fundamental scientific quest [3, 32, 35, 43].
A rigorous treatment of this quest requires a reference causal model, typically consisting at least of (i) a causal diagram or directed acyclic graph (DAG), capturing the qualitative causal structure between a system’s variables [49] and (ii) a joint distribution that is Markovian w.r.t.
this causal graph [68].
Other frameworks additionally model (iii) the functional dependence of each variable on its causal parents in the graph [50, 76].
If the graph is not known from domain expertise, causal discovery aims to infer it from data [42, 68].
However, given only passively-collected observational data and no assumptions on the data-generating process, causal discovery is limited to recovering the Markov equivalence class (MEC) of DAGs implying the conditional independences present in the data [68].
Additional assumptions like linearity can render the graph identifiable [33, 54, 64, 77] but are often hard to falsify, thus leading to risk of [Figure]
estimate as E M| x 1: t [ p ( Y | M )] inform misspecification.
These shortcomings motivate learning from experimental (interventional) data, which enables recovering the true causal structure [13, 14, 27].
Since obtaining interventional data is costly in practice, we study the active learning setting, in which we sequentially design and perform interventions that are most informative for the target causal query [1, 22, 27, 28, 44, 72].
Classically, causal discovery and reasoning are treated as separate, consecutive tasks that are studied by different communities.
Prior work on experimental design has thus focused either purely on causal reasoning—that is, how to best design experimental studies if the causal graph is known?—or purely on causal discovery, whenever the graph is unknown [31, 54].
In the present work, we consider the more general setting in which we are interested in performing causal reasoning but do not have access to a reference causal model a priori.
In this case, causal discovery can be seen as a means to an end rather than as the main objective.
Focusing on actively learning the full causal model to enable subsequent causal reasoning can thus be disadvantageous for two reasons.
First, wasting samples on learning the full causal graph is suboptimal if we are only interested in specific aspects of the causal model.
Second, causal discovery from small amounts of data entails significant epistemic uncertainty—for example, incurred by low statistical test power or multiple highly-scoring
DAGs—which is not taken into account when selecting a single reference causal model [2, 18].
In this work, we propose Active Bayesian Causal Inference (ABCI), a fully-Bayesian framework for integrated causal discovery and reasoning with experimental design.
The basic approach is to put a Bayesian prior over the causal model class of choice, and to cast the learning problem as
Bayesian inference over the model posterior.
Given the unobserved causal model, we formalize causal reasoning by introducing the target causal query , a function of the causal model that specifies the set of causal quantities we are interested in.
The model posterior together with the query function induce a query posterior , which represents the result of our Bayesian learning procedure.
It can be used, e.g., in downstream decision tasks or to derive a MAP solution or suitable expectation.
To learn the query posterior, we follow the Bayesian optimal experimental design approach [9, 37] and sequentially choose admissible interventions on the true causal model that are most informative about our target query w.r.t.
our current beliefs.
Given the observed data, we then update our beliefs by computing the posterior over causal models and queries and use them to design the next experiment.
Related Work
Causal discovery and reasoning have been widely studied in machine learning and statistics [23, 31, 54, 74].
Given an already collected set of observations, there is a large body of literature on learning causal structure, both in the form of a point estimate [8, 26, 53, 64, 68] and a Bayesian posterior [2, 11, 18, 29, 39].
Given a known causal graph, previous work studies how to estimate treatment effects or counterfactuals [50, 60, 62].
When interventional data is yet to be collected, existing work primarily active causal discovery was first considered in discrete [44, 72] or linear [10, 47] models with closedform marginal likelihoods and later extended to nonlinear causal mechanisms [71, 73], multi-target interventions [70], and general models by using hypothesis testing [20] or heuristics [61].
Graph theoretic works give insights on the interventions required for full identifiability [13, 14, 27, 34, 63].
Beyond learning the complete causal graph, few prior works have studied active causal inference.
Concurrent work of Tigas et al.
[71] considers experimental design for learning a full SCM parameterised by neural networks.
There are significant differences to our approach.
In particular, our framework (§ 3) is not limited to the information gain over the full model and provides a fully Bayesian treatment of the functions and their epistemic uncertainty (Appx.
A).
Agrawal et al.
[1] consider actively learning a function of the causal graph under budget constraints, though not of the causal mechanisms and only for linear Gaussian models.
Conversely, Rubenstein et al.
[59] perform experimental design for learning the causal mechanisms after the causal graph has been inferred.
Thus, while prior work considers causal discovery and reasoning as separate tasks, ABCI forms an integrated Bayesian approach for learning causal queries through interventions, reducing to previously studied settings in special cases.
We further discuss related work in Appx.
B.
Active Bayesian Causal Inference (ABCI) Framework
In this section, we first introduce the ABCI framework in generality and formalize its main concepts and distributional components, which are illustrated in Fig.
In Appx.
A, we then describe our particular instantiation of ABCI for the class of causally sufficient nonlinear additive Gaussian noise models.
Notation.
We use upper-case X and lower-case x to denote random variables and their realizations, respectively.
Sets and vectors are written in bold face, X and x .
We use p ( · ) to denote different distributions, or densities, which are distinguished by their arguments.
Causal Model.
To treat causality in a rigorous way, we first need to postulate a mathematically well-defined causal model.
Historically hard questions about causality can then be reduced to epistemic questions, that is, what and how much is known about the causal model.
A prominent type of causal model is the structural causal model (SCM) [50].
From a Bayesian perspective, an
SCM can be viewed as a hierarchical data-generating process involving latent random variables.
Definition 1 (SCM) .
An SCM M over observed endogenous variables X
= { X 1 , . . .
, X d } and unobserved exogenous variables U
= { U 1 , . . .
, U d } consists of structural equations, or mechanisms,
X i :=
f i ( Pa i , U i ) , for i ∈ { 1 , . . .
, d } , (3.1) which assign the value of each X i as a deterministic function f i of its direct causes, or causal parents,
Pa i ⊆
X \ { X i } and U i ; and a joint distribution p ( U ) over the exogenous variables.
Associated with each SCM is a directed causal graph G with vertices X and edges X j → X i if and only if X j ∈ Pa i , which we assume to be acyclic.
Any acyclic SCM then induces a unique observational distribution p ( X | M ) over the endogenous variables X , which is obtained as the pushforward measure of p ( U ) through the causal mechanisms in Eq.
Interventions.
A crucial aspect of causal models such as SCMs is that they also model the effect of interventions —external manipulations to one or more of the causal mechanisms in Eq.
(3.1)—which, in general, are denoted using Pearl’s do-operator [50] as do ( { X i = ˜
f
i ( Pa i , U i ) } i ∈I ) with I ⊆
[ d ] and suitably chosen ˜ f
i ( · ) .
An intervention leads to a new SCM, the so-called interventional SCM, in which the relevant structural equations in Eq.
(3.1) have been replaced by the new, manipulated ones.
The interventional SCM thus induces a new distribution over the observed variables, the so-called interventional distribution, which is denoted by p do ( a ) ( X | M ) with a denoting the (set of) intervention(s) {
X i = ˜
f
i ( Pa i , U i ) } i ∈I .
Causal effects, that is, expressions like E [ X j | do ( X i = 3)] , can then be derived from the corresponding interventional distribution via standard probabilistic inference.
Being Bayesian with Respect to Causal Models.
The main epistemic challenge for causal reasoning stems from the fact that the true causal model M ⋆ is not or not completely known.
The canonical response to such epistemic challenges is a Bayesian approach: place a prior p ( M ) over causal models, collect data D from the true model M ⋆ , and compute the posterior via Bayes rule:
[Equation]
A full Bayesian treatment over M is computationally delicate, to say the least.
We require a way to parameterise the class of models M while being able to perform posterior inference over this model class.
In this paper, we present a fully Bayesian approach for flexibly modelling nonlinear relationships (Appx.
A).
Bayesian Causal Inference.
In the causal inference literature, the tasks of causal discovery and causal reasoning are typically considered separate problems.
The former aims to learn (parts of) the causal model M ⋆ , typically the causal graph G ⋆ , while the latter assumes that the relevant parts of
M ⋆ are already known and aims to identify and estimate some query of interest, typically using only observational data.
This separation suggests a two-stage approach of first performing causal discovery and then fixing the model for subsequent causal reasoning.
From the perspective of uncertainty quantification and active learning, however, this distinction is unnatural because intermediate, unobserved quantities like the causal model do not contribute to the epistemic uncertainty in the final quantities of interest.
Instead, we define a causal query function q , which specifies a target causal query Y =
q ( M ) as a function of the causal model M .
This view thus subsumes and generalises causal discovery and reasoning into a unified framework.
For example, possible causal queries are:
Causal Discovery:
Y =
q CD ( M ) =
G , that is, learning the full causal graph G ;
Partial Causal Discovery:
Y =
q PCD ( M )
=
ϕ ( G ) , that is, learning some feature ϕ of the graph, such as the presence of a particular (set of) edge(s);
Causal Model Learning:
Y = q CML ( M ) =
M , that is, learning the full SCM M ;
Causal Reasoning:
[Equation]
[Equation]
, that is, learning a set of interventional variables X j induced by M under do ( X I ( j ) = ψ j ) .
Given a causal query, Bayesian inference naturally extends to our learning goal, the query posterior :
[Equation]
Evidently, computing Eq.
(3.3) constitutes a hard computational problem in general, as we need to marginalise out the causal model.
In Appx.
A, we introduce a practical implementation for a restricted causal model class, informed by this challenge.
Active Learning with Sequential Interventions.
Rather than collect a large observational dataset, we seek to leverage experimental data, which can help resolve some of the aforementioned identifiability issues and facilitate learning our target causal query more quickly, even if the model is identifiable.
Since obtaining experimental data is costly in practice, we study the active learning setting in which we sequentially design experiments in the form of interventions a t .
At each time step t , the outcome of this experiment a t is a batch x t of N t i.i.d.
observations from the true interventional distribution:
[Equation]
Crucially, we design the experiment a t to be maximally informative about our target causal query Y .
In our Bayesian setting, this is naturally formulated as maximising the myopic information gain from the next intervention, that is, the mutual information between Y and the outcome X t [9, 37]:
[Equation]
where X t follows the predictive interventional distribution of the Bayesian causal model ensemble at time t − 1 under intervention a t , which is given by
[Equation]
By maximising Eq.
(3.5), we collect experimental data and infer our target causal query Y in a highly efficient, goal-directed manner.
of having an uncountable set J for a continuous set of intervention values, it may be more practical to have a finite set J for intervention targets and to assume a distribution over intervention values ψ we do
Note that restricting to a t = ∅ amounts to learning from observational data as a special case.
[Figure]
Experiments
Since inference in the general ABCI framework is computationally highly challenging we instantiate
ABCI for the class of causally-sufficient, nonlinear additive Gaussian noise models [33], which we model using Gaussian processes (GPs) [19, 75].
To perform efficient posterior inference in the combinatorial space of causal graphs, we use a recently proposed framework for differentiable Bayesian structure learning (DiBS) [39] that employs a continuous latent probabilistic graph representation.
For details on our tractable inference model and implementation we refer the reader to Appxs.
A, E and F.
Setup.
We evaluate ABCI by inferring the query posterior on synthetic ground-truth SCMs using several different experiment selection strategies.
Specifically, we design experiments w.r.t.
U CD (causal discovery), U CML (causal model learning), and U CR (causal reasoning); see Appx.
A.2.
We compare against baselines which (i) only sample from the observational distribution ( OBS ) or (ii) pick an intervention target j uniformly at random from [ d ] ∪ { ∅ } and set X j =
( RAND FIXED , a weak random baseline used in prior work) or draw X j ∼ U ( − 7 , 7) ( RAND ) if X j ̸ = ∅ .
All methods follow our Bayesian GP-DiBS-ABCI approach from Appx.
A. We sample ground truth SCMs over random scale-free graphs [5] of size d = 20 , with mechanisms and noise variances drawn from our model prior in Eq.
(A.4).
In Appx.
H, we report additional results for both scale-free and Erd ˝ os Renyi random graphs over d = 10 resp.
d = 20 variables.
For specific prior choices and simulation details, see Appx.
E.
Metrics.
As ABCI infers a posterior over the target query Y , a natural evaluation metric is the Kullback-Leibler divergence (KLD) between the true query distribution and the inferred query posterior, KL ( p ( Y | M ⋆ ) || p ( Y | x 1: t )) .
We report Query KLD , a KLD estimate for target interventional distributions ( q CR ).
As a proxy for the KLD of the SCM posterior ( q CML ), 4 we report the average KLD across all single node interventional distributions { p do ( X i = ψ ) ( X ) } di =1 , with ψ ∼ U ( − 7 , 7) ( Average I-KLD ).
We also report the expected structural Hamming distance [12],
ESHD =
E G | x 1: t [ SHD ( G, G ⋆ )] , a commonly used causal discovery metric, and the area under the precision recall curve ( AUPRC ).
See Appx.
G for further details.
Causal Discovery and SCM Learning (Fig. 2).
In our first experiment, we find that all ABCI-based methods are able to meaningfully learn from small amounts of data, which validates our Bayesian approach.
Moreover, performing targeted interventions using experimental design indeed improves performance compared to uninformed experimentation ( OBS , RAND FIXED , RAND ). Notably, the [Figure] Query KLD
[Figure] stronger random baseline ( RAND ), which also randomises over intervention values, performs well in the considered setting.
As expected by the theoretical grounding of the information gain utilities,
U CD identifies the true graph the fastest (as measured by ESHD), whereas U CML exhibits good scores across all metrics.
Further details are given in the caption of Fig.
Learning Interventional Distributions (Fig. 3).
In our second experiment, we investigate ABCI’s causal reasoning capabilities by randomly sampling ground-truth SCMs as described above over the fixed graph shown in Fig.
3 (right), which is not known to the methods. Our target query is the set of interventional random variables, or “distributional treatment effects”, X do ( X 3 = ψ )for treatments ψ ∼ U [2 , 5] .
The results show that our informed experiment selection strategies significantly outperform the baselines at causal reasoning as measured by the Query KLD.
In accordance with the results from Fig. 2 and considering that, once we know the true SCM, we can compute any causal quantity of interest, U CML seems to provide a reasonable experimental strategy in case the causal query of interest is not known a priori.
However, our results indicate that if we do know our query of interest, then U CR provides a more efficient experiment design strategy for its estimation, even when the treatment variable of interest is not directly intervenable.
In this case, the task is indeed more difficult, as highlighted by the larger Query KLD values across all considered methods.
Discussion
Assumptions, Limitations, and Extensions.
In Appx.
A, we have made several assumptions to facilitate tractable inference and showcase the ABCI framework in a relatively simple data-generating process.
In particular, our assumptions exclude heteroscedastic noise, unobserved confounding, and cyclic relationships.
On the experimental design side, we only considered hard interventions, but for some applications soft interventions [15] are more plausible.
On the query side, we only considered interventional distributions.
However, SCMs also naturally lend themselves to counterfactual reasoning, so one could also consider counterfactual queries such as the effect of the treatment on the treated [30, 65].
In principle, the ABCI framework as presented in § 3 extends directly to such generalisations.
In practice, however, these can be non-trivial to implement, especially with regard to model parametrisation and tractable inference.
Since actively performed interventions allow for causal learning even under causal sufficiency violations, we consider this a promising avenue for future work and believe the ABCI framework to be particularly well-suited for exploring it.
Reflections on the ABCI Framework.
The main conceptual advantages of the ABCI framework are that it is flexible and principled .
By considering general target causal queries, we can precisely specify what aspects of the causal model we are interested in.
This conceptual framework offers a fresh perspective on the classical divide between causal discovery and reasoning: sometimes, the main objective may be to foster scientific understanding by uncovering the qualitative causal structure underlying real-world systems; other times, causal discovery may only be a means to an end to support causal reasoning.
Of particular interest in the context of actively selecting interventions is the setting in which we cannot directly intervene on variables whose causal effect on others we are interested in (see Fig. 3), which connects to concepts such as transportability and external validity [6, 51].
ABCI is also flexible in that it easily allows for incorporating available domain knowledge: if we know some aspects of the model a priori (as assumed in conventional causal reasoning) [47] or have access to a large observational sample (from which we can infer the MEC of DAGs) [1], we can encode this in our prior and only optimise over a smaller model class.
The principled Bayesian nature of ABCI comes at a significant computational cost: most integrals are intractable and approximating them with Monte-Carlo sampling is computationally expensive and can introduce bias when resources are limited.
We discuss the computational complexity of our implementation in more detail in Appx.
F.3.
On the other hand, in many real-world applications, such as in the context of biological networks, active interventions are possible but only at a significant cost [10, 47].
In such cases in particular, a careful and computationally-heavy experimental design approach as presented in the present work is warranted and could be easily amortised.
[-Contents 
-]
[-B Further Discussion of Related Work 
-]
[-C Background on Gaussian processes 
-]
[-D Derivation and Estimation of Information Gain Objectives 
-]
[-Details 
-]
[-F Implementation Details 
-]
[-G Evaluation Metrics 
-]
[-H Extended Experimental Results 
-]
A Tractable ABCI for Nonlinear Additive Noise Models
Having described the general ABCI framework and its conceptual components, we now detail how to instantiate ABCI for a flexible model class that still allows for tractable, approximate inference.
This requires us to specify (i) the class of causal models we consider in Eq.
(3.1), (ii) the types of interventions a t we consider at each step and the corresponding interventional likelihood in Eq.
(3.4), (iii) our prior distribution p ( M ) over models, (iv) how to perform tractable inference of the model posterior in Eq.
(3.2), and finally (v) how to maximise the information gain in Eq.
(3.5) for experimental design.
Model Class and Parametrisation.
In the following, we consider nonlinear additive Gaussian noise models [33] of the form
[Equation]
where the f i ’s are smooth, nonlinear functions and the U
i ’s are assumed to be mutually independent.
The latter corresponds to the assumption of causal sufficiency, or no hidden confounding.
Any model M in this model class can be parametrised as a triple M =
( G, f , σ 2 ) , where G is a causal
DAG, f = ( f 1 , . . .
, f d ) is a vector of functions defined over the parent sets implied by G , and σ 2 = ( σ 21 , . . .
, σ 2 d ) contains the Gaussian noise variances.
Provided that the f i are nonlinear and not constant in any of their arguments, the model is identifiable almost surely [33, 55].
Interventional Likelihood.
We support the realistic setting where only a subset W ⊆ X of all variables are actionable, that is, can be intervened upon.
5 We consider hard interventions of the form do ( a t )
= do ( X I
=
x I ) that fix a subset X I ⊆
W to a constant x I .
Due to causal sufficiency, the interventional likelihood under such hard interventions a t factorises over the causal graph G and is given by the g-formula [57] or truncated factorisation [68]:
[Equation]
The last term in Eq.
(A.2) is given by N ( X j | f j ( Pa Gj ) , σ 2 j ) , due to the Gaussian noise assumption.
Let x 1: t be the entire dataset, collected up to time t .
The likelihood of x 1: t is then given by
[Equation]
Structured Model Prior.
To specify our prior, we distinguish between root nodes X i , for which
Pa i = ∅ and thus f i = const, and non-root nodes X j .
For a given causal graph G , we denote the index set of root nodes by R ( G ) =
{ i ∈ [ d ] : Pa Gi = ∅ } and that of non-root nodes by
NR ( G ) =
[ d ] \ R ( G ) .
We then place the following structured prior over SCMs M =
( G, f , σ 2 ) :
[Equation]
Here, p ( G ) is a prior over graphs and p ( f , σ 2 | G ) is a prior over the functions and noise variances.
We factorise our prior conditional on G as in Eq.
(A.4) not only to allow for a separate treatment of root vs. non-root nodes, but also to share priors across similar graphs.
Whenever Pa G 1 i =
Pa G 2 i , we set p ( f i , σ 2 i | G 1 ) =
p ( f i , σ 2 i | G 2 ) .
As a consequence, the posteriors are also shared, which substantially reduces the computational cost in practice (see Appx.
F.2 for details).
Our prior also encodes the beliefs that { f i , σ 2 i } ⊥⊥ { f i ′ , σ 2 i ′ } | G for i ̸
= i ′ ∈
[ d ] and that f j ⊥⊥ σ 2 j | G for j ∈ NR ( G ) which is motivated by the principle of independent causal mechanisms [54] and the causal sufficiency assumption.
Our specific choices for the different factors on the RHS of Eq.
(A.4) are guided by ensuring tractable inference and described in more detail below.
Model Posterior.
Given collected data x 1: t , we can update our beliefs and quantify our uncertainty in M ⋆ by inferring the posterior p ( M | x 1: t ) over SCMs M =
( G, f , σ 2 ) , which can be written as[-
-]
[Equation]
For root nodes i ∈ R ( G ) , posterior inference given the graph is straightforward.
We have f i = const, so f i can be viewed as the mean of U i .
We thus place conjugate normal-inverse-gamma
N- Γ − 1 ( µ i , λ i , α R i , β R i ) priors on p ( f i , σ 2 i | G ) , which allows us to analytically compute the root node posteriors p ( f i , σ 2 i | x 1: t , G ) in Eq.
(A.5) given the hyperparameters ( µ , λ , α R , β R ) [45].
The posteriors over graphs and non-root nodes j ∈ NR ( G ) are given by
[Equation]
Computing these posteriors is more involved and discussed in the following.
A.1 Addressing Challenges for Posterior Inference with GPs and DiBS
The posterior distributions in Eq.
(A.6) are intractable to compute in general due to the marginal likelihood and evidence terms p ( x 1: t | G ) and p ( x 1: t ) , respectively.
In the following, we will address these challenges by means of appropriate prior choices and approximations.
Challenge 1: Marginalising out the Functions.
The marginal likelihood p ( x 1: t | G ) reads
[Equation]
and requires evaluating integrals over the function domain.
We use Gaussian processes (GPs) [75] as an elegant way to solve this problem, as GPs flexibly model nonlinear functions while offering convenient analytical properties.
Specifically, we place a GP (0 , k Gj ( · , · )) prior on p ( f j | G ) , where k Gj ( · , · ) is a covariance function over the parents of X j with kernel parameters κ j .
As is common, we refer to ( κ j , σ 2 j ) as the GP-hyperparameters.
In addition, we place Gamma ( α σj , β σj ) and Gamma ( α κj , β κj ) priors on p ( σ 2 i | G ) and p ( κ i | G ) and collect their parameters in ( α GP , β GP ) .
G
Z f i σ 2 i x τ,n ( µ , λ , α R , β R ) do ( a τ ) f
j σ 2 j κ j ( α GP , β GP )
NR ( G )
N τ
R ( G ) t
The graphical model underlying all variables and hyperparameters is shown in Fig.
For our model class, GPs provide closed-form expressions for the GP-marginal likelihood p ( x 1: t | G, σ 2 j , κ j ) , as well as for the GP posteriors p ( f j | x 1: t , G, σ 2 j , κ j ) and the predictive posteriors over observations p ( X | x 1: t , G, σ 2 , κ ) [75], see Appx.
C for details.
Challenge 2:
Marginalising out the
GPHyperparameters.
While GPs allow for exact posterior inference conditional on a fixed instance of ( σ 2 j , κ j ) , evaluating expressions such as p ( f j | x 1: t , G ) requires marginalising out these
GP-hyperparameters from the GP-posterior.
In general, this is intractable to do exactly, as there is no analytical expression for p ( σ 2 j , κ j | x 1: t , G ) .
To tackle this, we approximate such terms using a maximum a posteriori (MAP) point estimate (ˆ σ 2 j , ˆ κ j ) obtained by performing gradient ascent on the unnormalised log posterior
[Equation]
according to a predefined update schedule, see Alg. 1.
More specifically,
[Equation]
Challenge 3:
Marginalising out the Causal Graph.
The evidence p ( x 1: t ) is given by
[Equation]
Input: # of experiments T , batch sizes { N t } Tt =1 , # of latent particles M , # of MC samples K , particle resampling schedule { r t } Tt =1 , hyperparameter update schedule { s t } Tt =
Output: Posterior over target causal query p
( Y | x 1: T ) z
0 ∼ p
( Z )
▷ sample initial particles; Eq.
(E.12) for t = 1 to T do a t ← arg max a =(
I , x I ) U
( a, x 1: t − 1 )
▷ design experiment; Eq.
(A.11)
x t ← { x ( t,n ) ∼ p do ( a t ) ( X | M ⋆ ) } N t n = ▷ perform experiment; Eq. (3.4) z t ← z t −if r t then z t ← resample_particles ( z t )
▷ see Appx.
F endrepeat
G ← { G ( k,m ) ∼ p ( G | z tm ) } Kk =1 Mm =
▷ sample graphs; Eq. (E.11) κκκ , σσσ 2 ← estimate_hyperparameters ( x 1: s t , G )
▷ see Eq.
(A.8)
z t ← svgd_step ( z t , x 1: t , G ,κκκ,σσσ 2 ) ▷ update latent particles until svgd_convergence ▷ z t now approximate p ( Z | x 1: t ) end and involves a summation over all possible DAGs G .
This becomes intractable for d ≥ 5 variables as the number of DAGs grows super-exponentially in the number of variables [58].
To address this challenge, we employ the recently proposed DiBS framework [39].
By introducing a continuous prior p ( Z ) that models G via p ( G | Z ) and simultaneously enforces acyclicity of G , Lorch et al.
[39] show that we can efficiently infer the discrete posterior p ( G | x 1: t ) via p ( Z | x 1: t ) as
[Equation]
where ϕ is some function of the graph.
Since p ( Z | x 1: t ) is a continuous density with tractable gradient estimators, we can leverage efficient variational inference methods such as Stein Variational Gradient
Descent (SVGD) for approximate inference [38].
Additional details on DiBS are given in Appx.
E.
A.2 Approximate Bayesian Experimental Design with Bayesian Optimisation
Following § 3, our goal is to perform experiments a t that are maximally informative about our target query Y =
q ( M ) by maximising the information gain from Eq.
(3.5) given our hitherto collected data
D := x 1: t − 1 .
In Appx.
D, we show that this is equivalent to maximising the following utility function:
[Equation]
where
[Equation]
denotes the differential entropy of the experiment outcome which depends on a and is distributed as in Eq.
This surrogate objective can be estimated using a nested Monte Carlo estimator as long as we can sample from and compute p ( Y | M ) , or alternatively, p ( Y | X t , G, D ) .
Refer to Appx.
D for further details.
For example, for q CR ( M ) = X do ( X i = ψ ) j with ψ ∼ p ( ψ ) a distribution over intervention values, we obtain:
[Equation]
A.12) [Equation]
Importantly, for specific instances of the query function q ( · ) discussed in § 3, we can derive simpler utility functions than Eq.
(A.11).
For example, for q CD ( M ) =
G and q CML ( M ) =
M , we arrive at
U CD [Equation] [Equation] [Equation]
|
[Equation]
(cid:2) p ( X
[Equation]
| D , G [Equation] (cid:3)(cid:3)(cid:3) , (A.13)
U
[Equation]
, (A.14) where the entropy E X t |M [log p ( X t | M )] can again be efficiently computed given our modelling choices.
For brevity, we defer derivations and estimation details to Appxs.
D and E.
Finding the optimal experiment a ∗ t
= ( I ∗ , x ∗I ) requires jointly optimising the utility function corresponding to our query with respect to (i) the set of intervention targets I and (ii) the corresponding intervention values x I .
This lends itself naturally to a nested, bi-level optimisation scheme [73]: [Equation] I [Equation]
∗I
[Equation]
, where ∀I :
[Equation]
In the above, we first estimate the optimal intervention values for all candidate intervention targets I and then select the intervention target that yields the highest utility.
The intervention target I may contain multiple variables, which would yield a combinatorial problem.
For simplicity, we consider only single-node interventions, |I| = 1 .
To find x ∗I , we employ Bayesian optimisation [40, 41, 66] to efficiently estimate the most informative intervention value x ∗I , see Appx.
E.
B Further Discussion of Related Work
In this section, we further discuss the most closely related prior works, which also consider a Bayesian active learning approach for causal discovery.
These methods are summarised and contrasted with
ABCI in Tab. 1.
Similar to our approach, they also all assume acyclicity and causal sufficiency.
[Table]
[Table]
[Table] Conjugate [Table]
Cho et al.
[10] causal [Table] G
Conjugate linear Gaussian-inverse-Gamma
Agrawal et al.
[1] some function ϕ ( G ) of the causal graph G
Linear Gaussian
Tigas et al.
[71] causal graph G and parameters of f i
Additive Gaussian noise with parametric neural network functions f
i
GP-DiBS-ABCI (ours) some function q ( M ) of the full SCM M
Additive Gaussian noise with nonparametric functions
f i modeled by GPs
The early experimental design work by Tong and Koller [72] and Murphy [44] already investigated active causal discovery from a Bayesian perspective.
They focused on the case in which all variables are multinomial to allow for tractable, closed-form posterior inference with a conjugate Dirichlet prior.
The setting with continuous variables was not explored from an active Bayesian causal discovery perspective until the work of Cho et al.
[10], who consider the linear Gaussian case in the context of biological networks.
Cho et al.
[10] similarly use an inverse-Gamma prior to enable closed-form posterior inference.
In these approaches, experiment selection targets the full causal graph.
Agrawal et al.
[1] extend the work of Cho et al.
[10] by enabling the active learning of some function of the causal graph and handling interventional budget constraints.
Similarly to our approach, the concurrent work by Tigas et al.
[71] models nonlinear causal relationships with additive Gaussian noise in the active learning setting.
However, they are limited to targeting the full SCM for experiment design, which corresponds to our q CML objective.
In addition, their approach does not quantify the uncertainty in the functions conditional on a causal graph sampled from the graph posterior.
In contrast, our nonparametric approach both directly models the epistemic uncertainty in the functions and mitigates the risk of model misspecification by jointly learning the kernel hyperparameters.
Moreover, our method is Bayesian over the unknown noise variances, which are usually unknown in practice.
It is unclear whether Tigas et al.
[71] hand-specify a constant noise variance a priori, or whether they infer it jointly with the function parameters [71, cf.
Other related work by Shanmugam et al.
[63] considers the problem of finding the minimal number of perfectly informative (w.r.t.
conditional independences induced by the true underlying graph) multi-target interventions to fully identify the true causal graph.
In contrast, we assume that only finitely many data points are available per experiment/intervention.
Thus, we try to perform at each time step (possibly repeating) interventions to maximally reduce our uncertainty in the target causal query (which may be the causal graph).
As another point of difference, we also optimise for the actual intervention value, whereas Shanmugam et al. [63] only optimise for the intervention targets.
C Background on Gaussian processes
We use Gaussian Processes (GPs) to model mechanisms of non-root nodes X i , i.e., we place a
GP prior on p ( f i | G ) .
In the following, we give some background on GPs and how to compute probabilistic quantities thereof relevant to this work.
For further information on GPs we refer the reader to Williams and Rasmussen [75].
A GP ( m i ( · ) , k Gi ( · , · )) is a collection of random variables, any finite number of which have a joint
Gaussian distribution, and is fully determined by its mean function m i ( · ) and covariance function (or kernel)
k Gi ( · , · ) , where
[Equation]
In our experiments, we choose the mean function m i ( x ) ≡ 0 to be zero and a rational quadratic kernel
[Equation]
as our covariance function.
Here, α denotes a weighting parameter, κ oi denotes an output scale parameter and κ li denotes a length scale parameter.
For the weighting parameter, we use a default value of α = log 2 ≈ 0 .
For κ l i and κ o i we choose priors according to Appx.
E.4.
In Section A. we summarise both parameters as κ i =
( κ oi , κ li ) .
In this work, we consider Gaussian additive noise models (see Eq.
(A.1)).
Hence, for a given non-root node X i in some graph G , we have
[Equation]
where pa Gi denotes the parents of X i in G .
For some batch of collected data x = { x n } Nn =1 , let x i =
( x 1 i , . . .
x Ni ) T , pa Gi = ( pa G, 1 i , . .
. , pa G,Ni ) , and K the Gram matrix with entries K m,n = k RQ ( pa G,mi , pa G,ni ) .
Then, we can compute the prior marginal log-likelihood, which is needed to compute p ( x 1: t | G ) , in closed form as
[Equation]
To predict the function values
f i ( (cid:102) pa Gi ) at unseen test locations (cid:102) pa Gi =
( (cid:102) pa G, 1 i , . .
, (cid:102) pa G, ˜ N i ) given previously observed data x , let K † be the ( ˜ N × N ) covariance matrix with entries
K † m,n = k RQ ( (cid:102) pa G,mi , pa G,ni ) and
˜ K be the ( ˜ N × ˜ N ) covariance matrix with entries ˜ K m,n = k RQ ( (cid:102) pa G,mi , (cid:102) pa G,ni ) .
Then, the predictive posterior is multivariate Gaussian
[Equation]
[Equation]
with mean
[Equation]
and covariance
[Equation]
Finally, the marginal posterior over observations ˜
X i , which is needed to sample and evaluate candidate experiments in the experimental design process, is given by
[Equation]
with mean
[Equation]
and covariance
[Equation]
D Derivation of the Information Gain Utility Functions
In the following, we provide the derivations for the expressions presented in Section A.2.
D.1 Information Gain for General Queries
We show that
[Equation]
for U ( a t ) given in Eq.
(A.11).
Proof.
We write the mutual information in the following form
[Equation]
In the above, we expand the joint entropy of experiment outcome and query as
[Equation]
for any query such that query and experiment outcome are conditionally independent given an SCM.
This holds true, e [Equation] g., whenever Y is a deterministic function of M such as Y = q CD ( M ) =
G .
The marginal entropy of the experiment outcome given previously observed data is
[Equation]
Finally
[Equation]
since the query posterior entropy H
( Y | x 1: t − 1 ) does not depend on the candidate experiment a t , we obtain
[Equation]
[Equation]
which, together with Eqs.
(D.5) and (D.8), completes the proof
[Equation]
D.2 Derivation of the Causal Discovery Utility Function
To derive U CD ( a ) [Equation] we note that Y =
q CD ( M ) = G [Equation] and hence the joint entropy of experiment outcome and query in Eq.
(D.3) becomes
[Equation]
Substituting this into Eq.
(D.2) yields
I
[Equation]
[Equation]
By Eq.
(D.12), we have
[Equation]
which recovers the utility function U CD ( a ) from Eq
(A.13)
[Equation]
D.3 Derivation of the Causal Model Learning Utility Function
To derive U CML ( a ) given Y =
q CML ( M ) = M
[Equation]
the joint entropy of experiment outcome and query in Eq.
(D.3) are given by
[Equation]
As previously, substituting this into Eq.
(D.2) yields
[Equation]
and by Eq.
(D.10), we have
[Equation]
which recovers the utility U CML ( a ) from Eq.
(A.14).
For our concrete modeling choices we can further simplify this utility.
Let Anc M i and Pa M i denote the ancestor and parent sets of node X i in M .
Then, [Equation]
[Equation]
Since our root nodes and GPs assume an additive Gaussian noise model, the innermost expectation amounts to the negative entropy the Gaussian noise variable, i.e.,
[Equation]
D
[Equation]
As we further assume a homoscedastic noise model for our GPs, Eq.
(D.31) reduces to
[Equation]
which can be approximated by nested Monte Carlo estimation.
For non-root nodes we approximate the inner expectation with a single point estimate (cf.
Section A.1).
For root nodes we can compute the inner expectation in closed form as
[Equation]
where α ti , β ti are the parameters of the inverse-gamma noise posterior σ 2 i ∼ Γ − 1 (
σ 2 i | α ti [Equation] β [Equation]
) (see Appx. E.3) and ψ ( · ) is the digamma function.
Proof (adapted from [67]).
We need to show that
[Equation]
where the noise variance σ 2 follows an inverse-gamma density
[Equation]
By substituting y = log
σ 2 we get
[Equation]
Now note that
[Equation]
and hence
[Equation]
By differentiating the latter integrand w.r.t.
α we get
[Equation]
Bringing the parts together we obtain [Equation] which completes the proof [Equation]
In summary
[Equation]
in our instance of GP-DIBS-ABCI we estimate the causal model learning utility as
[Equation] D.4 Derivation of the Causal Reasoning Utility Function We derive the utility function U CR ( a ) in Eq. (A.12) for the query
Y =
X do ( X i = ψ ) j with ψ ∼ p ( ψ ) a distribution over intervention values. Starting with the joint entropy in Eq. (D.3) we marginalise over graphs (instead of SCMs) to exploit that we can sample from and evaluate p ( X | G, x 1: t − 1 ) in closed form by using GPs:
[Equation]
To estimate E Y | X t
[Equation]
G, x 1: t − 1 [ · ] we first sample intervention values ψ ∼ p ( ψ ) and then sample from the respective interventional densities p do ( X i = ψ )
( X j | X t , G, x 1: t − 1 ) induced by candidate SCMs with graph G .
Thus, the expectation becomes E ψ (cid:2) E do ( X i = ψ )
X j | X t ,G,
[Equation]
1: t
[Equation]
1 [ · ] (cid:3) . To evaluate p ( Y | X t , G ′ , x 1: t − 1 ) we estimate p do ( X i = ψ ) ( X j | X t , G ′ , x 1: t − 1 ) as described in Appx. E.1.
The joint entropy therefore becomes
[Equation]
By substituting Eqs.
(D.13) and (E.1) into Eq. (D.12) we obtain the causal reasoning utility in Eq. (A.12).
E Approximate Inference and Experimental Details
In this section, we provide details about our approximate inference and estimation procedures, including the estimation of the marginal interventional likelihoods in Section E.1 and prior choices in
Sections E.2 — E.4.
We also provide details on DiBS for approximate graph posterior inference in
Section E.5, the estimation of the information gain utilities in Section E.6, and our use of Bayesian Optimisation for experimental design in Section E.7.
E.1 Estimating Posterior Marginal Interventional Likelihoods
In the following
[Equation]
we show how we estimate (posterior) marginal interventional likelihoods p do ( x j ) ( x i | x 1: t ) .
Let Anc Gi and Pa Gi denote the ancestor and parent sets of node X i in G .
Then, the marginal interventional likelihood is given by
[Equation]
Given that X i is independent of it’s non-descendants given its parents
[Equation]
we obtain
[Equation]
Given that p ( f , σ 2 | G, x 1: t ) factorises and Anc Gi are independent of mechanisms and noise variances f , σ 2 of the non-ancestors of X i , we have
[Equation]
Finally, marginalising out the functions and noise variances, we obtain
[Equation]
We use Monte Carlo estimation to approximate the outer expectation of this quantity according to Eq.
(A.10). To approximate the inner expectation by performing ancestral sampling from the interventional density p do ( x j ) ( X | G ) , where we use 50 samples when estimating the U CR utility in Equation Eq. (A.12) and 200 samples when estimating the metrics described in Appx.
G.
E.2 Sampling Ground Truth Graphs
When generating ground truth SCMs for evaluation, we sample causal graphs according to two random graph models.
First, we sample scale-free graphs using the preferential attachment process presented by Barabási and Albert [5].
We use the networkx.generators.barabasi_albert_graph implementation provided in the NetworkX [25] Python package and interpret the returned, undirected graph as a DAG by only considering the upper-triangular part of its adjacency matrix.
Before permuting the node labels, we generate graphs with in-degree 2 for nodes { X i } di =3 whereas X 1 and X 2 are always root nodes.
In addition, we consider Erdös-Renyi random graphs [17], where edges are sampled independently with probability p =
d − 1 .
After sampling edges, we choose a random ordering and discard any edges that disobey this ordering to obtain a DAG.
Our choice of p yields an expected degree of 2 .
Unlike Lorch et al.
[39], we do not provide our model with any kind of prior information on the graph structure.
E.3 Normal-Inverse-Gamma Prior for Root Nodes
We use a conjugate normal-inverse-gamma (N- Γ − 1 ) prior
[Equation]
as the joint prior over functions and noise parameters for root nodes in G (see Section A and Fig. 4).
In our experiments, we use µ i = 0 , λ i = 0 .
1 , α Ri = 50 and β Ri = 25 .
When generating ground truth SCMs, we draw one sample for ( f ⋆i , σ 2 ,⋆ i ) from this prior for all i and leave it fixed thereafter.
Closed-form expressions for the (posterior) marginal likelihood can be found, e.g., in [45].
E.4 Gamma Priors for GP Hyperparameters of Non-Root Nodes
We model non-root node mechanisms with GPs (see Section A.1), where each GP has a set of hyperparameters ( κ i , σ 2 i ) where κ i = ( κ li , κ oi ) includes a length scale and output scale parameter, respectively, and where σ 2 i denotes the variance of the Gaussian noise variable
U i .
In our experiments, we use p ( σ 2 i | G ) =
Gamma ( α = 50 , β = 500) , p ( κ oi | G ) =
Gamma ( α = 100 , β = 10) and p ( κ li | G ) =
Gamma ( α = 30 · | Pa Gi | , β = 30) , where | Pa Gi | denotes the size of the parent set of X i in G .
E.5 DiBS for Approximate Posterior Graph Inference
DiBS [39] introduces a probabilistic latent space representation for DAGs to allow for efficient posterior inference in continuous space.
Specifically, given some latent particle z ∈ R d × d × 2 we can define an edge-wise generative model
[Equation]
where G i,j ∈ { 0 , 1 } indicates the absence/presence of an edge from X i to X j in G , and a prior distribution
[Equation]
where h ( G ) is a scoring function quantifying the “degree of cyclicity” of G .
β is a temperature parameter weighting the influence of the expected cyclicity in the prior.
Lorch et al.
[39] propose to use
Stein Variational Gradient Descent [38] for approximate inference of p ( Z | x 1: t ) .
SVGD maintains a fixed set of particles z
= { z m } Mm =1 and updates them using the posterior score ∇ log p ( z | x 1: t ) = ∇ log p ( z ) + ∇ log p ( x 1: t | z ) .
In our experiments, we use K = 5 latent particles.
For the estimation of expectations as in Eq.
(A.10), we use K = 40 MC graph samples unless otherwise stated, hence, a total of M · K = 200 graphs, and we use the DiBS+ particle weighting.
In contrast to the original
DiBS version, we do not use the annealing parameter α to force the mass of p ( G | z ) onto a single graph during training.
For further details on the method and its implementation, we refer to the original publication [39] and the provided code.
E.6 Estimation of the Information Gain Utility Functions
When estimating the information gain utilities (see Appxs.
A.2 and D), we keep the set of Monte Carlo samples from the SCM posterior p ( M | x 1: t ) fixed for all evaluations of the chosen utility during a given experiment design phase at time t , i.e., during the optimisation for all candidate intervention sets and intervention targets.
In our experiments, for the U CD and U CML utilities we sample 5 and 30 graphs to approximate the outer and inner expectations w.r.t.
the posterior graphs, respectively.
We sample 100 hypothetical experiment outcomes with given batch size from p ( X t | G, x 1: t ) to approximate the expectation E X t | G, x 1: t [ · ] .
For the U CR utility we sample 3 and 9 graphs to approximate the outer and inner expectations w.r.t.
the posterior graphs, respectively.
We sample 50 hypothetical experiment outcomes with given batch size from p ( X t | G, x 1: t ) to approximate expectations of the form E X t | G, x 1: t [ · ] .
To approximate the expectations E ψ (cid:2) E do ( X i = ψ )
X j | X t ,G, D [ · ] (cid:3) we sample 5 intervention values from p ( ψ ) and draw 3 samples from p do ( X i = ψ )
( X j | X t , G, D ) for each intervention value.
E.7 Bayesian Optimisation for Experimental Design
In order to find the optimal experiment a ⋆t = ( I ⋆ , x ⋆ I ) at time t , we compute the optimal intervention value x ⋆ I ∈ arg max x U ( I , x ) for each candidate intervention target set I (see Eq.
(A.15)).
As the evaluation of our proposed utility functions U ( a ) is expensive, we require an efficient approach for finding optimal intervention values using as few function evaluations as possible.
Following von
Kügelgen et al.
[73], we employ Bayesian optimisation (BO) [40, 41] for this task and model our uncertainty in U ( I , x ) given previous evaluations D BO
= { ( x l , U
( I , x l )) } kl =1 with a GP.
We select a new candidate solution according to the GP-UCB acquisition function [69],
[Equation]
13) where µ k ( x ) and σ k ( x ) correspond to the mean and standard deviation of the GP predictive distribution p ( U ( I , x ) | D BO ) (see Appx.
C).
We then evaluate U ( I , x k +1 ) at the selected x k +1 and repeat.
The scalar factor γ trades off exploitation with exploration.
In our experiments, we set γ = 1 and run the GP-UCB algorithm 8 times for each candidate set of intervention targets.
Input: set of latent particles z = { z k } Kk =
Output: set of resampled latent particles ˜ z
= { ˜ z k } Kk = ˜
z ← ∅ ▷ initialise set of resampled particles
N max ← (cid:6) K 4 (cid:7) ▷ max.
number of particles to keep { w k } Kk =1 ← (cid:110) p ( z k | x 1: t ) ˜
p
( z k ) (cid:80) k p ( z k | x 1: t ) ˜ p ( z k ) (cid:111)
▷ compute particle weights n kept ←for w k in sort_descending( { w k } Kk =1 ) do if n kept < N max and w k > 0 .
01 then ˜
z ← ˜ z ∪ { z k } n kept ← n kept +endelse z new ∼ p ( Z )
˜
z ← ˜ z ∪ { z new } end end
F Implementation Details
In this section, we give details about our implementation, including our particle resampling procedure in Section F.1, the sharing and caching of priors in Section F.2, a discussion of the computational complexity of our implementation in Section F.3, and finally some information on our code framework and computing resources in Section F.4. Our implementation is available at https://www.github.com/chritoth/active-bayesian-causal-inference.
F.1 Particle Resampling
As described in Alg. 1, we resample latent particles z
= { z k } Kk =1 according to a predefined schedule instead of sampling new particles from the particle prior p ( Z ) after each epoch.
Although sampling new particles would allow for higher diversity in the graph Monte Carlo samples and their respective mechanisms, it also entails a higher computational burden as the caching of mechanism marginal loglikelihoods is not as effective anymore.
On the other hand, keeping a subset of the inferred particles is efficient, because once we have inferred a “good” particle z k that supposedly has a high posterior density p ( z k | x 1: t ) it would be wasteful to discard the particle only to infer a similar particle again.
Empirically, we found that keeping particles depending on their unnormalized posterior densities according to Alg. 2 does not diminish inference quality while increasing computational efficiency.
In our experiments, we chose the following resampling schedule:
[Equation]
F.2 Shared Priors and Caching of Marginal Likelihoods
We share priors for mechanisms and noise p ( f i , σ i | G ) , as well as for GP hyperparameters p ( κ i | G ) , across all graphs G that induce the same parent set Pa Gi .
Consequently, not only the posteriors p ( f i , σ i | G, x 1: t ) and p ( κ i | G, x 1: t ) , but also the GP marginal likelihoods p ( x 1: t i | G ) and GP predictive marginal likelihoods p ( x t
+1 i | G, x 1: t ) can be shared across graphs with identical parent sets for node X i .
By caching the values of the computed GP (posterior) marginal likelihoods, we substantially save on computational cost when computing expectations of the form E G | z (cid:2) p ( x 1: t | G ) ϕ ( G ) (cid:3) and E G | z (cid:2) p ( x t +1 | G, x 1: t ) ϕ ( G ) (cid:3) where ϕ ( G ) is some quantity depending the graph.
Specifically, consider that p ( x 1: t | G ) =
(cid:81)
i p ( x 1: t i | G ) factorizes into the GP marginal likelihoods of the individual mechanisms, so for d nodes in the graph and N samples in x 1: t (counted over all time steps) the complexity of computing p ( x 1: t | G ) is O
( d · N 3 ) for a fixed set of GP hyperparameters (for simplicity we ignore that not all d mechanisms are modelled by GPs as some are root nodes, so this is not a tight bound).
Thus, in the worst case, estimating p ( x 1: t | z ) =
E G | z [ p ( x 1: t | G )] with K graph samples would yield a complexity of O ( K · d · N 3 ) .
By caching the marginal likelihoods as outlined above we can rewrite the complexity O ( K · d · N 3 ) as O ( L · N 3 ) where L ≤ K · d denotes the number of unique mechanisms entailed by the set of K graph samples.
Although this does not reduce the worst case complexity it nevertheless greatly alleviates the computational demand in practice.
The benefit of caching becomes even more pronounced as p ( G | z ) concentrates is mass on a small set of similar graphs as a result of the inference process.
In particular, when updating the latent particles using SVGD we do not need to recompute p ( x 1: t | G ) after we have once before sampled G , which greatly speeds up the gradient estimation of the particle posterior.
F.3 Computational Complexity
There are two main phases in our algorithm (disregarding the computation of metrics for evaluation), (i) the inference phase where we (approximately) infer the posterior over SCMs p ( M| x 1: t ) after collecting new experimental data, and (ii) the experimental design phase.
The inference phase has worst-case complexity in O ( T SV GD · ( T HP · M · K · d · N 3 + M 2 · d 2 )) where T SV GD is the number of SVGD update steps, T HP is the number of GP hyperparameter update steps, M is the number of latent z particles, K is the number of graph samples per latent z particle, d is the number of nodes in the network, and N is the number of collected experimental samples in x 1: t .
The computation of the GP marginal likelihood dominates the complexity of the inference phase.
To improve scalability we make use of shared priors and caching.
Additionally, we update the
GP hyperparameters according to a predefined schedule instead of doing so after each performed experiment.
In our experiments, both measures reduce the factor T HP · M · K · d significantly.
For example, running inference with 5 freshly initialized z particles with 40 graph samples each on a scale-free SCM with 20 nodes updates the hyperparameters of (2970, 964, 177) GPs during
SVGD update steps (1, 5, 10), and of less than 15 GPs after 20 SVGD update steps.
Compared to
M · K · d = 4000 in this example, the benefit is evident.
In the experimental design phase we parallelize finding the optimal intervention value for each candidate target node, so the complexity is basically the number of Bayesian optimization (BO) steps times the complexity of the utility we want to optimize for.
For a general query (cf.
Eq. (A.11)) we have complexity in O
( T BO · M · K outer · S · Q · M · K inner · ( O ( p ( y |M ) + d · N 3 )))
where
T BO is the number of Bayesian optimization iterations, M is the number of latent z particles,
K outer is the number of graph samples in the outer SCM expectation in, S is the number of simulated experiments per SCM, Q is the number of simulated queries, K inner is the number of graph samples in the inner SCM expectation, O ( p ( y |M ) ) is the complexity of evaluating the query likelihood and d · N 3 is the complexity of evaluating the GP predictive posteriors for the simulated experiments.
For the causal discovery and model learning utilities the complexity reduces to O ( T BO · M · K outer · S · M · K inner · d · N 3 ) .
In summary, the complexity of our ABCI implementation is dominated the experimental design phase from a high-level perspective.
On a lower level, the cubic scaling of GP inference is the major computational issue that we alleviate by caching the (posterior) marginal log-likelihoods (see Appx.
F.2 for details).
However, in a small data regime where experimental data is costly to obtain, GPs are not a prohibitive element in our inference chain.
Furthermore, GP scaling issues could be alleviated, e.g., by using sparse GP approximation or any other kind of scalable Bayesian mechanism model.
Disregarding issues of GP scaling, the estimation of the information gain utilities is still costly, simply because it requires many levels of nested sampling and too few Monte-Carlo samples will yield too noisy, in the worst case unusable utility estimates.
We believe that in follow-up work much can be gained in terms of scalability as well as performance by incorporating recent advances in nested Monte-Carlo/information gain estimation techniques(e.g.
Finally, consider that a single estimation of the causal discovery utility for an SCM with 20 nodes with N = 500 previously collected experimental samples takes approximately 2 minutes on an off-the-shelf laptop.
Thus, for 10 BO iterations we can do the experimental design phase inminutes (assuming we parallelize the utility optimization for each node).
In a practical application scenario one might be very willing to invest hours or days for the design phase before conducting a costly experiment.
F.4 Implementation and Computing Resources
Our Python implementation uses the PyTorch [48], GPyTorch [21], CDT [36], SKLearn [52], NetworkX [25] and BoTorch [4] packages, which greatly eased our implementation efforts.
All of our experiments were run on CPUs.
We parallelise the experiment design by running the optimisation process for each candidate intervention set on a separate core.
G Evaluation Metrics
In this section, we provide details on the metrics used to evaluate our method in Section 4 and Appx.
H.
In our experiments, we use (nested) Monte Carlo estimators to approximate intractable expectations.
Kullback-Leibler Divergence.
We evaluate the inferred posterior over queries given observed data, p ( Y | x 1: t ), to the true query distribution p
( Y | M ⋆ ) using the Kullback-Leibler Divergence (KLD), i.e.,
[Equation]
Query KLD.
For Y =
X do ( X 3 = ψ )with ψ ∼ p ( ψ ) we have
[Equation]
To approximate the outer two expectations, we keep a fixed set of samples for each ground truth
SCM to enhance comparability between different ABCI runs.
For p do ( X 3 = ψ ) ( X 5 | x 1: t ) , we use the estimator described in Section E.1.
SCM KLD.
For Y =
q CML ( M ) =
M , we have
[Equation]
Now note that p ( G ⋆ | G )
= 1 if G = G ⋆ and 0 otherwise, p ( f ⋆ | f ) =
δ ( f ⋆ − f ) , and p ( σ 2 ,⋆ | σ 2 ) =
δ ( σ 2 ,⋆ − σ 2 ) .
Hence, the SCM KLD vanishes iff the SCM posterior p ( M | x 1: t ) collapses onto the true SCM M ⋆ , and is infinite otherwise.
Average Interventional KLD.
Computing the KLD for Y =
q CML ( M ) =
M is not useful for evaluation, since it vanishes when the SCM posterior p ( M | x 1: t ) collapses onto the true SCM M ⋆ and is infinite otherwise.
For this reason, we report the average interventional KLD as a proxy metric, which we define as
[Equation]
As with the Query KLD, we keep a fixed set of MC samples per ground truth SCM to approximate the two outer expectations to enhance comparability between different ABCI runs.
Expected Structural Hamming Distance.
The Structural Hamming Distance (SHD)
[Equation]
denotes the simple graph edit distance, i.e., it counts the number of edges ( i, j ) that are present in the prediction graph G and not present in the reference graph G ⋆ and vice versa.
We report the expected
SHD w.r.t.
our posterior over graphs as
[Equation]
AUPRC.
Following previous work [16, 18, 39, 71], we report the area under the precision recall curve (AUPRC) by casting graph learning as a binary edge prediction problem given our inferred posterior edge probabilities p ( G i,j | x 1: t ) .
Refer to e.g. Murphy [46] for further information on this quantity. [Figure]
[Figure]
Interventional
[Figure] [Figure]
H Extended Experimental Results
Causal Discovery and SCM Learning for SCMs with d = 10 Variables.
We report results on ground truth SCMs with d = 10 variables and scale-free graphs in Fig.
We initialise all methods with 5 observational samples and perform experiments with a batch size of 3 .
All other parameters are chosen as described in Appx.
E.
Causal Discovery and SCM Learning for SCMs with d = 20 Variables.
To demonstrate the scalability of our framework, we report results on ground truth SCMs with d = 20 variables and scale-free or Erd ˝ os-Renyi graphs in Fig.
6 and Fig.
7, respectively.
We initialise all methods with 50 observational samples and perform experiments with a batch size of 5 .
All other parameters are chosen as described in Appx.
E.
While ABCI shows clear benefits when scale-free causal graphs underlie the SCMs, we find that the advantage of ABCI diminishes on SCMs with unstructured Erd ˝ os-Renyi graphs, which appear to pose a harder graph identification problem.
Moreover, we expect performance of our inference machinery, especially together with the informed action selection, to increase when investing more computational power to improve the quality of our estimates, e.g., by increasing the number of Monte
Carlo samples used in our estimators and increasing the number of evaluations during the Bayesian optimisation phase.
Finally, in Fig.
8 we show that using a simple linear model (GP model with a linear kernel) is not able to reasonably capture the characteristics of the ground truth model (non-linear GP model) due to the model mismatch.
Learning Interventional Distributions vs. Causal Discovery and SCM Learning.
We report additional metrics for our causal reasoning experiment as described in § 4 in Figs.
9 and 10.
The key result here is that U CR yields a significantly lower Query KLD while exhibiting a worse ESHD and Average I-KLD scores, which indicates that, indeed, the U CR learns only those parts of the model that are relevant to reducing the uncertainty in our target query.
This is more data efficient than trying to learn the entire model first and then answering the causal query of interest.
[Figure]
AUPRC
[Figure]
AUPRC
We expect that improving the quality of the U CD and U CML estimates (e.g., by scaling up computational resources invested in the MC estimates) yield similar benefits of the experimental design utilities as apparent in Fig.
[Figure]
[Figure] [Figure]