
Series: The Sequentia Lectures: Unlocking the Math of AI
Part 7: The Frontier – Open Problems & Research Directions
Lecture 60: Causality in AI: The Quest to Teach Machines “Why” Things Happen
In our journey, we’ve seen that machine learning models are powerful correlation engines. They are brilliant at learning that A and B tend to happen together. In Lecture 35, we warned that “correlation does not imply causation”—just because ice cream sales and shark attacks are correlated doesn’t mean one causes the other.
This limitation is perhaps the single biggest gap between current AI and human-like intelligence. A child quickly learns not just that flipping a switch is associated with the light turning on, but that flipping the switch causes the light to turn on. This understanding allows them to reason, plan, and intervene in the world.
How can we give our AI models this same ability to understand “why”? This is the monumental challenge of Causal Inference in AI.
The Ladder of Causation
Computer scientist Judea Pearl, a pioneer in this field, describes three levels of cognitive ability, which he calls the “Ladder of Causation”:
- Level 1: Association (Seeing): This is the domain of standard machine learning. It involves finding patterns and correlations in data. It answers questions like: “What is the probability of Y given that I observe X?” (e.g., “What is the likelihood a customer will churn given their browsing history?”). P(Y | X).
- Level 2: Intervention (Doing): This is the first step into true causal reasoning. It involves predicting the outcome of an intervention. It answers questions like: “What would happen to Y if I do X?” (e.g., “What would happen to customer churn if I send them a discount offer?”). This is written mathematically as P(Y | do(X)). Notice the do() operator—this is fundamentally different from just observing X.
- Level 3: Counterfactuals (Imagining): This is the highest level of causal reasoning, involving imagination and retrospection. It answers questions like: “What would have happened to Y if I had not done X?” (e.g., “Would this specific customer, who received a discount and did not churn, have churned if we had not sent the discount?”).
Today’s AI is exceptionally good at Level 1. The frontier of AI research is a massive effort to climb the ladder to Levels 2 and 3.
Beyond Correlation: The Need for a Causal Model
To move beyond correlation, we can’t just rely on the data alone. We need to create a causal model—a diagram that represents our hypotheses about what causes what in the world. These are often drawn as “directed acyclic graphs” (DAGs), where variables are nodes and arrows represent direct causal links.
For our ice cream example, the causal model would be:
Hot Weather -> Ice Cream Sales
Hot Weather -> Shark Attacks
Crucially, there is no arrow between Ice Cream Sales and Shark Attacks.
This causal model, which often requires human domain expertise to create, provides the structure that allows an AI to start reasoning about “why.”
The Mathematics of “Doing”: Do-Calculus
How do you perform mathematical operations on interventions? Judea Pearl developed a formal framework for this called do-calculus. It provides a set of rules for how to mathematically manipulate causal diagrams and probabilistic statements to calculate the effect of a do(X) intervention, even when you can’t actually run a perfect controlled experiment (which is often the case in the real world).
For example, do-calculus provides a way to estimate the effect of a new drug by using observational data, while carefully accounting for confounding variables (like age or pre-existing conditions) that are identified in the causal model. It’s a powerful and complex set of tools for untangling cause from effect.
Why is Causality the Holy Grail?
Teaching machines to reason causally would unlock the next generation of AI:
- Robustness: A model that understands that “grass” doesn’t cause “cows” would be much better at identifying a cow on a beach. It would be less brittle and less dependent on spurious correlations in its training data.
- Fairness: Causal models can help us understand and mitigate algorithmic bias. We can ask “Would the loan decision have been different if the applicant’s gender was different, all else being equal?”
- Scientific Discovery: AI could move from finding correlations in scientific data to proposing causal hypotheses that can then be tested with experiments.
- True Planning & Strategy: An RL agent that understands causality could make much more intelligent plans. Instead of just learning that “pressing this button is correlated with winning,” it could reason “pressing this button causes the platform to move, which enables me to reach the goal.”
The quest for causal AI is a monumental undertaking. It requires a fusion of statistics, computer science, and even philosophy. It is the research frontier that aims to move AI from simply being a powerful pattern-finder to a true reasoning partner, capable of helping us understand not just what happens in the world, but why.