Standard machine learning is excellent at "seeing"—identifying patterns and correlations in data. However, as Judea Pearl argues in The Book of Why: Review, data alone cannot explain "why." To move from mere correlation to causation, we need a framework that can simulate "doing."
The core mechanism of this research direction is graph surgery: the act of mathematically or structurally "mutilating" a system to isolate the effects of a specific action.
The Intuition of Graph Surgery
In a natural system, variables are entangled. If we observe that people carrying umbrellas are more likely to have wet shoes, a standard model might conclude that umbrellas cause wetness. This is because both variables share a common cause: rain.
To find the true causal effect of the umbrella, we must perform an intervention. In the framework established by Alexander Balke and Judea Pearl in Probabilistic Evaluation of Counterfactual Queries, an intervention is modeled as a "local surgery" on a causal graph.
When we force a variable $X$ to take a specific value (an action denoted as $do(X=x)$), we physically or mathematically sever all incoming edges to that variable. By removing the influence of $X$'s parents, we ensure that $X$ is no longer a slave to its historical causes. This "incoming-edge excision," as described by Yusuke Kawamoto in Formalizing Statistical Causality via Modal Logic, allows us to see how the change propagates forward to descendants without being confounded by backward associations.
From Equations to Neural Masks
While the theory of graph surgery began in structural equations, it has recently been translated into the language of deep learning.
In Relating Graph Neural Networks to Structural Causal Models, Devendra Singh Dhami and colleagues demonstrate that the do-operator can be implemented in Graph Neural Networks (GNNs) by masking messages. By zeroing out the messages sent from parent nodes to a target node, the network replicates the structural pruning of Pearl’s calculus.
Similarly, Adrienne Raglin and her team in CAN: A Causal Adversarial Network use masks within Generative Adversarial Networks. This allows a user to "force" a feature—like adding a mustache to a face—and observe how that change flows through the learned causal structure to affect other attributes, while leaving the "ancestors" (like eye color or gender) untouched.
Why It Works: The Autonomy of Mechanisms
The reason graph surgery works is the principle of autonomous mechanisms. Judea Pearl posits in Reasoning with Cause and Effect that a complex system is composed of independent modules. When you intervene on one variable, you only replace the equation for that variable. All other equations (mechanisms) in the system remain valid.
This modularity is exploited in several ways:
- Predictive Coding: In Predictive Coding beyond Correlations, interventions are achieved by fixing a node's value and suppressing its error signal. This effectively severs the backward flow of information without needing to physically rewrite the graph.
- Probabilistic Programming: Languages like $\Omega_C$, introduced by Zenna Tavares in A Language for Counterfactual Generative Models, use "lazy evaluation" to retroactively modify variables in a simulation, allowing for complex "what-if" queries in high-fidelity models.
- Density Estimation: Sergio Garrido shows in Estimating Causal Effects with the Neural Autoregressive Density Estimator that we can recover causal effects in non-linear systems by simply removing the neural sub-network associated with the intervened variable.
The Ladder of Causation
The ultimate goal of these surgeries is to climb what Pearl calls the "Ladder of Causation." 1. Association ($P(y|x)$): Seeing a correlation. 2. Intervention ($P(y|do(x))$): Predicting the result of a deliberate action by pruning the graph. 3. Counterfactuals ($P(y_x | x', y')$): Imagining a different past.
By treating interventions as structural modifications, researchers like Tim Genewein (Algorithms for Causal Reasoning in Probability Trees) and Chitta Baral (Probabilistic reasoning with answer sets) have created systems that can distinguish between "the patient took the medicine and recovered" and "the patient recovered because they took the medicine."
Whether applied to cloud outage diagnosis (Hongyuan Tao, DeepITE) or understanding the drivers of schizophrenia (Giusi Moffa, Longitudinal symptomatic interactions), the logic remains the same: to understand the world, we must be able to simulate breaking it.