Concepts#
This page states the problem that Andrey’s 50 methods solve, what data can and cannot settle about it, and what the graph a method returns claims. It assumes you know probability and regression, not causal graphs. Graph types draws each kind of graph, and Getting started runs the methods on real data.
The data and the model#
The data are a sample of rows, drawn i.i.d. from a distribution over the variables , one column each. A column may be continuous, categorical, or mixed. For a set of indices , is the vector of the variables with .
The causal model is a directed acyclic graph (DAG) with one structural equation per variable:
holds the parents of , the variables with an edge into it, and an edge says that is a direct cause of relative to . The noise terms are jointly independent, which is causal sufficiency: no hidden variable causes two variables of . Causal discovery estimates , or the part of the data identify, from .
What the data identify#
d-separates from in , written , when it blocks every path between them; the d-separation demo steps through the rule. We write when the two are independent given under . Two assumptions tie the graph to the distribution:
Causal Markov condition. implies . Every model of the form above satisfies it.
Faithfulness. The converse: every conditional independence in comes from a d-separation in ; for example, no two paths of effects cancel exactly.
Under both, the conditional independences of are exactly the d-separations of , and DAGs with the same d-separations give the same independences. So identifies only up to its Markov equivalence class : the DAGs with the same skeleton, the edges with their directions dropped, and the same v-structures, the triples with and not adjacent (Verma and Pearl, 1990).
A CPDAG (completed partially directed acyclic graph) represents . A directed edge points the same way in every member of ; an undirected edge does not (Meek, 1995; Chickering, 2002). Constraint-based methods such as PC test conditional independences, and score-based and permutation-based methods such as GES and BOSS search for the graph with the best score; with no other information, both kinds return a CPDAG. Background knowledge narrows : required and forbidden edges, or tiers , a partition of in which no variable causes one in an earlier tier.
A worked example#
Take three variables. Four DAGs share the skeleton :
The DAGs of one class |
Their independence |
Their CPDAG |
|---|---|---|
and |
||
The chain, its reverse, and the fork in the first row imply the same independence and have no
v-structure, so observational data alone cannot orient their edges: on data from any of them, PC
returns X1 -- X2 -- X3. The fourth DAG, in the second row, is a v-structure. and are
independent until you condition on , a pattern no other DAG on this skeleton gives, so PC
orients both edges.
Now let the data come from , where is not measured. Over
the independences are those of the v-structure, so PC, which assumes causal
sufficiency, returns X1 -> X2 <- X3. Its edge X3 -> X2 is false: does not cause ;
causes both. FCI, which allows hidden common causes, returns X1 o-> X2 <-o X3 on the same
data, and that claims only what holds: causes neither nor .
Restricted function classes#
is as far as the data go when the and the distributions of the are left free. Restricting them identifies itself, apart from exceptions each paper lists:
Linear non-Gaussian: , where only if , with non-Gaussian noise (Shimizu et al., 2006).
Additive noise: (Hoyer et al., 2008; Peters et al., 2014). A linear with Gaussian noise is the main exception.
Post-nonlinear: , with invertible (Zhang and Hyvärinen, 2009).
In each, the noise is independent of the causes in the causal direction and not in the reverse one, and that asymmetry orients every edge. These methods return a DAG, many with a causal order. Methods that fit a whole DAG to a score by continuous optimization, such as NOTEARS, return a DAG too, but under a linear model with Gaussian noise the data identify only : an edge the class leaves undirected gets a direction the data do not determine.
What a returned graph claims#
Every Andrey method returns one result type: a graph over the column labels whose edge ends carry marks, tail, arrowhead, or circle, of the kind its method identifies. Each mark is a claim about that holds under the method’s assumptions:
DAG. : is a parent of . No edge: neither is a parent of the other.
CPDAG. : every member of has this edge. : some members point it each way. No edge: some d-separates the two, in every member.
PAG. Each mark as above. No edge: some set of measured variables makes the two independent, so no member joins them.
Time-series graph. The marks of a DAG, a CPDAG, or a PAG, on edges between variables at given lags (below).
Undirected skeleton. : the two are adjacent, with no claim about direction.
Graph types draws each kind and lists the methods whose graph reads differently, such as ICP’s, whose only edges point into its target.
Each claim rests on assumptions that can fail. Faithfulness fails when effects nearly cancel, and
with rows a test can miss a weak dependence. Causal sufficiency fails when a common cause is not
measured, as in the example. A function class fails when, say, the noise is close to Gaussian. A
returned graph is an estimate under those assumptions, not the causal truth. Two tools check a
result: andrey.markov_check tests the independences a graph implies on rows it was not learned
from, and can reject the graph but not confirm it; andrey.bootstrap refits on resamples and
counts how often each edge appears, a measure of stability, not of correctness
(Getting started). Standards describes
how each method is tested.
Time series#
In a time series, is variable at step . An edge has lag
, where is a same-step edge, and the structure is the same at every
(Runge et al., 2019; Runge, 2020). Time orients every edge with , since a cause comes
before its effect; same-step edges are oriented as in a DAG. PCMCI+ leaves the same-step edges the
data cannot orient undirected, a CPDAG at lag 0; LPCMCI allows hidden variables and uses the marks
of a PAG. Granger causality and PCMCI assume every effect takes at least one step, so their lags
start at 1, and Longitudinal LiNGAM lets the structure change from one time point to the next.
Andrey returns a TemporalStructure, one graph per lag
(Graph types).
Environments and interventions#
Data can come from several environments . An intervention in environment changes the equations of its targets , setting each target or changing its , and leaves the others as they are; an observational environment has . The targets can be known or unknown. DAGs that also agree on every environment’s distribution form an interventional equivalence class, which refines and directs more edges (Hauser and Bühlmann, 2012). The methods that search that class return a CPDAG of it, and those that learn unknown targets report them.
ICP asks about one target variable : it accepts each set for which stays the same across the environments (Peters et al., 2016). When no environment intervenes on , its parents form one such set. ICP returns the variables in every accepted set; at test level , they are all parents of with probability at least . Other methods read the environment as an index, one more variable that no measured variable causes; its edges show which mechanisms change. Environments and interventions shows the calls.
Which method for which assumptions#
Start from what you are willing to assume about your data, and read the method family and the graph across the row. Each method’s docstring states its setting in a When to use. paragraph and where it stops working in a Limitations. paragraph.
You assume |
Family and methods |
Start with |
Graph returned |
|---|---|---|---|
One table, no hidden common causes, Markov and faithfulness, a test or score that fits the data |
Constraint-, score-, and permutation-based: PC, IAMB, Inter-IAMB, MMPC, GES, XGES, AGES, hill climbing, tabu search, exact search, MMHC, RSMAX2, BOSS, and GRaSP |
|
CPDAG; MMPC returns the skeleton |
One table, hidden common causes allowed, Markov and faithfulness |
Constraint- and permutation-based: FCI, GFCI, BOSS-FCI, and GRaSP-FCI |
|
PAG |
No hidden common causes, a restricted function class |
Functional and pairwise: DirectLiNGAM, ICA-LiNGAM, Multi-group DirectLiNGAM, CAM, RESIT, SCORE, NoGAM, ANM, PNL, and LOCI |
|
DAG |
No hidden common causes, the model the method’s score assumes |
Continuous optimization: CALM, NOTEARS, and DAGMA |
|
DAG, one member of when only is identified |
Hidden common causes, a restricted function class |
Hidden variables: GIN, RCD, BottomUpParceLiNGAM, and CAM-UV |
|
PAG marks, read as Graph types explains; GIN returns a DAG with latent nodes |
A time series with the same structure at every step |
Time series: VARMA-LiNGAM, Longitudinal LiNGAM, PCMCI, PCMCI+, J-PCMCI+, LPCMCI, Granger, and DYNOTEARS |
|
Time-series graph |
Several environments with known or unknown targets |
Interventional: ICP, GIES, GnIES, IGSP, and UT-IGSP |
|
CPDAG of the interventional class; ICP the parents of one target |
Several environments, read as an index no variable causes |
Environment index: GFCI, CD-NOD, FCI-JCI, GES, hill climbing, tabu search, BOSS, GRaSP, BOSS-FCI, and GRaSP-FCI |
|
CPDAG or PAG, with the index’s edges in |
References#
Verma and Pearl (1990), Equivalence and Synthesis of Causal Models, Proceedings of the Sixth Conference on Uncertainty in Artificial Intelligence.
Meek (1995), Causal Inference and Causal Explanation with Background Knowledge, Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence.
Chickering (2002), Learning Equivalence Classes of Bayesian-Network Structures, Journal of Machine Learning Research 2.
Richardson and Spirtes (2002), Ancestral Graph Markov Models, The Annals of Statistics 30(4).
Zhang (2008), On the Completeness of Orientation Rules for Causal Discovery in the Presence of Latent Confounders and Selection Bias, Artificial Intelligence 172(16-17).
Shimizu, Hoyer, Hyvärinen, and Kerminen (2006), A Linear Non-Gaussian Acyclic Model for Causal Discovery, Journal of Machine Learning Research 7.
Hoyer, Janzing, Mooij, Peters, and Schölkopf (2008), Nonlinear Causal Discovery with Additive Noise Models, Advances in Neural Information Processing Systems 21.
Peters, Mooij, Janzing, and Schölkopf (2014), Causal Discovery with Continuous Additive Noise Models, Journal of Machine Learning Research 15.
Zhang and Hyvärinen (2009), On the Identifiability of the Post-Nonlinear Causal Model, Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence.
Runge, Nowack, Kretschmer, Flaxman, and Sejdinovic (2019), Detecting and Quantifying Causal Associations in Large Nonlinear Time Series Datasets, Science Advances 5(11).
Runge (2020), Discovering Contemporaneous and Lagged Causal Relations in Autocorrelated Nonlinear Time Series Datasets, Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, PMLR 124.
Hauser and Bühlmann (2012), Characterization and Greedy Learning of Interventional Markov Equivalence Classes of Directed Acyclic Graphs, Journal of Machine Learning Research 13.
Peters, Bühlmann, and Meinshausen (2016), Causal Inference by Using Invariant Prediction: Identification and Confidence Intervals, Journal of the Royal Statistical Society Series B 78(5).