liveBook · Manning

Constraint-based algorithm

As explained in Causal AI

A constraint-based algorithm infers candidate causal graphs by testing conditional-independence constraints in observed data and comparing them with graphical separation constraints.

A constraint-based algorithm infers candidate causal graphs by finding conditional independencies in observed data and retaining DAGs whose d-separation constraints match those findings. It works in reverse: empirical independence evidence narrows the candidate graph space iteratively. section 4.6.1 section 4.6.2

A typical constraint-based workflow:

  • Test conditional-independence relationships in the available data. section 4.6.2
  • Translate each detected independence into a d-separation constraint. section 4.6.2
  • Iteratively narrow the candidate DAG space to graphs consistent with those constraints. section 4.6.2
  • Use prior knowledge about required or forbidden edges when the DAG space is large. section 4.6.1

PC algorithm and its assumptions

The PC algorithm is a well-known constraint-based method. Its interpretation relies on causal faithfulness: observed conditional independencies must correspond to d-separation statements. Faithfulness violations can make valid distributional independencies impossible to represent with a DAG, while latent variables can prevent required conditioning tests and distort the returned graph. section 4.6.2

Figure 4.22 Assume this is the true causal DAG. Here, B, C, and D are conditionally independent, given A.
figure

Use the figure to inspect conditional independence among observed variables given a parent variable, then compare it with the latent-variable case. section 4.6.2

How Causal AI covers it

How deep it goes
Explains iterative graph restriction, faithfulness, prior constraints, and latent-variable failure modes without deriving test statistics.
Examples
Uses the PC algorithm, a three-variable faithfulness violation, and DAGs whose required conditioning variable is latent.
What it assumes
Assumes familiarity with DAGs, d-separation, conditional independence, and the untestable faithfulness assumption.
What you can do after
Apply it via PyWhy libraries such as causal-learn and DoDiscover to begin causal discovery in Python.
How it connects
Connects causal discovery with DAGs, conditional independence, d-separation, causal faithfulness, latent variables, and interventions.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.