2 Introduction
2.1 Why Causal Dynamics?
Any complex dynamical system (organism, ecosystem, clinical cohort, coupled socio-technical process) is not a static thing but a process of becoming1 (Whitehead 1978). Structure constrains what can happen; dynamics unfolds those constraints through time; and what we measure is only a partial prehension2 of a deeper state.
This book develops one data-generating framework for that story:
- an invariant Structural stratum whose hypotheses we can test in principle;
- dynamical states that evolve through time (some latent, none fully transparent);
- an observable measurement process (noisy and partial) that generates data from those states;
- causal semantics that keep association, intervention, and counterfactual “what if?” questions distinct.
The focus is practical wherever such systems appear: treatment policies in longitudinal data, ecosystem recovery and intervention effort, disease-spread thresholds, networks under perturbation, and analogous problems outside biology.
Scientific models ought to say explicitly what we intervene upon and what we observe, not merely condition on what was already recorded (Pearl 2009; Imbens and Rubin 2015). Presentational immediacy (what is observed) is not the same as what we do to a system (Whitehead 1978). Pearl’s structural causal models make that separation mathematical; this book brings dynamical models, state-space inference, and graph theory under the same roof (Pearl 2009).
2.2 Why causality and time matter
Correlation is not causation. Causation is nonetheless usually measured as association, and time changes which causal questions we can ask. Observational associations mix effects, selection, and confounding; without structure we cannot predict what happens under intervention (Pearl 2009). Longitudinal systems add feedback, time-varying confounding, and attractor dynamics: the same interaction graph can support more than one stable long-run pattern, so when and how hard we intervene can matter as much as what we change (Robins 1986; Robins et al. 2000; Strogatz 2014; Scheffer et al. 2009).
Pearl’s ladder of causation distinguishes three modes of reasoning (Pearl 2009; Pearl and Mackenzie 2018; Bareinboim 2026), three rungs of prehension: perceiving what is, acting upon it, and imagining what might have been for a specific unit. Chapter 1 develops each rung; the compact reference is:
| Level | Question | Typical mistake if confused with the next rung |
|---|---|---|
| L1: Association | What happens if I observe \(X\)? | Treating a predictive model as if it answers policy |
| L2: Intervention | What happens if I do \(X\)? | Ignoring confounding or mechanism change |
| L3: Counterfactual | What would this unit have seen if \(X\) had differed? | Averaging without fixing exogenous context \(\mathbf{u}\) |
Complex dynamical systems make these distinctions acute. Mechanisms, transport across settings (Pearl and Bareinboim 2014; Bareinboim and Pearl 2012, 2013), and experiments that are impossible or unethical all push us toward explicit causal structure (McElreath 2020). Multistability, thresholds, and intervention timing (policy rollout, restoration effort, regulatory networks on fixed wiring) are worked through with code in Chapter 9 and Chapter 15.
The book’s object is the causal dynamical model: a general framing for structure, time, and observation under Pearl’s levels of Reason. Executable examples use a Julia stack; the packages are not the subject of the book. Package roles and the process gloss for API names are collected in Table 8; how to run the examples is under Using this book.
2.3 Framework at a glance
We organise the material along two axes that are easy to confuse and worth keeping separate:
- Three strata: Structural, Dynamical, and Observable (form, becoming, measurement).
- Three levels of Reason: causal queries (associate, intervene, counterfactualise).
The three strata separate assumptions about what may influence what, how latent state unfolds, and what data show. As in a geological section, only the surface stratum is directly observable; deeper strata (Dynamical, Structural) are inferred from what crops out in measurement, and from how the layers constrain one another (Figure 2.1).
| Stratum | Role | Examples |
|---|---|---|
| Structural | What may influence what; invariances; identification | Graphs, SCMs, \(do(\cdot)\), transport |
| Dynamical | How latent states unfold | ODEs/SDEs, attractors, feedback |
| Observable | What data show and how we learn | Filtering, G-methods, TMLE, policy evaluation |
| Level | Question | Where it is developed |
|---|---|---|
| L1 | Forecast / associate | Parts I–III “Seeing” chapters |
| L2 | Intervene / do | SCMs, dynamics under \(do(\cdot)\), forecasting under intervention |
| L3 | Counterfactual / imagine | Fixed \(\mathbf{u}\), alternative concrescences |
Chapter 1 is the canonical exposition. A standard state-space stack links the strata:
\[ X_{t+1} = f(X_t, A_t, C, U^x_{t+1}), \qquad Y_t = h(X_t, C, U^y_t) \]
Latent \(X_t\) lives in the Dynamical stratum; \(Y_t\) is the observation (what measurement gives); structural parents and \(do(\cdot)\) live in the Structural stratum.
2.3.1 Counterfactuals and creative advance
Without explicit structure, counterfactuals can feel ad hoc. With a CDM, we hold fixed one organism’s exogenous context \(\mathbf{u}\) (its creative advance3), intervene on \(a\) via \(do(\cdot)\), and propagate the result through the same society \((G,F)\). That yields alternative concrescences for the same unit (Chapter 9).
Markov blankets and organism–environment cuts (FEP) bridge structure to dynamics in Chapter 9. Robustness, resistance, and resilience language is developed in Part II.
2.4 Causal dynamical models
Two communities have built powerful but largely separate toolkits. Causal inference excels at interventional and counterfactual questions (Pearl 2009; Imbens and Rubin 2015) but often misses temporal structure, feedback, and attractors. Dynamical systems excel at mechanisms and long-run behaviour (Strogatz 2014; Hirsch et al. 2012) but often lack explicit \(do(\cdot)\) semantics. Real systems need both: time-varying confounding, attractor shifts, and a single object that supports forecasting, interventional simulation, and unit-level counterfactuals (Robins 1986; Robins et al. 2000; Laan and Rubin 2006; Ives and Carpenter 2007).
Questions that need both toolkits
- What happens if we vaccinate earlier? (Chapter 9)
- How much restoration effort to move an ecosystem between attractors? (Chapter 9)
- What would this patient’s trajectory have been under another protocol? (Chapter 28)
A Causal Dynamical Model (CDM) combines mechanistic dynamics, explicit \(do(\cdot)\) and counterfactual semantics (fixed \(\mathbf{u}\)), state-space inference, and graph structure when applicable (Pearl 2009; Durbin and Koopman 2012; Särkkä 2013). CDMs instantiate the three strata and three levels in one generative story. Chapter 28 gives the full notation and a confounded treatment simulation.
2.5 Using this book
This book is a work in progress. Use it as a conceptual and computational treatment of causal dynamics; package manuals and changelogs live in the repositories.
Audience: anyone modelling complex dynamical systems with feedback, latent structure, and imperfect observation (ecology, epidemiology, medicine, climate, and related fields), as well as statisticians and ML researchers bridging causality and dynamics, and graduate students in those areas.
Chapter map and progress: see the preface and chapter list. Concept tables (strata, levels, methods, and optional package terminology): Concept Reference Appendix.
Reading tracks
- Practitioner: skim Chapter 1; Chapter 5 for identification; CDM notation; Chapter 12; Observable Part, especially Chapter 20 and Chapter 23; then Chapter 28. Use Chapter 30 for Julia end-to-end patterns.
- Theory: Part I (1–9) thoroughly; then Observable identification and estimation chapters; Part II as needed.
- Research: sequential read through Chapter 28; implementation sections and appendices as required.
Prerequisites: probability, linear algebra, basic ODE or state-space exposure. Julia helps for the worked examples but is not required to follow the conceptual arc. No prior causal inference is assumed.
2.5.1 Why Julia
The book’s ideas are not tied to one language. The worked examples use Julia because it suits reading mathematics and running it in the same place (Bezanson et al. 2017, 2012).
One language, not two. Much technical computing still splits the work: explore in a slow, flexible language (Python, R, MATLAB), then rewrite hot paths in C or C++ for speed. That two-language problem costs time, introduces bugs, and separates the notebook from production code (Bezanson et al. 2012). Julia was designed so the same source can be interactive and fast enough for serious numerics. Here that means one file can hold the SCM, the ODE, and the estimator you run.
Syntax close to the maths. Julia lets you write \(α\), \(σ_w\), and \(X_{t+1}\) in code much as they appear in the equations (Unicode identifiers, broadcasting, linear-algebra operators). A working aim is that the model can be read from the code, rather than translated into an alien API. Notation on the page and in the examples is kept aligned on purpose. Executed chunks call the public APIs; occasional “From CausalDynamics.jl” (or sibling) callouts show a short package excerpt when that implementation is the definition (see snippets/package-source/).
Multiple dispatch. In many languages, a function “belongs” to one object: model.simulate(). In Julia, a function such as simulate or solve can have many methods, and the runtime selects which one to run from the types of all the arguments together (Bezanson et al. 2017). The same verb can therefore mean the right thing for an ODE problem, an SDE, or a discrete-time CDM, without a giant if typeof(x) == ... tree. For causal dynamics that matters because we reuse verbs (do, identify, simulate, solve) across graphs, trajectories, and estimators; dispatch keeps those verbs coherent as the types grow.
Composability. Julia packages are meant to combine rather than to swallow the world. A graph from one library, a solver from SciML, and a plotting backend can meet in a short script without forcing everything through one megapackage (Rackauckas and Nie 2017; Rackauckas 2026). That matches small, clear pieces (identify, estimate, display) that can be rearranged, rather than a single opaque application. Shared abstractions (arrays, tables, ODEProblem / solver interfaces, and similar) make it practical to swap one machine-learning backend or differential-equation solver for another as the ecosystem evolves, without rewriting the rest of the pipeline.
You can follow the conceptual arc without writing Julia. If you prefer another stack, treat the code as executable notation and port the ideas.
Implementation: Examples run in Julia with Quarto native engine: julia; scripts/ensure_packages.jl loads dependencies. The working stack is CausalDynamics.jl (graphs, identification, SCMs, CDM simulation), CausalTargeted.jl (LMTP and mediation estimation), and DAGMakie.jl (DAG visualisation): identify → estimate → display. API names stay Pearl / targeted-learning standard; any process gloss is book-side only (Table 8). For package manuals and changelogs, use the repositories themselves.
Cross-cutting themes: interventional vs conditional forecasting, transportability, model criticism, and consistent CDM notation.
2.6 Notation
Formal definitions (the tuple \((G, U, F, P(U))\), interventions, counterfactuals, networked CDMs, and beyond the Markovian baseline) are in Chapter 28. The creative advance footnote above is the book’s glossary anchor for Pearl’s \(\mathbf{u}\).
2.7 References
The phrase sits in a long process tradition: Heraclitus’s πάντα ῥεῖ (“everything flows”), then philosophies that take events rather than substances as primary. Alfred North Whitehead’s process of becoming is a modern articulation of that stance; it signals our position that a “system” unfolds in time, not a fixed thing.↩︎
A prehension is any way the present takes account of something else: how data “grasp” latent structure, or how a cause influences an effect. Whitehead’s technical term is related to, but not the same as, everyday “comprehension” or “apprehension”.↩︎
In Alfred North Whitehead’s process philosophy, the creative advance is the open-ended becoming of reality: each moment is shaped by the past but not fully predetermined, with genuine novelty rather than a closed clockwork universe (Whitehead 1978). Do not confuse this with a statistical noise or error term. Noise names unexplained variation within an assumed model and state space; creative advance, in the philosophical sense, is closer to generative openness: the possibility that what can happen is not fixed in advance by the variables already in the equations. The better (still imperfect) match in this book is Pearl’s exogenous vector \(\mathbf{u}\): unobserved or unmodelled generative influences (background conditions, latent structure, omitted causes) that enter structural assignments but are not directly measured. That is why counterfactuals fix \(\mathbf{u}\) for one unit: same hidden generative conditions, different intervention, replayed through the same mechanisms (alternative concrescences). Caveat: standard causal models still place \(U\) inside a fixed graph and mechanism class \((G,F)\); process philosophy can additionally stress that causal structure itself may evolve. We flag that openness via transport, discovery, and model criticism, but do not fully formalise “evolving structure” beyond ordinary model revision.↩︎