                               Continuous Bayesian Model Selection for
                                    Multivariate Causal Discovery


               Anish Dhir * 1 Ruby Sedgwick * 1 2 Avinash Kori 1 Ben Glocker 1 Mark van der Wilk 3


                         Abstract                                      Biology (Sachs et al., 2005) to Medicine (Feuerriegel et al.,
                                                                       2024) to Economics (Hicks et al., 1980). There are two main
     Current causal discovery approaches require re-
                                                                       approaches for learning the ground truth causal structure
     strictive model assumptions in the absence of in-
                                                                       from data. The first approach assumes a restricted model
     terventional data to ensure structure identifiability.
                                                                       class for the data generating process (Peters et al., 2017,
     These assumptions often do not hold in real-world
                                                                       Ch. 4), but its guarantees often fail when these assumptions
     applications leading to a loss of guarantees and
                                                                       do not hold. The second approach requires interventional
     poor performance in practice. Recent work has
                                                                       data for all variables, which can be costly, ethically chal-
     shown that, in the bivariate case, Bayesian model
                                                                       lenging, or even impossible (Li et al., 2019). Consequently,
     selection can greatly improve performance by ex-
                                                                       learning a unique causal structure often relies on impractical
     changing restrictive modelling for more flexible
                                                                       assumptions, limiting its real-world applicability.
     assumptions, at the cost of a small probability
     of making an error. Our work shows that this                      Recent work has shown that, in the absence of interventional
     approach is useful in the important multivariate                  data and in the bivariate case, Bayesian model selection can
     case as well. We propose a scalable algorithm                     more accurately infer the unique causal structure of a system
     leveraging a continuous relaxation of the discrete                (Dhir et al., 2024). Unlike previous methods, including other
     model selection problem. Specifically, we employ                  Bayesian methods1 , which impose constraints on the func-
     the Causal Gaussian Process Conditional Den-                      tion class, this framework allows the use of more flexible
     sity Estimator (CGP-CDE) as a Bayesian non-                       model classes. This comes at a cost of loosened identifia-
     parametric model, using its hyperparameters to                    bility guarantees but with the ability to posit more realistic
     construct an adjacency matrix. This matrix is                     assumptions. However, Dhir et al. (2024) only study the bi-
     then optimised using the marginal likelihood and                  variate case, while most applications require understanding
     an acyclicity regulariser, giving the maximum a                   causal relationships between multiple variables. It is thus an
     posteriori causal graph. We demonstrate the com-                  open question whether the advantages of this method hold
     petitiveness of our approach, showing it is advan-                in the multivariate case. Furthermore, the approach in Dhir
     tageous to perform multivariate causal discovery                  et al. (2024) requires computing and comparing the posteri-
     without infeasible assumptions using Bayesian                     ors of all possible causal graphs. As the number of graphs
     model selection.                                                  grows super-exponentially with the number of variables,
                                                                       this becomes computationally intractable for scalability.
                                                                       A potential solution lies in continuous optimisation causal
1. Introduction                                                        discovery approaches (Zheng et al., 2018; Nazaret et al.,
In many systems, such as protein signalling networks, vari-            2024). These approaches interpret causal discovery as a
ables causally relate to each other, since changing a variable         single continuous optimisation problem that is amenable
only modifies certain variables (Sachs et al., 2005). Uncover-         to gradient based methods. The emphasis of this line of
ing these unique underlying causal structures from data can            work has been either on scaling to a larger number of vari-
allow us to gain new insights in a wide range of fields, from          ables or on loosening model assumptions. Our contribution
                                                                       tackles the latter. We argue that the potential advantages
   *
     Equal contribution 1 Department of Computing, Imperial Col-       of Bayesian methods enable them to outperform their non-
lege London, London, UK 2 Xyme, Oxford, UK 3 Department of             Bayesian counterparts.
Computer Science, University of Oxford, Oxford, UK. Correspon-
dence to: Anish Dhir <anish.dhir13@imperial.ac.uk>.                    We investigate whether and how well Bayesian model se-
                                                                          1
Proceedings of the 42 nd International Conference on Machine               These methods are usually concerned with inferring a distri-
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025            bution instead of a single causal structure.
by the author(s).

                                                                   1
                            Continuous Bayesian Model Selection for Multivariate Causal Discovery

lection can recover the ground truth causal structure in mul-         2.2. Learning Causal Structure
tivariable systems. We use a model based on the Gaussian
                                                                      Formally, the task is to recover a DAG G given a dataset of
Process conditional density estimator (GP-CDE) (Titsias &
                                                                      N samples with D variables, X ∈ RN ×D . Without any in-
Lawrence, 2010; Lalchand et al., 2022) that is more flexible
                                                                      terventional data, only the Markov equivalence class (MEC)
than traditional identifiable models that rely on restrictive
                                                                      of a DAG can be recovered with the faithfulness assump-
model assumptions. Interpreting the model hyperparameters
                                                                      tion (Pearl, 2009) and with infinite data (Appendix A). To
as a graph, we optimise over them using a Bayesian model
                                                                      recover a unique DAG, and differentiate within an MEC, we
selection-based loss and a regulariser to enforce acyclic-
                                                                      require additional assumptions.
ity, ultimately producing the maximum a posteriori (MAP)
causal graph. Our experiments address two critical ques-
tions: (1) How much performance is lost compared to enu-              2.3. Learning Causal Structure with Functional
merating every causal graph? (2) How does our scalable                     Restrictions
Bayesian model selection compare to existing multivariate             One way to recover a DAG is to impose a priori restrictions
causal discovery methods in terms of performance? Our                 on the allowable conditional distributions Ci|PAG (i) . These
results show that Bayesian model selection outperforms                restrictions are chosen so that the joint distributions implied
methods enforcing strict identifiability even at larger scales.       by a causal model cannot be expressed by any other causal
While it introduces a small error probability, the flexibility        model— specifically, for P ∈ FG it holds that P ̸∈ FH for
afforded enables more realistic and practical multivariable           any H =  ̸ G (Guyon et al., 2019, Ch. 2). Thus, if data is
causal discovery, advancing toward real-world applications.           sampled from one of the causal models, the causal structure
                                                                      can be identified. As an example, additive noise models
2. Background                                                         (ANM) (Hoyer et al., 2008) restrict all Ci|PAG (i) to the form
                                                                      f (XPAG (i) ) + ϵ for some arbitrary non-linear function f ,
Here, we outline the assumptions relevant to the task of              and arbitrarily distributed ϵ. If we consider a different graph
causal discovery. Additional background is in Appendix A.             H but the same ANM restrictions on Ci|PAH (i) , it is not
                                                                      possible to approximate the joint induced       by the original
2.1. Causal Model
                                                                                                                Q
                                                                      set of conditional
                                                                              Q            distributions CG  =    i∈V Ci|PAG (i) using
                                                                      CH = i∈V Ci|PAH (i) . This allows the graph G to be identi-
We assume that data X ∈ RN ×D can be explained by a
                                                                      fied. For a lot of these restrictions, the maximum likelihood
Causal Model, which we refer to as MG . We make the
                                                                      score can identify the causal structure (Zhang et al., 2015;
common assumption that there are no hidden confounders.
                                                                      Peters & Bühlmann, 2014; Immer et al., 2023).
                                                                      Methods relying on restricted model classes also restrict the
Definition 2.1. (Consistent with Pearl (2009) but using no-           datasets they can model. Specifically, assume that data was
tation from Dhir et al. (2024)) A Causal Model MG :=                  generated by a distribution Π, then it may be that Π ̸∈ FG
(G, CG ) is defined as a tuple containing a DAG G with vertex         for all G. Here, none of the causal models can approximate
set V and edge set E, along with a set of conditional distribu-       the true data-generating distribution and guarantees about
tions for each variable Ci|PAG (i) , where PAG (i) denotes the        causal identifiability no longer hold. That is, the models are
parent index set of node index i in G. The setQof all possible        misspecified. A solution would be to loosen the restrictions
conditionals is the Cartesian product CG := i∈V Ci|PAG (i) .          on Ci|PAG (i) providing greater flexibility in approximating
The set of all possible conditional distributions induces a           distributions. However, this could also allow causal models
set of joint distributions denoted FG .                               with different DAGs to express the true data-generating
                                                                      distribution, thereby losing the ability to recover the true
                                                                      DAG (Zhang et al., 2015, Lemma 1).
An element of CG induces a joint distribution over D ran-
                                                                      2.4. Learning Causal Structure with Bayesian Model
dom variables X = {X1 , . . . , XD } when its constituent
                                                                           Selection
members are multiplied together. ThatQD is, for an element
(Pi : i ∈ V) ∈ CG the joint is i=1 Pi (Xi |XPAG (i) ).                Restricted function classes are required for identifiability
 QD CG induces a set of joint distributions FG =
Hence                                                                 within an MEC as it implies that, with infinite data, only one
{ i=1 Pi (Xi |XPAG (i) ) : (Pi : i ∈ V) ∈ CG } (Dhir et al.,          of the causal models can approximate the data distribution
2024). We also assume likelihood modularity (Geiger &                 and thus achieve a higher score such as the maximum likeli-
Heckerman, 2002), that is for variable Xi if PAG (i) =                hood. Without restrictions, multiple causal structures can
                ̸ G ′ , then Ci|PAG (i) = Ci|PAG′ (i) . This
PAG ′ (i) for G =                                                     yield the same maximum likelihood score, making it impos-
means that for graphs where variables have the same par-              sible to distinguish between them. However, using such an
ents, we assume the same set of conditional distributions.

                                                                  2
                            Continuous Bayesian Model Selection for Multivariate Causal Discovery

unrestricted causal model with a Bayesian model selection-            Multiple Bayesian causal models may achieve the same
based score can restore the ability to differentiate between          likelihood score given infinite data, but the prior and the
causal structures. This is because, while multiple structures         encoded ICM assumption play a key role in yielding distinct
may share the same maximum likelihood score, they typi-               marginal likelihood scores. The ICM assumption, which
cally yield distinct scores under Bayesian model selection.           encodes the causal factorisation in the prior, typically does
This insight was demonstrated for the two-variable case in            not hold in any other factorisation (Dhir et al., 2024). To
Dhir et al. (2024), building on prior efforts (Friedman &             see this, consider the model with graph X → Y , with
Nachman, 2000; Stegle et al., 2010). While this approach              CX parametrised by θ and CY |X parametrised by ϕ. Here,
no longer guarantees strict identifiability and admits a small        placing a prior on CX→Y is equivalent to placing a prior on
probability of error, the error probability can be empirically        the parameters θ and ϕ. ICM implies that the priors over
estimated and remains low with appropriate models (Dhir               θ, ϕ factorise, which means the joint factorises as
et al., 2024). The key advantage of this framework lies in
its flexibility. By enabling the use of broader model classes,                       π(θ)π(ϕ)P (X|θ)P (Y |X, ϕ).                   (3)
it mitigates the risk of misspecification, which is a com-
mon limitation where the assumptions and guarantees of                We can find the reverse factorisation of the variables for
restricted models fail (Section 2.3). Our work builds on              the same model using Bayes’ rule. Here, in general, it is
these insights.                                                       not possible to parametrise CY and CX|Y with independent
                                                                      parameters (Dhir et al., 2024)2
In Bayesian model selection, the evidence for a causal model
MG (as defined in Section 2.1) is quantified by the posterior             Equation (3) =π(θ)π(ϕ)P (Y |θ, ϕ)P (X|Y, θ, ϕ)           (4)
                                                                                        =π(α, β)P (Y |α)P (X|Y, β),                (5)
            P (MG |X) ∝ P (X|MG )P (MG ),                  (1)

where P (MG ) is the prior over the causal model. As we               where α, β are some reparametrisations. Hence, if
assume no preference over causal direction between vari-              π(α, β) ̸= π(α)π(β), the model with the graph X → Y
ables, our prior belief is equal over graphs in the same MEC.         only satisfies the ICM assumption, as specified by factorised
The posterior within an MEC is then dependent only on the             priors on the set of conditionals, in the causal factorisation
term P (X|MG ), known as the marginal likelihood. Given               of the joint {Pi (X)Pj (Y |X) : Pi ∈ CX , Pj ∈ CY |X }.
that our task is to infer the single ground truth causal struc-       Given a prior, the marginal likelihood is
ture, we select the causal model M∗G based on the highest
posterior probability (Kass & Raftery, 1995)                                                D
                                                                                          Z Y
                                                                                                                              
                                                                          P (X|MG ) =              Pi (Xi |XPAG (i) )πi (dPi ) .   (6)
                M∗G = argmax P (MG |X).                    (2)                               i=1
                          MG
                                                                      The marginal likelihood score has an automatic Occam’s
To calculate the marginal likelihood, a prior (denoted π)             razor effect that balances model fit along with complexity
over the distributions in the causal model must be specified.         (MacKay, 2003, Ch. 28). This means that although mul-
This defines a Bayesian Causal Model.                                 tiple causal models may have parameter settings that fit a
Definition 2.2. (Dhir et al., 2024) A Bayesian Causal                 given distribution, some models may provide a simpler ex-
Model, denoted as (MG , π), is defined as a causal model              planation than others. Specifically, those whose prior, and
MG (Definition 2.1) with a prior distribution π over CG .             encoded ICM assumption, align with properties of the data
                                                                      generating process. This allows for distinguishing between
Each Bayesian causal model should encode the common                   causal models even with loosening the restrictions discussed
and foundational principle that a change in one causal mech-          in Section 2.3.
anism should not affect any others (Aldrich, 1989; Pearl,
                                                                      Dhir et al. (2024) only consider Bayesian model selection
2009). This can be formalised by the independent causal
                                                                      for the two variable case. It is not clear how this approach
mechanism (ICM) assumption (Janzing & Schölkopf, 2010).
                                                                      will perform when the number of variables is increased,
The ICM assumption implies that, in the causal factori-
                                                                      especially in contrast with competing methods. We study
sation, knowledge about any distribution Pi ∈ Ci|PAG (i)
                                                                      the multiple variable case where we address the following
should not inform any other Pj ∈ Cj|PAG (j) for j ̸= i. In
                                                                      challenges: First, we use the theory in Dhir et al. (2024) to
                                                     Q pri-
the Bayesian approach this implies defining factorised
                                                                      clearly show that Bayesian model selection can be applied
ors on each set of variable distributions — π = i∈V πi ,
                                                                      to causal discovery with multiple variables. Secondly, as the
where πi ∈ P(Ci|PAG (i) ) is the prior on the distributions for
                                                                      number of variables increases, the number of possible DAGs
variable Xi , factorised according to the causal structure G,
and P is the set of all distributions over an object. This is            2
                                                                           Exceptions exist, notably normalised linear Gaussian models
the only constraint we place on the prior.                            which are known to be unidentifiable.

                                                                  3
                            Continuous Bayesian Model Selection for Multivariate Causal Discovery

grows super-exponentially, making direct comparison of                 The advantage of the Bayesian approach is apparent when
marginal likelihoods across all DAGs infeasible. To address            considering cases where the underlying causal model is
this, we propose a scalable approach for applying Bayesian             unidentifiable with maximum likelihood. This is the case
model selection to multiple-variable causal discovery.                 for graphs within an MEC, where functional restrictions
                                                                       have not been made.
3. Distinguishability with Multiple Variables                          Remark 3.3. Suppose that the ICM assumption only holds
                                                                       in the causal factorisation of the Bayesian causal model.
We use theory from Dhir et al. (2024) to show that in the              Bayesian model selection can then distinguish within an
multiple variable case, Bayesian causal models can find                MEC (Theorem B.7).
the correct DAG using only priors with the ICM condition,
rather than hard model restrictions. We proceed by first               Thus, without restrictions and if the ICM condition only
showing that Bayesian causal models can be identified up to            holds in the causal factorisation, Bayesian model selection
an MEC. Then, we show that Bayesian causal models can                  can be used to distinguish Bayesian causal models, in that
differentiate within an MEC, without functional restrictions,          the probability of error is lower than a uniformly random
but with some probability of error. We only make remarks               chosen graph. The model class we choose only satisfies the
on key results in this section, but the full set of assumptions,       ICM condition in the causal factorisation (Dhir et al., 2024,
theorems, and proofs is in Appendix B. Note that these                 Appendix D.3). The probability of error for our chosen
definitions hold in the population setting.                            model class was shown to be very low for the two variable
                                                                       case in Dhir et al. (2024, Section 4.3). We estimate the
First, we define the probability of making an error, given
                                                                       probability of error for the multivariate case and show that
datasets from the chosen Bayesian causal model.
                                                                       it is low in Section 6.1.
Definition 3.1. (Dhir et al., 2024) Given a score S, such as
the marginal likelihood, we define the probability of error            As is common with identifiability results, the probability of
for a model MG as                                                      error estimate assumes that the data is generated from one of
                             Z                                         the candidate causal models. However, this assumption may
             P (E|MG ) =        p(X|MG )dX,              (7)           not hold in practice. Dhir et al. (2024, Section 4.4) demon-
                               R                                       strate that the model’s estimated probability of error and the
where R = {X : S(X|MH ) > S(X|MG ) for H ̸= G},                        true probability of error (from the actual data-generating
and S(X|MG ) is the score achieved by model MG on                      process) are bounded by the total variation distance between
dataset X.                                                             the model and the true distribution. Consequently, mild
                                                                       violations of model assumptions, such as the prior, can still
That is, given datasets X from a Bayesian causal model with            yield accurate error probability estimates.
DAG G, the integral over datasets where the wrong causal
model is chosen by the score. For Bayesian causal models,              4. CGP-CDE: Causal Gaussian Process
this quantifies the overlap in the posteriors. Note that, simi-
                                                                          Conditional Density Estimators
lar to previous work, this definition assumes that the data is
sampled from one of the models under consideration. The                Although the posterior can allow for more accurate causal
probability of error can thus be estimated empirically for             discovery with fewer restrictions, computing and comparing
Bayesian causal models by sampling a graph, then sampling              the posterior of every causal structure becomes intractable
datasets from a chosen Bayesian causal model, and infer-               when the number of variables is increased. We propose
ring the causal graph using the chosen score (Dhir et al.,             a method that scales up Bayesian model selection based
2024). An identifiable model implies a probability of error            causal discovery by using the insights of Zheng et al. (2018)
of zero in the infinite data limit (Dhir et al., 2024; Guyon           (Appendix A.2). We first describe the model that we use,
et al., 2019). In contrast, an unidentifiable model will have          then we show how the model can continuously parameterise
a probability of error equal to that of a uniformly random             the space of graphs. This is followed by a loss function
chosen graph. Similarly, we say a model is distinguishable             that maximises the posterior probability and ensures that the
if the probability of error is less than that of a uniformly           final graph is a DAG.
chosen random graph.
Remark 3.2. With the faithfulness assumption, Bayesian                 4.1. The GP-CDE Model
model selection can identify a Bayesian causal model up to
the MEC of its graph (Theorem B.3).                                    The Bayesian model selection approach to causal structure
                                                                       learning described in Section 2.4 requires defining distribu-
Although this is well known for certain parametric models              tions and priors for a causal model. To take advantage of
(Heckerman, 1995; Chickering, 2002), we show that it is                the Bayesian framework, we wish to use a model for each
true for the general non-parametric case.                              Ci|PAG (i) that is more flexible than previous attempts. For

                                                                   4
                              Continuous Bayesian Model Selection for Multivariate Causal Discovery

this, we use a version of the Gaussian process conditional                variable Xj . This implies an adjacency matrix
density estimator (GP-CDE) model (Dutordoir et al., 2018).                                        (
Here, Ci|PAG (i) is a class of nonparametric functions and the                                      θij if j ̸= i,
prior over the conditionals is a Gaussian process prior.                                   Aij =                                             (10)
                                                                                                    0     otherwise.
The input to the estimator for each variable is determined
by the causal graph of the causal model. For a given causal               A value of θij = 0 implies that changing Xj does not
DAG G, the joint p(X, f , W|Λ, ϕ, MG ) of our model is                    change Xi and results in an absence of the edge Xj → Xi
                                                                          in A.
    N
  D Y
  Y                                                                       The Gaussian process prior p(fi |XPAGA (i) , σ i , θ i , wi ) is
            p(xni |fi , ϕi )p(fi |XPAG (i) , Λi , wni )p(wni ), (8)
                                                                          then parameterised as follows
  i=1 n=1

where W ∈ RN ×D are the latent variables, ϕ ∈ RD are                                  N (0, Kσi ,θi ((X¬i , wi ), (X¬i , wi )′ )),           (11)
the likelihood variances, Λi are the kernel hyperparame-
ters, and MG denotes the causal model with DAG G. Each                    where PAG A (i) denotes the parents of Xi in G A (the graph
variable xi is modelled as the output of a function fi , with             implied by the adjacency A), and X¬i denotes all variables
the parents of the variable in G, XPAG (i) , and a latent vari-           except Xi . Thus, for a variable Xi , all the other variables
able wi being the inputs. The inclusion of wi ∼ N (0, I)                  are inputs, and the values of the hyperparameters θ i control
allows for each variable to be described with non-Gaussian                the dependence of the rest of the variables X¬i on Xi , and
and heteroscedastic noise, greatly increasing the expres-                 hence define the parents of Xi . The hyperparameters in the
sivity of the model (Dutordoir et al., 2018)3 . The term                  above model thus continuously parameterise the space of
p(fi |XPAG (i) , Λi , wni ) is the Gaussian process prior (Ras-           graphs. The exact kernel we use is in Appendix C.1.
mussen, 2003), and equal to
                                                                          4.3. Priors on Graphs
        N 0, KΛi (XPAG (i) , wi ), (XPAG (i) , wi )′ ,
                                                     
                                                            (9)
                                                                          As discussed in Eggeling et al. (2019), the lack of a prior on
where K(·, ·) is a chosen kernel matrix parameterised by                  graphs leads to a higher weight on denser graphs due to the
hyperparameters Λi .                                                      larger number of dense graphs versus sparse graphs. Hence,
                                                                          to even out this effect, we place a prior on graphs. By intro-
The above approach requires defining a separate model for                 ducing priors on the hyperparameters θ in our model, we
each causal DAG. Next, we show how to interpret the hyper-                can effectively encode priors on the graph in Equation (10).
parameters of this model as an adjacency matrix. This will                We thus place a Gamma prior with parameters chosen to pre-
allow for continuously parameterising the space of graphs.                fer small values of θ, P (θ) = Gamma(η, β). Note that our
                                                                          prior is symmetric between graphs within the same MEC.
4.2. Continuous Relaxation: The CGP-CDE Model                             That is, we do not impose a preference over the causal di-
The key insight to continuously parameterise graphs (not                  rection between variables, only over the number of edges
DAGs) in the above model is that the hyperparame-                         in the graph. Other priors on graphs could be considered
ters control dependence between variables (Williams &                     (Eggeling et al., 2019), but we leave that for future work.
Rasmussen, 1995). In our Gaussian process prior for
a variable Xi , we use kernels with different hyperpa-                    4.4. Score
rameters Λij for each dimension j. In general, ker-                       As stated in Section 2.4, our decision rule is to pick the
                                                         ′
                Q factorise as K′ Λi ((X, wi ), (X, wi ) ) =
nels of this form
             ′
                                                                          causal graph with the highest posterior probability. For
KΛii (wi , wi ) j̸=i KΛij xj , xj . Certain hyperparame-                  this, we need to calculate the log marginal likelihood for
ters of the kernels can then be used to control the variability           every variable in our model (Equation (6)). To find the log
of the function with respect to specific inputs. We denote                marginal likelihood, we must integrate over the priors of f
these hyperparameters as θ with θ ⊂ Λ and all other hyper-                and W, log p(xi |XPAGA (i) , σ i , θ i , ϕi ) is given as
parameters as σ = Λ \ θ. Specifically
                                                                                Z Z
                                    ∂fi                                   log         p(xi |fi , ϕi )p(fi |XPAGA (i) , wi , σ i , θ i )p(wi )dwi dfi .
                   θij = 0 =⇒           = 0.
                                    ∂Xj
                                                                          Calculating this marginal likelihood is analytically in-
Hence, if the kernel hyperparameter value for θij is near
                                                                          tractable due to the non-linear dependence of fi on the
zero, the function for variable Xi is constant with respect to
                                                                          latent term wi . We thus use variational inference, with
    3
      Our model can be thought of as a Bayesian conditional varia-        variational posteriors q, to optimise a tractable lower
tional autoencoder.                                                       bound to the marginal likelihood (details and derivation

                                                                      5
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

as well as handling of other hyperparameters are in Ap-             Brouillard et al., 2020; Ke et al., 2020). Since we assume
pendix C.2). We denote the full lower bound for all variables       access only to observational data, we focus on the former.
as LELBO (q, θ, σ, ϕ). The optimisation problem is
                                                                    Continuous optimisation methods cast causal discovery as
  max LELBO (q, θ, σ, ϕ) + log p(θ) s.t. G   Aθ
                                                  ∈ DAGs.           a single unconstrained optimisation problem (Zheng et al.,
 θ,σ,ϕ,q                                                            2018). NOTEARS (Zheng et al., 2018) first introduced a
                                                                    regulariser for learning acyclic causal graphs in linear causal
Maximising σ, ϕ, and q gives an accurate estimate of the            models. Follow-up work extended these methods to more
marginal likelihood while maximising θ finds the graph that         flexible models such as neural networks, or graph neural
maximises the posterior probability.                                networks (Lachapelle et al., 2019; Yu et al., 2019; Zheng
To enforce the condition that G Aθ ∈ DAGs we use the                et al., 2020). At the same time, works such as NOBEARS
spectral acyclicity constraint method (Lee et al., 2019)            (Lee et al., 2019) and SDCD (Nazaret et al., 2024) have
                                                                    worked on improving the scalability of the acyclic regularis-
                    h(Aθ ) = |λd (Aθ )|,                (12)        ers. However, the above methods rely on restricted models
                                                                    to recover a DAG, which can limit performance when as-
where λd (Aθ ) denotes the largest eigenvalue of Aθ , which         sumptions are not met (Section 2.3). When these models
has been shown to be more stable and scalable than other            are not restricted, their guarantees no longer hold.
acyclic constraints (Nazaret et al., 2024). Following Nazaret
                                                                    Other methods first search for node orderings and then prune
et al. (2024), a penalty method is used to allow for continu-
                                                                    to ensure a DAG structure. CAM (Bühlmann et al., 2014)
ous optimisation, making the final loss
                                                                    uses sparse regression to learn node neighbourhoods and
           LELBO (q, θ, σ, ϕ)+log p(θ)− γt h(Aθ ),      (13)        searches for orderings that maximise a score. SCORE (Rol-
                                                                    land et al., 2022) learns the ordering based on the score
                                                                    function of ANM models with Gaussian noise and then
where the weighting γt is increased by ρ at each epoch. A           prunes using sparse regression. NOGAM (Montagna et al.,
solution A∗ is found when h(A∗ ) < τ for some τ > 0. See            2023) extends SCORE to arbitrary noise distributions. The
Appendix A.2 for more details.                                      above methods specifically rely on the ANM assumption.

4.5. Computational Cost                                             The Bayesian framework has previously been used for
                                                                    causal discovery but has typically focused on computing
The cost of computing the loss for N samples in a Gaussian          a posterior over causal structures to quantify uncertainty
Process is usually O(N 3 ). We use the uncollapsed induc-           (Friedman & Koller, 2003; Heckerman et al., 2006). Geiger
ing point formulation that introduces M < N inducing                & Heckerman (2002) use Bayesian linear Gaussian mod-
points allowing for mini-batching (Appendix C.2)(Hensman            els but construct their model such that graphs in the same
et al., 2013). This changes the cost to O(M 3 ). As we              Markov equivalence class receive the same score. Similarly,
have D variables, the total cost is O(DM 3 ). The cost of           Cundy et al. (2021) also only consider posteriors over lin-
computing the acyclicity regulariser is O(D2 ). Hence, the          ear Gaussian models. DiBS (Lorch et al., 2021) assumes
cost is dominated by M . The choice of M depends on the             Bayesian ANMs and parametrises the space of graphs using
problem, with more inducing points leading to better ap-            latent variables. Annadani et al. (2023) also use sampling
proximations (Bauer et al., 2016). However, it is possible to       methods to sample from the posterior over ANM causal
use LELBO to find the optimal number of inducing points             models, but use a permutation based parametrisation of the
(Burt et al., 2020). Gaussian processes, and Bayesian meth-         graph (Charpentier et al., 2021; Yu et al., 2021).
ods in general, can be more computationally expensive than
their non-Bayesian counterparts. However, Bayesian model            Previous Bayesian methods have also relied on the restric-
selection-based causal discovery provides key advantages,           tive assumptions common in likelihood based methods.
including the ability to use more flexible model classes.           In contrast, our work demonstrates that the advantage of
                                                                    Bayesian model selection is the allowance of fewer restric-
                                                                    tions compared to likelihood-based methods (Stegle et al.,
5. Related Work                                                     2010; Dhir et al., 2024; Cooper & Herskovits, 1992). This is
Certain approaches only use information about indepen-              strongly related to the idea of using independence of causal
dences between variables to discover the causal structure,          mechanisms (and the Kolmogorov complexity of causal
recovering only an MEC, and not the whole DAG (Spirtes              models) to distinguish causal models (Janzing & Schölkopf,
et al., 2000; 1995; Chickering, 2002; Huang et al., 2018).          2010) (see Dhir et al. (2024, Appendix B)). While previous
Identifying a unique DAG requires additional assumptions,           studies demonstrated this with two variables, we show its
typically involving restrictions on model classes or access         feasibility and advantages in the important multi-variable
to interventional data (Lippe et al., 2021; Ke et al., 2022;        regime.

                                                                6
                            Continuous Bayesian Model Selection for Multivariate Causal Discovery

                   SHD for 3 Variable                      SID for 3 Variable                         F1 for 3 Variable
           6                                      6                                      1.00
                                                                                         0.75
           4                                      4
                                                                                         0.50
           2                                      2
                                                                                         0.25
           0                                      0                                      0.00
             SD RS
                CD
           NO CAM
            SC AM
         CG D RE
         DGP C BS


                                           m


                                                     SD RS
                                                        CD
                                                   NO M


                                                 CG D RE
                                                 DGP C BS


                                                                                   m
                                                    SC AM




                                                                                              SD RS
                                                                                                 CD
                                                                                            NO CAM


                                                                                          CG D RE
                                                                                          DGP C BS


                                                                                                                             m
                                                                                             SC AM
                                P DE
                                Ra DE




                                                                         P DE
                                                                         Ra DE




                                                                                                                  P DE
                                                                                                                  Ra DE
                                        do




                                                                                do




                                                                                                                          do
                                                        A
               A




                i




                                                       A




                                                        i




                                                                                                A




                                                                                                 i
              O




                                                      O




                                                                                               O
                                  C




                                                                           C




                                                                                                                    C
              G




                                                      C
                                                      G




                                                                                               G
                                  n




                                                                           n




                                                                                                                    n
       TE




                                                 TE




                                                                                         TE
     NO




                                               NO




                                                                                       NO
Figure 1: Boxplot of metrics for the three variable dataset. The plots show the distribution of the metrics across the different
datasets for each experiment. The centre line is the median, the black dot is the mean, and the white dots represent outliers.
Lower is better for SHD and SID, and higher is better for F1.


6. Experiments                                                        the ground truth adjacency matrix. SID: The structural
                                                                      interventional distance counts the number of interventional
We compare our approach to various baselines that perform             distributions that are incorrect if the predicted graph is used
multivariate causal discovery to recover a DAG. We test               to form the parent adjustment set instead of the ground truth
our method on synthetic data generated from our model                 graph (Peters & Bühlmann, 2015). F1: The F1 score is the
(Section 6.1), and data not generated from our model (Sec-            harmonic mean of the precision and recall, where an edge
tion 6.2). Then we test our model on a common semi-                   is considered the positive class.
synthetic benchmark (Section 6.3). Additional experi-
ments and results are in Appendix I. See Appendix C.6
                                                                      6.1. Synthetic 3 Variables
for full details of the CGP-CDE implementation. Code
can be found at: https://github.com/Anish144/                         Using more flexible estimators may introduce some proba-
ContinuousBMSStructureLearning.git.                                   bility of error (Section 3). In the two variable case, Dhir et al.
                                                                      (2024) showed that the probability of error for our model
It was recently found that causal discovery methods can
                                                                      class is low; we show that this is true for the multivariate
be sensitive to variance information that is an artefact of
                                                                      case as well. To estimate the error only due to overlap in
synthetic causal datasets (Reisach et al., 2021; Ormaniec
                                                                      posteriors of different causal models, we perform discrete
et al., 2024). Hence we standardise every variable, including
                                                                      model comparison (labelled DGP-CDE, see Appendix D.1
during data generation (see Appendix E).
                                                                      for more details). This involves enumerating and computing
Baselines: Details for all baselines are in Appendix G. We            the posterior of every causal model. We study the 3 variable
compare against non-Bayesian counterparts that use acyclic-           case, where it is possible to enumerate every possible causal
ity regularisers, such as NOTEARS (Zheng et al., 2018), and           structure, 25 in total. Here, as required by the probability of
SDCD (Nazaret et al., 2024). SDCD uses the same spectral              error, data is generated from our GP-CDE model (details in
acyclicity regulariser as the CGP-CDE, the only difference            Appendix F). We generate five datasets of 1000 samples for
being that the model uses a neural network and a likelihood           each of the six graphs that are unique up to a permutation
score to learn the data distribution (Lachapelle et al., 2019).       of the variables.
Thus, comparison against this method provides direct evi-
                                                                      The results for the 3 variable case can be seen in Figure 1.
dence for the usefulness of the Bayesian approach. We also
                                                                      Here, we can see that the discrete comparison DGP-CDE
compare against methods that first estimate a topological
                                                                      achieves very good performance. This shows that in the
order of the graph and then prune to get the final graph -
                                                                      GP-CDE model, the probability of error in the multivariable
SCORE (Rolland et al., 2022), NOGAM (Montagna et al.,
                                                                      case is low and that our inference does not contribute greatly
2023), and CAM (Bühlmann et al., 2014). These all assume
                                                                      to errors. Thus, if the GP-CDE model is a good descriptor
ANM. Finally, we compare against the MAP estimate of the
                                                                      of the dataset at hand, we can expect the MAP value to
Bayesian model DiBS. Other Bayesian methods are sample
                                                                      identify the true causal direction with high probability. We
based and hence do not allow for easy MAP calculation.
                                                                      also compare our continuous relaxation model against the
Metrics: We use the following metrics to compare the                  discrete model that enumerates each graph type. In Figure 1,
methods. SHD: The structural Hamming distance is the                  the performance of CGP-CDE shows that we can expect a
Hamming distance between the predicted adjacency and                  higher error due to optimisation of the continuous relaxation


                                                                  7
                          Continuous Bayesian Model Selection for Multivariate Causal Discovery

               SHD for 50 Variable ER4               SID for 50 Variable ER4                     F1 for 50 Variable ER4
       800
                                           2250
       600                                 2000                                         0.6

       400                                 1750
                                                                                        0.4
                                           1500
       200
                                           1250                                         0.2
             SD S
                CD
           NO M
            SC M
                 E
           P S




                                                  SD S
                                                     CD
                                                NO M
                                                 SC M
                                                      E
                                                P S




                                                                                             SD S
                                                                                                CD
                                                                                           NO M
                                                                                            SC M
                                                                                                 E
                                                                                           P S
                                     E




                                                                                E




                                                                                                                          E
               AR




         CG DiB




                                                    AR




                                              CG DiB




                                                                                               AR




                                                                                         CG DiB
              OR




                                                   OR




                                                                                              OR
                                     CD




                                                                             CD




                                                                                                                     CD
              CA
              GA




                                                   CA
                                                   GA




                                                                                              CA
                                                                                              GA
       TE




                                            TE




                                                                                       TE
     NO




                                          NO




                                                                                     NO
                                                               (a)
                   SHD for Syntren                      SID for Syntren                             F1 for Syntren
                                            300
       100
                                                                                        0.4
        80                                  200
        60                                                                              0.2
                                            100
        40
                                                                                        0.0
                 SD S
                   CD
               NO M
                SC M
                     E
               P S




                                                      SD S
                                                        CD
                                                    NO M
                                                     SC M
                                                          E
                                                    P S




                                                                                                  SD S
                                                                                                    CD
                                                                                                NO M
                                                                                                 SC M
                                                                                                      E
                                                                                                P S
                                     E




                                                                                E




                                                                                                                          E
         AR




             CG DiB




                                              AR




                                                  CG DiB




                                                                                         AR




                                                                                              CG DiB
                  OR




                                                       OR




                                                                                                   OR
                                     CD




                                                                             CD




                                                                                                                     CD
                  CA
                  GA




                                                       CA
                                                       GA




                                                                                                   CA
                                                                                                   GA
       TE




                                            TE




                                                                                       TE
     NO




                                          NO




                                                                                     NO
                                                               (b)

Figure 2: Box plots of metrics for different graph types: (a) Erdos-Renyi (ER) graphs with four expected edges per variable,
(b) Syntren data. Black dot is the average metric. Lower is better for SHD and SID, higher is better for F1.


in the CGP-CDE. However, the CGP-CDE still performs                  datasets in Appendix I.1.
competitively compared to other baselines.
                                                                     The full results are in Appendix I, and we show the 50 vari-
                                                                     able ER4 results in Figure 2a. Compared to the DGP-CDE
6.2. Synthetic Higher Variable                                       results of Section 6.1, we can expect a higher number of
Next, we analyse the performance on a higher number of               errors due to the continuous relaxation and the shift in the
variables with varying graph density. Here, performing               data generation process. Nevertheless, the CGP-CDE out-
discrete model comparison is too costly as the number of             performs all other baselines, especially in terms of SHD
DAGs is prohibitively large, so we use our continuous re-            and F1 scores, and the increase in performance compared
laxation, labelled CGP-CDE. We generate five datasets for            to the baselines is greater for these larger graphs. While
each graph size 50 using Erdos-Rényi (ER) and scale-free            both SDCD and CGP-CDE employ flexible function ap-
(SF) (Barabási & Albert, 1999) graph generation schemes,            proximators and the same acyclic regulariser, the superior
with expected total edge counts of 1D and 4D, respectively.          performance of CGP-CDE suggests that Bayesian methods
In ER graphs, each edge is generated independently, while            are more effective at distinguishing causal structures. In con-
SF graphs promote a few nodes with a high number of edges.           trast, the poor performance of DiBS (MAP estimation) can
To test our claim that Bayesian model selection allows for           be attributed to poor inference in Bayesian neural networks.
more flexible models, we ensure that the data is not gener-
ated from our model. The data is generated from randomly             6.3. Syntren
initialised neural networks with noise included as an input.
                                                                     Syntren is a gene-regulatory network simulator that gener-
Performing well in such cases showcases the advantage of
                                                                     ates gene expression data from real biological graphs. There
the added flexibility in the Bayesian approach. Data genera-
                                                                     are 10 datasets of 20 nodes with 500 samples each. The
tion details are in Appendix F. To show that our method also
                                                                     results on Syntren can be seen in Figure 2b. Here, the CGP-
performs well with a lower number of variables and samples,
                                                                     CDE outperforms other methods, especially in terms of the
we show results for a graph size of 20 in Appendix I.3 and
                                                                     SID and F1 scores.
Appendix I.2. We also perform an ablation study with ANM

                                                               8
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

7. Conclusion                                                         interventional data. Advances in Neural Information Pro-
                                                                      cessing Systems, 33, 2020.
In this work, we have shown why Bayesian model selec-
tion works, and that it is a highly effective approach for          Bühlmann, P., Peters, J., and Ernest, J. Cam: Causal additive
causal discovery in multivariable settings. Then, we pro-             models, high-dimensional order search and penalized
pose a scalable model that outperforms existing Bayesian              regression. The Annals of Statistics, 42(6), 2014.
and non-Bayesian methods across multiple settings. The
consistent performance of our approach highlights the ad-           Burt, D. R., Rasmussen, C. E., and Van Der Wilk, M. Con-
vantages of framing causal discovery as a Bayesian model              vergence of sparse variational inference in gaussian pro-
selection problem. We believe this perspective addresses a            cesses regression. Journal of Machine Learning Research,
critical limitation in causal discovery—namely, the inability         21(131), 2020.
to use flexible models, paving the way for more practical and
widely applicable causal inference in real-world scenarios.         Charpentier, B., Kibler, S., and Günnemann, S. Differ-
                                                                      entiable dag sampling. In International Conference on
                                                                      Learning Representations, 2021.
Impact Statement
                                                                    Chickering, D. M. Optimal structure identification with
This paper presents work whose goal is to advance the field
                                                                      greedy search. Journal of machine learning research, 3
of Machine Learning. There are many potential societal
                                                                      (Nov), 2002.
consequences of our work, none of which we feel must be
specifically highlighted here.                                      Cooper, G. F. and Herskovits, E. A bayesian method for the
                                                                      induction of probabilistic networks from data. Machine
Acknowledgements                                                      learning, 9, 1992.

R.S. was supported by the Wellcome Trust [222836/Z/21/Z].           Cundy, C., Grover, A., and Ermon, S. Bcd nets: Scalable
B.G. acknowledges the support of the UKRI AI programme,               variational approaches for bayesian causal discovery. Ad-
and the Engineering and Physical Sciences Research Coun-              vances in Neural Information Processing Systems, 34,
cil, for CHAI - EPSRC Causality in Healthcare AI Hub                  2021.
(grant no. EP/Y028856/1). A.K. is supported by UKRI
(grant number EP/S023356/1), as part of the UKRI Centre             Cvetković, D. M., Doob, M., and Sachs, H. Spectra of
for Doctoral Training in Safe and Trusted AI. A.D. acknowl-           graphs: Theory and application. Academic Press, 1980.
edges the support of G-Research’s March 2025 grant.
                                                                    Dhir, A., Power, S., and Van Der Wilk, M. Bivariate causal
                                                                      discovery using Bayesian model selection. In Proceed-
References                                                            ings of the 41st International Conference on Machine
Aldrich, J. Autonomy. Oxford Economic Papers, 41(1),                  Learning, volume 235 of Proceedings of Machine Learn-
  1989.                                                               ing Research. PMLR, 2024.

Annadani, Y., Pawlowski, N., Jennings, J., Bauer, S., Zhang,        Dutordoir, V., Salimbeni, H., Hensman, J., and Deisen-
  C., and Gong, W. BayesDAG: Gradient-based posterior                 roth, M. Gaussian process conditional density estimation.
  inference for causal discovery. In Thirty-seventh Confer-          Advances in neural information processing systems, 31,
  ence on Neural Information Processing Systems, 2023.                2018.
Barabási, A.-L. and Albert, R. Emergence of scaling in             Eggeling, R., Viinikka, J., Vuoksenmaa, A., and Koivisto, M.
  random networks. science, 286(5439), 1999.                          On structure priors for learning bayesian networks. In The
                                                                      22nd International Conference on Artificial Intelligence
Bauer, M., Van der Wilk, M., and Rasmussen, C. E. Under-
                                                                      and Statistics. PMLR, 2019.
  standing probabilistic sparse gaussian process approxima-
  tions. Advances in neural information processing systems,         Erdos, P., Rényi, A., et al. On the evolution of random
  29, 2016.                                                           graphs. Publ. math. inst. hung. acad. sci, 5(1):17–60,
Bello, K., Aragam, B., and Ravikumar, P. Dagma: Learn-                1960.
  ing dags via m-matrices and a log-determinant acyclicity
                                                                    Feuerriegel, S., Frauen, D., Melnychuk, V., Schweisthal,
  characterization. Advances in Neural Information Pro-
                                                                      J., Hess, K., Curth, A., Bauer, S., Kilbertus, N., Kohane,
  cessing Systems, 35:8226–8239, 2022.
                                                                      I. S., and van der Schaar, M. Causal machine learning for
Brouillard, P., Lachapelle, S., Lacoste, A., Lacoste-Julien,          predicting treatment outcomes. Nature Medicine, 30(4):
  S., and Drouin, A. Differentiable causal discovery from             958–968, 2024.

                                                                9
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

Friedman, J. H. Another approach to polychotomous classifi-           Janzing, D. and Schölkopf, B. Causal inference using the
  cation. Technical Report, Statistics Department, Stanford             algorithmic markov condition. IEEE Transactions on
  University, 1996.                                                     Information Theory, 56(10), 2010.

Friedman, N. and Koller, D. Being bayesian about network              Kass, R. E. and Raftery, A. E. Bayes factors. Journal of the
  structure. a bayesian approach to structure discovery in              american statistical association, 90(430), 1995.
  bayesian networks. Machine learning, 50, 2003.
                                                                      Ke, N. R., Bilaniuk, O., Goyal, A., Bauer, S., Larochelle,
Friedman, N. and Nachman, I. Gaussian process networks.                 H., Schölkopf, B., Mozer, M. C., Pal, C., and Bengio, Y.
  In Proceedings of the Sixteenth conference on Uncertainty             Learning neural causal models from unknown interven-
  in artificial intelligence, 2000.                                     tions. stat, 1050:23, 2020.

Geiger, D. and Heckerman, D. Parameter priors for directed            Ke, N. R., Chiappa, S., Wang, J. X., Bornschein, J., Goyal,
  acyclic graphical models and the characterization of sev-             A., Rey, M., Weber, T., Botvinick, M., Mozer, M. C., and
  eral probability distributions. The Annals of Statistics, 30          Rezende, D. J. Learning to induce causal structure. In
  (5), 2002.                                                            International Conference on Learning Representations,
                                                                        2022.
Guyon, I., Goudet, O., and Kalainathan, D. Evaluation
                                                                      Kingma, D. P. and Ba, J. Adam: A method for stochastic
  methods of cause-effect pairs. In Cause Effect Pairs in
                                                                        optimization. arXiv preprint arXiv:1412.6980, 2014.
 Machine Learning, chapter 2. Springer, 2019.
                                                                      Lachapelle, S., Brouillard, P., Deleu, T., and Lacoste-Julien,
He, K., Zhang, X., Ren, S., and Sun, J. Delving deep                    S. Gradient-based neural dag learning. In International
  into rectifiers: Surpassing human-level performance on                Conference on Learning Representations, 2019.
  imagenet classification. In Proceedings of the IEEE inter-
  national conference on computer vision, 2015.                       Lalchand, V., Ravuri, A., and Lawrence, N. D. Generalised
                                                                        gplvm with stochastic variational inference. In Proceed-
Heckerman, D. A bayesian approach to learning causal                    ings of The 25th International Conference on Artificial
  networks. In Proceedings of the Eleventh conference on                Intelligence and Statistics, 2022.
  Uncertainty in artificial intelligence, pp. 285–295, 1995.
                                                                      Lee, H.-C., Danieletto, M., Miotto, R., Cherng, S. T., and
Heckerman, D., Meek, C., and Cooper, G. A bayesian                      Dudley, J. T. Scaling structural learning with no-bears to
  approach to causal discovery. Innovations in Machine                  infer causal transcriptome networks. In Pacific Sympo-
  Learning: Theory and Applications, 2006.                              sium on Biocomputing 2020, pp. 391–402. World Scien-
                                                                        tific, 2019.
Hensman, J., Fusi, N., and Lawrence, N. D. Gaussian
  processes for big data. In Proceedings of the Twenty-               Li, H., Wu, K., Ruan, C., Pan, J., Wang, Y., and Long,
  Ninth Conference on Uncertainty in Artificial Intelligence,           H. Cost-reduction strategies in massive genomics experi-
  2013.                                                                 ments. Marine Life Science & Technology, 1, 2019.

Hicks, J. et al. Causality in economics. Australian National          Lippe, P., Cohen, T., and Gavves, E. Efficient neural causal
  University Press, 1980.                                               discovery without acyclicity constraints. In International
                                                                        Conference on Learning Representations, 2021.
Hoyer, P., Janzing, D., Mooij, J. M., Peters, J., and
  Schölkopf, B. Nonlinear causal discovery with additive             Lopez, R., Hütter, J.-C., Pritchard, J., and Regev, A. Large-
  noise models. Advances in neural information processing               scale differentiable causal discovery of factor graphs. Ad-
  systems, 21, 2008.                                                    vances in Neural Information Processing Systems, 35:
                                                                        19290–19303, 2022.
Huang, B., Zhang, K., Lin, Y., Schölkopf, B., and Glymour,
                                                                      Lorch, L., Rothfuss, J., Schölkopf, B., and Krause, A. Dibs:
  C. Generalized score functions for causal discovery. In
                                                                        Differentiable bayesian structure learning. Advances in
  Proceedings of the 24th ACM SIGKDD international con-
                                                                        Neural Information Processing Systems, 34, 2021.
  ference on knowledge discovery & data mining, 2018.
                                                                      MacKay, D. J. Comparison of approximate methods for
Immer, A., Schultheiss, C., Vogt, J. E., Schölkopf, B.,               handling hyperparameters. Neural computation, 11(5),
  Bühlmann, P., and Marx, A. On the identifiability and               1999.
  estimation of causal location-scale noise models. In In-
  ternational Conference on Machine Learning. PMLR,                   MacKay, D. J. Information theory, inference and learning
  2023.                                                                algorithms. Cambridge university press, 2003.

                                                                 10
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

Magnus, J. R. On differentiating eigenvalues and eigenvec-            Spirtes, P., Meek, C., and Richardson, T. Causal inference
 tors. Econometric theory, pp. 179–191, 1985.                           in the presence of latent variables and selection bias. In
                                                                        Proceedings of the Eleventh conference on Uncertainty
Montagna, F., Noceti, N., Rosasco, L., Zhang, K., and Lo-               in artificial intelligence, 1995.
 catello, F. Causal discovery with score matching on addi-
 tive models with arbitrary noise. In Conference on Causal            Spirtes, P., Glymour, C. N., and Scheines, R. Causation,
 Learning and Reasoning. PMLR, 2023.                                    prediction, and search. 2000.

Nazaret, A., Hong, J., Azizi, E., and Blei, D. Stable dif-            Stegle, O., Janzing, D., Zhang, K., Mooij, J. M., and
  ferentiable causal discovery. In Forty-first International            Schölkopf, B. Probabilistic latent variable models for
  Conference on Machine Learning, 2024.                                 distinguishing between cause and effect. Advances in
                                                                        neural information processing systems, 23, 2010.
Ormaniec, W., Sussex, S., Lorch, L., Schölkopf, B., and
  Krause, A. Standardizing structural causal models. arXiv            Titsias, M. Variational learning of inducing variables in
  preprint arXiv:2406.11601, 2024.                                      sparse gaussian processes. In Artificial intelligence and
                                                                        statistics. PMLR, 2009.
Pearl, J. Causality. Cambridge university press, 2009.
                                                                      Titsias, M. and Lawrence, N. D. Bayesian gaussian process
Peters, J. and Bühlmann, P. Identifiability of gaussian
                                                                         latent variable model. In Proceedings of the thirteenth
  structural equation models with equal error variances.
                                                                         international conference on artificial intelligence and
  Biometrika, 101(1), 2014.
                                                                         statistics. JMLR Workshop and Conference Proceedings,
Peters, J. and Bühlmann, P. Structural intervention distance            2010.
  for evaluating causal graphs. Neural computation, 27(3),
                                                                      Van den Bulcke, T., Van Leemput, K., Naudts, B., van Re-
  2015.
                                                                        mortel, P., Ma, H., Verschoren, A., De Moor, B., and
Peters, J., Janzing, D., and Schölkopf, B. Elements of causal          Marchal, K. Syntren: a generator of synthetic gene ex-
  inference: foundations and learning algorithms. The MIT               pression data for design and analysis of structure learning
  Press, 2017.                                                          algorithms. BMC bioinformatics, 7, 2006.

Rasmussen, C. and Ghahramani, Z. Occam’s razor. Ad-                   Walker, S., Damien, P., and Lenk, P. On priors with a
  vances in neural information processing systems, 13,                 kullback–leibler property. Journal of the American Sta-
  2000.                                                                tistical Association, 99(466), 2004.

Rasmussen, C. E. Gaussian processes in machine learning.              Walker, S. G. Modern bayesian asymptotics. Statistical
  In Summer school on machine learning. Springer, 2003.                Science, 2004.

Reisach, A., Seiler, C., and Weichwald, S. Beware of the              Wei, D., Gao, T., and Yu, Y. Dags with no fears: A closer
  simulated dag! causal discovery benchmarks may be easy               look at continuous optimization for learning bayesian
  to game. Advances in Neural Information Processing                   networks. Advances in Neural Information Processing
  Systems, 34, 2021.                                                   Systems, 33:3895–3906, 2020.

Rolland, P., Cevher, V., Kleindessner, M., Russell, C., Janz-         Williams, C. and Rasmussen, C. Gaussian processes for
  ing, D., Schölkopf, B., and Locatello, F. Score matching            regression. Advances in neural information processing
  enables causal discovery of nonlinear additive noise mod-            systems, 8, 1995.
  els. In International Conference on Machine Learning.
  PMLR, 2022.                                                         Williams, C. K. and Rasmussen, C. E. Gaussian processes
                                                                       for machine learning, volume 2. MIT press Cambridge,
Sachs, K., Perez, O., Pe’er, D., Lauffenburger, D. A., and             MA, 2006.
  Nolan, G. P. Causal protein-signaling networks derived
  from multiparameter single-cell data. Science, 308(5721),           Yu, Y., Chen, J., Gao, T., and Yu, M. Dag-gnn: Dag structure
  2005.                                                                 learning with graph neural networks. In International
                                                                        Conference on Machine Learning. PMLR, 2019.
Salimbeni, H., Eleftheriadis, S., and Hensman, J. Natural
  gradients in practice: Non-conjugate variational inference          Yu, Y., Gao, T., Yin, N., and Ji, Q. Dags with no curl: An
  in gaussian process models. In International Conference               efficient dag structure learning approach. In International
  on Artificial Intelligence and Statistics. PMLR, 2018.                Conference on Machine Learning. Pmlr, 2021.

                                                                 11
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

Zhang, K., Wang, Z., Zhang, J., and Schölkopf, B. On
  estimation of functional causal models: general re-
  sults and application to the post-nonlinear causal model.
  ACM Transactions on Intelligent Systems and Technology
  (TIST), 7(2), 2015.
Zheng, X., Aragam, B., Ravikumar, P. K., and Xing, E. P.
  Dags with no tears: Continuous optimization for structure
  learning. Advances in Neural Information Processing
  Systems, 31, 2018.
Zheng, X., Dan, C., Aragam, B., Ravikumar, P., and Xing,
  E. Learning sparse nonparametric dags. In Interna-
  tional Conference on Artificial Intelligence and Statistics.
  PMLR, 2020.




                                                                 12
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

A. Additional Background
A.1. Causal Model Basics
The causal model satisfies the Independent Causal Mechanism (ICM) assumption by construction     QD (Janzing & Schölkopf,
2010). Given a graph G, this means that changing a term in the causal factorisation of the joint i=1 Pi (Xi |XPAG (i) ) does
not change any of the other terms. This is achieved by assuming that the choice of conditional distributions for each variable
Xi from Ci|PAG (i) is independent of the choice for other variables Xj from Cj|PAG (j) with j ̸= i. This property is assumed
to hold in the causal factorisation but does not necessarily hold in any other factorisation of the joint (Peters et al., 2017).
This can be seen in the two variable system with graph X → Y . If the terms in P (X)P (Y |X) are chosen independently,
the choice of the terms in P (Y )P (X|Y ) are tied to each other. Changing P (X) or P (Y |X) in general will require changes
in both P (Y )P (X|Y ) to maintain equality.
As variables are dependent only on their parents in a graph by construction, a causal model satisfies the Markov assumption.
This states that d-separations in G between variables implies conditional independence between the same variables (Pearl,
2009). We also assume faithfulness: any conditional independences between variables are represented by d-separations in G
(Pearl, 2009). Together, faithfulness and Markov assumptions imply a one-to-one relationship between independences in the
distributions and d-separations in the graph (Peters et al., 2017). These assumptions are enough to recover a causal structure
from data up to a Markov equivalence class (MEC), that is, the class of causal structures that have the same d-separations.

A.2. Continuous Optimisation for Learning Causal Structure
Given a score (such as the likelihood or marginal likelihood) S, causal structure learning can be defined as an optimisation
problem over graphs (Zheng et al., 2018)

                                         G ∗ = argmax S(G) such that G ∈ DAGs.                                             (14)
                                                   G

That is, finding the graph that optimises the score under the constraint that the graph must be a valid DAG. This converts
causal structure learning into a single optimisation problem, tackling the scalability issue. However, ensuring that the graph
is acyclic is non-trivial with gradient based methods. Zheng et al. (2018) first solve this by encoding a graph as a weighted
adjacency matrix A ∈ RD×D   ≥0    and using a measure of acyclicity h(A) as a constraint. The function h : A → R≥0 is a
measure of the number of weighted directed walks that allow for returning to a starting node. Hence, h(A) = 0 implies that
there are no directed cycles in the adjacency A and that the graph implied by A is a valid DAG.
Numerous variations on this approach have been proposed to improve the scalability and stability of optimisation (Lee
et al., 2019; Bello et al., 2022; Wei et al., 2020; Nazaret et al., 2024). We use the spectral acyclicity constraint method
in Equation (12), which is equivalent to the largest eigenvalue magnitude of A, due to its stability and scalability (Lee
et al., 2019; Nazaret et al., 2024). This constraint uses the fact that A is acyclic if and only if all its eigenvalues are zero
(Cvetković et al., 1980).
The gradients of the spectral acyclicity constraint can be easily calculated as

                                                                   vd uTd
                                                       ∇h(A) =            ,                                                (15)
                                                                   vdT ud

where ud and vd are the right and left eigenvectors associated with λd (A) (Magnus, 1985). We follow the example of
Nazaret et al. (2024) and use the power iteration method to estimate these eigenvectors in O(d2 ) rather than finding them
exactly, which costs O(d3 ).
Equation (14) can now be written as an optimisation problem with the differentiable constraint h(A) = 0. Nazaret et al.
(2024) use a penalty method, writing the objective as:

                                                 argmax S(G A ) − γt h(A),                                                 (16)
                                                       A

where the weighting γt of the penalty h(A) is increased by ρ each epoch. A solution A∗ is found when h(A∗ ) < τ for
some convergence threshold τ > 0.

                                                              13
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

B. Proof of Distinguishability with Multiple Variables
Bayesian model selection uses the marginal likelihood (equivalent to the posterior over models) to distinguish between
Bayesian causal models with different causal graphs. Thus, following Dhir et al. (2024), we will provide conditions
such that two Bayesian causal models will have different distributions over marginal likelihood values. This implies that
there will always exist datasets such that the marginal likelihood values of two Bayesian causal models differ. We will
do this by defining two Bayesian causal models as Bayesian distribution-equivalent if they have the same distribution
over marginal likelihood values, and then provide conditions such that two Bayesian causal models cannot be Bayesian
distribution-equivalent. Note that this can be viewed as a version of observation equivalence (Pearl, 2009), but for Bayesian
causal models. If models are not observationally equivalent, they can be learnt from observational data (for example, by
using methods such as PC (Spirtes et al., 2000)). A similar reasoning holds for Bayesian distribution equivalence.
We split the proof into two parts, first, we will show that Bayesian model selection can effectively identify up to a Markov
equivalence class. This is known for certain classes of models, for example, curved exponential models (Chickering, 2002),
but it has not been shown for the general non-parametric case. Second, we will provide conditions such that two Bayesian
causal models within the same Markov equivalence class are not Bayesian distribution-equivalent. Here, there may be some
probability of error depending on the overlap of the posteriors that can be computed empirically. This second result is
implied by the result in Dhir et al. (2024, Proposition 4.7).
We define Bayesian distribution-equivalent models. These are the Bayesian counterparts of models that are unidentifiable.
That is, given any dataset, these models will achieve the same marginal likelihood score.
Definition B.1. (Dhir et al., 2024, Definition 4.4) Given two Bayesian causal models (MG , πG ), (MH , πH ), say they are
                                                                                                                   N
Bayesian distribution-equivalent
                                   if P (· | MG ) = P (· | MH ), i.e. for all N ∈ N, and for all xN , yN ∈ (X × Y) , it
              N   N                 N     N
holds that p x , y | MG = p x , y | MH .

We proceed by showing that two Bayesian causal models with graphs in different MECs cannot be Bayesian distribution
equivalent. Further, if the estimate of the Bayes factor (Kass & Raftery, 1995) (ratios of marginal likelihood) is consistent, it
can identify the correct graph.
Lemma B.2. Assume faithfulness and two Bayesian causal models (MG , πG ), and (MH , πH ). If G and H are in separate
Markov equivalence classes (MEC), then FG ∩ FH = ∅, where FG and FH are the sets of all joints expressible by MG and
MH respectively.

Proof. The Markov and Faithfulness assumptions together means that Xi ⊥   ⊥P Xj |Xk ⇐⇒ Xi ⊥     ⊥G Xj |Xk , where
⊥P denotes distributional independence, and ⊥
⊥                                           ⊥G signifies d-separation in graph G. Hence, as G and H are in separate
MECs, there exists some Xi ⊥                         ⊥H Xj |Xk . This implies that for every P ∈ FG , we have that
                             ⊥G Xj |Xk such that Xi ̸⊥
   ⊥P Xj |Xk , and for every Q ∈ FH we have that Xi ̸⊥
Xi ⊥                                                 ⊥Q Xj |Xk . Hence P ∈  / FH .

Theorem B.3. Assume faithfulness and two Bayesian causal models (MG , πG ), and (MH , πH ). If G and H are in separate
Markov equivalence classes (MEC), then they are not Bayesian distribution equivalent for any choices of priors πG , πH .
                                                                             (X N |MG )
Assume N samples are generated from one of the models. If the estimate PP (X   N |M ) is consistent as N → ∞, the
                                                                                    H
probability of error between these two models is 0.

Proof. The first claim follows directly from Lemma B.2 and Dhir et al. (2024, Proposition 4.5). Given that FG ∩ FH = ∅,
                                                                      (X N |MG )
only one of the models can be the true model. Consistency implies PP (X  N |M ) → ∞ if the data generating distribution
                                                                             H
                   N
                 (X |MG )
P ∈ FG , and PP (X N |M ) → 0 if the data generating distribution P ∈ FH (Walker, 2004). Hence, the marginal likelihood
                        H
is higher for the correct model for each distribution in the union of FG ∪ FH leading to a probability of error of 0.

Consistency in the above requires certain conditions on the prior (Walker et al., 2004, Theorem 1). Suppose the data is
generated from X N ∼ P0 , we require that for the correct model, suppose it is MG , the prior puts non-negligible mass
around P0 : πG ({P : KL[P0 ∥P ] < ϵ}) > 0 for all ϵ > 0 (Walker et al., 2004). Second, the posterior for both models
cannot paradoxically concentrate in a region of negligible prior mass: lim inf N KL[P0 ∥PN A ] ≥ ϵ for all ϵ > 0 where
A := {P : KL[P0 ∥P ] > ϵ}. PN A is the posterior (over N samples) computed from the prior but restricted to the set of
densities A, which are ϵ far from the true density P0 as measured by the KL-divergence (Walker, 2004). This condition

                                                               14
                            Continuous Bayesian Model Selection for Multivariate Causal Discovery

stops the wrong model (which has negligible prior mass around the true density) from concentrating around the true density
for a large enough sample size.
The condition for two causal models that FG ∩ FH = ∅ also holds when the causal models are identifiable (Guyon et al.,
2019, Ch. 2). Hence, Bayesian model selection can recover the causal structure if the causal models are identifiable.
Corollary B.4. Assume two Bayesian causal models (MG , πG ), and (MH , πH ) where the underlying causal models are
                                              (X N |MG )
identifiable: FG ∩ FH = ∅. If the estimate PP (X N |M ) is consistent as N → ∞, the probability of error between these two
                                                     H
models is 0.

Next, we consider the case of two Bayesian causal models where the two graphs are in the same MEC. Without restrictions,
it is well known that in this case there may exist distributions in two Bayesian causal models that can express a given dataset
(Pearl, 2009). Thus, the result from Lemma B.2 does not hold. The key idea that allows for distinction here is that the
ICM assumption (as represented by factorised priors) may only hold in the causal factorisation of a Bayesian causal model.
Further, the distributions of marginal likelihood values are sensitive to the ICM assumption. As the causal factorisation of
the two Bayesian causal models differs, they will have a different distribution over marginal likelihood values.
We first formalise the ICM assumption as the separability of the priors with respect to a certain factorisation of the joint.
Definition B.5. (Dhir et al.,Q2024, Definition 4.2) Given a Bayesian causal model (MG , πG ), a prior π is separable with
respect to CG if it factorises i∈V πi such that πi ∈ P(Ci|PAG (i) ), where P is the set of all distributions over an object.
                                                                           Q
That is, if π is separable with respect to CG , the joint can be written as i∈V Pi (Xi |XPAG (i) )π(dPi ), with Pi ∈ Ci|PAG (i) .
Separability of the prior (and hence the ICM condition) may hold in multiple factorisations. This is the case with normalised
linear Gaussian models (Dhir et al., 2024, Appendix D.2). To formalise this, we reiterate the notion of separability-
compatibility.
Definition B.6. (Dhir et al., 2024, Definition 4.6) Given two Bayesian causal models (MG , πG ), and (MH , πH ). Denote
Q: CG → CH a bijection such
γ                             Q that for any P ∈ CG such that Q := δ(P ) ∈ CH , there holds an equality of joint measures
   i∈V P i (Xi |X PAG (i) ) =  i∈V Qi (Xi |XPAH (i) ). The two Bayesian causal models are separable-compatible if: i) the
pushforward πG ◦ γ −1 is separable with respect to CH , ii) πH ◦ γ is separable with respect to CG .

The operation δ is simply the transformation by Bayes’ rule that transforms the factorisation according to G to the factorisation
according to H while ensuring the joint is the same. Separability-compatibility checks whether the prior separates according
to multiple factorisations. If it does, ICM holds in multiple factorisations.
Theorem B.7. Given two Bayesian causal models (MG , πG ), and (MH , πH ). If G and H are in the same Markov
equivalence classes (MEC), and the Bayesian causal models are not separable compatible, they cannot be Bayesian
distribution-equivalent. Further, assuming data is generated from one of the models, then the probability of error is less
than 50%.

Proof. The first statement follows directly from Dhir et al. (2024, Proposition 4.7). The probability of error in the two model
case can be written as (Dhir et al., 2024)
                                                    1
                                          P (E) =     (1 − TV[P (·|MG ), P (·|MH )]).                                         (17)
                                                    2
If the two models are not Bayesian distribution-equivalent, then TV[P (·|MG ), P (·|MH )] > 0. This implies that the
probability of error is less than 12 .

Theorem B.7 shows that if the ICM assumption only holds in the causal factorisation of the model (prior is only separable
with respect to the causal factorisation), then there will always exist datasets that give different marginal likelihood values for
the two Bayesian causal models. The above holds for any combination of Bayesian causal models with graphs in the same
MEC. Hence, the total probability of error for the comparison within an MEC will be less than that of a graph randomly
chosen from within the MEC (Friedman, 1996).

C. CGP-CDE Details
For our Bayesian causal model, we use the Gaussian process conditional density estimator (Dutordoir et al., 2018). We use a
sum of commonly used kernels Rasmussen (2003, Ch. 5), as outlined in Appendix C.1. We also apply variational inference

                                                                15
                                 Continuous Bayesian Model Selection for Multivariate Causal Discovery

to optimise the lower bound, as is standard for latent variable Gaussian process models (Dutordoir et al., 2018; Titsias &
Lawrence, 2010) and use inducing points with stochastic variational inference to improve data scalability (Hensman et al.,
2013). We outline the variational inference in Appendix C.2 and detail our optimisation schedule in Appendix C.3.

C.1. CGP-CDE Kernel
The ultimate aim of the approach is to find the causal graph that maximises the posterior probability. The choice of kernels
will be problem dependent and it is possible to carry out Bayesian model selection over the kernels themselves (Rasmussen,
2003, Ch. 5). To allow for good fits of a range of datasets, we use a sum of kernels that can express functions with a range of
lengthscales and roughness well.
The kernel for function fi is
                                                ki = klin,i + ksqe,i + km12,i + km32,i + krq,i ,                                 (18)
where each of the kernels is defined below (Williams & Rasmussen, 2006, Ch. 4). For all the kernels, θii is the hyperparameter
for the latent dimension.
klin,i is the linear kernel:
                                                               D
                                                               X
                                                    klin,i =          θlin,ij xj x′j + θlin,ii wi wi′ ,                          (19)
                                                               j̸=i

where θlin,ij indicates the j th dimension of hyperparameter θ lin,i .
ksqe,i is the squared exponential kernel
                                                                    !                             
                                         D                       ′ 2                         ′ 2
                                                        (x   − x   )
                                                                                                
                                 2
                                        X
                                                 2         j     j             2      (wi − wi ) 
                       ksqe,i = σsqe,i    exp −θsqe,ij                + exp −θsqe,ii               ,                            (20)
                                                             2                            2
                                           j̸=i


where θsqe is the precision parameter.
km12,i and km32,i are the Matérn12 and Matérn32 kernels with ν = 12 and ν = 32 respectively, with the general form
                   D
                   X 21−ν              √             ν       √             
           2
  kmν,i = σmν,i                   θmν,ij 2ν|xj − x′j | Kν θmν,ij 2ν|xj − x′j |
                          Γ(ν)
                   j̸=i

                                                                           21−ν        √             ν       √             
                                                                  2
                                                               + σmν,i            θmν,ii 2ν|wi − wi′ | Bν θmν,ii 2ν|wi − wi′ | , (21)
                                                                           Γ(ν)

where Γ(ν) is the gamma functions and Bν is a modified Bessel function. Similarly to the squared exponential kernel, θmν
is the precision parameter.
krq is the rational quadratic kernel, which is equivalent to the sum of many squared exponential kernels with different
precision hyperparameters (Williams & Rasmussen, 2006, Ch. 4),
                                                                !−ai                             
                                      D
                                                    (x   − x ′ 2
                                                               )                           ′ 2 −ai
                                                                                               
                               2 
                                     X
                                               2       j     j              2     (w i − w i )
                      krq,i = σrq,i      1 + θrq,ij                  + 1 + θrq,ii                  ,              (22)
                                                         2ad                           2ai
                                         j̸=i


where a is a hyperparameter that is learned.
                             2    2        2
The kernel variance terms σsqe , σmν and σrq mean individual kernels can be “switched off” by setting this term to zero if
they do not contribute to improving the evidence lower bound.
In all these kernels, the hyperparameter denoted by θ controls the variability of the function, as discussed in subsection 4.2.
This means as they tend to zero, the input and output of the function become decorrelated. To construct the adjacency matrix
in Equation 10, we sum these hyperparameters, so that


                                           θij = θlin,ij + θsqe,ij + θm12,ij + θm32,ij + θrq,ij .                                (23)

                                                                            16
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

C.2. CGP-CDE Lower Bound
We use a variant on the GP-CDE (Dutordoir et al., 2018) to define our causal model and define a prior over distributions.
Intractability in these models is commonly solved using variational inference (Lalchand et al., 2022; Dutordoir et al., 2018).
Each variable xi is modelled as a function of all other variables X¬i and latent variable wd plus some Gaussian noise,
parameterised by noise variance ϕ2i :
                                           xi = fi (X¬i , wi ) + ε, ε ∼ N (0, ϕ2i ).                                       (24)

The presence of the latent variable allows learning of non-Gaussian and heteroscedastic noise (Dutordoir et al., 2018). A
Gaussian process prior is placed on fi ,
                              p(fi |XPAGA (i) , Λi , wi ) = N (0, KΛi ((X¬i , wi ), (X¬i , wi )′ )),                       (25)
where XPAGA (i) are the parents of xi in A, and K is the kernel with set of hyperparameters denoted Λi . We denote kernel
hyperparameters that control dependence and are included in the adjacency matrix collectively as θ, while the rest as σ,
with Λ = {θ, σ}.
Different prior beliefs of the form of f can be expressed in the choice of kernel. To find the causal DAG with the highest
posterior, we need to maximise the marginal likelihood of each variable. This is written as
                                                       Z Z
                 log p(xi |XPAGA (i) , Λi , ϕi ) = log     p(xi |fi , ϕi )p(fi |XPAGA (i) , Λi , wi )p(wi )dwi dfi .


However, the latent variables wi appear non-linearly in p(fi |XPAGA (i) , Λi , wi ) making the calculation of
log p(xi |XPAGA (i) , Λi , ϕi ) analytically intractable.
The addition of inducing points ui , with corresponding inducing inputs Z i , helps both with the intractability of
log p(xi |XPAGA (i) , Λi , ϕi ) and scaling to large datasets (Titsias, 2009; Titsias & Lawrence, 2010). We can write the
joint between f and ui as:
                                                                          
                                                fi            0     Ki,ff Ki,fu
                                           p          =N         ,                   ,                               (26)
                                                ui            0 Ki,uf Ki,uu
where Kff is the covariance matrix between training data, Kuu is the covariance matrix between inducing points and Kfu
and Kuf are the covariance matrices between the two. Suppressing the hyperparameters and Z i for brevity, the marginal
likelihood can then be written as:
                                              Z Z
                  log p(xi |XPAGA (i) ) = log     p(xi |fi )p(fi |XPAGA (i) , wi , ui )p(wi )p(ui )dwi dfi dui .   (27)


where p(ui ) = N (0, Ki,uu ). This is still not tractable, so we use variational inference to define an evidence lower bound
(ELBO) to the marginal likelihood (Titsias, 2009). This is done by introducing a variational distribution q(fi , wi , ui ) and
rewriting the marginal likelihood as (suppressing conditioning terms for neatness):
                              Z Z Z
                                                                                              q(fi , wi , ui )
             log p(xi ) = log          p(xi |fi , ϕi )p(fi |ui , XPAGA (i) , wi )p(ui )p(wi )                  dui dwi dfi ,
                                                                                              q(fi , wi , ui )

The variational distribution takes the form (Titsias & Lawrence, 2010; Dutordoir et al., 2018):
                                          q(fi , wi , ui ) = p(fi |wi , ui )q(wi )q(ui ),                                  (28)

where q(ui ) = N (ui |mu,i , S u,i ) is the Gaussian variational distribution of inducing points ui and q(wi ) = N (µi , Σi ) is
the variational distribution of wi .
Rearranging and using Jensen’s inequality, we can then get the lower bound for variable d as (Dutordoir et al., 2018)
                                D                      E
                   log p(xi ) ≥ ⟨log p(xi |fi )⟩q(fi )     − KL[q(u)||p(u)] − KL[q(wi )||p(wi )],                     (29)
                                                         q(wi )


                                                                  17
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery
               R
where q(fi ) = p(fi |u, wi )q(u)du. We denote the lower bound for variable Xi as LELBO,i (qi , Λi , ϕi ). The full lower
                                    PD
bound then is LELBO (q, Λi , ϕi ) := i=1 LELBO,i (qi , Λi , ϕi ), remembering Λ = {θ i , σ i }.
By incorporating the optimal Gaussian variational distribution q(u), which can be calculated in closed form, it is possible
to collapse the bound by integrating out the inducing variables (Titsias, 2009; Titsias & Lawrence, 2010). However, the
computational complexity of this approach is O(N M 2 D), meaning for large values of N training becomes infeasible
(Lalchand et al., 2022). To allow our method to scale to large datasets, we follow the approach of Hensman et al. (2013)
and keep q(u) uncollapsed so that stochastic variational inference can be used. This means the data can be mini-batched
in training, reducing the computational complexity to O(M 3 D). To further improve computational efficiency, we use
an encoder to learn a function gq,i : (xbatch ) 7→ (µi , Σi ) for the variational distribution q(wi ) = N (µi , Σi ), where
xbatch ∈ Rb×D is a batch of data points, µi ∈ Rb and Σi ∈ Rb for batch size b (Dutordoir et al., 2018). This is more efficient
than the alternative of learning N parameters. We use a multi-layer perceptron for the encoder and list the hyperparameters
used in Table 1.

                      Table 1: Hyperparameters for the variational encoder gq,i : (xbatch ) 7→ (µi , Σi ).

                                                     Parameter          Value
                                                 hidden layer size      128
                                                 number of layers        5
                                                activation function    ReLU


Other hyperparameters: We follow common practice and maximise the lower bound with respect to the hyperparameters
σ and ϕ as well (Rasmussen, 2003) (along with θ and q). This is justified based on the fact that the posterior for these
hyperparameters tends to be highly peaked in practice (MacKay, 1999). Thus, a Laplace approximation can be approximated
by the maximum value.

C.3. Optimisation schedule
We split the training schedule up into three steps. The warm-up phase allows the model to learn conditional independences
present in the data. In the acyclic constraint phase, where a penalty method is used to enforce the DAG constraint, the model
then learns the direction of any edges. The learnt DAG is then enforced, and the ELBO is optimised in the cool-down phase
to find the ELBO of the final model, which can then be used for comparing random restarts.

Warm-up phase: The warm-up phase allows the model to learn any conditional independences from the data. It also
ensures the hyperparameters and variational parameters of the Gaussian process are at reasonable values at the beginning of
the acyclic phase. Although the number of iterations needed will depend on the problem at hand, we found T0 = 25, 000
iterations for this phase sufficient to ensure convergence.

Acyclic constraint phase: After the warm-up phase has concluded, a lot of the edges corresponding to conditional
independences are switched off. However, for variables that are correlated, the causal direction has not been decided. This
part of the training forces the constraint that the final graph has to be acyclic. The loss is

                              LELBO (q, θ, σ, ϕ) := LELBO (q, θ, σ, ϕ) + log p(θ) − γt h(A),                             (30)

is optimised, using the acyclic regulariser proposed by Nazaret et al. (2024). The weighting γt of the acyclic penalty term
h(A) is increased linearly each epoch by ρ = 50, starting from 0. As we use minibatching, one epoch is a full pass through
the dataset. For some of the 50 variable datasets, we increased this to ρ = 250 to reduce the time required to train. This
is because the unconstrained loss scales with the number of variables, so for the 50 variable dataset, a higher ρ ensures a
higher ratio between the acyclic constraint and the rest of the loss, ensuring faster convergence.
We use 50 power iterations to approximate the eigenvectors required to calculate the gradients of the acyclic constraint, as
described in Appendix A.2. The acyclic constraint phase is terminated when h(Aθt ) < τ where τ = 0.005, or the number
of iterations exceeds a maximum value of Ta = 50, 000.

                                                              18
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

Acyclic thresholding: After the end of the acyclic phase, the values of the hyperparameters are sometimes not exactly 0
due to numerical precision, we find the adjacency matrix with an extra thresholding step. Following Lachapelle et al. (2019),
we threshold weights to 0, starting with the lowest weight, until the adjacency is exactly acyclic (h(Aθt ) = 0).


Cool-down phase: We found that random restarts helped tackle local optima in optimisation Appendix C.4. To allow for
the comparison of ELBO values across restarts (see Appendix C.4) we continue training the found acyclic DAG for Tf
iterations. This ensured that the found ELBO approximates the ELBO of the final resultant DAG. As some hyperparameters
may have been pushed to extreme values by the acyclic threshold if competing with an anti-causal edge, we reinitialise the
hyperparameters of the edges that are still active to their initial value. This reduces the number of iterations needed for the
cool-down phase. We found that Tf = 25, 000 cool-down iterations sufficed here.


Final matrix thresholding: Finally, we perform an extra thresholding step to remove edges that do not encode correlations.
As our data is normalised, we check the kernel evaluation of points −3 and 3, which should bound 95% of the data. If the
function is highly correlated between these points, it is effectively constant for 95% of the data. We thus threshold the linear
variances to 10−4 and the graph parameters (the rest of the kernels) to 0.05, which corresponds to a lengthscale of 20. These
values ensure that points between −3, 3 are highly correlated.

C.4. Random Restarts
The main principle behind our method is to find the graph that maximises the marginal likelihood (or a lower bound to
it). Maximising the ELBO with respect to the hyperparameters Λ in Gaussian process models is known to suffer from
local optima issues (Rasmussen, 2003, Ch. 5). The final hyperparameters found, and hence the adjacency matrix, can be
dependent on the initialisation of the hyperparameters. To mitigate this, we use a widely adopted technique of performing
random restarts (Dhir et al., 2024). We optimise the loss L starting from multiple initialisations (this can be done in parallel)
Nr times. Then we pick the graph that achieves the highest LELBO as the candidate for the most likely graph. Adding more
random restarts for the CGP-CDE should improve performance, as shown for the DGP-CDE Appendix D.1.

Algorithm 1 Optimisation procedure for the Causal GP-CDE.
Input: Data X, number of random restarts Nr , acyclic penalty weighting update ρ, threshold τ , acyclic penalty weighting
         γt = 0 initial Λ = {θ, σ}
Result: Most likely adjacency matrix A∗
Initialise empty list graphscore
for i = 1 to Nr do
     for j = 1 to T0 do
         Update q, Λ by maximising L (Equation (30))
     end
     t←0
    while h(Aθt ) > τ and t < Ta do
         Update q, Λ by maximising L (Equation (30))
         t←t+1
         if epoch ended then
             γt ← γt + ρ
         end
     end
end
Set γt to 0
Threshold Aθt starting from lowest weight until h(Aθt ) = 0
for k = 1 to Tf do
     Update q, Λ by maximising L (Equation (30))
end
Append (Aθ , L) to graphscore.
A∗ ← Aθ from graphscore with the maximum L.



                                                               19
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

C.5. Hyperparameter Priors
As discussed in Section 4.3, we can place priors on the graphs by placing priors on the hyperparameters θ of the CGP-
CDE. For our implementation, we place a prior on θ that favours sparser graphs. Specifically, we use the Gamma prior
P (θ) = Gamma(η, β), where η is the shape parameter and β is the rate parameter. For all experiments, we set η = 1 and
β = 10. Our hyperparameters for the priors were heuristically chosen and give log probabilities that are a fraction of the rest
of the loss.

C.6. Implementation Details
In this section, we outline the details of our implementation.

Hyperparameter initialisations We initialise the hyperparameters θ ∼ Uniform(0.01, 1), except θlin = 0.25. All kernel
variances σ are initialised to 1 so they all have the same initial weighting and likelihood variance initialised as ϕ2 = κ12
where κ ∼ Uniform(50, 100). The a term in the rational quadratic kernel is initialised as a ∼ Uniform(0.1, 10).

Variational parameters We use 400 inducing points for all datasets as we found this a reasonable trade off between
computation time and accuracy. We initialise our inducing point locations at a subset of the data inputs. We use a multilayer
                                                                                                        Table 1. The encoder
perception for the latent variable encoder, as described in Appendix C.2, with hyperparameters listed inq
                                                                                                                 2
weights are initialised from a truncated normal distribution centred on 0 with a standard deviation of ( hidden layer size ) (He
et al., 2015).

Loss calculation We use a minibatch size of 256 to calculate the loss. We take 50 Monte Carlo samples to integrate out
the latent variables wi = N (µi , Σi ).

Acyclic constraint penalty The acyclic constraint penalty has three hyperparameters: the coefficient to linearly increase
the weighting of the penalty term by, ρ, the threshold value for the acyclicity, τ , and the number of power iterations used
to approximate the eigenvectors for the gradients of the acyclic constraint. We tuned these variables using five datasets
generated from 10 variable ER1.5 graphs. We chose 50 power iterations, as it led to better performance than smaller
numbers of iterations and after 50 we saw minimal improvement. For the 10 variable ER1.5 datasets, we found ρ = 50
and τ = 0.005 leads to the best performance across SHD, SID and F1, while still converging in a reasonable amount of
time. However, as the number of variables scaled, this value of ρ took prohibitivelyP    long, except for the Syntren dataset.
                                                                                           D
This is because the ELBO scales with the number of variables, LELBO (q, Λi , ϕi ) := i=1 LELBO,i (qi , Λi , ϕi ). Therefore,
for the 3, 20 and 50 variable datasets we scale ρ with the number of variables, such that ρ = 5D. This ensures the relative
magnitude of the ELBO and the acyclic penalty remains roughly the same, meaning the time for the acyclic constraint phase
to converge is not dependent on the number of variables. We did not find scaling ρ affected the performance, but it did speed
up the acyclic phase.

Optimisers Each optimisation step consists of two steps. First, we optimise the parameters of the variational distribution
of inducing points q(ui ) = N (ui |mu,i , S u,i ) using natural gradients, which have been shown to significantly improve
training time for variational Gaussian processes (Salimbeni et al., 2018). We linearly increase the natural gradient step size
from 0.0001 to 0.1 for the first five iterations, and then use a step size of 0.1. Second, we optimise the Gaussian process
hyperparameters using Adam with a learning rate of 0.05 (Kingma & Ba, 2014).

Random restarts We did as many random restarts as we had computational resources for. This means we did 2 restarts
for the three-variable dataset, 2 restarts for each of the 50 variable datasets and the Syntren dataset, and 1 restart for the 20
variable datasets.

D. DGP-CDE Details
In Section 6.1 we introduce the discrete Gaussian process conditional density estimator (DGP-CDE), which is used to
enumerate every possible causal structure for the 3 variable case. For this, a separate DGP-CDE is trained for each of the 25
possible causal graphs, with the Gaussian process prior for each variable defined in Equation (9). The DGP-CDE differs
from the CGP-CDE in that it only takes XPAG (i) as inputs, whereas the CGP-CDE takes X¬i as inputs and then learns the

                                                               20
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

adjacency matrix.

                    PD is fixed for the DGP-CDE there is no acyclic penalty, so the loss function is just the lower bound
As the adjacency matrix
LELBO (q, Λ, ϕ) := i=1 LELBO,i (qi , Λi , ϕi ). When all 25 separate DGP-CDE models have been trained, the most likely
graph is selected by choosing the model with the highest marginal likelihood.

D.1. Implementation Details
Loss Calculation As the DGP-CDE is limited in the number of variables it can model by the need to enumerate over all
graphs, there is no need to make the lower bound scalable using the methods discussed in Appendix C.2 (Hensman et al.,
2013). Instead, we use the collapsed version of the lower bound, which can be calculated in closed form (Titsias, 2009).

Kernels We use a sum of a linear kernel defined in Equation (19) and a squared exponential kernel defined in Equation (20).
This kernel means the kernel expectations needed to calculate the lower bound can be computed in closed form.

Hyperparameters The kernel variances are initialised as σ i = 1, the likelihood variance is randomly sampled as
ϕ2i ∼ Uniform(10−4 , 10−2 ) and the precision parameter θ i ∼ Uniform(1, 100).

Variational parameters As the enumeration over graphs is computationally expensive, we use 200 inducing points, which
we found to be sufficient. As we are not using stochastic variational inference (Hensman et al., 2013) for the DGP-CDE,
we can no longer mini-batch, so don’t use a multilayer perceptron for the latent variables. Instead, we initialise the latent
variable mean as µi = 0.1xi and standard deviation is randomly sampled Σi ∼ Uniform(0, 0.1).

Optimisation Schedule The use of the collapsed bound for the DGP-CDE requires a different optimisation schedule than
for the CGP-CDE. This consists of a two part optimisation scheme. Due to the loss function being highly non-convex and
suffering from local optima, the first step of the optimisation scheme uses Adam (Kingma & Ba, 2014) with a learning rate
of 0.05 to get into a good region of the decision space. Once the loss function reaches the value a noise model would have,
the optimisation scheme switches to the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm to perform gradient descent
for the final part of the optimisation.

Random Restarts We did 10 random restarts for each DGP-CDE, selecting the one with the best lower bound for our final
result. We analysed the effect of the random restarts by permuting the order of the random restarts and plotting, in Figure 3,
the mean and standard deviation of the SHD, SID and F1 across permutations as the number of restarts increases. From the
plot, it is clear that as the number of random restarts increases, the mean value of the metrics, on average, improves. This is
because more random restarts allow a more thorough exploration of the loss function. It also shows that a higher value of
LELBO does lead to better causal structure discovery.

E. Data Standardisation
For additive noise models, it has been shown that when data is sampled from a simulated DAG and not normalised, the
marginal variance tends to increase along the causal order (Reisach et al., 2021). When this is the case, it is possible to, at
least partially, determine the causal order by ranking the marginal variance of variables. Reisach et al. (Reisach et al., 2021)
demonstrate that commonly used synthetic datasets often have this property, meaning a simple baseline method based on
variance sorting and regression can perform as well as some recent continuous structure learning algorithms. This variance
can be manipulated by rescaling (such as changing measurement units), which would then give a different causal order. As
such, results that take advantage of the variance may be sensitive to measurement scales. Such effects may also persist in
real-world datasets due to the measurement scale used.
To get rid of these effects, we standardise all datasets before applying any of the causal discovery methods discussed in this
paper. For the synthetic datasets, we also normalise each variable during the data generating process. This has been shown
to create graphs that are not Var-sortable or R2 -sortable, meaning the causal order cannot be determined using variances and
correlation artefacts (Ormaniec et al., 2024). This means our results for the baselines don’t match the results reported in the
original papers for similar datasets (Montagna et al., 2023; Lachapelle et al., 2019; Rolland et al., 2022) (note that some of
these works also define SHD of an anti-causal edge as 1 where we define it as 2).

                                                              21
                           Continuous Bayesian Model Selection for Multivariate Causal Discovery

                    SHD                                       SID                                        F1
 0.6                                      0.55                                      0.90

                                          0.50                                      0.88
 0.5
                                          0.45                                      0.86
 0.4                                      0.40                                      0.84

                                          0.35                                      0.82
 0.3
                                                                                    0.80
       0     2       4     6        8            0     2       4     6        8            0     2       4     6        8
           Number of Random Restarts                 Number of Random Restarts                 Number of Random Restarts

Figure 3: Effect of adding random restarts for the DGP-CDE. We record the metrics (SHD, SID and F1) for the restart
with the lowest loss out of a growing set of restarts, starting with one restart and adding one restart at a time. We randomly
permute the order in which the random restarts are added 50 times and plot the mean and standard deviation for each of the
metrics. This shows that, on average, increasing the number of random restarts improves performance.


F. Data Generation Details
3 Variable Synthetic Data: For each of the six distinct causal structures for three variables (up to permutations of the
variables), we generated five datasets, each with 1000 samples. The data was generated by sampling a GP-CDE with a
sum of a linear kernel and one other kernel randomly selected out of Matérn12, Matérn32, Matérn52, squared exponential
and rational quadratic. The kernel hyperparameters are sampled from σ i ∼ Uniform(1, 100) and θ i ∼ Gamma(1.5, 1)
while the other parameters are sampled as ϕi ∼ Uniform(0.01, 1) and wi ∼ N (0, 1). The data is then sampled from this
GP-CDE.

20 & 50 Variable Synthetic Data: For both 20 and 50 nodes, we create synthetic graphs using the ER (Erdos et al., 1960)
and SF (Barabási & Albert, 1999) sampling schemes, with expected edges of one and four to simulate sparse and dense
graphs. For each graph type, we generate five random graphs. Data is then generated for each node Xi using


                                                 Xi := fiN N (XPAG (i) , ϵi ),                                              (31)
where PAG (i) are the parents of Xi and ϵi ∼ N (0, 1) is sampled from ϵi ∼ N (0, 1). f N N is a randomly initialised neural
network with two layers, 128 units and ReLU activation functions. For each graph, we sample 1000 data points. This
data generating scheme ensures that the final data is generated from a complicated distribution which does not directly
correspond to any of the models.

Syntren Dataset: Syntren is a synthetic data generator that approximates real transcriptional regulatory networks (Van den
Bulcke et al., 2006). Networks are selected from previously described transcriptional regulatory networks. Relationships
between the genes are based on the Michaelis-Menten and Hill enzyme kinetic equations. The kinetic equations contain
some biological noise and some lognormal noise is added on top. We use the data generated by Lachapelle et al. (2019).
This contains 10 datasets of 500 samples, each with 20 nodes. The data was generated using the syntren data generator
(Van den Bulcke et al., 2006), using the E. coli network with the default parameters except for the probability for complex
2-regulator interactions, which was set to one (Lachapelle et al., 2019).

G. Details about Baselines
SCORE & NoGAM: For SCORE (Rolland et al., 2022) and NoGAM (Montagna et al., 2023) we use the implementation
in the dodiscover package https://github.com/py-why/dodiscover. SCORE and NoGAM have very similar
hyperparameters, and for both methods, we use the values of ridge regression suggested by Montagna et al., which they

                                                              22
                          Continuous Bayesian Model Selection for Multivariate Causal Discovery

tuned to minimise the generalisation error on the estimated residuals (Montagna et al., 2023). We also use the values
suggested by the authors for both methods for all the hyperparameters for the Stein gradient, Hessian estimators and CAM
pruning step except for the cutoff value for the CAM pruning step which we set to 0.01 as is standard for CAM and follows
Montagna et al. (Montagna et al., 2023). NoGAM has the additional hyperparameter of number of cross validation models,
for which we use the preset value of five.

CAM: For CAM, we preliminary neighbourhood selection and DAG pruning method with a cutoff value of 0.001 for
the edge pruning as suggested by the authors (Bühlmann et al., 2014). We used the implementation in the https:
//github.com/kurowasan/GraN-DAG repository.

NOTEARS: For NOTEARS, we used the implementation provided in https://github.com/azizilab/sdcd,
which uses binary search to find the adjacency matrix threshold that gives the largest possible DAG. This procedure has
been found to give better performance than the default threshold of 0.3 in the original NOTEARS paper (Nazaret et al.,
2024; Lopez et al., 2022).

SDCD: Nazaret et al. did not tune their hyperparameters for every dataset, instead using the same hyperparameter values,
which were found to perform well empirically, for all their experiments (Nazaret et al., 2024, Appendix C.2). We use these
same hyperparameter values and their implementation provided in https://github.com/azizilab/sdcd.

DiBS: We use the non-linear model provided by the authors in https://github.com/larslorch/dibs/. For
graph priors, we use the ER prior for the ER graphs and SF prior for the SF graphs, Syntren and the three variable
baseline. This is because SF more closely matches the structure of the Syntren and the three variable datasets. For the other
hyperparameters we use the values fine-tuned by the authors, including an observational noise of 0.1 and 3000 optimisation
steps. The authors fine-tuned different values for the bandwidths of the kernel and slope of the linear schedule depending
on the number of variables. We use these values, which are listed in (Lorch et al., 2021, Appendix E.3). DiBS typically
returns a posterior over DAGs using Stein variational gradient descent. When a single particle is used, this becomes the
MAP estimate of the graph. Therefore, as we wish to compare to our method, which returns a MAP estimate, we use one
particle for DiBS, and perform five random restarts, selecting the one with the highest marginal likelihood value.

Random: For the three variable dataset, we include uniform random sampling of DAGs. To compute this, for each ground
truth graph, we enumerate all 25 possible graphs and evaluate their performance metrics. This exhaustive enumeration
ensures that our results approximate those obtained in the limiting case where the number of sampled DAGs tends to infinity.

H. Code Availability & Computational Resources
Code and data to replicate the experiments in this paper can be found at https://github.com/Anish144/
ContinuousBMSStructureLearning. The experiments in this paper were run on A100 and RTX 4090 GPUs.

I. Additional Experiments
I.1. 20 Variable ER4 Comparison with Additive Noise Model
Our model is more expressive than previous methods, many of which rely on the additive noise assumption. Here, we answer
the following question: If the dataset is generated from an ANM model, how does our more expressive model perform?
To test this, we introduce the CGP, which is the same as the CGP-CDE model (Section 4), except that it is restricted to
an additive noise model. This is done by simply removing the latent variable w in Equation (8). The likelihood then is a
Gaussian, hence an ANM model. Removal of the latent variable also means that inference is more accurate in this model
than the CGP-CDE, however at the cost of a loss of flexibility. All the settings of the CGP model are exactly the same as in
Appendix C.
Figure 4a shows the performance on five datasets generated from 20 variable ER4 graphs with Gaussian process functional
relations. Thus, the datasets were generated from an additive noise model. It is worth noting that the CGP outperforms
other methods that make the ANM assumption, such as CAM, SCORE, NOGAM, DiBS, and SDCD. Despite being more
expressive than the CGP model, the CGP-CDE model performs on par with the CGP model. This shows that with the

                                                             23
                          Continuous Bayesian Model Selection for Multivariate Causal Discovery

        SHD for 20 Variable ER4 ANM              SID for 20 Variable ER4 ANM              F1 for 20 Variable ER4 ANM
  120                                     350
                                                                                    0.6
  100                                     300
   80                                                                               0.4
                                          250
   60
                                          200                                       0.2
   40
     SD S
        CD
   NO M
    SC M
 CG D E
   P iBS




                                              SD S
                                                 CD
                                            NO M
                                             SC M
                                          CG D E
                                            P iBS




                                                                                       SD S
                                                                                          CD
                                                                                     NO M
                                                                                      SC M
                                                                                   CG D E
                                                                                     P iBS
                               E




                                                                        E




                                                                                                                 E
                               P




                                                                        P




                                                                                                                 P
       AR




                                                AR




                                                                                         AR
      OR




                                               OR




                                                                                        OR
                            CG




                                                                     CG




                                                                                                              CG
                            CD




                                                                     CD




                                                                                                              CD
      CA
      GA




                                               CA
                                               GA




                                                                                        CA
                                                                                        GA
    TE




                                             TE




                                                                                      TE
NO




                                        NO




                                                                                NO
                                                            (a)
           SHD for 20 Variable ER4                  SID for 20 Variable ER4                  F1 for 20 Variable ER4
                                          350                                       0.8
  100
   80                                     300
                                                                                    0.6
   60                                     250
                                                                                    0.4
   40                                     200
   20                                                                               0.2
       SD S
          CD
     NO M
      SC M
   CG D E
     P iBS




                                                SD S
                                                   CD
                                              NO M
                                               SC M
                                            CG D E
                                              P iBS




                                                                                         SD S
                                                                                            CD
                                                                                       NO M
                                                                                        SC M
                                                                                     CG D E
                                                                                       P iBS
                               E




                                                                        E




                                                                                                                 E
                               P




                                                                        P




                                                                                                                 P
         AR




                                                  AR




                                                                                           AR
        OR




                                                 OR




                                                                                          OR
                            CG




                                                                     CG




                                                                                                              CG
                            CD




                                                                     CD




                                                                                                              CD
        CA
        GA




                                                 CA
                                                 GA




                                                                                          CA
                                                                                          GA
 TE




                                          TE




                                                                                   TE
NO




                                        NO




                                                                                NO
                                                            (b)

Figure 4: 20 variable ER4 graphs, with data generated from (a) an additive noise model (Gaussian process) and (b) a
non-additive noise model (neural network) as described by Equation (31). Black dot is the average metric. Lower is better
for SHD and SID, and higher is better for F1. Despite the CGP-CDE being more expressive than the CGP, it is still able
to perform comparably for the ANM dataset, demonstrating the added flexibility of the CGP-CDE does not hinder the
performance on datasets generated from restricted models.




added flexibility of our model, we do not lose performance on datasets generated from restricted models. This is due to the
Occam’s razor effect of Bayesian model selection, which allows for expressing simpler models when the data requires it
(Rasmussen & Ghahramani, 2000).
For comparison, Figure 4b shows results for five 20 variable ER4 non-additive noise datasets generated using a neural
network as described in Equation (31). Here, the CGP-CDE outperforms the CGP due to its more flexible functional
assumptions. Also, the CGP outperforms the other ANM methods, showing the benefit of the Bayesian model selection
approach even when restrictive functional assumptions are made.

I.2. 20 Variable with Different Numbers of Samples Results
To investigate the effect of the number of samples on the performance of the models, we performed experiments on five
20 variable ER4 graphs, with 100, 500 and 1000 random samples. These results are shown in Figure 5. The CGP-CDE
generally outperforms the other methods for metrics and numbers of samples, except for with 100 samples, where CAM
performs slightly better and NoGAM and SCORE perform comparatively, however, the CGP-CDE outperforms these
methods on SID and F1.

                                                            24
                                Continuous Bayesian Model Selection for Multivariate Causal Discovery

                  SHD for 20 Variable ER4                        SID for 20 Variable ER4                           F1 for 20 Variable ER4
                                                     350                                               0.8
      125
      100                                            300                                               0.6
SHD




                                               SID




                                                                                                  F1
      75                                             250                                               0.4
      50
                                                     200                                               0.2
      25
            100             500             1000           100            500              1000              100            500             1000
                        No. Samples                                   No. Samples                                       No. Samples
                                                                       Model
            NOTEARS               SDCD                CAM               NOGAM                 SCORE                    DiBS           CGP-CDE

Figure 5: 20 variable ER4 graphs with data generated for 5 graphs as described by Equation (31). The x axis is the number
of samples per graph, the circular markers are the mean and the vertical lines show the standard error across graphs. Lower
is better for SHD and SID, higher is better for F1.


I.3. 20 Variable Results
To show the CGP-CDE performs well with a smaller number of variables on a range of graph types and densities,
we performed experiments on 20 variable graphs with the following graph types and densities: ER1 (Figure 6a), ER4
(Figure 4b), SF1 (Figure 6b), and SF4 (Figure 6c). These results show the CGP-CDE consistently performs well, although it
is outperformed on some metrics for the ER1 and SF1 graphs, particularly by NOGAM, which seems to perform better on
sparser graphs, perhaps because it is an ordering based method. However, the CGP-CDE is more consistent in performance
than NOGAM across all our experiments with varying number of variables and graph types.

I.4. Full 50 Variable Results
To demonstrate the performance of the CGP-CDE on a range of graph types and densities, we performed experiments on 50
variable graphs with the following graph types and densities: ER1, ER4, SF1, and SF4. The results of these experiments
can be seen in Figure 7. These results show the CGP-CDE consistently performs well. For the ER graphs, the CGP-CDE
outperforms all the baselines on SHD, SID and F1. For the SF graphs, where a few variables cause the rest of the variables,
some of the baselines outperform the CGP-CDE on SID. We hypothesise this is because the structure of the SF graphs
benefits methods that use topological search, such as NOGAM and SCORE. However, the CGP-CDE greatly outperforms
these methods on SHD and F1 for both the SF graph densities.




                                                                         25
                          Continuous Bayesian Model Selection for Multivariate Causal Discovery




               SHD for 20 Variable ER1              SID for 20 Variable ER1              F1 for 20 Variable ER1
        40                                                                      0.8
                                           100
        30                                  80                                  0.6
                                            60
        20                                                                      0.4
                                            40
        10                                  20                                  0.2
             SD S
                CD
           NO M
            SC M
                 E
           P S




                                                 SD S
                                                    CD
                                               NO M
                                                SC M
                                                     E
                                               P S




                                                                                     SD S
                                                                                        CD
                                                                                   NO M
                                                                                    SC M
                                                                                         E
                                                                                   P S
                                     E




                                                                          E




                                                                                                                  E
               AR




         CG DiB




                                                   AR




                                             CG DiB




                                                                                       AR




                                                                                 CG DiB
              OR




                                                  OR




                                                                                      OR
                                   CD




                                                                        CD




                                                                                                            CD
              CA
              GA




                                                  CA
                                                  GA




                                                                                      CA
                                                                                      GA
       TE




                                           TE




                                                                                TE
     NO




                                         NO




                                                                              NO
                                                           (a)
               SHD for 20 Variable SF1              SID for 20 Variable SF1              F1 for 20 Variable SF1
        40                                 200
                                                                                0.6
        30                                 150
                                                                                0.4
        20                                 100

        10                                  50
                 SD S
                   CD
               NO M
                SC M
                     E
               P S




                                                     SD S
                                                       CD
                                                   NO M
                                                    SC M
                                                         E
                                                   P S




                                                                                          SD S
                                                                                            CD
                                                                                        NO M
                                                                                         SC M
                                                                                              E
                                                                                        P S
                                     E




                                                                          E




                                                                                                                  E
         AR




             CG DiB




                                             AR




                                                 CG DiB




                                                                                 AR




                                                                                      CG DiB
                  OR




                                                      OR




                                                                                           OR
                                   CD




                                                                        CD




                                                                                                            CD
                  CA
                  GA




                                                      CA
                                                      GA




                                                                                           CA
                                                                                           GA
       TE




                                           TE




                                                                                TE
     NO




                                         NO




                                                                              NO




                                                           (b)
               SHD for 20 Variable SF4              SID for 20 Variable SF4              F1 for 20 Variable SF4
                                                                                0.8
                                           350
        80
                                           300                                  0.6
        60
                                           250
                                                                                0.4
        40                                 200
                                                                                0.2
         SD S
            CD
       NO M
        SC M
             E
       P S




                                             SD S
                                                CD
                                           NO M
                                            SC M
                                                 E
                                           P S




                                                                                  SD S
                                                                                     CD
                                                                                NO M
                                                                                 SC M
                                                                                      E
                                                                                P S
                                     E




                                                                          E




                                                                                                                  E
           AR




     CG DiB




                                               AR




                                         CG DiB




                                                                                    AR




                                                                              CG DiB
          OR




                                              OR




                                                                                   OR
                                   CD




                                                                        CD




                                                                                                            CD
          CA
          GA




                                              CA
                                              GA




                                                                                   CA
                                                                                   GA
        TE




                                            TE




                                                                                 TE
      NO




                                          NO




                                                                               NO




                                                           (c)

Figure 6: (a) Erdos-Renyi (ER) graphs with one expected edge per variable. (b) Scale-Free (SF) graphs with one expected
edge per variable. (d) SF graphs with four expected edges per variable. For results for Erdos-Renyi (ER) graphs with four
expected edges per variable, see Figure 4b. Black dot is the average metric. Lower is better for SHD and SID, higher is
better for F1.




                                                           26
                          Continuous Bayesian Model Selection for Multivariate Causal Discovery

              SHD for 50 Variable ER1               SID for 50 Variable ER1              F1 for 50 Variable ER1
                                                                                0.6
                                           400
       200
                                           300                                  0.4
       100
                                           200
                                                                                0.2
            SD S
               CD
          NO M
           SC M
                E
          P S




                                                 SD S
                                                    CD
                                               NO M
                                                SC M
                                                     E
                                               P S




                                                                                     SD S
                                                                                        CD
                                                                                   NO M
                                                                                    SC M
                                                                                         E
                                                                                   P S
                                     E




                                                                          E




                                                                                                                  E
              AR




        CG DiB




                                                   AR




                                             CG DiB




                                                                                       AR




                                                                                 CG DiB
             OR




                                                  OR




                                                                                      OR
                                   CD




                                                                        CD




                                                                                                            CD
             CA
             GA




                                                  CA
                                                  GA




                                                                                      CA
                                                                                      GA
       TE




                                           TE




                                                                                TE
     NO




                                         NO




                                                                              NO
                                                           (a)
              SHD for 50 Variable ER4               SID for 50 Variable ER4              F1 for 50 Variable ER4
       800
                                          2250
       600                                2000                                  0.6

       400                                1750
                                                                                0.4
                                          1500
       200
                                          1250                                  0.2
                 SD S
                   CD
               NO M
                SC M
                     E
               P S




                                                     SD S
                                                       CD
                                                   NO M
                                                    SC M
                                                         E
                                                   P S




                                                                                          SD S
                                                                                            CD
                                                                                        NO M
                                                                                         SC M
                                                                                              E
                                                                                        P S
                                     E




                                                                          E




                                                                                                                  E
        AR




             CG DiB




                                             AR




                                                 CG DiB




                                                                                 AR




                                                                                      CG DiB
                  OR




                                                      OR




                                                                                           OR
                                   CD




                                                                        CD




                                                                                                            CD
                  CA
                  GA




                                                      CA
                                                      GA




                                                                                           CA
                                                                                           GA
       TE




                                           TE




                                                                                TE
     NO




                                         NO




                                                                              NO
                                                           (b)
               SHD for 50 Variable SF1              SID for 50 Variable SF1              F1 for 50 Variable SF1
       600                                1200                                  0.6
                                          1000
       400
                                           800                                  0.4
       200                                 600
                                                                                0.2
                                           400
                 SD S
                   CD
               NO M
                SC M
                     E
               P S




                                                     SD S
                                                       CD
                                                   NO M
                                                    SC M
                                                         E
                                                   P S




                                                                                          SD S
                                                                                            CD
                                                                                        NO M
                                                                                         SC M
                                                                                              E
                                                                                        P S
                                     E




                                                                          E




                                                                                                                  E
        AR




             CG DiB




                                             AR




                                                 CG DiB




                                                                                 AR




                                                                                      CG DiB
                  OR




                                                      OR




                                                                                           OR
                                   CD




                                                                        CD




                                                                                                            CD
                  CA
                  GA




                                                      CA
                                                      GA




                                                                                           CA
                                                                                           GA
       TE




                                           TE




                                                                                TE
     NO




                                         NO




                                                                              NO




                                                           (c)
               SHD for 50 Variable SF4              SID for 50 Variable SF4              F1 for 50 Variable SF4

       600
                                          2000                                  0.6
       400
                                          1500                                  0.4
       200
                                          1000                                  0.2
         SD S
            CD
       NO M
        SC M
             E
       P S




                                             SD S
                                                CD
                                           NO M
                                            SC M
                                                 E
                                           P S




                                                                                  SD S
                                                                                     CD
                                                                                NO M
                                                                                 SC M
                                                                                      E
                                                                                P S
                                     E




                                                                          E




                                                                                                                  E
           AR




     CG DiB




                                               AR




                                         CG DiB




                                                                                    AR




                                                                              CG DiB
          OR




                                              OR




                                                                                   OR
                                   CD




                                                                        CD




                                                                                                            CD
          CA
          GA




                                              CA
                                              GA




                                                                                   CA
                                                                                   GA
        TE




                                            TE




                                                                                 TE
      NO




                                          NO




                                                                               NO




                                                           (d)

Figure 7: (a) Erdos-Renyi (ER) graphs with one expected edge per variable. (b) ER graphs with four expected edges per
variable. (c) Scale-Free (SF) graphs with one expected edge per variable. (d) SF graphs with four expected edges per
variable. Black dot is the average metric. Lower is better for SHD and SID, higher is better for F1.

                                                           27
