Causal inference

Causal inference is the set of methods for working out whether, and by how much, one thing actually causes another, rather than merely occurring alongside it.

Most statistics and machine learning finds associations: patterns that hold in the data as collected. Causal inference asks a different question: what would happen if something were changed? The computer scientist Judea Pearl puts the distinction sharply. Nothing in the joint data on symptoms and diseases tells you whether curing the symptom would cure the disease. To answer that, you need assumptions about how the world works that the data alone cannot supply, which is the formal version of the rule that correlation does not imply causation.

The most trusted method is the randomised experiment: assign a treatment at random, so that the treated and untreated groups differ only in the treatment. When experiments are impossible, costly or unethical, researchers use other designs. Donald Rubin's potential outcomes framework compares what happened with what would have happened otherwise. Pearl's structural causal models draw assumptions as diagrams of causes and use a mathematical do-operator to represent intervening. Economists use instrumental variables and natural experiments, where some outside event assigns treatment almost at random.

A well-known example shows what goes wrong without it. In an earlier pneumonia study described by Rich Caruana and colleagues in 2015, a rule-based model trained on patient records learned that asthma lowered a pneumonia patient's risk of dying. The pattern was real in the data: asthmatic patients were usually sent straight to intensive care, and that aggressive treatment worked. But a model used to decide who needed hospital care would have sent a high-risk group home. The team chose logistic regression, a simpler model they could inspect, over more accurate neural networks, because they could not see what else the networks had learned.

The two fields are now converging. In 2021 Bernhard Schölkopf, Yoshua Bengio and colleagues argued that machine learning and causal research had developed separately and that combining them could help with transfer and generalisation, the ability to keep working when conditions change. A key open problem they named is causal representation learning: discovering useful cause-and-effect variables from raw data such as pixels.

In practice, a prediction model can be accurate without being causal, and that is fine for forecasting under familiar conditions. It is not fine for decisions that change the world, such as which patients to treat or which policy to adopt. When a story says AI found that one thing leads to another in a large dataset, ask whether anyone tested it by intervening, or whether it is an association waiting for a trial.

Common questions

What is the difference between correlation and causation?

Correlation means two things tend to move together in data. Causation means changing one would change the other. Two things can be correlated because a third factor drives both, because the effect runs the other way, or by chance, which is why causal claims need experiments or explicit causal assumptions.

Why can't machine learning tell correlation from causation on its own?

Standard machine learning finds patterns in the data it is given, and the same patterns can arise from very different causal structures. Judea Pearl argues that behind every causal conclusion lies some assumption that observational data cannot test. A model only learns causes if experiments, interventions or causal assumptions are built into how it is trained or used.

What is a confounder?

A confounder is a factor that influences both the supposed cause and the outcome, creating a misleading association between them. In the pneumonia example, intensive care was linked to asthma and lowered the risk of death, making asthma look protective. Causal methods aim to remove or account for such factors.

What is the gold standard for causal inference?

The randomised controlled trial, where a treatment is assigned at random so that the groups differ only in the treatment. When trials are impossible, researchers use natural experiments, instrumental variables, potential outcomes analysis or causal diagrams, each of which relies on stated assumptions.

Finding more

Search for "causal inference introduction", "structural causal model do-calculus" or "causal machine learning" to go further. Good sources include Judea Pearl's overview papers, econometrics and epidemiology textbooks, and machine learning papers on arXiv about causal representation learning. Be cautious with headlines that report a cause from observational data alone, especially in health and policy, unless the study explains how it ruled out confounding.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.