The first interactive web laboratory for Judea Pearl's causal inference framework. Learn, visualize, and experiment with structural causal models, do-calculus, causal discovery algorithms, and counterfactual reasoning — all in-browser with zero dependencies.
- MIT Technology Review 2026 lists "World Models" as #1 AI trend — causal reasoning is the backbone
- Causal AI is the frontier connecting AI safety, scientific reasoning, and robust decision-making
- No comprehensive interactive web lab exists for this deeply mathematical field
- Pearl's Ladder of Causation (Association → Intervention → Counterfactuals) maps perfectly to interactive modules
- Drag-and-drop DAG editor with nodes and directed edges
- Define structural equations for each variable (e.g., Y := 2*X + U_Y)
- Visualize data generation from the SCM
- Identify paths, d-separation, conditional independencies
- Color-code: confounders, mediators, colliders
- Pearl's 3 rules of do-calculus with step-by-step derivations
- Input: P(Y|do(X)) queries on a user-defined DAG
- Visualize graph surgery (removing incoming edges for do-operator)
- Show back-door criterion, front-door criterion, IV identification
- Animate each derivation step
- PC Algorithm: constraint-based, starts with complete graph, removes edges via conditional independence
- Run on simulated data with adjustable sample size & significance level
- Visualize the skeleton → v-structures → orientation rules pipeline
- Compare true DAG vs discovered DAG with metrics (SHD, precision, recall)
- Classic Berkeley admissions example + custom datasets
- Toggle between marginal and conditional views
- Show how confounding reverses apparent relationships
- Interactive: change confounder strength and watch the paradox appear/disappear
- Visual IV identification on DAGs
- 2SLS (Two-Stage Least Squares) estimation walkthrough
- Weak instruments: show how weak IVs inflate variance
- Interactive: adjust instrument strength, sample size, confounding
- Twin network model visualization
- Compute P(Y_x|X=x', Y=y') — probabilities of causation
- PNS (Probability of Necessity and Sufficiency)
- Interactive: "Would the patient have recovered if given the treatment?" scenarios
- Single HTML file, zero dependencies
- Canvas-based DAG rendering with force-directed layout
- Pure JS causal graph algorithms (d-separation, topological sort, path enumeration)
- CSS Grid layout with dark theme
- Embedded statistical computations (regression, chi-squared, correlation)
- Dark theme (#0a0a0f background, cyan #00d4ff accents)
- Module tabs at the top
- Each module: left panel (controls/params), center (main visualization), right panel (info/derivation)
- Responsive, works on desktop