A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Causal Inference in Machine Learning

Research Depth 101 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
669prerequisites beneath it
See this on the map →
Introduction to Bayesian InferenceProbabilistic Graphical Models→→Fairness in Machine Learning Theory
causal-inference causal-graphs treatment-effects confounding intervention

Core Idea

Causal inference in machine learning goes beyond correlation to identify cause-effect relationships: "If we intervene to change X, how will Y change?" This is formalized through causal graphs (directed acyclic graphs representing causal assumptions), do-calculus (Pearl's framework for computing interventional distributions), and randomized experiments (gold standard but often infeasible). Machine learning approaches use observational data with causal assumptions to estimate causal effects, addressing confounding (variables that influence both cause and effect), selection bias, and unobserved confounders. Applications include treatment effect estimation, policy evaluation, and counterfactual prediction.

Explainer

Causal inference is the science of learning cause-effect relationships from data. In machine learning, this emerges as a critical challenge: when you train a model on observational data, are you learning correlation or causation? This distinction is crucial for applications like medical treatment (does this drug help patients?), policy evaluation (does this intervention improve outcomes?), and counterfactual reasoning (what would happen if we changed a decision?).

The Causal Graph Framework: Pearl's causal framework represents causal assumptions as directed acyclic graphs (DAGs). Nodes are variables; directed edges represent causal influences. For example, a treatment T causes outcome Y, and a confounder C causes both T and Y. The graph encodes the causal structure and enables formal reasoning about which variables must be controlled to isolate causal effects.

Do-Calculus: Pearl's do-calculus provides rules for computing interventional distributions P(Y|do(X)) — the probability of Y if we intervene to set X — from observational distributions P(Y|X). The do-operator is key: P(Y|do(X)=x) differs from P(Y|X=x) when confounders exist. Do-calculus formalizes three rules:

1. Ignore observations: P(Y|do(X), Z, W) = P(Y|do(X), W) if Z is not a descendant of X.

2. Ignore interventions: P(Y|do(X), do(Z), W) = P(Y|do(X), W) if there is no causal path from Z to Y given X.

3. Ignore interventions and observations: Complex rule for ignoring variables when confounding is broken.

These rules allow converting do-expressions to observation-based quantities, enabling estimation from observational data.

Confounding and Bias: A confounder is a variable that influences both treatment and outcome. Confounders induce spurious correlation: if C causes both T and Y, then T and Y are correlated even without a causal effect of T on Y. Causal methods address confounding through:

Identifiability: A causal effect is identifiable if it can be computed from the observational distribution and the causal graph. The backdoor criterion (Pearl) provides a sufficient condition: the causal effect of T on Y is identifiable if there exists a set of confounders C such that (1) C blocks all non-causal paths from T to Y (backdoor paths), and (2) no element of C is a descendant of T. If the backdoor criterion is satisfied, the causal effect is identifiable by conditioning on C.

Unobserved Confounding: If unmeasured confounders exist, the causal effect is not identifiable from observational data alone, even with a known causal graph. Alternative strategies:

Machine Learning Integration: Modern causal ML combines machine learning with causal inference:

Practical Challenges:

Applications:

Causal inference is an increasingly critical capability as ML systems move from prediction (does X predict Y?) to decision-making (if we do X, what happens to Y?). Practitioners must understand both the power and limitations of causal methods.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Weak Law of Large Numbers → Probability Axioms and Rules → Conditional Probability → Conditional Distributions → Bivariate Normal Distribution → Normal Distribution: Properties and Fundamentals → Central Limit Theorem: Rigor and Applications → Confidence Intervals: General Framework → Margin of Error and Sample Size → Bayesian Statistics: Prior, Posterior, Credible Intervals → Introduction to Bayesian Inference → Causal Inference in Machine Learning

Longest path: 102 steps · 669 total prerequisite topics

Prerequisites (2)

Leads To (1)