Introduction to structure learning and causal discovery

Grigory Chernov4 Jun 2022

Problem

Analysts often have no experiment and no agreed causal graph, yet must decide which variables to control for or which links to trust. Statistical association alone cannot separate "X causes Y", "Y causes X" and "a common cause drives both". Controlling for the wrong variable (a collider or a mediator) can bias the estimate or hide the effect. Models trained on such links stop working when the system changes.

Example from the article: two independent coin-toss sequences show a correlation after all pairs where both are zero are removed, because the filter acts as a collider.

Solution in brief

Causal discovery recovers a graph from observational data in two steps: test conditional independencies to find which pairs are linked, then orient edges where the data allow it. The data identify the graph only up to a Markov equivalence class. The talk covers PC, FCI, GES and LiNGAM, and shows FCI output used to check how SHAP attributions change under assumed causal structure.

Questions this case answers
  • How to learn which variables cause which from observational data alone, and see which links the data cannot orient
  • How to test how sensitive a model's feature attributions are to assumptions about causal structure
  • How to recover the causal structure between variables from observational data?
  • How to decide which variables to control for in a regression or model without drawing the graph by hand?

Tools and methods

  • PC algorithm — finds the skeleton by conditional independence tests, then orients colliders
  • FCI — PC variant that allows unobserved confounders
  • GES — score-based greedy search over graphs (AIC, BIC)
  • LiNGAM — linear model with non-Gaussian noise, fully identifiable
  • causal-learn — Python library with these algorithms
  • SHAP — feature attributions, compared with and without a causal structure
Continue reading — it's free

Google or a one-time email code. No password.