Demajh logo Demajh, Inc.

A Real-Time Digital Twin for Type 1 Diabetes using Simulation-Based Inference: what it means for business leaders

The study amortises a physiologically trusted simulator with deep probabilistic inference, delivering millisecond patient-specific twins that foresee glucose swings and enable adaptive insulin therapy without cloud-heavy Bayesian sampling.

1. What the method is

The authors pair the UVA-Padova glucose–insulin simulator with simulation-based inference. Millions of synthetic day-long scenarios teach a normalising-flow posterior estimator to map recent CGM readings, meal logs and pump doses to hidden metabolic parameters instantly. The trained network becomes a real-time “digital twin,” replacing slow MCMC with a single, optimizer-free forward pass.

2. Why the method was developed

Existing twins demand fasting baselines and hour-scale MCMC fits, making them unusable for on-body decision support. Clinics and device firms need second-level predictions that honour uncertainty, generalise across lifestyles and avoid labelled data. Simulation-based inference promises fast, label-free, probabilistic personalisation that can close the loop between sensors and automated insulin delivery.

3. Who should care

4. How the method works

A parameter sampler generates physiologically plausible sensitivity, absorption and gastric-emptying constants, then runs a 24-hour simulator with random meals and boluses. Glucose traces are resampled to CGM cadence and paired with parameters. A convolutional encoder compresses two-hour windows; a mixture-density flow predicts full posterior distributions. Training minimises negative log-likelihood over 1.2 M simulations. At deployment, real CGM and pump data flow through the encoder each minute; the flow outputs parameter posteriors, enabling fast forward simulation for dosing decisions while propagating credible intervals to clinicians or control algorithms.

5. How it was evaluated

Benchmarks pit the network against Hamiltonian Monte Carlo on 20 Diabetes Center Berne patient records plus synthetic patients. Metrics: parameter RMSE, 30-minute glucose-forecast MAPE, credible-interval calibration and wall-clock inference time. Stress tests swap unseen meal sizes, insulin analogues and sensor noise to probe generalisation.

6. How it performed

The twin cut parameter RMSE 35 % and trimmed glucose-forecast error 22 % versus HMC, while slashing inference from 30 minutes to 28 ms on CPU. Credible intervals captured 93 % of ground truth and stayed stable under unseen scenarios, meeting real-time safety margins. (Source: arXiv 2507.01740, 2025)

← Back to dossier index