Reframed GES with a Neural Conditional Dependence Measure
Abstract
In a nonparametric setting, the causal structure is often identifiable only up to Markov equivalence, and for the purpose of causal inference, it is useful to learn a graphical representation of the
Markov equivalence class (MEC).
In this paper, we revisit the Greedy Equivalence Search (GES) algorithm, which is widely cited as a score-based algorithm for learning the MEC of the underlying causal structure.
We observe that in order to make the GES algorithm consistent in a nonparametric setting, it is not necessary to design a scoring metric that evaluates graphs.
Instead, it suffices to plug in a consistent estimator of a measure of conditional dependence to guide the search.
We therefore present a reframing of the GES algorithm, which is more flexible than the standard score-based version and readily lends itself to the nonparametric setting with a general measure of conditional dependence.
In addition, we propose a neural conditional dependence (NCD) measure, which utilizes the expressive power of deep neural networks to characterize conditional independence in a nonparametric manner.
We establish the optimality of the reframed GES algorithm under standard assumptions and the consistency of using our NCD estimator to decide conditional independence.
Together these results justify the proposed approach.
Experimental results demonstrate the effectiveness of our method in causal discovery, as well as the advantages of using our NCD measure over kernel-based measures.
INTRODUCTION
Causal structure learning is a fundamental problem in various disciplines of science, and flexible solutions to this problem have potentially wide applications [Pearl, 2009,
Koller and Friedman, 2009, Peters et al., 2017], e.g., inferring causal relationships among phenotypes [Neto et al., 2010, Zhang et al., 2015], and finding causes in earth system sciences [Runge et al., 2019] and telecommunication networks [Ng et al., 2022].
In many scenarios, it is expensive or even impossible to perform interventions or randomized experiments in order to discover the causal relationships.
This limitation inspires the need to infer or at least systematically produce plausible hypotheses of causal structures from purely observational data, which is often known as causal discovery.
General assumptions relating the data distribution to the unknown causal structure have been leveraged to make causal discovery feasible, including the well-known Markov condition and faithfulness assumption [Spirtes et al., 2000].
Suppose the unknown causal structure can be properly represented by a directed acyclic graph (DAG) over the observed variables.
The last one and a half decades have seen a host of results on the identifiability of the causal DAG from the observational data distribution, under various parametric or semi-parametric assumptions [Shimizu et al., 2006,
Hoyer et al., 2009, Zhang and Hyvarinen, 2009, Bühlmann et al., 2014, Peters and Bühlmann, 2014].
However, in a nonparametric setting, from the observational distribution, the causal structure is known to be identifiable only up to Markov equivalence.
Despite this limitation, it remains a worthy task to learn a graphical representation of the Markov equivalence class (MEC), known as a completed partial directed acyclic graph (CPDAG), for a CPDAG usually reveals some valuable causal information and can be used to guide experimental studies.
Existing methods for causal discovery targeting the CPDAG are roughly categorized into constraint-based and scorebased methods.
The former uses statistical tests to find conditional (in)dependence relationships in the data and use them as constraints to recover the CPDAG that satisfies them.
The PC algorithm [Spirtes et al., 2000] is a wellknown exemplar of this approach.
The latter formulates the task as an optimization problem by assigning a score to each candidate graph and searching for the one with the optimal score.
Regarding the search and optimization strategy, many algorithms solve a combinatorial optimization problem by performing a greedy search; on the other hand, starting from Zheng et al.
[2018], much recent work tackles the problem through a continuous optimization [Yu et al., 2019, Lachapelle et al., 2020].
While continuous optimization has advantages in scalability, global convergence is hard to guarantee by using gradient-based algorithms without implausible assumptions such as strong convexity, especially when the model involves neural networks.
In contrast, some search algorithms can be shown to achieve global optimality in the large sample limit even with a relatively sparse search space.
One of the best-known procedures of this kind is Greedy Equivalence Search (GES)
[Chickering, 2002].
The standard score-based GES algorithm requires a scoring criterion to evaluate each candidate graph.
Classical examples include the BIC [Schwarz, 1978] and the BDeu scores [Geiger and Heckerman, 1994].
However, most score functions are born out of restrictive parametric assumptions on the data distribution which rarely hold for real-world data.
When the parametric model is misspecified, which is very common in real data, the optimality of the standard GES with such a score is not guaranteed to reflect the ground truth even in the large sample limit.
In this paper, we explore a simple strategy to produce a nonparametric GES.
We observe that in order to make GES consistent in a nonparametric setting, it is not necessary to design a scoring metric that evaluates graphs as a whole.
Instead, it suffices to define a certain criterion to guide the search at each step of the procedure.
The approach we consider in this work is to plug in a consistent estimator of a measure of conditional dependence to provide such guidance.
The result is a reframed GES algorithm that is more flexible than the standard score-based version and readily lends itself to the nonparametric setting with a general measure of conditional dependence.
This avoids potential model misspecification that commonly occurs in score-based methods.
On the other hand, although the reframed GES becomes essentially constraint-based, it retains desirable features of the search strategy of GES and performs significantly better in our experiments than paradigmatic constraint-based methods such as PC.
In addition, we propose a measure of conditional dependence based on a characterization of conditional independence from Daudin [1980] and a novel neural conditional dependence (NCD) estimator which utilizes the expressive power of deep neural networks.
Many existing nonparametric measures of conditional dependence are based on kernel methods and leverage characterizations in a Reproducing
Kernel Hilbert Space (RKHS), e.g., Gretton et al.
However, kernel methods suffer from high computational complexity, preventing them from efficient applications in large scale problems.
In contrast, our neural network based approach can benefit from a large sample size without a severe compromise in computational time.
We highlight our main contributions as follows:
• We present a reframing of the GES algorithm that can flexibly incorporate a consistent estimator of a general conditional dependence measure.
• We propose a neural conditional dependence (NCD) measure, which utilizes the expressive power of deep neural networks.
• We provide theoretical guarantees on the correctness of the reframed GES algorithm and the consistency of the NCD estimator to measure conditional dependence under mild conditions, and demonstrate the empirical advantages of the resulting method in causal discovery.
BACKGROUND AND RELATED WORK 2.1 PRELIMINARIES AND NOTATIONS
Let G =
( V , E ) be a directed acyclic graph (DAG) consisting of nodes V =
( X 1 , . . .
, X d ) , each of which is a (possibly multi-dimensional) random variable, and directed edges E that connect pairs of nodes.
Let Pa G
i be the set of parents of node X i .
We denote the joint distribution of V by P V .
A basic problem of causal discovery aims at inferring the unknown causal DAG G from an independent and identically distributed (i.i.d.)
sample from P V .
In general, we need assumptions relating the DAG G and the distribution P V to make the task possible.
A principle adopted by all causal discovery methods is the causal Markov condition : P V is Markovian with respect to DAG G , in the sense that every conditional independence statement entailed by G according to the standard Markov property of DAGs is true of P V .
We also assume the commonly adopted faithfulness assumption : P V is faithful with respect to DAG G , in the sense that every conditional independence statement true of P V is entailed by G .
If two DAGs G 1 and G 2 entail the same set of conditional independence statements, they are said to be Markov equivalent .
The set of all DAGs that are Markov equivalent to a DAG G is called the Markov equivalence class (MEC) of G , which can be represented by a completed partially directed acyclic graph (CPDAG).
For random variables X, Y and Z , we write X ⊥⊥ Y | Z to mean that X and Y are conditionally independent given Z .
2.2 RELATED WORK ON CAUSAL DISCOVERY
The point that GES can be recast in the spirit of a constraintbased method has been noted in the literature, most recently by Chickering [2020] and most explicitly by Nandy et al.
To our knowledge, however, the idea of running GES without a global scoring metric has not been sufficiently explored.
In Nandy et al.’s insightful discussion, for example, they emphatically show how a consistent global score can be constructed from local conditional dependence scores in multivariate Gaussian and nonparanormal settings, and stop short of considering the option of dispensing with global scoring altogether.
As we aim to demonstrate in this paper, a reframed GES without global scoring is especially flexible and useful in a nonparametric context.
In our experiments, we use a number of state-of-the-art causal discovery algorithms for comparison, in addition to the aforementioned PC and standard GES.
One of them is the CAM algorithm [Bühlmann et al., 2014], which decouples the search for the causal ordering from the selection of parents for each variable, by leveraging an additive modeling assumption.
Huang et al.
[2018] propose a generalized score function (GSF) and apply it in the GES algorithm.
Specifically, they transform the statistical decision about conditional independence to a model selection problem for a regression task in an RKHS, define a score based on the penalized log-likelihood for the kernel regression, and then use the score to guide local moves in GES.
This work is closely related to ours in that both works are motivated by the goal to develop a nonparametric score to guide the local moves of GES.
However, our approach differs from GSF in at least two notable aspects.
First, by highlighting the sufficiency of designing a local score that enables consistent statistical decisions about conditional independence, we propose a simpler and more flexible way to dispense with parametric assumptions in GES.
Second, the specific score we propose is based on neural networks rather than kernels and hence enjoys better computational efficiency when scaling to large sample size.
Another earlier work sharing a similar spirit is the kernel generalized variance (KGV)
[Bach and Jordan, 2002], which is also compared in our experiments.
Other methods follow Zheng et al.
[2018], who reformulate the original combinatorial problem into a continuous optimization problem, named NOTEARS, which is solved using the augmented Lagrangian algorithm.
Several follow-up works extend NOTEARS to nonlinear causal models, including DAG-GNN [Yu et al., 2019], GraN-DAG
[Lachapelle et al., 2020], and Ng et al.
[2022], all of which utilize neural networks to model the nonlinear causal relations.
In addition, Zhu et al.
[2020], Wang et al.
[2021] adopt policy gradient to search for a DAG with the optimal score.
Since the main purpose of this work is to make GES more applicable in nonparametric settings, in our comparisons we focus mainly on methods that are designed to handle data for continuous variables generated from fairly complex, nonlinear models, and leave out some important methods designed to learn Bayesian networks for discrete variables, such as Bartlett and Cussens [2017].
2.3 RELATED WORK ON CONDITIONAL INDEPENDENCE
Conditional independence plays an important role in many statistics and machine learning problems, ranging from graphical models [Koller and Friedman, 2009] to invariance learning [Arjovsky et al., 2019].
A number of studies were devoted to characterizing conditional independence or developing conditional independence tests.
Gretton et al.
[2005] introduce the Hilbert-Schmidt independence criterion (HSIC), which is extended by Fukumizu et al.
[2007] to cover conditional independence and used for a conditional independence test.
Recently, Azadkia and Chatterjee [2021] propose a surprisingly simple nonparametric measure of conditional dependence based on ranking statistics, which we refer to as the Rank Conditional Dependence (RCD) measure and will use later to illustrate the flexibility of our approach.
Other works focus on constructing tests of conditional independence by proposing various test statistics, including the kernel conditional independence test [Zhang et al., 2011] and the test based on a generalized covariance measure [Shah and Peters, 2020], among others.
REFRAMING THE GES ALGORITHM 3.1 STANDARD GES
The GES algorithm [Chickering, 2002] searches over the space of MECs of DAGs, which are represented by CPDAGs.
The connectivity in the search space is given by the independence-map (IMAP) relation: graph G is an IMAP of graph G ′ if every conditional independence entailed by G is entailed by G ′ .
The standard GES uses a scoring function that assigns a score to every DAG given data, and uses the score of a representative DAG in a MEC as that for the MEC.
The search strategy consists of two phases, a phase of forward equivalence search (FES) followed by a phase of backward equivalence search (BES).
In FES, the procedure starts with the empty CPDAG (the one with no edges), and moves at each step to a best-scoring CPDAG with one more adjacency (that is an IMAP of the previous CPDAG), until the score cannot be improved by adding more adjacencies.
In BES, the procedure starts with the output from FES, and moves at each step to a best-scoring CPDAG with one fewer adjacency (of which the previous CPDAG is an IMAP), until the score cannot be improved by deleting more adjacencies.
We enter some details of FES to highlight the observation that motivates the subsequent reframing.
The case of BES is analogous.
In FES, each step considers possible insert-oneedge operations on the current CPDAG.
Following Chickering [2002], for non-adjacent nodes X i and X j in a CPDAG P , and for any subset T of the neighbors of X j (i.e., nodes that are connected to X j by undirected edges) that are not adjacent to X i , the Insert ( X i , X j , T ) operator modifies P to obtain P ′ by inserting the directed edge X i → X j , and for each T ∈ T , directing the previously undirected edge between T and X j as T → X j .
If the validity condition in Chickering [2002, Theorem 15] is met, then there is a representative DAG G in the MEC represented by P and a representative DAG G ′ in the MEC represented by P ′ , such that G ′ is the result of inserting X i → X j in G (which implies that P ′ is an IMAP of P ).
In Chickering’s (2002) proof of the asymptotic correctness of GES under the causal Markov and faithfulness assumptions, the crucial condition is that the “local” decision between G and G ′ mentioned above asymptotically tracks whether a certain conditional independence relation holds.
We make this notion precise in the following definition, in which D denotes an i.i.d.
sample with size n from the joint distribution P V of V .
Definition 1 (Independence-tracking decision criterion) .
Let G and G ′ be two DAGs over V that are exactly the same except that G ′ contains an edge X i → X j that does not appear in G .
A decision criterion (based on data D ) to choose between G and G ′ (among other options) is independencetracking if the following two properties hold in the large sample limit:
(i)
If X j ⊥⊥ X i | Pa G j (according to P V ), then the decision criterion favors G over G ′ .
(ii) Otherwise, the decision criterion favors G ′ over G .
In the standard GES algorithm, a scoring function for DAGs is used to make such local decisions.
The induced decision criterion is independence-tracking if the scoring function satisfies the so-called local consistency [Chickering, 2002, Definition 6].
Indeed, Definition 1 is a straightforward generalization of the notion of local consistency for scoring functions.
The generalization serves to highlight a simple but important observation: the crucial condition for the optimality of GES can be implemented by a (locally consistent) score function for DAGs, but does not necessitate such a function.
3.2 REFRAMED GES
We now describe a simple alternative way to implement an independence-tracking decision criterion for GES, by using any consistent measure of conditional dependence, in the following sense:
Definition 2 ( τ -consistency) .
Consider a set of statistics
T = { T n ( X, Y | Z ) | X, Y ∈ V , Z ⊆
V \{ X, Y }} (intended to measure conditional dependence) depending on the sample D with size n .
T is said to be τ -consistent with parameter τ > 0 if for every X, Y ∈ V and Z ⊆
V \{ X, Y } , the following two conditions hold in the large sample limit: (i)
If X ⊥⊥ Y | Z (according to P V ), then T n ( X, Y | Z ) < τ .
(ii)
Otherwise, T n ( X, Y | Z ) >
τ .
For our purpose, the following sufficient condition for the τconsistency in Definition 2 is useful.
All proofs are deferred to Appendix B.
Proposition 1.
Suppose for every X, Y ∈ V and Z ⊆
V \{ X, Y } , T ∗ ( X, Y | Z ) ≥ 0 is a quantity depending on
P V such that
[Equation]
| [Equation]
Let ˆ T n ( X, Y | Z ) form a set of statistics indexed by X, Y ∈
V and Z ⊆ V \{ X, Y } .
If ˆ T n ( X, Y | Z ) → T ∗ ( X, Y | Z ) in probability as n → ∞ for every X, Y ∈ V and
Z ⊆ V \{ X, Y } , then there exists τ > 0 such that { ˆ T n ( X, Y | Z ) } is τ -consistent.
This proposition provides a way to construct a τ -consistent set of statistics.
One first defines a population quantity that takes the boundary value if and only if the conditional independence in question holds.
Then one constructs a consistent estimator for this quantity given an i.i.d.
sample.
The aforementioned measures including HSIC [Fukumizu et al., 2007] and RCD [Azadkia and Chatterjee, 2021] were both developed along this line.
In the next section, we will propose a new measure of conditional dependence based on a neural network implementation.
It is worth noting the essential difference between our defined τ -consistent statistics and conditional independence tests.
We note that the condition in Proposition 1 indicates that when X ⊥⊥ Y | Z , the statistic ˆ T n ( X, Y | Z ) converges to 0 in probability, i.e., ˆ T n = o p (1) .
By contrast, in a typical conditional independence test, one usually uses a test statistic that, under the null hypothesis of conditional independence, follows an asymptotic null distribution, which is then used to develop a decision rule.
This means that when
X ⊥⊥ Y | Z , the test statistic is stochastically bounded, i.e., O p (1) , but not necessarily o p (1) .
Therefore, it is in general non-trivial to define a τ -consistent statistic from a conditional independence test.
With a τ -consistent ˆ T ( X, Y | Z ) , it is straightforward to implement an independence-tracking decision criterion to be used in GES.
Specifically, at each step in FES, to each (valid) operator Insert ( X i , X j , T ) we assign ˆ T ( X i , X j | Pa G j ) as its “local score” (where G is the DAG representing the current CPDAG induced by the operator), and apply the operator with the highest local score (indicating conditional dependence), unless all remaining valid insert operators yield a local score lower than the threshold τ .
Similarly, at each step in BES, to each (valid) operator Delete ( X i , X j , H ) , we assign ˆ T ( X i , X j | Pa G j ) as its local score (where G is the
DAG representing the CPDAG the operator would produce),
Input : the current CPDAG P , sample D , a list of valid insert operators INS , statistics ˆ T ( X, Y | Z ) , threshold τ
Output : the next CPDAG P ′
Set s = 0 and I = NULL . for Insert ( X i , X j , T ) ∈ INS do
Let G be the representative DAG of P corresponding to
Insert ( X i , X j , T ) .
Evaluate Score ( X i , X j , T ) =
ˆ T ( X i , X j | Pa G j ) .
if Score ( X i , X j , T ) > s then
Let s =
Score ( X i , X j , T ) and
I =
Insert ( X i , X j , T ) .
end if end for if s > τ then
Apply operator I to obtain P ′ .
else
Keep P ′
=
P (and terminate FES).
end if return P ′ and apply the operator with the lowest local score (indicating conditional independence), unless all remaining valid delete operators yield a score greater than τ .
The update step of FES is summarized in Algorithm 1, and the dual update step of BES is given in Appendix A.
We call the GES algorithm with these update steps the reframed GES .
Unlike the standard GES, this reframed GES does not optimize a global score for MECs.
However, by using a suitable local score for choosing operators to apply (or to stop), the local decision criterion remains independencetracking, and as a result the asymptotic optimality of the reframed GES algorithm is still guaranteed, as stated in the following theorem.
Theorem 2.
Under the causal Markov and faithfulness assumptions, the reframed GES procedure using a τ -consistent ˆ T ( X, Y | Z ) recovers the MEC of the true graph in the large sample limit.
NEURAL CONDITIONAL DEPENDENCE MEASURE
In this section, we propose a novel measure of conditional dependence.
Let X , Y , and Z be three random variables taking values in R d X , R d Y , and R d Z , respectively, where d X , d Y , and d Z are the corresponding dimensions.
We assume that their joint distribution is absolutely continuous with respect to Lebesgue measure with density p ∗ defined on R d X + d Y + d Z .
The conditional independence between X and Y given Z is defined by p ∗ ( x, y, z ) =
p ∗ ( x | z ) p ∗ ( y | z ) p ∗ ( z ) for all x, y, z with p ∗ ( z ) >
[Dawid, 1979].
The following lemma from Daudin [1980] characterizes the conditional independence, which has given rise to several hypothesis testing methods.
Let L 2 Z , L 2 XZ , and L 2 Y Z be the spaces of square integrable functions of Z , ( X, Z ) , and ( Y, Z ) , respectively, e.g., L 2 XZ
=
{ f : R d X + d Z → R |
E [ f ( X, Z ) 2 ] < ∞} .
Lemma 3 (Daudin [1980]) .
The random variables X
and
Y are conditionally independent given Z if and only if
E [ f ( X, Z ) g ( Y, Z )] = 0 , for all f ∈ L 2 XZ and
g ∈ L 2 Y Z such that E
[ f ( X, Z ) | Z ] =and E
[ g ( X, Z ) | Z ] = 0 .
At the population level, given a ground truth density p ∗ , we propose the following measure of conditional dependence between X and Y given Z :
[Equation]
where f ∈ L 2 XZ and g ∈ L 2 Y Z are test functions, h ∗ ( Z )
=
E [ f ( X, Z ) | Z ] , l ∗ ( Z ) =
E [ g ( Y, Z ) | Z ] , and ρ ( X 1 , X 2 ) =
cov ( X 1 , X 2 ) / (cid:112) var ( X 1 ) var ( X 2 ) denotes the Pearson correlation coefficient of two random variables
X 1 and X 2 .
The reason for using the correlation coefficient rather than the covariance is that after normalization by the variances, the characteristic is bounded between [ − 1 , 1] .
This makes the measure well-defined in a bounded range and the computation of its subsequent sample version numerically stable.
Based on Lemma 3, we have the following simple theorem which characterizes the property of the measure (1) and establishes an equivalence condition between the measure and conditional independence.
Theorem 4.
For all p ∗ , we have S ( X, Y | Z ) ∈ [0 , 1] and
S ( X, Y | Z ) =
if and only if X ⊥⊥ Y | Z .
Having defined the measure S ( X, Y | Z ) , we now make the computation tractable.
We use deep neural network classes to parametrize the test functions f, g and the conditional expectations h, l in (1).
Formally, we write f θ , g ϕ , h ω , l ψ , where the subscripts denote the parameters of the corresponding neural networks.
We then exploit the approximation
[Equation]
where h ω ∗ ( z ) =
h ∗ ( z ) and l ψ ∗ ( z ) =
l ∗ ( z ) .
According to the universal approximation theorem of neural networks [Hornik et al., 1989], equation (2) can approximate the true measure (1) with arbitrary accuracy by choosing the appropriate network architecture.
Since here we mainly focus on the statistical property of the estimator proposed below, we ignore the small approximation error (i.e., the gap between (2) and (1)) in the analysis for simplicity.
Next, we present a consistent estimator of S ( X, Y | Z ) .
Let
D = { ( x i , y i , z i ) , i = 1 , . . . , n } be the collection of i.i.d.
Input : sample D , horizon T t , T r , initial θ, ϕ, ω, ψ
Output : NCD score 1: for t t = 1 , 2 , . .
, T t do 2: for t r = 1 , 2 , . . . , T r do 3: Update ω by descending (cid:80) i ∇ ω ( f θ ( x i , z i ) − h ω ( z i ))4:
Update ψ by descending (cid:80) i ∇ ψ ( g ϕ ( y i , z i ) − l ψ ( z i ))5: end for 6:
Update θ, ϕ by ascending the gradient of ˆ ρ 2 ( f θ ( X, Z )
− h ω
( Z ) , g ϕ ( Y, Z ) − l ψ ( Z )) 7: end for 8: Compute ˆ s =
ˆ ρ 2 ( f ( X, Z ) − h ( Z ) , g ( Y, Z ) − l ( Z )) 9: return ˆ s copies of ( X, Y, Z ) ∼ p ∗ .
Our estimator of S ( X, Y | Z ) is given by
[Equation]
[Equation]
where ˆ ρ is the sample correlation coefficient based on data
D , and
[Equation]
are the estimators of ω ∗ and ψ ∗ .
Remark.
The estimators in (4) based on regression come from the fact that E [ f ( X, Z ) | Z ] = argmin h E [ f ( X, Z ) − h
( Z )] 2 , which is proved in Appendix B.
We call the proposed estimator (3) the neural conditional dependence (NCD) estimator and its population version (2) the NCD measure.
Since (3) solves a bilevel optimization problem involving regression problems (4), we adopt an alternating gradient descent scheme to obtain the NCD estimator.
The procedure is summarized in Algorithm 2, where we alternately update the test functions f θ , g ϕ and nonlinear regressors h ω , l ψ for T t and T r steps, respectively.
To study the asymptotic behavior of the proposed estimator, we assume the following regularity conditions, all of which are mild assumptions commonly adopted in the literature.
C1 .
The parameter spaces θ ∈ Θ , ϕ ∈ Φ , ω ∈ Ω , and ψ ∈ Ψ are compact.
C2 .
f θ ( x, z ) , g ϕ ( y, z ) , h ω ( z ) , and l ψ ( z ) are continuous with respect to the corresponding parameters and data x, y, z .
C3 .
f θ ( x, z ) , g ϕ ( y, z ) , h ω ( z ) , and l ψ ( z ) are dominated square integrable, i.e., there exists a dominating function F ( x, z ) such that | f θ ( x, z ) | ≤ F ( x, z ) for all θ and E [ F ( X, Z )] 2 < ∞ .
C4 .
For all θ, ϕ , there exist unique ω ∗ ( θ ) ∈ Ω and ψ ∗ ( ϕ
) ∈
Ψ such that h ω ∗ ( z )
=
h ∗ ( z ) and l ψ ∗ ( z ) =
l ∗ ( z ) almost surely, respectively.
The following theorem establishes the consistency of ˆ
S n ( X, Y | Z ) as an estimator of the population measure
S ( X, Y | Z ) .
Theorem 5.
Under the regularity conditions C1-C4, as n → ∞ , we have ˆ S n ( X, Y | Z ) → S ( X, Y | Z ) in probability.
Finally, we apply the NCD measure to causal discovery through the reframing of GES in the previous section.
We plug the estimator ˆ S n into the reframed GES procedure as the “local score”.
Based on Theorems 4 and 5, by applying the sufficient condition in Proposition 1, we know that ˆ S n ( X, Y | Z ) satisfies the τ -consistency in Definitionwith some τ > 0 .
Then Theorem 2 implies the asymptotic correctness of our method to recover the true MEC.
In addition, to demonstrate the flexibility of our reframed
GES algorithm in incorporating various conditional dependence measures, we will also test a version of our procedure using the RCD measure recently proposed by Azadkia and
Chatterjee [2021], because it is very easy to compute.
The
RCD estimator can be shown to satisfy the τ -consistency and hence suits our framework well.
For completeness, we provide a description of RCD in Appendix C.
EXPERIMENTS
In this section, we compare our proposed method with various existing state-of-the-art causal discovery approaches on both synthetic and pseudo-real data sets.
Baseline methods include score-based methods using BIC [Chickering, 2002], KGV [Bach and Jordan, 2002], and GSF [Huang et al., 2018]; a constraint-based method, PC algorithm [Spirtes et al., 2000]; a method based on structural causal model, CAM [Bühlmann et al., 2014]; as well as the emerging methods in the continuous optimization paradigm including NOTEARS [Zheng et al., 2018], DAG-GNN [Yu et al., 2019], and GraN-DAG [Lachapelle et al., 2020].
The details of the experimental settings and hyperparameters (including the choice of τ ) of baseline methods and ours are given in
Appendix D.
The causal discovery performance is evaluated using three metrics: the structural hamming distance (SHD), the structural interventional distance (SID)
[Peters and Bühlmann, 2015] and the F1 score.
Since our method and many baseline approaches return a CPDAG representing an MEC, both SHD and SID are evaluated between the learned and groundtruth CPDAGs.
Then the SHD is the smallest number of [Table]
[Table] tribution j | ( X i )) would be miscalculated if we chose the parent adjustment set from the estimated graph.
We report the SIDs corresponding to the best and worst DAG in the learned MEC.
The SHD and SID are computed using functions corresponding to CPDAGs in the Causal Discovery Toolbox [Kalainathan et al., 2020].
The F1 score is defined as the harmonic mean of the precision and the recall.
Computing the F1 score involves summarizing the number of correctly estimated edges.
Directed edges in the ground-truth CPDAG are deemed correctly estimated if the learned CPDAG contains exactly the same directed edge and are deemed incorrectly otherwise.
Undirected edges in the ground-truth CPDAG are converted to two directed edges in the adjacency matrix.
When the learned CPDAG contains exactly the same undirected edge, both converted directed edges are correctly estimated.
One directed edge and no edge in the learned CPDAG are deemed as correctly estimating 1 and 0 edge, respectively.
In general, a lower SHD or SID and a higher F1 score indicate a better estimate.
5.1 SYNTHETIC DATA
As mentioned in previous sections, when a data set does not satisfy the additive Gaussian noise assumption, many existing methods such as BIC, CAM, NOTEARS, and GraNDAG suffer from model misspecification and thus may lead to misleading results.
In contrast, nonparametric methods like GSF and ours in principle will not be affected.
Here we consider the well-known post nonlinear (PNL) causal models [Zhang and Hyvarinen, 2009].
A general PNL model expresses each variable X i as
X i = g i, 2 ( g i, 1 ( Pa i ) + N i ) , i = 1 , . . .
, d, where Pa i contains the direct causes of X i , N i is the exogenous noise variable, and g i, 1 and g i, 2 are nonlinear transformations.
To synthesize a data set, we first randomly generate a groundtruth DAG G following the Erd˝os-Rényi (ER) graph model and then generate data following G and two types of PNL models that were also considered in Lachapelle et al.
The first one, called PNL-GP , samples g i, 1 independently from a Gaussian process with bandwidth one, takes g i, as the sigmoid function, and N i ∼ Laplace (0 , b i ) with b i ∼ U [0 , 1] .
All root variables in PNL-GP are sampled from U [ − 1 , 1] .
The second one, named PNL-MULT , takes g i, 1 ( x ) =
log( sum ( x )) where sum ( x ) takes the sum of all components of a vector x , g i, 2 ( · ) = exp( · ) , and N i ∼ |N
(0 , σ 2 i ) | with σ 2 i ∼ U [0 , 1] .
All root variables in PNLMULT are sampled from U [0 , 2] .
This model is adapted from Zhang et al.
Tables 1 and 2 present the results of SHD and F1 score on sparse and dense graphs with 10 nodes respectively, where the error bars represent the standard deviations across 5 data sets per setting.
The results of SID are basically consistent, which are deferred to Appendix E due to the space limit.
Additional results on graphs with 20 nodes are also presented in
Appendix E.
We see that in general, the reframed GES algorithm with our own NCD or the adopted RCD (shown in the first two lines of all tables) performs the best across all settings, except in the sparse PNL-MULT data where GSF is the best.
The advantages of our methods on the more challenging dense graphs are more significant than those on sparse ones.
In most cases, NCD outperforms RCD, though RCD produces excellent results on PNL-MULT with a larger sample.
From the perspective of implementation, RCD may be favored over NCD in terms of fewer hyperparameters and less computational cost.
In addition, our methods exhibit similarly good performances across different ground-truth models, while most other methods tend to perform well on at most one setting, which indicates the robustness of our nonparametric approach against different distributions.
GSF, as another kernel-based nonparametric score, performs very well on PNL-MULT with a sparse structure, but is less competitive in other settings.
Note that we only report the results of GSF using 1000 samples, because even for the sparse graph, it takes around 17 hours for a single run with 5000 samples compared to around 19 minutes withsamples.
In contrast, our NCD-based method can benefit from a larger sample size while taking similar computational time as with a smaller sample (both within 4 minutes in the sparse case).
In Appendix E, we discuss more details regarding the computational time of different methods.
KGV leads to inferior performance in all settings.
The standard GES with the linear-Gaussian BIC score sometimes performs well on PNL-MULT; a possible reason is that when the noise variance σ 2 i ∼ U [0 , 1] happens to be small, the
PNL-MULT model behaves similarly to a linear-Gaussian model, leading to a case with minor misspecification for BIC.
This may also partly account for the fact that PC performs better on PNL-MULT than on PNL-GP; that is, a PNL-MULT data set can be similar to linear-Gaussian data which would satisfy the model assumption made in the hypothesis testing.
CAM performs better on PNL-GP than on PNL-MULT and achieves the best SID in one case, as shown in Appendix E.
The continuous optimization methods are inferior on these PNL data sets, which could be explained [Table] by their misspecification of the model.
In addition, we evaluate our methods in a multi-dimensional scenario where each node may have more than one dimension.
Note that our NCD estimator can be readily applied to the multi-dimensional setup by adjusting the input dimension of the test functions, while the rank-based RCD measure unfortunately cannot be directly applied here.
Some of the baseline methods, including CAM, NOTEARS, and
GraN-DAG do not apply to the multi-dimensional case, so we do not compare with them in this setting.
We use 10 synthetic data sets from Huang et al.
[2018], each with 5 nodes and a sample size of 1000.
As shown in Table 3, our approach outperforms the baseline methods in all three metrics.
PC, KGV, and GSF are the second-best performing methods in terms of SHD, SID, and F1 score, respectively, though they all give an inferior performance in other metrics.
5.2 PSEUDO-REAL DATA
Although the synthetic data sets from PNL models can expose the model misspecification problem in many existing methods, they differ from the additive noise setup only by the nonlinearity g i, 2 , and hence amount to relatively mild cases of misspecification.
In this section, we consider a pseudo-real data set sampled from the SynTReN generator [Van den Bulcke et al., 2006] where there is no guarantee at all for model specification.
We evaluate on the 10 data sets sampled by Lachapelle et al.
[2020], each with 20 nodes and a small sample size of 500.
In addition, we consider a real Bayesian network, CHILD network (with 20 nodes), and randomly generate 3000 samples following the PNL-GP model introduced in the previous section.
As shown in Table 4, on SynTReN, most baseline methods perform poorly, indicating a potentially severe violation of their model assumptions.
Our reframed GES with NCD and with RCD obtain the best SHDs.
The results on SynTReN suggest the potential advantage of nonparametric causal discovery methods in real applications where model misspecification is common and possibly grave.
Moreover, our methods also obtain the best performance on the real graph structure CHILD.
Note that on this large data set withsamples, the kernel-based methods GSF and KGV face serious computational challenges in that they take more than [Table] hours for a single run.
Therefore, we expect our method to exhibit even more advantages than the kernel-based methods in large-scale scenarios.
CONCLUSION
In this work, we presented a reframed GES algorithm that works with a measure of conditional dependence rather than a scoring metric for graphs.
This way the algorithm is easily applicable in a nonparametric setting with a theoretical guarantee.
We also proposed a neural conditional dependence (NCD) measure based on a deep neural network implementation, and established its theoretical properties that make it suitable for the reframed GES.
The resulting causal discovery algorithm was shown in our experiments to be superior or competitive in comparison to a number of state-of-the-art methods.
It also enjoys a significant advantage over kernelbased nonparametric methods in large-scale settings, since the latter are usually infeasible when the sample size is relatively large.
For future work, we plan to explore a continuous optimization formulation of causal discovery based on such nonparametric conditional dependence measures.
Acknowledgements
JZ’s research was supported in part by the RGC of Hong
Kong under GRF13602720 and a start-up fund from
HKBU.
The authors thank the anonymous reviewers for their valuable comments and suggestions.