Scope and architecture

CausalDynamics.jl implements Pearl-style identification and executable structural models for Causal Dynamical Models (CDMs), including time-indexed simulation, do(·), and shared-U counterfactual trajectories.

The CDCS book uses these exported APIs in narrative chapters. Process/Whitehead gloss lives in the book (Concept Reference Table 8); package names stay Pearl/SciML-facing.

What is in core (v0.1–v0.2)

LayerRoleTypical API
GraphsDAG validation, ancestral sets, pathsis_dag, get_ancestors, find_backdoor_paths
IdentificationCriteria for adjustment / instrumentsd_separated, backdoor_adjustment_set, frontdoor, IV
Static SCMOne-shot settlement given UGraphSCM, DoIntervention, simulate_scm, compute_counterfactual
Discrete-time CDMTrajectories over occasionsDiscreteTimeCDM, DoSequence, simulate, counterfactual
Soft interventionsState-dependent treatment rulesPolicy, policy
Interventional meansMonte Carlo g-computationg_computation
Time-indexed IDUnrolled lag DAGsTemporalDAGSpec, unroll_temporal_dag, temporal_backdoor_adjustment_set

Hard dependencies stay lean: Graphs and CausalInference (d-separation and minimal backdoor algorithms). Frontdoor, IV, path enumeration, SCM/CDM simulation, and estimation bridges are owned here.

What is optional

  • DAGMakie.jl — weakdep plotting (plot_causal_graph, …)
  • Associations.jl — weakdep discovery bridge (PC, OCE → identification); see Associations integration
  • RxInfer / GraphPPL / DataFrames — weakdep variational backdoor head (narrow residualised ATE; see RxInfer integration)
  • TMLE.jl — workflow helpers when the package is loaded (prepare_for_tmle)

What is not in core

ConcernWhere it lives
Discovery algorithms (PC, OCE, CCM, …)Associations.jl (optional weakdep bridge)
ODE/SDE/UDE solversSciML (OrdinaryDiffEq, UniversalDiffEq, …); CausalDynamics supplies structure and do semantics
Full symbolic do-calculus / ModelingToolkit IDStubs only (is_identifiable, SymbolicSCM); unexported until implemented
Process metaphysics vocabularyCDCS book prose, not package exports

Experimental (exported, quarantined)

APIStatus
HypergraphHigher-order edges; not used by identify or CDM simulation
SymbolicSCMModelingToolkit placeholder (system::Any); use GraphSCM for executable SCMs

Façade vs own code

  • Façades over CausalInference: d_separateddsep; backdoor_adjustment_set / adjustment listing → CausalInference backdoor helpers.
  • Own code: frontdoor, instruments, path finding, ancestral sets, GraphSCM, DiscreteTimeCDM, TMLE/RxInfer/DAGMakie/Associations bridges.

Version narrative

  • 0.1 — static graphs, identification façades, GraphSCM
  • 0.2DiscreteTimeCDM trajectories (book Ch. 28); time-indexed unrolling
  • 0.3 — Associations.jl discovery bridge; prepare_from_discovery, OCE → TemporalDAGSpec

See also