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 (SCM). An SCM is a special case of causal generative model that can encode causal assumptions beyond those we can capture with a DAG. If a DAG tells us what causes what, an SCM tells us how the causes affect the effects. We can use that extra “how” information to make better causal inferences.
In this chapter, we’ll focus on defining and building an intuition for SCMs using examples in code. In later chapters, we’ll see the additional powers in causal inference beyond those of a causal DAG.
6.1 From a general causal graphical model to an SCM
6.1.1 Converting to an SCM via reparameterization
6.1.2 Formalizing the new model
6.1.3 A discrete, imperative example of an SCM
6.1.4 Why use SCMs?
6.1.5 Differences from related approaches
6.1.6 Causal determinism and implications to how we model
6.2 Equivalence between SCMs
6.2.1 Reparameterization is not enough
6.2.2 Uniqueness and equivalence of SCMs
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 Training an SCM on data
6.4.1 What assignment functions should I choose?
6.4.2 How should I model the exogenous variable distributions?
6.4.3 Additive models: A popular choice for SCM modeling
6.4.4 Linear Gaussian additive model
6.4.5 Linear Non-Gaussian Additive Models (LiNGAMs)
6.4.6 Nonlinear Additive Noise Models (ANMs)
6.4.7 Training additive model SCMs with regression tools
6.4.8 Beyond the additive model
6.5 Combining SCMs with deep learning
6.5.1 Implementing and training an SCM with basic PyTorch
6.5.2 Training an SCM with probabilistic PyTorch
6.5.3 “Neural SCMs” and normalizing flows
6.6 Summary