Skip to content
@causaldyn

CausalDyn

CausalDyn builds open research software for causal decision-making in dynamical systems.

causaldyn

Decisions on dynamical systems, from confounded observational data.

Most of the modelling stack stops at prediction. A decision is different in kind: it changes the future, so it has to be identified as an intervention rather than fitted as a correlation, and chosen by constrained optimal control rather than by argmax over a predictive score. These two repos are that step, and the measuring stick for it.

repo what it is
causal-hybrid-control The library. Physics-structured dynamics ẋ = f_known + r_θ with a causally identified residual, constrained OC / MPC on top, and pessimism calibrated to unmeasured confounding rather than to sampling noise. JAX + Equinox.
causaldyn-bench The benchmark. Nine tracks that score prediction and decision separately, so a gradient-boosted tree can win one-step RMSE while a causal constrained controller wins closed-loop regret.

The seam this is about

Three standard approaches, three different problems, and the same gap left over:

  • Forecast + argmax optimises a correlation. Under a confounded logging policy the fitted action response is the observational one — a control channel of 0.02 where the truth is 1.0 — so the planner barely acts and nothing in the loss notices.
  • Causal effect estimation (DML, staggered DiD, synthetic control, causal forests) returns an effect, not a decision: no dynamics, no actuation limits, no horizon, no state the action must not reach. The library treats these as backends, not rivals.
  • Offline RL / MPC on a learned model fits dynamics by residual MSE — which is not identification — and prices its own uncertainty against sampling noise, so the penalty shrinks with N while the bias does not.

What is actually verified

Not a claim of state-of-the-art on a public leaderboard. What exists is a gated chain:

  • Every effect and control claim has a falsifiable, two-sided test in CI — the good case passes and the bad case fails.
  • The theory line is machine-checked: symbolic derivation in Maxima → proof in Rocq 9.2 → a numeric certificate that the closed form matches the simulation. CI compiles the proofs.
  • Both halves are validated on something real, not only synthetic: causal identification against an experimental ground truth (LaLonde NSW — the naive estimate flips sign, Double ML recovers the randomised benchmark), and the control loop against a live BOPTEST building emulator, where it beats the tuned built-in baseline on every KPI at once.

Early, single-author research code. Scope limits are documented where they bind rather than in a footnote — see each repo's CHANGELOG.md, which records the corrections as well as the features.

Popular repositories Loading

  1. causal-hybrid-control causal-hybrid-control Public

    Physics-structured dynamics with a learned causal residual, controlled by constrained optimal control / MPC.

    Python 1

  2. mixdyn mixdyn Public

    A media-mix modelling (MMM) engine in Python and JAX: regressions, discount dynamic linear models, Bayesian models with lift and geo tests in the likelihood, geo hierarchies, test readers and budge…

    Python 1

  3. causaldyn-bench causaldyn-bench Public

    A benchmark for causal, constrained, dynamical decision-making: it scores predictions and decisions, not just one-step error.

    Python

  4. .github .github Public

    Organisation profile

Repositories

Showing 4 of 4 repositories

Top languages

Loading…

Most used topics

Loading…