Feature Stories

Causal Discovery: Learning Causal Structure from Data

1 Introduction

The dominant mode of causal inference in economics takes the causal graph as given: the researcher specifies which variables are confounders, which are mediators, and which instruments are valid, then uses that assumed structure to identify and estimate a treatment effect. This approach is powerful and credible when the structure is known from institutional knowledge — as in a regression discontinuity design, where the running variable and threshold are clear from the data-generating process.

But in many scientific settings, the causal structure itself is unknown and contested. Does education cause income, or does a third variable (family background) cause both? Does social media use cause depression, or do pre-existing mood disorders cause social media use? Does inflammation cause heart disease, or vice versa? Answering these questions requires not just causal inference, but causal discovery: the recovery of causal structure from observational data.

Causal discovery is a rapidly maturing field that straddles statistics, computer science, and econometrics. It begins from a different premise than the potential-outcomes approach: rather than asking "what is the effect of treatment D on outcome Y?", it asks "what directed acyclic graph (DAG) is consistent with the joint distribution of all observed variables?" This article introduces the main families of algorithms, their identifying assumptions, and available software, with attention to both what causal discovery can and cannot deliver.

2 The Problem of Markov Equivalence

The foundation of causal discovery is the Causal Markov Condition: every variable is independent of its non-descendants, given its parents in the DAG. Equivalently, the joint density of (V₁, . . . , Vₚ) factorises along the graph:

(1) p(v1, . . . , vp) = pj=1 p(vj | pa(vj))

where pa(vⱼ) denotes the parents of vⱼ [Pearl, 2009].

The fundamental difficulty is that multiple DAGs can imply the same set of conditional independence (CI) relations and thus be statistically indistinguishable from observational data. For example, the three DAGs X → Y → Z, X ← Y → Z, and X ← Y ← Z all encode the same CI: X ⊥ Z | Y. They form a Markov equivalence class, represented compactly as a Completed Partially Directed Acyclic Graph (CPDAG) or equivalence class graph.

The key question is: under what additional assumptions can the equivalence class be fully resolved, yielding a unique DAG?

3 Constraint-Based Methods: The PC Algorithm

The PC algorithm, named after its inventors Peter Spirtes and Clark Glymour [Spirtes et al., 2000], is the foundational constraint-based approach to causal discovery.

3.1 Algorithm Outline

The PC algorithm proceeds in two phases:

Phase 1: Skeleton recovery. Begin with a complete undirected graph on all p variables. For each pair (X, Y), test whether X ⊥ Y | S for progressively larger conditioning sets S ⊆ V \ {X, Y}. Remove the edge X–Y whenever a separating set is found.

Phase 2: Edge orientation. Use v-structures (colliders) to orient edges. If the skeleton contains X–Z–Y with no edge between X and Y, and Z is not in the separating set of X and Y, then orient as X → Z ← Y (a collider). Propagate orientations using Meek's orientation rules [Meek, 1995] to avoid cycles and new colliders.

The output is a CPDAG that encodes the Markov equivalence class consistent with the observed conditional independencies.

3.2 Faithfulness Assumption

In addition to the Causal Markov Condition, PC requires the Faithfulness Assumption: the observed CI relations are exactly those implied by the graph, with no cancellations. Faithfulness can fail when path coefficients precisely cancel — a knife-edge condition that is probability-zero under continuous distributions but may arise in approximately linear systems.

3.3 Latent Confounders: The FCI Algorithm

When latent common causes are possible (as is almost always the case in economics), the PC algorithm's output may be misleading — a missing edge might reflect a latent confounder rather than causal independence. The Fast Causal Inference (FCI) algorithm extends PC to this setting, outputting a Partial Ancestral Graph (PAG) that distinguishes between "X causes Y", "X is caused by Y", and "X and Y share a latent common cause" [Spirtes et al., 2000].

4 Score-Based Methods: GES

Score-based approaches replace CI testing with optimisation of a scoring criterion (e.g., BIC) over the space of DAGs. The Greedy Equivalence Search (GES) algorithm, due to Chickering [2002], operates directly over Markov equivalence classes:

  1. Forward phase: Starting from an empty graph, greedily add edges that most improve the score, maintaining the CPDAG representation.
  2. Backward phase: Greedily remove edges that improve the score.

Under faithfulness, GES is provably consistent: in large samples, it recovers the true CPDAG. Practical implementations use the BIC score BIC(G) = log p(data | θ̂_G) − (d_G/2) log n, where d_G is the number of free parameters in graph G.

5 Exploiting Non-Gaussianity: LiNGAM

A key limitation of constraint-based and score-based methods is that they recover at best the Markov equivalence class — they cannot distinguish X → Y from X ← Y in a bivariate system without additional assumptions.

The Linear Non-Gaussian Acyclic Model (LiNGAM) framework, introduced by Shimizu et al. [2006], achieves full identifiability under one additional assumption: the noise terms in the structural equation model are non-Gaussian. In a linear SEM:

(2) X = BX + ε,    εj ∼ fj non-Gaussian, mutually independent,

where B is a strictly lower-triangular matrix (after permuting variables), the causal order and the matrix B are jointly identifiable from the data. The algorithm recovers B using Independent Component Analysis (ICA) applied to the residuals.

LiNGAM is particularly useful in settings where economic theory implies a structural linear model and non-Gaussian shocks are plausible (e.g., in time-series macroeconomics, where structural shocks may have fat tails).

6 Continuous Optimisation: NOTEARS

A recent breakthrough came from re-framing causal discovery as a continuous optimisation problem. Zheng et al. [2018] observed that the acyclicity constraint on a DAG — which was previously enforced by enumeration over permutations — can be expressed as a smooth algebraic constraint:

(3) h(W) = tr(eW∘W) − p = 0,

where W is the adjacency matrix of the graph and e^(W∘W) is the matrix exponential of the elementwise-squared adjacency. The problem then becomes:

(4) minW ℒ(data; W)   subject to   h(W) = 0,

which can be solved with standard augmented Lagrangian methods. NOTEARS scales to hundreds of variables — far beyond what PC or GES can handle — though it shares the standard faithfulness and no-latent-confounders assumptions.

Extensions include NOTEARS-MLP for nonlinear models using neural networks, and DAG-GNN for graph neural network-based structure learning.

X
Income
Y
Education
Z
Employment
PC/GES: recovers equivalence class
{X → Y → Z, X ← Y → Z, . . .}
LiNGAM: recovers unique causal
order if errors non-Gaussian

Figure 1: In a three-variable chain, constraint-based methods recover a Markov equivalence class containing multiple graphs with the same CI relations. Non-Gaussianity assumptions (LiNGAM) or intervention data enable unique identification.

7 Intervention Data and Active Causal Discovery

Observational data alone cannot distinguish all members of a Markov equivalence class. Interventional data — observations from experiments where specific variables are set to fixed values via do-operator interventions — can shrink or eliminate the equivalence class [Hauser and Bühlmann, 2012].

The ideal setup for active causal discovery involves an agent that sequentially performs interventions to maximally reduce uncertainty about the causal graph. In practice, the "interventions" available to social scientists are often natural experiments or policy changes, rather than controlled experiments.

Peters et al. [2017] argue that a combination of observational and interventional data, combined with modularity assumptions (mechanisms change independently under interventions), provides the most reliable foundation for causal discovery in practice.

8 Software

  • pcalg (R): Implements PC, FCI, GES, and related algorithms on top of conditional independence tests.
  • bnlearn (R): Comprehensive package for Bayesian network learning, including score-based (HC, TABU) and hybrid algorithms.
  • causal-learn (Python): Maintained by CMU, implements PC, GES, LiNGAM, NOTEARS, and extensions.
  • gCastle (Python/PyTorch): Implements NOTEARS, DAG-GNN, and neural network-based causal discovery methods.
  • tigramite (Python): Specialised for time-series causal discovery using the PCMCI algorithm.

9 Limitations and the Economics Perspective

Several features of economic data make causal discovery particularly challenging:

Many latent confounders. Economic variables are driven by preferences, technologies, and institutions that are largely unobserved. The FCI algorithm allows for latent confounders but produces weaker, less informative output.

Simultaneity. In competitive markets, supply and demand are simultaneously determined. Standard acyclicity assumptions break down, requiring extensions to directed graphs with cycles or equilibrium representations.

Finite samples and high dimensions. CI tests lose power rapidly as the number of conditioning variables grows. Most causal discovery algorithms face a curse of dimensionality that makes them unreliable in typical economic datasets with many correlated variables.

Faithfulness violations. Economic theory predicts precisely calibrated structural equations (e.g., Ricardian equivalence, rational expectations) where path coefficients may approximately cancel, violating faithfulness.

For these reasons, most economists use causal discovery primarily as a model-specification tool — generating candidate DAGs from data for subsequent evaluation — rather than as a standalone identification strategy. Pearl [2009] and Peters et al. [2017] provide comprehensive treatments of the theoretical foundations.

10 Conclusion

Causal discovery offers a fundamentally different answer to the question "where do causal graphs come from?" rather than assuming them from domain knowledge, algorithms like PC, GES, LiNGAM, and NOTEARS attempt to learn them from data. Under faithfulness and sufficient sample sizes, these algorithms can recover the Markov equivalence class of the true DAG — and with non-Gaussianity or interventional data, the unique graph.

For economists, causal discovery is most useful as a complement to theory-driven identification, providing a data-driven check on assumed graphical structures and flagging potential confounders or reversed causal directions that theory may have missed. As datasets grow larger and richer, and as the tools mature, causal discovery is likely to become an increasingly standard part of the empirical econometrician's toolkit.

References

  1. Chickering, D. M. (2002). Optimal structure identification with greedy search. Journal of Machine Learning Research, 3:507–554.
  2. Hauser, A. and Bühlmann, P. (2012). Characterization and greedy learning of interventional Markov equivalence classes of directed acyclic graphs. Journal of Machine Learning Research, 13:2409–2464.
  3. Meek, C. (1995). Causal inference and causal explanation with background knowledge. In Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence, pages 403–410.
  4. Pearl, J. (2009). Causality: Models, Reasoning, and Inference. Cambridge University Press, 2nd edition.
  5. Peters, J., Janzing, D., and Schölkopf, B. (2017). Elements of Causal Inference: Foundations and Learning Algorithms. MIT Press.
  6. Shimizu, S., Hoyer, P. O., Hyvärinen, A., and Kerminen, A. (2006). A linear non-Gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7:2003–2030.
  7. Spirtes, P., Glymour, C., and Scheines, R. (2000). Causation, Prediction, and Search. MIT Press, 2nd edition.
  8. Zheng, X., Aragam, B., Ravikumar, P. K., and Xing, E. P. (2018). DAGs with NO TEARS: Continuous optimization for structure learning. In Advances in Neural Information Processing Systems, volume 31.

Continue Reading

Browse All Sections →
Home
This is some text inside of a div block.
This is some text inside of a div block.
This is some text inside of a div block.

Article Title