Skip to content

Development history

This page records what each release of symphony-dt added for a computational modeller. It also names the comparable tools whose ideas we borrow. Items marked DONE ship in the release named.

What comparable tools offer

tool what it does well what we borrow
Leaspy (disease progression modelling) long-format data container; population and individual trajectory plots a cohort spaghetti plot and a per-participant report figure
OHDSI CohortGenerator inclusion rules applied in sequence; an attrition table with a count after each rule and the gain of each rule sequential eligibility rules with the same attrition table and per-rule gain
MEDS (Medical Event Data Standard) one flat event table: subject, time, code, numeric value a MEDS reader and writer
bayesplot and ArviZ trace, rank, energy and predictive interval plots the same diagnostic plots on our gated chains
SBC (Modrak et al.) rank plots with simultaneous bands already present; extended with reliability plots for events
e-value calibration tests (Arnold, Henzi and Ziegel) sequential, anytime-valid tests of forecast calibration the monitor that decides when the twin relearns
adaptive conformal inference (Gibbs and Candes, 2021) long-run coverage under drift online recalibration of the twin's intervals
probabilistic digital twins in engineering belief updating and information-driven actions visit scheduling by expected information gain

The survey drew on the Leaspy documentation, CohortGenerator attrition, the MEDS package and the bayesplot reference.

Release 2.1: the modeller's workflow

1. Eligibility with an attrition table (DONE in 2.1)

Declarative inclusion rules apply in order. They cover minimum visits, minimum follow-up and endpoints required at baseline. They also cover cohort labels, age range, the longest gap between visits and custom rules. The result holds the eligible dataset, a sequential attrition table with each rule's gain, and a flow chart. Counts below the small-cell limit are suppressed in every shared output.

2. More data formats and a data profile (DONE in 2.1)

Readers for SAS, Stata, SPSS, JSON Lines and SQL queries, besides CSV, Parquet, Excel and Arrow. A MEDS reader and writer. A REDCap mapping template. A data profile that reports coverage, visits, intervals, missingness and boundary shares per endpoint, with a figure.

3. One study file, one command (DONE in 2.1)

A study.yaml controls the whole run. It names the data source and mapping, the eligibility rules and the model switches. It also sets the held-out design, the sampler, any gate override, forecasts, scoring and outputs. symphony-dt init writes a commented template. symphony-dt run study.yaml runs every stage, writes a manifest per stage and skips stages that are already complete. --dry-run validates the file and the data without fitting.

4. Outputs a modeller can use (DONE in 2.1)

Tidy tables for the posterior summary, forecasts and scores, written as CSV, Parquet and one Excel workbook.

5. Plots for every step (DONE in 2.1)

Trace, rank and energy plots; posterior predictive intervals; and coverage against nominal level. Reliability of event probabilities, cohort trajectories, the attrition flow, the data profile and a one-page participant report. Every plot uses the colour-blind-safe palette and saves to PNG, PDF and SVG in one call.

6. A twin that learns and interacts (DONE in 2.1, EXPERIMENTAL)

A ParticipantTwin object holds one person's twin for its whole life:

  • observe a new visit and update the person's latent state at once, without refitting the population. The update is a tempered SMC sampler with preconditioned Crank-Nicolson moves (Del Moral, Doucet and Jasra, 2006);
  • forecast any horizon, with uncertainty split into population, person and measurement parts;
  • suggest the next visit that most reduces forecast uncertainty, by expected information gain (Lindley, 1956; Chaloner and Verdinelli, 1995);
  • milestone curves: the probability of crossing a clinical threshold by each time;
  • an audit log of every update, saved and reloaded with the twin.

A TwinMonitor watches every forecast that later meets its outcome:

  • an anytime-valid calibration monitor: an e-process on PIT values (Arnold, Henzi and Ziegel; Vovk and Wang). It may be checked after every visit, and its false-alarm rate stays at alpha for all time;
  • adaptive conformal recalibration (Gibbs and Candes, 2021) that widens or narrows intervals online to keep long-run coverage on target, on the bounded clinical scale;
  • a relearning policy: when the monitor's evidence passes its threshold, the population model is refitted, and the new posterior is versioned with its lineage.

Why this is new. Each component exists in the literature. To our knowledge, no tool joins them into one governed loop for a disease-progression twin. The loop updates a monotone latent state, monitors calibration with error control, recalibrates on bounded scales and schedules visits by information. A visit-triggered PD twin on the same three scores appears in a 2026 preprint. The monitoring, recalibration and scheduling layers go beyond it. This claim needs a full literature review before publication, and every part is labelled EXPERIMENTAL until validated on a cohort.

7. Runs on any machine (DONE in 2.1)

  • One run bundle holds everything needed to repeat a run elsewhere: data block, study file, manifest, digests.
  • Slurm job scripts with one chain per task, an Apptainer definition for HPC and a Dockerfile for any machine.
  • JSON Schemas for the dataset and the study file, so R, Julia or any language can produce valid inputs.
  • A JSON command interface for twins: any program can send a visit and receive a forecast on standard streams.

8. An open benchmark (DONE in 2.1)

Synthetic scenarios with known truth cover dense and sparse visits, floor effects, informative dropout and drift. Each is scored with the same frozen specification for the twin, LOCF and the mixed model. One command runs it and writes a table, so any method can be compared on equal terms.

Release 2.2: calibration you can break down

Calibration by subgroup (DONE in 2.2)

subgroup_calibration reports 50% and 95% interval coverage and CRPS for the twin, LOCF and the mixed model. It does so within each level of a grouping such as sex, age band, cohort, genotype or site. Each cell carries a participant-cluster bootstrap interval. The twin also gets a PIT uniformity test with a multiplicity adjustment. Cells with fewer than ten participants are suppressed. See Evaluate.

Next release

Decision curve analysis (DONE, not yet released)

decision_curve reports net benefit of the event forecasts across threshold probabilities. It scores the twin, LOCF and the mixed model beside flagging all targets or none. Each estimate carries a participant-cluster bootstrap interval. See Evaluate.

Leave-future-out predictive density (DONE, not yet released)

leave_future_out scores exact leave-future-out log predictive density over several anchors. It uses the model's own truncated or censored density and scores each target and each participant's future block. Totals by anchor and endpoint carry a participant-cluster standard error. See Evaluate.

PSIS-LOO and stacking (DONE, not yet released)

psis_loo estimates leave-one-out predictive density by Pareto smoothed importance sampling, per observation or per participant, with a Pareto k for each unit. stacking_weights, pseudo_bma_weights and loo_compare weigh and rank model arms from PSIS-LOO or leave-future-out scores. The results match ArviZ on its reference example. See Evaluate.

Prior sensitivity by power scaling (DONE, not yet released)

powerscale_sensitivity diagnoses prior and likelihood sensitivity of each variable by power scaling, with Pareto k checks on the weights. pd_v2_log_prior computes the declared pd_v2 priors of the global parameters in Python, and pd_v2_powerscale_sensitivity joins it to the fit's likelihood. The results match ArviZ on its reference example. See Evaluate.

Identifiability report (DONE, not yet released)

identifiability_report reports prior to posterior contraction for every global parameter. On simulated data it adds posterior z-scores and plots one against the other, flagging weakly identified parameters. See Calibration checks.

ArviZ InferenceData export (DONE, not yet released)

fit_to_inference_data writes a fit with posterior, sample statistics, observed data, replicated data and log likelihood groups. forecast_to_inference_data writes a forecast as replicated data over its targets. Both work with ArviZ 0.x and 1.x. See Input and output.

Covariate-shift diagnostics (DONE, not yet released)

covariate_shift compares an external cohort with the development cohort in aggregates only. It reports standardised mean differences of covariates, baseline scores and follow-up features. It also gives the envelope codes of each cohort and the external share inside the central development range. A cross-fitted domain classifier gives an AUC with a bootstrap interval. See Data.

PROBAST+AI appraisal helper (DONE, not yet released)

probast_appraisal turns answers to paraphrased PROBAST+AI signalling prompts into domain and overall judgements, for the development or the evaluation part. An assessor can override any judgement, and the reason is kept beside the rule's own call. Applicability concerns are rated and combined the same way. See Governance and reports.

Cost-aware visit planning (DONE, not yet released)

plan_visits ranks candidate visits for a living twin by the expected reduction in forecast variance per unit cost. It weighs several endpoints, each by its reduction as a share of its prior variance. The cost adds a visit cost to the burden of each assessed endpoint. The ranking describes forecast uncertainty under the model, not when a patient should be seen. See The living twin.

Model credibility plan (DONE, not yet released)

credibility_plan writes a plan in the style of ASME V&V 40. Its inputs are a question of interest, a context of use, model influence and decision consequence. Model risk comes from a small illustrative matrix and sets a goal for each credibility factor under verification, validation and applicability. Evidence is filled from run manifests where they record it, each item citing its manifest, and the rest is left to be supplied. See Governance and reports.

Estimated population and external methods in the benchmark (DONE, not yet released)

run_benchmark(population="estimated") fits pd_v2 on each scenario's fit data and runs the twin on the fitted draws, and a column records which population was used. benchmark_targets gives any method the same history and targets as the twin. score_predictions scores its forecast draws with the same specification and baselines. See Benchmark.

Quantile recalibration for an external cohort (DONE, not yet released)

recalibrate_quantiles learns a quantile recalibration map per endpoint from the PIT values of a calibration subset of participants. It scores interval coverage and CRPS before and after on a separate evaluation subset, with participant-cluster bootstrap intervals. Recalibrated draws stay inside the scale bounds. See

Sensitivity to data missing not at random (DONE, not yet released)

delta_adjustment shifts the imputed outcomes of participants who dropped out by a grid of deltas towards worse health. It reports the cohort mean and the share meeting the event rule per endpoint, assessment time and delta. tipping_point finds the smallest delta at which a summary reaches a chosen reference. See Evaluate.

Prognostic scores for trial adjustment (DONE, not yet released)

prognostic_scores gives each participant a prediction of an endpoint at a fixed horizon from baseline data only. simulate_prognostic_trial adds a known effect in a simulated randomised trial from pd_v2. It compares the unadjusted estimate with ANCOVA on the score, as in prognostic covariate adjustment. The table reports observed and expected variance ratios. See Evaluate.

Discrete observation model with a practice-effect term (DONE, not yet released)

pd_bb is registered beside pd_v2 as an EXPERIMENTAL model. It keeps the pd_v2 latent process and gives each sum score a beta-binomial likelihood, so floors and ceilings carry mass. MoCA has a transient practice term that fades with the time since the previous test. The package simulates from it, converts pd_v2 data blocks and provides an SBC design, with compile, fit and SBC smoke tests. See Models.