Causal Discovery and Structure Learning

Causal Discovery and Structure Learning

Overview

Causal discovery (a.k.a. structure learning) learns the causal graph itself from observational and/or interventional data — the edges and their directions — rather than assuming the graph and estimating an effect. This is the upstream problem to causal inference.

If the user already has/assumes a DAG and wants an effect estimate, defer to da-12-ab-testing-causal-inference. Use this skill only when the structure is the unknown.

The hard truth of discovery: from purely observational data you usually cannot recover a single DAG — only an equivalence class of DAGs (a CPDAG or PAG). Pinning down direction requires extra assumptions (non-Gaussianity, nonlinearity), interventions, or time order. Always communicate which edges are oriented vs. undetermined.

Core Concepts

1. Markov equivalence, CPDAGs, and what is identifiable

Two DAGs are Markov equivalent if they entail the same conditional independences — they have the same skeleton (undirected edges) and the same v-structures / colliders (A → C ← B with A, B not adjacent). Equivalent DAGs cannot be distinguished by observational independence tests alone (Verma & Pearl, 1990; Andersson, Madigan & Perlman, 1997).

2. Foundational assumptions (state them, always)

Methodology — algorithm families

A. Constraint-based (independence-test driven)

D. Functional causal models (FCMs) — orient beyond the equivalence class

By assuming a functional form, these identify a unique DAG, not just a CPDAG.

E. Continuous-optimization / gradient methods

Reframe combinatorial DAG search as smooth optimization with a differentiable acyclicity constraint — scales and integrates with deep learning.

F. Time-series causal discovery

Tools / Frameworks

Practical Patterns

  1. Always inject background knowledge. Forbidden edges, required edges, and tiered time order (a cause can’t follow its effect) dramatically reduce the equivalence class. Every major tool supports knowledge/tabu constraints — use them.
  2. Match method to assumptions and data type:
    • Possible latent confounders → FCI / RFCI (get a PAG), not PC/GES.
    • Linear + non-Gaussian noise → DirectLiNGAM (gets a full DAG).
    • Nonlinear, continuous → ANM / PNL, or NOTEARS-MLP / DAG-GNN.
    • Discrete/categorical → score-based with BDeu, or G²-test PC.
    • High-dim time series → PCMCI+.
    • Have interventions/experiments → GIES or interventional NOTEARS.
  3. Standardize/scale continuous variables before continuous-optimization methods to avoid varsortability artifacts.
  4. Bootstrap for edge stability. Resample, re-run discovery, and report edge-presence and orientation frequencies rather than one point graph.
  5. Discover → refute → estimate. Use discovery to propose a graph, validate with domain experts and refutation/sensitivity checks, then hand the validated DAG to da-12 for effect estimation. Discovery output is a hypothesis, not ground truth.
  6. Evaluate with the right metric:
    • SHD (Structural Hamming Distance): count of edge insert/delete/reverse ops to match the truth — lower is better; compare against the CPDAG, not a DAG, when methods return equivalence classes.
    • SID (Structural Intervention Distance; Peters & Bühlmann, 2015): counts intervention-distribution errors — closer to what matters for downstream effect estimation than SHD.
    • Also F1 / precision / recall on the skeleton, FDR, TPR.

Anti-Patterns

Troubleshooting

References

  1. Spirtes, Glymour & Scheines, Causation, Prediction, and Search, 2nd ed., 2000 — PC, FCI foundations.
  2. Andersson, Madigan & Perlman (1997) — characterization of Markov equivalence / CPDAGs.
  3. Chickering (2002) — Greedy Equivalence Search (GES). https://jmlr.org/papers/v3/chickering02b.html
  4. Hauser & Bühlmann (2012) — GIES (interventional GES). https://jmlr.org/papers/v13/hauser12a.html
  5. Shimizu, Hoyer, Hyvärinen & Kerminen (2006) — LiNGAM, JMLR. https://www.jmlr.org/papers/v7/shimizu06a.html
  6. Shimizu et al. (2011) — DirectLiNGAM, JMLR. https://jmlr.org/papers/volume12/shimizu11a/shimizu11a.pdf
  7. Hoyer et al. (2008/2009) — nonlinear additive noise models (ANM), NeurIPS.
  8. Zhang & Hyvärinen (2009) — Post-Nonlinear (PNL) model. https://arxiv.org/abs/1205.2599
  9. Zheng, Aragam, Ravikumar & Xing (2018) — NOTEARS, NeurIPS. https://arxiv.org/abs/1803.01422
  10. Ng, Ghassami & Zhang (2020) — GOLEM, NeurIPS. https://arxiv.org/abs/2006.10201
  11. Yu et al. (2019) — DAG-GNN, ICML. https://arxiv.org/abs/1904.10098
  12. Reisach, Seiler & Weichwein (2021) — “Beware of the Simulated DAG”, NeurIPS. https://arxiv.org/abs/2102.13647
  13. Colombo & Maathuis (2014) — order-independent PC-stable, JMLR. https://jmlr.org/papers/v15/colombo14a.html
  14. Lam, Andrews & Ramsey (2022) — GRaSP / BOSS. https://proceedings.mlr.press/v180/lam22a.html
  15. Zhang (2008) — augmented FCI orientation rules for PAGs, AIJ.
  16. Runge et al. (2019) — PCMCI, Science Advances. https://www.science.org/doi/10.1126/sciadv.aau4996
  17. Runge (2020) — PCMCI+, UAI. https://proceedings.mlr.press/v124/runge20a.html
  18. Hyvärinen et al. (2010) — VAR-LiNGAM, JMLR. https://jmlr.org/papers/v11/hyvarinen10a.html
  19. Peters & Bühlmann (2015) — Structural Intervention Distance (SID). https://arxiv.org/abs/1306.1043
  20. Zheng et al. (2024) — causal-learn, JMLR; docs https://causal-learn.readthedocs.io/
  21. Zhang et al. (2021) — gCastle toolbox. https://arxiv.org/abs/2111.15155
  22. Kalisch et al. (2012) — pcalg, JSS. https://www.jstatsoft.org/article/view/v047i11
  23. Tigramite — https://github.com/jakobrunge/tigramite ; DoWhy — https://www.pywhy.org/dowhy/ ; CausalNex docs.