chapter six

6 Structural Causal Models

 

This chapter covers

  • Converting a general causal graphical model to a structural causal model (SCM)
  • Mastering the key elements of the SCM
  • Implementing SCMs for rule-based systems
  • Building an SCM from scratch using additive models
  • Combining SCMs with deep learning

In this chapter, I introduce a fundamental causal modeling approach called the structural causal model. For context, in the previous chapters, we learned how to encode causal assumptions in a causal DAG and test that DAG out against data. We also learned how to build a causal generative model using this causal DAG as a scaffold. An SCM is a special case of that kind of causal generative model.

In the causal generative models we’ve built so far, we defined for each node a conditional probability distribution given the node’s direct parents, which we called a causal Markov kernel. We saw we could fit these kernels with parametric models ranging from conditional probability tables to deep neural nets. Further, our choice of how to model the causal Markov kernels was a matter of statistical and computational convenience and preference. For example, we might use look-up tables because the variables are all categorical, or because pgmpy makes it easy. Or perhaps we use deep neural nets because we have a large amount of data, or because we’re don’t mind debugging PyTorch. These criteria have nothing to do with causality, our causal assumptions stopped at the causal DAG.

6.1 Converting a general causal graphical model to an SMC

6.1.1 Converting to an SCM via reparameterization

6.1.2 Breaking down the new model

6.1.3 A discrete, imperative example of an SCM

6.2 Mastering the key elements of the SCM

6.2.1 Defining the SCM

6.2.2 Reparameterization is not enough

6.2.3 Uniqueness and equivalence of SCMs

6.2.4 Causal determinism

6.2.5 The benefits of causal assumptions beyond the causal DAG

6.3 Implementing SCMs for rule-based systems

6.3.1 Case Study: The Monty Hall Problem

6.3.2 A causal DAG for the Monty Hall Problem

6.3.3 Implementing Monty Hall as an SCM with pgmpy

6.3.4 Exogenous variables in the rule-based system

6.3.5 Summary: Applications of SCM-modeling of rule-based systems

6.4 Building an SCM from scratch using additive models

6.4.1 Defining additive models

6.4.2 Benefits of additive modeling

6.4.3 Linear Gaussian additive model