Continuously Updating Digital Twins using Large Language Models
Authors: Harry Amad
Nicolás Astorga
Mihaela van der Schaar
Venue: ICML 2025 poster (2025)
Keywords: Digital twin
simulation
dynamical systems
LLM
in-context learning
Primary area: deep_learning->sequential_models_time_series

Abstract: Digital twins are models of real-world systems that can simulate their dynamics in response to potential actions. In complex settings, the state and action variables, and available data and knowledge relevant to a system can constantly change, requiring digital twins to continuously update with these changes to remain relevant. Current approaches struggle in this regard, as they require fixed, well-defined modelling environments, and they cannot adapt to novel variables without re-designs, or incorporate new information without re-training. To address this, we frame digital twinning as an in-context learning problem using large language models, enabling seamless updates to the twin at inference time. We develop CALM-DT, a Context-Adaptive Language Model-based Digital Twin that can accurately simulate across diverse state-action spaces using in-context learning alone by utilising fine-tuned encoders for sample retrieval. We empirically demonstrate CALM-DT's competitive performance with existing digital twin approaches, and its unique ability to adapt to changes in its modelling environment without parameter updates.

Continuously Updating Digital Twins using Large Language Models
Harry Amad Nicolás Astorga
Mihaela van der Schaar
Abstract
concurrently administer chemo- and radiotherapy is non- trivial (Cooper et al., 2004; Pignon et al., 2009). A DT can model factors related to their disease, such as tumour volume, and how they respond to certain interventions to assess the efficacy of different treatment plans, leading to optimal results (Tardini et al., 2022).
Digital twins are models of real-world systems that can simulate their dynamics in response to po- tential actions. In complex settings, the state and action variables, and available data and knowl- edge relevant to a system can constantly change, requiring digital twins to continuously update with these changes remain relevant. Current approaches struggle in this regard, they require fixed, well-defined modelling environments, and they cannot adapt to novel variables without re- designs, or incorporate new information without re-training. To address this, we frame digital twin- ning as an in-context learning problem using large language models, enabling seamless updates the twin at inference time. We develop CALM- DT, Context-Adaptive Language Model-based Digital Twin that can accurately simulate across diverse state-action spaces using in-context learn- ing alone by utilising fine-tuncd encoders for sam- ple retrieval. We empirically demonstrate CALM- DT's competitive performance with existing digi- tal twin approaches, and its unique ability to adapt to changes in its modelling environment without parameter updates.
Why must a digital twin be able to continuously update? An important aspect of effective DT is its ability to contin- uously learn and update as time passes (Tzachor et al., 2022; National Academy of Engineering and National Academies of Sciences, Engincering, and Medicine, 2024). DTs oper- ate in user-defined modelling envirouments, that dictate the state and action variables they can model, and the data and knowledge bases from which they can derive insights. In dynamic settings, however, the variables that best describe system, the actions that apply to it, and the pertinent sur- rounding information can constantly evolve, and models become obsolete if they cannot casily adjust to new con- ditions (Lu et al., 2018). Consider an illustrative example of using DTs to guide care for patients with cystic fibrosis (CF). Medical practice can evolve rapidly," exemplified by the 2012 approval of Ivacaftor, transformative therapy for CF patients with specifie gene mutations (Ramsey al., 2011). Such breakthroughs demand immediate integration into clinical workflows, and if a CF patient's DT cannot easily adapt to incorporate novel treatments like Ivacaftor, it can quickly lose relevance. Furthermore, given the rarity of CF, there is limited patient data available, and therefore any new information, such as annual data releases from the UK CF registry, can be highly impactful. DDTs that cannot con- tinuously learn from new information will therefore perform increasingly sub-optimally for CF patients over time.
1. Introduction
What is digital twin? Digital twins (DTs) compu- tational models that simulate real-world system dynamics. They have been applied in variety of fields, such as finance (Slepneva et al., 2021), climate science (Voosen, 2020), man- ufacturing (Rosen et al., 2015), and medicine (Katsoulakis et al., 2024), and they are particularly useful for scenario planning, by modelling how a system will respond var- ious actions (Tao al., 2018; Corral-Acero et al., 2020). For example, consider a medical patient with oropharyngeal carcinoma, for whom deciding whether to sequentially or
Why do current approaches struggle to continuously update? Existing DTs typically involve knowledge-driver mechanistic components (Laubenbacher et al., 2024) defined by expert-derived equations, data-driven machine learning (ML.) components (Kreuzer al., 2024) defined by neural networks, or some hybrid combination of these (Sokolov et al., 2021; Holt et al., 2024). For these approaches, up- dating modelling environments can be laborious. Updating
Depaatmeent of Applied Mathematics and Theoretical Physics, University of Cambridge, Cambridge, United Kingdom. Corre- spondence to: Harry Amad
'The FDA approved 50 novel drugs in 2024 (Food and Drug Administration, 2024). Pnttps:/ tenttss//ee / hww.///wwooooo/o www.cccsstiiiir. org.uk/ uk/
Proceedings of the ndnd International Conference Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

Continuously Updating Digital Twins using Large Language Models
Modelling Environment (E,)
Dynamical System (s, (X,, Ar,
2)))
Data (D₂)
Knowledge (K,)
X, State space
A, Action space 2 Transition dist.
D, ((t(t) ND
K { Nx
Change in environment
Knowledge (KA)
Knowledge (KB)
FEVI is forced expiratory valume in
FEVI is forced expiratory volume in I sec.
Dornase alfa slows lung function decline.
Dornase alfa slows lung function decline.
Add Ivacaftor information
Ivacaftor improves lung function.
CALM-DT
Traditional DT
Flexible dimensionality (handles SA + Sn) /
Fixed dimensionality (re-design at SA + SB)X
Continuous learning (handles DA DB, KA K
Fixed information (re-training at D - DB, KA - KB)X
Figure 1. DTss operate within a user-defined modelling environment ε,, with a certain ahstraction of the target system S, with state space X, and action space Ar, well as relevant data 1), and knowledge K,- Modelling environments change when the user alters S, incorporate additional state or action variables, or when new data or knowledge is added to D, or K. (example addition to Kr shown in middle panel). Traditional DTs cannot adapt to changes in &, without re-design and re-training, while our CALM- can.
mechanistic components accommodate new variables or information requires significant expert involvement re- define the equations underpinning the model, especially in complex settings. Similarly, ML components operate with fixed state-action dimensions and training data, and they cannot incorporate novel variables or information without undergoing potentially expensive re-training.
et al., 2024b). This encourages us to develop a simulation strategy that manages context length by making intelligent adjustments to the supplied context mid-generation.
In this work, we investigate the ability of LLMs to act as hybrid DT's, making the following contributions:
For DT to remain relevant in real-world settings it must allow inputs and outputs of flexible dimensionality, such that it can incorporate new variables without re-design, and be able to continuously learn and leverage new information without re- re-training.
1. We identify incompatibilities of existing DTs with dy- namic modelling environments, and establish set of desiderata for DT's in such conditions (52). We show that an LLM-based DT can satisfy these desiderata ($3).
2. We propose CALM-DT: Context-Adaptive Language Model-based Digital Twin that can adapt to changes in its modelling environment without re-design or re- training ($4). We address problems with excessive con- text length by adjusting the information supplied the LLM sidd-generation, ensure maximum relevance to the current simulation state. We select trajectories from related systems to include in context using fine-tuned bi- encoder framework, retrieving samples that are expected to minimise the LLM generation error at the current simu- lation state. During retrieval, we append LLM- --M-generatedd summaries of trajectory trends to encoder inputs to im- prove the identification of temporal patterns.
How can large language models address this? Large lan- guage models (LLMs) acquire domain knowledge during pre-training, which can be augmented with task-specific knowledge and data at inference time through prompting. As such, LLMs can be novelly framed as instantiation of hybrid DT, incorporating both knowledge- and data-driven insights into simulation. Importantly, LLMs operate on nat- ural language, permitting inputs of flexible and arbitrary dimensionality, and their in-context learning abilities al- low new information to be incorporated without re-training (Brown et al., 2020).
While not their original use case, LLMs have shown promise in dealing with time-series data (Xue & Salim, 2023; Jin et al., 2024), most notably in an entirely zero-shot fashion (Gruver et al., 2024), suggesting that their use as DTs is plau- sible. However, DT's must be able to simulate across poten- tially vast state-action spaces, and providing enough data to allow LLM achieve this with in-context learning alone can be challenging. LLM context windows are finite, and performance can degrade with excessive context length (Liu
3. We empirically demonstrate that CALM-DT outperforms existing DTs, and we showcase its unique ability to re- main relevant across changes in modelling environments without parameter updates (86).
Throughout this work, we will continually refer back to our CF DT example for illustrative explanations.
2

---

Continuously Updating Digital Twins using Large Language Models
2. Digital Twins in Dynamic Environments
and K, at design time, LLMs can adapt evolving state- action spaces, and learn from new information without re- designs or parameter updates. LLMs operate on free-form natural language, decoupling them from rigid state-action schemas. An L.L.-based DT will therefore satisfy [D1] if a mapping g is developed from state-action pairs of arbitrary dimensionality to natural language. Furthermore, LLMs have the capacity to learn at inference time with in-context learning (Brown et al., 2020). They therefore satisfy [D2]] as their simulations can incorporate new information without parameter updates through changes to their prompts.
A dynamical system is defined as a three-tuple S := AA Ø), where X' S Rdx is dx-dimensional state space, A S pd is a da-dimensional action space, and & is transition distribution. The system at time t E T has history h(()) = (<<(k), a(k))) E H = (X' x A)* of state-action pairs, where [kk) E X' is a state vector and a(k) E A is an action vector. The dynamics of the system is described by the transition & : H x T + P(x)) and actions are determined by an external policy distribution x X T + P(A).
There are outstanding practical challenges with LLM--based DT',, however. The dimensionality of the state-action space for complex systems can be large, and their dynamics can vary significantly in this space. DTs can therefore require large amounts of data to accurately approximate system dynamics across these large spaces. The amount of infor- mation that LLMs can effectively incorporate at inference time is limited, however, making it infeasible for an LLM to accurately simulate a complex S, with a fixed context.
When constructing a DT. user defines a modelling envi- ronment & == (S+, D., K-) which contains an abstrac- tion S. = A,, --) of the system for the DT to ap- proximate, a dataset D, = {(=:((), (1)
t= l==1 No of ob-
T:-
served histories from related systems, and a knowledge base } K, = (ks, NN of descriptions (e.g. physical laws) to guide modelling. Crucially, modelling environments are dynamic, as users may wish to redefine S, and expand D, K, at any moment, inducing a change in modelling environment E, + E,+1. For example, the approval of the novel drug Ivacaftor in 2012 could lead to a user inducing a change in modelling environment by expanding A, to incorporate it, and adding to D, and K, to describe its effects.
To overcome this, we develop a novel context context-adaptive sim- ulation strategy which adjusts the context supplied to the LLM mid mid-generation, based on the information require- ments of the current simulation state. By continuously re- evaluating the relevance of the available information in D, and K2 to the current simulation state we ensure that only the most useful context is given to the LLM, enabling it to simulate across large state-action spaces with varied dynam- ies without overloading its context window.
For DT remain relevant to dynamical system in real- world settings, it must be able to easily incorporate addi- tional state and action variables and refine its approximation with newly available information. To do so, a DT must satisfy the following desiderata:
4. CALM-DT
[D1] Flexible dimensionality. To incorporate new state and action variables as S, evolves, a DT must allow state-action inputs and outputs of varying and arbitrary dimensionality.
We propose CALM-DT, a Context-Adaptive Language Model-based Digital Twin (overview in Figure 2). CALM- DT a simulation approach that allows an LLM to ac- curately model the dynamics of system across diverse state-action pairs by continuously adjusting its context to minimise the generation error at each simulation state. A user inputs the target's state-action history (h), dataset of related trajectories (D,). ). a knowledge base including data and variable deseriptions (K,), an action policy (T), a con- text sample-set size (c). a rolling lookback (l), a resampling buffer (r), and a simulation horizon (F). CALM-DT simu- lates F' state-action pairs via an iterative three-stage process: information retrieval (64.1), prompt formulation ($4.2), and generation (f4.3).
[D2] Continuous learning capability. To leverage updates to D, and K,, a DT must be able to integrate new information without parameter updates.
Existing DT approaches do not satisfy these desiderata, since they have inflexible architectures that are fixed at design time. Upon & - Er+1 they require architectural overhauls to accommodate new A7+1 dimensions and full re-training on D,+1 and K++1- This necessitates a shift towards DTs that natively support dynamic modelling environments, a challenge we address through LLM- simulation.
4.1. Information Retrieval
3. LLMs as Digital Twins
In this stage, relevant knowledge is extracted from K, and the top samples are retrieved from Dr, based on h.
To develop DT' that remain relevant in dynamic modelling environments, we leverage LLMs, since they naturally fulfil [D1-2] from g2. Unlike traditional methods that fix Sr, D,
3

---

Continuously Updating Digital Twins using Large Language Models
1) Information Retrieval
2) Prompt Formulation Prompt
3) Generation
h = (z(m), Hm m= n, K,, Dr F.
Filter information
Generate next state
g [Ks K, (isscclcaan((kk,))) A]]
<Data description in K
(PM(prrmpt)
P(a))
P(a))
Dj= {d; D. Delliseelea k))
Variable descriptions in Ky
P(as)
f f= f=
For o, E Cy:
*(f) ~ 4
f=0
Select context samples
C arg top,(d= (ylor(h) (.(d))
<SSaplle es historyy <Sample or futures
Generate next action a(f) a(f)~<(a(f).)) f)
<Targot history h >
Simulaae the next state of the target system.
Update history h = U {a(f),((f)) h (h)) 1-41
If mod r of 0 and alf) E
Else
While f
Figure 2. Simulation with CALM-DT. Inputs: target history (h), dataset of related trajectories (D-), knowledge base including system and variable descriptions (K-), action policy (s), context sample-set size (c), rolling lookback (T), resampling buffer (r), simulation horizon (F). For F steps: 1) Extract relevant knowledge from K, and choose the top c samples from D2 using fine-tuned encoders ($4.1) 1). 2) Construct natural language prompt describing the target and related systems ($4.2). 3) Draw the next simulated state from the LLM, the next action from s,, and update h (64.3). If a new action is taken, or r steps have been simulated, return to 1), else return to 2).
4.1.1. KNOWLEDGE EXTRACTION
Dr 11t.... S ha S {a=(t)) and t" + w S T; 13.3 From each de E V, we extract a history-future pair, where the history is a length ( state-action sequence covering the identified window that shares actions with h, and the future is the next (up to) r state-action pairs. This forms the action- data base Dy-
K- forms the basis for the knowledge-driven insights that will guide simulation. Through Kr the user can encode their own knowledge into simulations, and assist the LLM to leverage its domain knowledge by providing valuable context (Du et al., 2024). We consider a flexible K2 with varying levels of information, depending on user preference. This can include general descriptions of the target system (e.g. 'This data describes a patient with cystic fibrosis") ) state variables (e.g. 'FEVI is forced expiratory volume in second') and action variables (e.g. 'Dornase alfa can sta- bilise or slow the decline of FEVI"). "). Furthermore, any infor- mation that the user wishes to provide that represents their own priors over expected dynamies can also be included (e.g. 'FEVI tends to decline without treatment"). ) Crucially, this allows users to instil knowledge-baset insights into sim- ulation with semantic descriptions, not requiring distillation into well-formed equations, which can be a difficult task (Kacprzyk& & van der Schaar, 2025). During knowledge extraction, any descriptions involving the state-action vari- ables in h are extracted from K,, along with general system descriptions, to form the relevant knowledge base Kz.
For sample selection, we adapt bi-encoder retrieval methods from natural language processing (NLP) (Cheng et al., 2023; Liu et al., 2024a) to our use case. Given we can convert state-action sequences into natural language representations via g, we can utilise natural language encoders Φi, te to assess the similarity between a target and candidate sample. However, since time-series data differ significantly from typ- ical NLP training distributions, we need to align pre-trained encoder embedding spaces with our task via fine-tuning, Furthermore, we enhance each trajectory's 's textual represen- tation by appending an LLM--ennrran summary of its trends. This enriched representation facil- itates more effective retrieval by improving the encoder's ability to identify temporal patterns.
natural language
We employ contrastive learning (Becker & Hinton, 1992; Hadsell et al., 2006; Chen et al., 2020) to fine-tune Φ, and 6c. using LLM performance feedback to determine positive and negative samples. We construct a training dataset of target-candidate trajectory pairs, where multiple candidates are paired with each target. Each candidate is assigned a score based on the performance that LLM achieves using it as context sample when simulating the target trajec- tory.* 4 For each target, we designate its paired candidate with the best score as the positive sample and its B worst- scoring paired candidates as negative samples. We fine-tune Φi and Φe using the InfoNCE loss (Oord et al., 2018), to
4.1.2. SAMPLE RETRIEVAL
Dr. dataset of N state-action trajectories from related systems (e.g. other CF patients), forms the basis for the data-driven insights that will guide simulation. We wish to select only the most useful samples for the current h.
We firstly filter D, for samples with relevant actions, such that the DT can learn action-induced dynamics. Let ha (aaquu(fa(t)
denote the unique actions in h. We filter D, for samples d; whose action sequences {a) Ti-1 contain a subsequence of length at most / that includes all actions in hg and that is followed by at least one future time step. Formally, the set of valid samples is V (d+ e
'For continuous actions, appropriate discretisation is required. *Scores can be metries such as MSE, MAE, Continuous Ranked Probability Score (CRPS) (Gneiting & Raftery, 2007).
4

---

Continuously Updating Digital Twins using Large Language Models
maximise similarity between targets and their positive can- didates, while minimising similarity to negative candidates. For each target 6, and their respective positive (ct) and negative (fc, } R
Finally, depending on the new h. the decision is made whether to return 1) information retrieval, or 2) prompt formulation. If the newest action is not in the previous has or the resampling buffer is exceeded (i.e.. f mod r = 0), the process returns to 1) to re-select the most relevant infor- mation. Otherwise, the simulation continues from 2) with the same information base.
Ti=1) candidates, this loss is:
bi(t)
exp
C -log exp
)x(())p((et)
(1(1))be(oT)
1==1 exp
To the best of our knowledge, CALM-DT is the first context-adaptive simulation method, dynamically adjusting its knowledge and data mid-generation. Notably, CALM- DT is LLM-agnostic allowing us to leverage arbitrary base LLMs as & without any necessary fine-tuning to incorporate relevant data- and knowledge-drie driven insights. By efficiently selecting and adapting the supplied context, CALM-DDT permits accurate simulation across diverse state-action tra- jectories while maintaining manageable context window sizes. Additionally, novelty arises in our sample-selection method, as we are the first to propose retrieval of time-series data by leveraging LLM-generated summaries to enhance NLP encoder capabilities.
where is a temperature parameter that controls the con- centration of the distribution. This fine-tuning process en- codes some notion of LLM simulation performance into the embedding spaces of oe and Φc. leading to retrieval of samples that enhance simulations for a given target. No- tably, we have not contradicted our claim that CALM-DT can adapt to new modelling environments without parameter updates. We perform fine-tuning only once, in the initial modelling environment Eo. using Do to form the training dataset, and the resulting encoders remain applicable across the proceeding environments, as their inputs are natural lan- guage trajectory representations that are dimension-agnostin Moreover, as demonstrated in $6.2, even without fine-tuning we surpass existing DT approaches, indicating that fully training-free version of CALM-DT is feasible (further de- tails of this fine-tuning process, including elaboration our L.M--genertedd time-series summaries, are in Appendix A).
Crucially, CALM-DT allows continuous and seamless up- dating, as all data- and knowledge-driven insights arise purely from in-context learning. This ensures the model can easily adapt to new modelling environments without re- designs or parameter updates- an advantage that no existing DT approach offers.
At inference time, o, and de are used to compute similarity scores between h and each history of d, E Dy. The top c highest-scoring samples are selected to form the context set Cy= = to ()) (.(d.)).
5. Related Works
5.1. Digital Twins
DT's have been deployed as far back the 1960s, where they were used by NASA to simulate spacecraft (Allen, 2021) based on collection of expertly crafted equations de- rived from physical laws. While expert-defined DTss remain in use (Laubenbacher et al., 2024), they require significant effort on the part of domain experts to distil knowledge into mechanistic equations, which can limit scalability. Methods like genetic programming (Koza, 1994) and Sparse Iden- tification of Nonlinear Dynamics (SINDy) (Brunton et al., 2016) aim to automate the discovery of such models, but these techniques are limited to relatively simple equations, and they result in fixed-dimensional models.
4.2. Prompt Formulation
Once Ky and Cy have been determined, they are struc- tured into a prompt to be supplied to the LLM. The general prompt format is shown in Figure 2, which includes each description k E Ky. each history-future pair in Cy. and the target system's 's history. Example prompts are provided in Appendix B.
4.3. Generation
Supplied with this prompt, the LLM estimates the transition distribution of the target system, L generating a distribu- tion over the natural language representation of the next possible state. Depending on whether uncertainty quantifi- cation desired, sampling can be performed using beam search (Sutskever et al., 2014), to obtain multiple plausible outcomes, greedy decoding. For each state sampled from &. we apply the inverse mapping -1 to transform it into structured state representation, and the corresponding action is then sampled from π. Generated state-action pairs are appended to h, and the oldest entry is removed to maintain a consistent rolling lookback I.
Deep learning approaches offer an alternative by approxi- mating complex dynamics directly from longitudinal data, There are variety of model architectures that are designed to handle sequential data, with the most powerful being those that can model long-term dependencies, including RNNs (Elman, 1990; Graves, 2012) and transformers (Wu et al., 2021: Zhou et al., 2022; Melnychuk et al., 2022). Neu- ral ODEs (Chen et al., 2018: Dupont et al., 2019; Alvarez et al., 2020) extend deep learning capabilities to modelling continuous-time dynamics. Despite their expressiveness,
5

---

Continuously Updating Digital Twins using Large Language Models
deep learning models require fixed input-output structures that are set at design time, obliging their re-design and re- training upon change in modelling environment.
Table I. Comparison of collection of related DTss. Knowledge:
How are snowledge-driver insights incorporated? Probabilistic: Allows uncertainty in simulation? [D1]: Handles arbitrary state-
Hybrid approaches combine mechanistic equations with deep learning methods to improve sample efficiency and generalisation to out-of-distribution data. These range from models that combine neural components with well-defined physical equations (Raissi et al., 2019; Kuang et al., 2024) to those that integrate learnable components into known model structures (Qian et al., 2021; Takeishi & Kalousis, 2021). Recent efforts to automate DT creation leverage LLMs for automatic generation of hybrid DT code structures (Holt et al., 2024).
action dimensions without re-design? [D2]: Incorporates new
information without parameter updates?
Method
Knowledge
Probabilistic [D1] [D2]
Expert DTs
Equations
X
X
Transformer
X
X
RNN
/
X
DyNODE
X
X
SINDY
X
X
HDTwin
Equations
X
X
x
CALM-DT Nat. language
V
Despite these varied approaches, existing DT methods break- down upon changes in modelling environment, as they can- not easily incorporate additional variables learn from new data or knowledge without extensive re-designs and re-training. Makarov et al. (2024) have recently considered direct use of LLMs as DTs, however they require LLM fine-tuning, hindering their ability to continuously learn as new data is released. To our knowledge we are the first to propose DT method that can use any base LLM, with- out fine-tuning, uniquely allowing CALM-DT to adapt to changes in modelling environment.
5.3. LLM-Based Time-Series Forecasters
A related, yet distinct, area is time-series forecasting, where LLMs are gaining traction (Xue & Salim, 2023; Zhou et al., 2023; Jin et al., 2024; Gruver et al., 2024). While these meth- ods show promising results, they focus solely on predicting future values and do not incorporate actions or allow for policy simulation, making them unsuitable for DT applica- tions. Again, using data from related systems for in-context learning with LLM time-series forecasters is unaddressed.
In Table we compare CALM-DT with a variety of ex- isting DTs. Notably, CALM-DT allows the most general form knowledge inputs, allows uncertainty in simulations if desired, and is the only method to satisfy our desiderata.
6. Empirical Investigation
We now demonstrate the empirical performance of CALM- DT. Firstly, we examine simulations in fixed modelling envi- ronments, demonstrating state-of-thee oh-the-art performance ($6.1) 1). We also conduct ablation studies to assess the contribution of different components of CALM-DT (36.2). We then showcase CALM-DT's unique ability to adapt to changes in modelling environment without re- re-design or re-training, demonstrating adaptation to a novel action (56.3), and incor- poration of new data (56.4). We report detailed experimental set-ups in Appendix C.
5.2. World Models
World models are a related research area concerned with modelling environment dynamics to enable planning (Ha & Schmidhuber, 2018). While traditional world models typically focus on fixed-horizon, often discrete-time roll- outs within largely fixed environments, DT's can be seen as a specific class of world model, with some additional re- quirements. DTss must exhibit continuous-timg dynamics, to allow simulation with arbitrary temporal granularity (Chen et al., 2025), and continuously update alongside their physi- cal counterparts (Tzachor et al., 2022; National Academy of Engineering and National Academies of Sciences, Engi- neering, and Medicine, 2024). While typical world models focus on more static environments, DTs must be designed to update. Several recent works have explored using L.MSs as world models (Hao et al., 2023; Liu et al., 2024c; Xie et al., 2025), however since they are not focused on applications as DTs specifically, they typically employ fixed prompt- ing, or fine-tuning, and they do not explore updating the model upon changes in environment. Furthermore, using data from related systems for in-context learning to enhance LLM-based simulations is unexplored.
6.1. Performance in Fixed Modelling Environments
Setup. We consider DT simulations in two medical scenarios: CF progression under treatment with dornase alfa (Yang & Montgomery, 2021), and non-small cell lung cancer (NSCLC) tumour growth under chemo- and radiotherapy. For the CF setting, we use 1000 trajectories from the 2008-2013 UK CF registry for training, and assess three-year simulation performance. For the NSCLC setting, we generate 500 training samples of 60-day cancer progression according to the model from Geng et al. (2017), which has previous use in ML literature (Bica et al., 2020; Seedat et al.,
6

---

Continuously Updating Digital Twins using Large Language Models
Table DT simulation comparisons for CF and NSCLC progression. Averaged over 10 runs, with 95% Cls. Ordered by average ranking.
CF
NSCLC
MSE (4)
MAE (4)
MSE (L)
MAE (4)
Rank (4)
1-NN
107 +
6.96 + 0
181.22 +
6.12 + 0
7.5
RNN
340 = 4.34
13.8 0.090
115 + 4.35
6.04 + 0.645
7.25
Constant
86.8 0
5.84
119.23+0
7.21 +
SINDy
7
5
1.90 x 10
3
6.5
Transformer
6.24 8.01
116
5.86
DyNODE
6.23 0.009
63.6
4.67
4.5
K-NN
0
5.47
97.28
4.91
HDTwin
69.8 3.69
5.44 + 0.169
11.8
3.42
2
CALM-DT 55.3 = 0.811
4.63 + 0.045
7
4.28 + 0.157
1.25
2022; Melnychuk et al., 2022; Holt et al., 2024), and assess 30-day simulation performance. Since the CF data is not publicly accessible, and we generate the NSCLC data from stochastic simulator, the test data is unlikely to appear in any LLM training corpora, addressing potential data leakage issues.
with fine-tuned encoders without natural language time-series summaries appended to their inputs, (v) selection with encoders that are neither fine-tuned given summaries, (vi) selection by querying LLM for the top samples, and (vii) placing the entire dataset in context (C₃ = Dy).
In Table we compare with three simple baselines: constant prediction, as well as K neihrest- predictions with K 1 and with the best observed K. We also compare with five existing DT methods, using the implementations from Holt et al. (2024): an RNN (Graves et al., 2007), Transformer (Melnychuk et al.. 2022), neural ODE model (DyNODE) (Alvarez et al., 2020), mechanistic model discovery method (SINDy) (Brunton et al., 2016), and LLM-driven hybrid DT discovery method (HDTwin) (Holt al., 2024).
On the left of Figure we compare the performance of CALM-DT across different base LLMs, setting either GPT-4o, GPT-4o Mini, GPT-3.5 Turbo 6. On the right we compare CALM-DT across different context 10).
set sizes E {0,
Table 3. CALM-DT CF performance with different Cf selection
methods. Averaged over 10 runs, with 95% Cls. Ordered by MSE
Cj Selection Method
MSE (4)
MAE (4)
Takeaway, Assessing simulation performance in terms of MSE and MAE from the test sample futures, CALM- DT achieves the best ranking, averaged across both metrics and datasets. For CF simulation in particular, CALM-DT outperforms all other methods to a statis- tically significant degree. LLMs, using their inherent domain knowledge along with the context samples pro- vided by our sample selection method, can generate accurate simulations of complex dynamical systems, with interventions. over horizons with both small (CF) and large (NSCLC) number of time steps.
No fine-tume tme-tuning/summary
76.3 + 1.61
5.15 + 0.0713
Cy=0
74.8 0.411
5.24 + 0.021
Random
73.8 3.22
5.22 + 0.100
No fine-tuning
67.1 0.899
4.95 0.040
No summary
0.387
5.0333
LLM selection
65.6 2.19
4.88 + 0.116
C D₁
65.3
4.81 + 0.102
CALM-DT
55.3 + 0.811
4.63 + 0.045
GPT--3.5 Turbo
75
71
MAE
MSE
07
6.2. Ablation Studies
63
Setup. We conduct several ablation studies on
GPT do Min
GPT-4c
59
CALM-DT in the CF setting from $6.1. In Table 3 compare variety of approaches to selecting the
55
85
90
10
MMLU
Concext Set Size (c)
context set Cy. We consider (i) zero-shot generation
Figure 3. Left: Base LIM ablations. Right: Context set size abla- tions. Raw results in Appendix D
(C₁ (), (ii) random selection, (iii) selection with encoders that are not tuned, (iv) selection

---

Continuously Updating Digital Twins using Large Language Models
Takeaway.
K + D), where samples from 2013 with one post- Ivacaftor measurement are also added D, D,+1-
1. The method of selecting C₁ significantly affects simulation performance. Setting Cy 0, conduct- ing random selection, or using a non fine-tuned encoder without appended summaries result similar, relatively poor, performance. Adding ei- ther fine-tuning or appending natural language sum- maries improves encoder selection, and these ap- proaches perform similarly to L.-.-based selection and setting C Dj. Our complete method, us- ing fine-tuned encoder with appended natural lan- guage summaries performs best, at a statistically significant level. interesting to note that the non fine-tuned encoder, with appended summaries, outperforms almost all DT approaches from Table 2. showing that an entirely training-free LLM-based DT can perform well.
We report three-year simulation performance on pa- tients that receive Ivacaftor from 2013-2015 Table
Table 4. CALM-DT simulation post-Ivacaftor across three adapta- tion scenarios. Averaged over runs, with 95% Cls.
Updates to &
MSE (L)
MAE (L)
A
0
4.95 + 0.0166
A + A+ + D
54.4
4.75 0.0242
50.4 0.477
4.28 + 0.0251
2. Simulation performance scales with base LLM ca- pacity (measured here with MMLU scores). Given CALM-DT is LLM-agnostic, this suggests that its performance will continue to improve along with ongoing LLM innovations, as opposed existing DTs with fixed architectures.
Takeaway. Updating the modelling environment by adding the Ivacaftor action without providing any rele- vant information on its effects naturally leads to poor simulation. Expanding K, to include a high-level de- scription of its effects greatly improves performance, and adding patients treated with Ivacaftor to D, leads to further increase. LLMs can incorporate insights from natural language descriptions into simulations, avoiding the need to distil knowledge into well-defined equations, and they can effectively harmonise this with data-driven insights maximise performance.
3. Simulation performance rapidly improves with only few context samples, showing how LLMs can effectively derive insights from small sample appears to be point of saturation, with no further gains being realised for larger c. Conducting careful sample selection is therefore important, as filling the I.IM context window with unnecessary samples hinders performance.
6.4. Incorporating New Data
Setup. We now show how CALM-DT continu- ously learn over time by incorporating growing data into D,. In $6.3 we only used data points from 2013 to expand D, with post-Ivacaftor information, showcas- ing performance immediately after a change in mod- elling environment. Longer term trajectories become available with each yearly release from the UK CF reg- istry, and CALM-DT can easily incorporate this new data improve its accuracy. To demonstrate this, report performance in Table 5 with varying amounts of post-Ivacaftor data in D,, from one to three years.
6.3. Introducing a New Action
Setup. We now demonstrate how CALM-DT natu- rally adapts to changes modelling environment. 2012, Ivacaftor was approved for CF treatment, and it is recorded in the UK CF registry from 2013. We investigate some changes in modelling environment that users could induce to include this new action, and how CALM-DT responds. We examine CALM-DT's performance when updating the:
1. Action space only (AA), where the new action is the only change from E, - Er+1, and no information on the effects of Ivacaftor is given.
Table 5. CALM-DT simulation post- Ivacaftacattor with growing Dr. Averaged over 20 runs, with 95% Cls.
2. Action space and knowledge base (A+K), where a high-level description of Ivacaftor's ss effects, derived from 48-week clinical trial (Ramsey et al., 2011), added K, + KT+1-
Post-Ivacafior Data
MSE (L)
MAE (4)
One year
50.4 + 0.477
4.28 + 0.0251
Two years
50.0 + 1.00
4.29 + 0.0468
Three years
47.8 + 1.01
4.19 + 0.0523
3. Action space, knowledge base, and dataset (A +
8

---

Continuously Updating Digital Twins using Large Language Models
Takeaway. As more post-Ivacaftor data becomes avail- able, CALM-DT learns its effects better, improving in three-year simulation accuracy. CALM-DT can effec- tively utilise growing datasets improve performance without re-iiini
could result in unlikely spikes or dips being included in simulations, or generation of values that violate known do- main constraints. Hallucinations can be difficult to predict or detect automatically, so careful analysis of simulation outputs is critical. Biases in LLM training corpora can influence model outputs (Bender et al., 2021), potentially leading to disparities simulation performance across pop- ulations. Classical tokenisation schemes (e.g. byte-pair encoding (Sennrich et al., 2016)) can limit LLM perfor- mance in numerical tasks (Liu & Low, 2023; Gruver et al., 2024), obliging caution in scenarios where high precision is necessary. Modern tokenisation schemes, however, are im- proving numerical handling (Touvron et al., 2023). Finally, correctly structured outputs cannot be guaranteed, given the stochastic nature of LLMs, although, practice, we rarely experienced such issues. At times, textual explanations or Markdown characters were erroneously included in simu- lation outputs. The majority of these limitations will likely benefit from general innovations in LLM technology.
6.4.1. 1. COMPARISON WITH A DOMAIN-SPECIFIC MODEL
For further context, we compare with recent expert- derived linear mixed-effects model for CF progression under Ivacaftor. Zhou et al. (2024) model CF patients' FEviPP-forced expiratory volume in I second as a per- centage of expected performance, a critical value for measur- ing CF progression-using data from the US CF foundation patient registry (Knapp et al.. 2016). They report an RMSE of 6.78 for six-month predictions on validation cohort. FEVIPP is one of the state variables we model in our CF setting, so we can compare to this. Using three years of post-lvacaftor data in D,, CALM-DT achieves an RMSE for FEVIPP, on our testing cohort, of 8.11 over one year, and 8.58 over three years.² Using Zhou et al. (2024) as a domain-specific upper bound on performance, we see that CALM-DT performs relatively well, even with its low ex- pertise requirements and seamless adaptability to changes in environment.
7.2. Future Works
Potential future directions for CALM-DT include extensions to improve generalisation and adaptability. Generalisation could be improved by incorporating causal graphs into sim- ulation, to ensure known causal relationships are respected, and expanding our information retrieval step to utilise large, unstructured textual corpora with potentially extensive in- sights. To improve adaptability, focus can be placed on actively retrieving information to reduce uncertainty during deployment (Kobalczyk et al., 2025). including strategic selection of informative data samples, which may be costly to acquire (Astorga et al., 2024).
7. Discussion
Our empirical results demonstrate that CALM-DT generates ofate-of-the-arr simulations fixed modelling environments 1). We validate our specific design choices in CALM-
DT ($6.2), and show how it can model novel actions (56.3) and incorporate new data to guide its simulations (56.4). Unlike existing DT approaches, which require architectural modifications and parameter updates to extend state-action spaces and incorporate new information, CALM-DT can adapt without re- re-training, since it relies on in-context learn- ing alone, enabling effective use in real-world, dynamic environments.
Impact Statement
This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
7.1. Limitations
Acknowledgements
There are, of course, limitations to CALM-DT. Inference speed will generally be slower than other DT approaches, especially over extended simulation horizons where the en- coders and base LLM are called multiple times. Further- more, if using closed-sourced L.LMs via API calls, monetary costs must be considered.
Harry Amad's studentship is funded by Canon Medical Systems Corporation.
References
Allen, B. D. Digital twins and living models at NASA. In Digital Twin Summit, 2021. URL https: //ntrs. nasa.
There are also specific artefacts of LLMdbased simulations that users should be aware of. It is well known that L.MMs can hallucinate (Maynez et al., 2020; Ji et al., 2023), which
Alvarez, V. M. M., Royca, R., and Falcujeseu, C. G. Dyn- ode: Neural ordinary differential equations for dynam- ics modeling in continuous control. arXiv preprint
'ee can only report yearly errors, as this is the granularity of the UK CF registry data.
9

---

Continuously Updating Digital Twins using Large Language Models
arXiv:2009.04278, 2020. org/abs 2ttps//.......00.
URL https://arxiv,
time digital twin with analog memristive neural ordi- nary differential equation solver. Science Advances, 11 (22)xadd77571, 2025. URL httaps://doi.rree 1 1 /126/sciadv. sciadv. scd.aa.aa.......... adr7571.
Astorga, N., Liu, T., Seedat, N., and van der Schaar, M. Active learning with Ilms for partially observed and cost- aware scenarios. Advances in Neural Information Pro- cessing Systems, 37:20819-208877, 2024. URL https: //openrevieww.ee///////e/......e wttp://ww....eppreeeeeeeeoooooo.
Chen, R. T., Rubanova, Y., Bettencourt, J., and Duve- naud, D. K. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018. URL
Becker, S. and Hinton, G. E. Self-organizing neural network that discovers surfaces in random-dot stereograms. Na- ture, 355(63356):161116633 1992. URL httpps://oi. org/10 000111////551100
co/paper / 9996ffcbllaeeed66222244466663383 pdf.
Bender, E. M., Gebru, T., McMillan-Majon A., and Shmitchell, On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Account- ability, and Transparency, FAccT '21, pp. 610-623, New York, NY, USA, 2021. Association for Comput- ing Machinery. ISBN 9781 3781450383997. doi: 10.1 .442188.3445922. URL https: htmpss//ddd. http:://oooo///oo 114 1145/3442 21 3445922.
Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. simple framework for contrastive learning of visual repre- sentations. In International conference machine learn- ing, pp. 1597-1607. PmLR, 2020. URL https: /dl. acm. org doii http://oi111.....5.... 0ttp:///...5555552255553533 3524933 3525007
Cheng, D., Huang, S., Bi, J., Zhan, Y., Liu, J., Wang. Y., Sun, H., Wei, F., Deng, W., and Zhang, Q. UPRISE: Universal prompt retrieval for improving zero-shot eval- uation. In Bouamor, H., Pino, J., and Bali, K. (eds.), Proceedings of the 2023 Conference on Empirical Meth- ods in Natural Language Processing, pp. 12318-12337, Singapore, December 2023. Association for Computa- tional I Linguistics. doi: 10.18653/ 758. URL https: /ttp:p::://aaaaaaa http///aaaaatttoooo...oo wwwp:/loooooooo//000 emnlp
Bica, I., Alaa, A. M., Jordon, J., and van der Schaar, M. Estimating counterfactual treatment outcomes over time through adversarially balanced representations. In In- ternational Conference on Learning Representations, net/paf?
2020. URL https://openzett id=BJg866NFVB.
Bonnaffé, W. and Coulson, T. Fast fitting of neural ordi- nary differential equations by bayesian neural gradient matching to infer ecological interactions from time-series data. Methods in Ecology and Evolution, 14(6):1543- 1563, 2023. URL https: http://t..ooo....////o 110.111// 2041 11011-210..0 14121.
Cooper, S., Pajak, T. F., Forastiere, A. A., Jacobs, J., Campbell, B. H., Saxman, S. B., Kish, J. A., Kim, H. E., Cmelak, A. J., Rotman, M., Machtay, M., En- sley, J. F. Chao, K. C., Schultz, C. J., Lee, N., and Fu, K. K. Postoperative concurrent radiotherapy and chemotherapy for high-risk squamous-cell carci- noma of the head and neck. New England Journal of Medicine, 350(19):1337-144 2004. doi: 10.1056/ NEJMoa032646.. URL hctps: www. ne jmmjmmm.. or.r htt.ffl11/10.105//EEE.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901, 2020. URL https: /atp::///ppprr..e httpapperrfillleepaarr//// /ttp:/iie//////////////// 4457c06bfe0335711111188111222221 pdf.
Corral-Acero, J., Margara, F., Marciniak, M., Rodero, C., Loncaric, F, Feng. Y., Gilbert, A., Fernandes, J. F. Bukhari, H. A., Wajdan, A., Martinez, M. V., Santos, M. S.. Shamohammdi, M., Luo, H. Westphal, P., Lee- son, P., DiAchille, P., Gurev, V., Mayr, M., Geris, L., Pathmanathan, P., Morrison, T., Cornelussen, R., Prinzen, F. Delhaas, T., Doltra, A., Sitges, M., Vigmond. E. J.. Zacur, E., Grau, V., Rodriguez, B., Remme, Niederer, S., Mortier, P., McLeod, K., Potse, M., Pueyo, E., Bueno-Orovio, A., and Lamata, P. The 'digital twin' to enable the vision of precision cardiology. European Heart Journal, 41 41(48):4556-4566 03 2020. ISSN 0195- 668X. doi: 10. 10010003euuthhatt//haaal15. URL https: / //doi. 0. 1ttp:///0000/////errrrr.// /eaaa199
Brunton, S. I.., Proctor, J. I.., and Kutz, J. N. Dis- covering governing equations from data by sparse identification of nonlinear dynamical systems. Pro- ceedings of the National Academy of Sciences, 113(15):3932 3937, 2016. doi: 10.1073/pnas. 1517384113, URL htthhhtp/:/wwwt pnas. /org//o///// abs/10. 1073/ 11111110000/ppa.11111111111
W.,
Chen. H., Yang, J.. Chen, J.. Wang. S., Wang, S., Wang. D., Tian, X., Yu, Y., Chen, X., Lin, Y., et al. Continuous-
10

---

Continuously Updating Digital Twins using Large Language Models
Du, K., Snæbbarnarson, V., Stoehr, N., White, J., Schein, A., and Cotterell, R. Context versus prior knowl- edge in language models. In Proceedings of the 62nd Annual Meeting of the Association for Com- putational Linguistics (Volume I: Long Papers), pp- 13211_, Association for Computational Linguis- tics, 2024. URL https: /acl crecllnthlogyy.oom 2024. 2924.acl-lons 714.pdf.
Ha, D. and Schmidhuber, J. Recurrent world models facili- tate policy evolution. Advances in neural information processing systems, 31, 2018. URL https: /ptpspss://ppprsss./// nips. httpc//aaperr_LLeeeapppee////// Eile/ (eeedlde666223355504449992222229 pdf.
Hadsell, R., Chopra, S., and LeCun, Y. Dimensionality re- duction by learning an invariant mapping. In 2006 IEEE computer society conference on computer vision and pat- tern recognition (CVPR '66), volume 2, pp. 1735-1745 IEEE, 2006. URL https: : /ttp///oiiio//// http://.i....111.11.1111
Dupont, E., Doucet, A., and Teh, Y. W. Augmented neural odes. Advances in neural information processing systems, 32, 2019. URL https: htttp:::/ppooceedinggggooo////ee neurips. cc se/paper /iapop//LiLee//ppee//////////
21be9a 4bd4 Paper pdf.
Hao, S., Gu, Y., Ma, H., Hong. J., Wang. Z., Wang, D., and
Hu, Z. Reasoning with language model is planning with world model. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 8154-8173, 2023, URL https: / aclaatoooooooo org 2223/222..02 wwammnmpmminn...m
Elman, J. L. Finding structure in time. Cognitive
Science, 14(2):179-25 1990. ISSN 0364-0213.
doi: http://dc..o//000000/66610119999 com/ URL
Holt, S., Liu, T., and der Schaar, M. Automati- cally learning hybrid digital twins of dynamical sys- tems. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https: / oppnreviees ew. net. pest/pdffid=soee ObSdU2.
Food and Drug Administration. Novel drug ther- apy approvals 2024. Center for Drug Evaluation
and Research, 2024. URL https:
gov/drugg/novel--ruugg wawp:ee---drrraa--vaalll fda/ movel--rrig-aproovals--000
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., and Fung, P. Survey of hallucination in natural language generation. ACM computing surveys, 55(12);1-38, 2023, URL https: l/doi. 10.
Geng, C., Paganetti, H., and Grassberger, C. Prediction of treatment response for combined chemo-and radia- tion therapy for non-small cell lung cancer patients ing bio-mathematical model. Scientific reports, 7(1): 13542, 2017. URL https: articlest seticles/see /ass//441998 017-13646-
com/
Jin, M., Wang, S., Ma, L., Chu, Z., Zhang, J. Y., Shi, X., Chen, P.-Y,, Liang, Y., Li, Y.-F, Pan, S., et al. Time- 11m: Time series forecasting by reprogramming large language models. In The Twelfth International Confer- ence Learning Representations, 2024. URL https: net wwt.t/pddfdddddnneeeeeee
Gneiting, T. and Raftery, A. E. Strietly proper scor- ing rules, prediction, and estimation. Journal of the American statistical Association, 102(477):359- 378, 2007. URL https: 016214506000001433 /ttps////oo..r///11111111
/ /ooeeneviee. wet.//wwweeeeeeeeeeeeeeeeeeeeeee
Graves, A.
Supervised Se- quence Labelling with Recurrent Neural Networks, pp. 37-45, 2012. URL https: //ts::///oo.ieee/ htt///o...g/111001..11 778-3-642-24797-11
Long short-term memory.
Kacprzyk, K. and van der Schaar, M. No equations needed: Learning system dynamics without relying on closed- form odes. In The Thirteenth International Conference on Learning Representationss 2025. URL https:// openreview.
ICar.
Graves, A., Fernández, S., and Schmidhuber, J. Multi- dimensional recurrent neural networks. In Interna- tional conference on artificial neural networks, pp. 549- 558. Springer, 2007. URL https: http://oioooooo//////oo 1007/978-2 3- 540- 12469-0444 -_.6.
Katsoulakis, E., Wang. Q., Wu, H., Shahriyari, L., Fletcher, R., Liu, J., Achenie, L., Liu, H., Jackson, P., Xiao, Y.. al. Digital twins for health: scoping review. NPJ Digital Medicine, 7(1):77, 2024. URL htwps:ttt////e.tm //oi:/ org/ 10. 1 1038////// 74 6 027----33---------
Gruver, N., Finzi, M., Qiu, S., and Wilson, A. G. Large language models are zero-shot time series forecasters. Advances in Neural Information Processing Systems, 36, 2024. URL https: attps:://penzeevess wwweeerrviee.nete/eee. id=md 6 1.88iiikk 1211.
Kingma, D. P. and Ba. J. Adam: A method for stochas- tic optimization. International Conference on Learning Representations (ICLR), 2015. URL https: //axxiv. org/abs/1412 69800.

---

Continuously Updating Digital Twins using Large Language Models
Knapp, E. A., Fink, A. K., Goss, C. H., Sewall, A., Os- trenga, J., Dowd, C., Elbert, A., Petren, K. M., and Mar- shall, B. C. The eystic fibrosis foundation patient registry. design and methods of a national observational disease registry. Annals of the American Thoracic Society, 13 (7):1173-117, 2016. URL https: / /ddii. org/10. 1513/Annal sATS 2 201511 5810..
Liu, T. and Low, B. K. H. Goat: Fine-tuned llama out- performs gpt-4 arithmetic tasks. arXiv preprint urXiv:2305.4220/ 2023. URL https: /arxiv. org/ hts/abs/23000 14201.
Liu, Z., Huan, Z., Wang, X., Lyu, J., Tao, J., Li, X., Huang, F. and Xu, H. World models with hints of large language models for goal achieving. CoRR, 2024c. URL https: / wawahooohoyyyy...ooooooooooottoo org/2025 www.snaanllooooo 3/.
Kobalczyk, K., Astorga, N., Liu, T., and van der Schaar, M. Active task disambiguation with LLMs. In The Thirteenth International Conference on Learning Representations, 2025. URL https::////... http///ppee.eeeeeeoeeeeeeeoeeeep wetee/ewweeeeeeeeeeeeeeeeeeeeeee n forum? id=JAMXRSXLFZ.
Lu, J., Liu, A., Dong, F., Gu, F., Gama, J., and Zhang, G. Learning under concept drift: A review. IEEE transac- tions on knowledge and data engineering, 31(12):2346 2363, 2018. Utthttp:/ dx doi. wrg/10. /10 1109/ TKDE 2018 28768577
Koza, J. R. Genetic programming means for program- ming computers by natural selection. Statistics and com- puting, 4:87-112, 1994. URL https:/ https://doi... iidddoorr........o..oo.....ooo.. 10. 1001 /300015555
Makarov, N., Bordukova, M., Rodriguez- R., Schmich, F,, and Menden, M. P. Large language mod- els forecast patient health trajectories enabling digital twins. medRxiv, pp. 2024-07, 2024. URL https: //doi. 10. http:/1..1111//1111 1101/2024 07...........995..7777.
Kreuzer, T., Papapetrou, P. and Zdravkovic, J. Ar- tificial intelligence in digital twins-a system- atic literature review. Data & Knowledge Engi- neering, 151:102304, 2024. ISSN 0169-023X. doi: https://oi.og//000006........222 com/ URL ccienee/arrtcee//l////8692222222
Maynez, J., Narayan, S., Bohnet, B., and McDonald, R. On faithfulness and factuality in abstractive summarization. In Proceedings of the 58th Annual Meeting of the Associ- ation for Computational Linguistics, pp. 1906. Associa- tion for Computational Linguistics, 2020. URL https: / //aclanthology .rg. wwwp///0.........o awl-mallla..... ww...iiin.....mm. 173/.
Kuang, K., Dean, F., Jedlicki, J. B., Ouyang, D., Philip- pakis, A., Sontag, D., and Alaa, A. Med-real2sim: Non- invasive medical digital twins using physics-informed self-supervised learning. In The eiiht Annual Conference on Neural Information Processing Systems, 2024. URL https: http://oppeeeiieeee wwwppereewww..ee/eeeeeeee.eeeeee / id=xCUXJq0ySD.
Melnychuk, V., Frauen, D., and Feuerriegel, S. Causal trans- former for estimating counterfactual outcomes. Inter- national Conference
Machine Learinng pp. 15293- 15329. PMLR, 2022. URL https: settps://proceedinng mir mir.press /v vv 62 meennccull222aaa html.
National Academy of Engineering and National Academies of Sciences, Engineering, and Medicine. Foundational Research Gaps and Future Directions for Digital Twins.
Kumar, S. K. On weight initialization in deep neural net- works. arXiv preprint 170..0/704.88633 2017. URL https: /ttps:///rxivv wawivv.vvvvv.///av org/ abs/ 11001174.0000 08863.
The National Academies Press, Washington, DC, 2024. ISBN 978-0-309-70042-99 doi: 10. 10.17226/2689, URL https: //doi. org/ 10. 1..0..12220 17226/2632224
Laubenbacher, R., Mehrad, B., Shmulevich, I. and Trayanova, N. Digital twins in medicine. Nature Com- putational Science, 4(3):184-191 2024. URL https:
Oord, A. v. d., Li, Y., and Vinyals, O. Representa- tion learning with contrastive predictive coding. arXiv preprint WVXVv1800.00374. 2018. URL https:// arxiv. www.vv.org/baa..
Liu, H., Liu, J., Huang, S. Zhan, Y.. Sun, H., Deng, W., Wei, F., and Zhang, Q. se2: Sequential example lection for in-context learning. In Findings of the As- sociation for Computational Linguistics ACI. 2024, pp. 5262-5284, 2024a. URL https: aaclanttottoo..... org/2024 findings-acl.
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., al. Pytorch: An imperative style, nigh-performance deep learning library. Advances in neural information processing systems, 32, 2019, https::s: /dl acc. org / doi /10 5555 3404234448770 3455008.
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157- 173, 2024b. URL https: http//aaaannnooooo org/ 2024. tacltl.cl..90
Pignon, J.PP., le Maître, A., Maillard, E., and Bourhis, J. Meta-analysis of chemotherapy in head and neck cancer (mach-nc): An update on 93 ran- domised trials and 17,346 patients. Radiotherapy
12

---

Continuously Updating Digital Twins using Large Language Models
and Oncology, 92(1):4-14, 2009. ISSN 0167- 8140. doi: https://bbb.rrg//111060/./roooo.
Behavioural Sciences, 2021. URL http://des doi. org/10. 0tg/10.11405// 154.11/555eesbbsb 2021 04. 02. 145.
014. URL htt.tttse//w...ceeeeeeeeeeeeeee com/
Sokolov, M., von Stosch, M., Narayanan, H., Feidl, E, and Butté, A. Hybrid modeling- a key enabler towards realizing digital twins in biopharma? Current Opinion in Chemical Engineering, 34: 14:100715, 2021. URL https: / //doi. 1016/ coche.eccc..o.o.oo..........c 20201.11111....
Qian, Z., Zame, W., Fleuren, L.,, Elbers, P., and van der Schaar, M. Integrating expert odes into neural odes: phar- macology and disease progression. Advances in Neu- ral Information Processing Systems, 14:11364-11383, 2021. URL hittps://ppereete id (d-tDqef76wEas
Sutskever, I., Vinyals, O., and Le, Q. V. Sequence to sequence learning with neural networks. Ad- vances neural information processing systems, 27, 2014. URL
net/pdf?
Raissi, M., Perdikaris, P., and Karniadakis, G. E. Physics- informed neural networks: A deep learning framework for solving forward and inverse problems involving non- linear partial differential equations. Journal of Com- putational physics, 378:686-707, 2019. URL https: //doi org/ / C 1 101 6/ j- jop. 201 8 10. 045.
cc/ hcc/appet.iiileepppee///////// ba15e133ca55f255777744400bbeeee3 pdf.
Takeishi, N. and Kalousis, A. Physics-intcgraate varia- tional autoencoders for robust and interpretable gener- ative modeling. Advances in Neural Information Pro- cessing Systems, 34:14809-14821, 2021. URL https:
Ramsey, B. W., Davies, J., McElvaney, N. G., Tullis, E., Bell, S. C., Dievinek, P., Griese, M., McKone, E. F., Wainwright, C. E., Konstan, M. W., et al. A cftr poten- tiator in patients with cystic fibrosis and the g55ld muta- tion. New England Journal of Medicine, 365(18))1663 1672, 2011. URL https: /to:://doo..oe oro.orgg///// /00 1056/ jejmaa1155185
/
net
Tao, F., Cheng, J., Qi. Q. Zhang, M., Zhang, H., and Sui, F. Digital twin-driven product design, manufac- turing and service with big data. The International Jour- nal of Advanced Manufacturing Technology, 94:3563- 3576, 2018. URL https: /tt::///ooiii www.dooo.o.....00.0./..00...11.. s
Rosen, R., von Wichert, G., Lo, G., and Bettenhausen, K. D. About the importance of autonomy and digital twins for the future of manufacturing. IFAC- PapersOnLine. 5873):567--72. 2015. ISSN 2405-8963. http:///ooooo///0....0////aa.oo.
Tardini, E., Zhang, X., Canahuate, G., Wentzel, A., Mo- hamed, A. S.,, Van Dijk, L.,, Fuller, C. D., and Marai, G. Optimal treatment selection in sequential systemic and locoregional therapy of oropharyngeal squamous carcino- mas: deep l-larrnnn with
doi:
URL https://wee httppss/www.eeeeeeeeeeree.e..oo com/
digital twin dyad. Journal of medical Internet research, 24(4);229455 2022. URL https: // /oii oar.i.rrg110 10. 2196/29455.
15th IFAC Symposium onInformation Control Problems inManufacturing.
Seedat, N., Imrie, F., Bellot, A., Qian, Z., and van der Schaar, M. Continuous time modeling of counterfactual outcomes using neural controlled dif- ferential equations. In International Conference Machine Learning, pp. 19497-19521. PMLR, 2022. http:ss::// httptpp::/pprreeee http///roceees...e///////// mlr press// v1 v1 2tt2//eeedtt2bbbee.e..e.
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. Llama: Open and efficient foundation language models. arXiv preprint 23Xiv:2302.139711 2023. URL https: arwiv. abs / /22./223...119
Tzachor, A., Sabri, S., Richards. C. E., Rajabifard, A., and Acuto, M. Potential and limitations of digital twins to achieve the sustainable development goals. Nature Sustainability, 5(10):822-88) 829, 2022. URL https: / //doi. wrt./oggg/////// 10tp//10.1133111 100.0.003//418993 00t.0/////41111--0-000000099 0220000222202222220000002200
Sennrich, R., Haddow, B., and Birch, A. Neural machine translation of rare words with subword units. In Pro- ceedings of the 54th Annual Meeting of the Associa- tion for Computational Linguistics (Volume 1: Long Pa- pers), pp. 1715. Association for Computational Linguis- ties, 2016. URL https:://///...... / antho wwwhhhoooyyoooooooooooo oorg P P16-1162/.
Voosen, Europe building a 'digital twin' of earth revo- lutionize climate forecasts. Science, 2020. URL https:
/ / //doi. 1226 htt///cieenc.cce abf0687.
Slepneva, T., Chernysheva, M., Zaitseva, K., et al. Impact of digital twin technology on the financial performance of corporations. European Proceedings of Social and
Warner, B., Chaffin, A., Clavié, B., Weller, O., Hall- ström, O., Taghadouini, S., Gallagher, A., Biswas, R., Ladhak, F,, Aarsen, T., et al. Smarter, better, faster,
13

---

Continuously Updating Digital Twins using Large Language Models
longer: modern bidirectional encoder for fast, mem- ory efficient, and long context finetuning and inference. arXiv preprint arXiv: 3666, 2024. URL https: //arxiv. wwwoor////oo.. http://bb/22222...///// 13663.
Zhou, T., Niu, P., Sun, L., Jin, R., et al. One fits all: Power general time series analysis by pretrained Im. Ad- vances in neural information processing systems, 36: 33322-43355, 2023. URL https: http:::///peeeevies. net.ppdFP.d==gg6FFVEE
Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., Davison, J., Shleifer, S., von Platen, P., Ma, Jer- nite, Y., Plu, J., Xu, C., Scao, T. L., Gugger, S., Drame, M., Lhoest, Q., and Rush, A. M. Transformers: State- of-the-art natural language processing.
Proceedings
of the 2020 Conference on Empirical Methods in Natu- ral Language Processing: System Demonstrations, pp. 38 45, Online, October 2020, Association for Compu- tational Linguistics. URL https: /
/www.w.. ac web. emn wawnnmnleeeeen ped-mos.... 6.
htrg/anthology/200
Wu, H., Xu, J., Wang, J., and Long. M. Autoformer: Decom- position transformers with auto-correlation for long-term series forecasting. Advances in neural information pro- cessing systems, 34:22419-2244 22430,, 2021. URL https: d= d= TSUUUU 1y.
// //openreview.o
net net/pdf? htwp:eewwwwwwwweeeeeeeeeee
Xie, K., Yang. I., Gunerli, J., and Riedl, M. Making large language models into world models with precondition and effect knowledge. In Proceedings of the 31st Inter- national Conference on Computational Linguistics, pp- 7532-7545, 2025. URL https: /aclanthology. org/2023 (wl.:22.coolln www.inoooiiion.o mang.-main.... 503/.
Xue, H. and Salim, F. D. Promptcast: A new prompt- based learning paradigm for time series forecasting. IEEE Transactions on Knowledge and Data Engineering, 2023. URL https: /tt::://doiiie www.io.rg/11.. 1109 TKDE. 2023. 3342137.
Yang. C. and Montgomery, M. Domnsse alfa for cystic fibrosis. Cochrane Database of Systematic Reviews, 3(3), 2021. URL https: nttps://doi. /doi. 14651858, cd001127.0..00
org/10.1002.
Zhou, G. C., Wang. Z., Palipana, A. K., Andrinopoulou, E.R., Miranda Afonso, P., McPhail, L., Siracusa, C. M., Gecili, E., and Szezesniak, R. D. Predicting lung function decline in cystic fibrosis: the impact of initiating ivacaftor therapy. Respiratory Research, 25 (1):187, 2024. URL https:://////. //t::/doo /oii. ort/o/////////o. /tgg/1..186/ 0
Zhou, T., Ma, Z., Wen, Q. Wang. X., Sun, L., and Jin, R. Fedformer: Frequency enhanced decomposed trans- former for long-term series forecasting. In Interna- tional conference on machine learning, pp. 27222-2227777 27286. PMLR, 2022. URL bttps::/proceed// press/vi 62/ zhou22g. html.
mlr.
14

---

Continuously Updating Digital Twins using Large Language Models
A. Bi-Encoder Fine- Tune-T with LLM Feedback
include extended details on our bi-encoder retrieval fine-tuning process here.
Time-Series Natural Language Representation. Firstly, define the mapping g we use produce natural language representation of time-series. Consider the following time-series with state variables x and y, and action variable z.
[<=: 1,y: 1, 0}, (x v 1, 0), {x 3, 1,,
Where the measurements are taken at times = 0, 1, 2. The natural language representation of the states of this series, as produced by our mapping is:
Time 0: 1, y: 1 Time 1: y: unn
Time 2: 3, y: 1
And for the actions, is:
Time 0: z: unm
Time 1: 2: Time 2: 2.
Training Dataset Construction. Given a dataset of trajectories D = ((,((),,; (1)) 1i=1, we first construct contrastive learning training dataset, in manner similar to existing NLP approaches (Cheng et al., 2023; Liu et al., 2024a). Each sample in this dataset contains a target trajectory and C candidate trajectories. We then score each candidate with a performance metric, such as MSE, MAE, or CRPS (Gneiting & Raftery, 2007), that is based on an LLM simulating the future the target trajectory, using the candidate an in-context learning example. Based on these scores, we designate candidates as either positive or negative samples. Specifically, the candidate that results in the best score is designated the positive sample, and the B worst performing candidates the negative samples. Finally, for each target, and its respective positive and negative candidates, This is to allow the encoders to more easily pick up temporal trends, that may be difficult to assess from numerical values alone. We generate this trajectory summary by supplying an LLM with the following prompt:
generate natural language summary of the trends in its state trajectory, using LLM.
For each variable this time-series, write <VARIABLE NAME>: <TREND>, where <TREND> is
list of one or more descriptive words that summarises the series in chunks. Decide how to chunk each variable based on when its trend changes. Neighbouring chunks should not have the same description. Each <TREND> each word is either [incrcasing, decreasing, stable]. There should be fewer chunks than points in the time-series. Time- series: (trajectory_str;
u
This summary is then appended to the natural language representation of the trajectory as produced by the mapping g.
Training. With the training dataset constructed, we initialise two encoders d, and Φe to encode the target and candidate samples, respectively. Then, for each target t, we extract their positive (ct) and negative (fc, BB candidates, and train the encoders with the InfoNCE loss (Oord et al., 2018):
exp( (u(t)-dofet)
C log cxp
(2)
(t) + >/" i== exp( (e(t)-
where is temperature parameter that controls the concentration of the distribution.
B. Example Prompts
Here are example prompts input to the LLM for simulation of CF and NSCLC patient, produced by the Prompt Formulation step of CALM-DT as described in $4.
15

---

Continuously Updating Digital Twins using Large Language Models
B.I. CF Example Prompt
The data is from a patient with cystic fibrosis. The time unit is in years.
STATE VARIABLES:
FEVIPP: Forced expi ratory volume in 1 second compared to the standard for that age. Weight: Patient weight kg.
Height: Patient height in cm.
ACTION VARIABLES:
Dornase Alfa: treatment which stabilise slow the decline of FEVI.
Examplc 1 state history:
Time 2008: FEVIPP: 80.1, Weight: 65.0, Height: 168 Time 2009: FEVIPP: 81.0, Weight:
66.2, Height: 168 Time 2010: FEVIPP: 74.2, Weight: 63.5, Reight: 168
Example 1 action history: Time 2008: Dernase Alfa Time 2009: Dornase Alta
Time 2010: Dornase Alta
Example state future:
Time 2011: FEVIPP: 71.2, Weight: 64.1, Height: 168
Given the follewing state history:
Time 2008: FEVIPP: 77.8, Weight: 70.1, Height: 174 Time 2009: FEVIPP: 80.1, Weight:
69.8, Height: 174 Tine 2010: FEVIPP: 74.0, Weight: 70.9, Height: 174
And the follewing action history: Time 2008: Alfa Time 2009: Reeaas_Alles Time 2010: Dornase_Alfa
Simulate the next timestep's state, for all state variables. Follow the exact format of the state history.
B.2. NSCLC Example Prompt
The data describes treatment responses for combined chemo and radiation therapy for non- small cell lung cancer patients, generated from bio-mathematical model. The time unit days.
STATE VARIABLES:
cumour_volume: ume Vclume of the tumour with units cm"3. units mg/m"3.
concentration of the chemotherapy drug vinblastine with
ACTION VARIABLES: chemotheraay__dcsage Dosage of the chemotherapy drug vinblastine with units mg/m"3.
radiotiherapy_desagee Dosage of the radiotherapy with units Gy.
Example 1 state history:
Time 0: tumour_vclune 734.27, aaapechheray_dduggoooncneeet
Time 1: aamour_volumee
200. 94, chemotherapy_drug_cooo c
Time 2: tumour_volur 227 94,
cherrootierrrp...rrn...oooontntt 0 Time 3: tumour_volume: 248.87,
0 Time 4: tumour monour_volume: 161.67,
treenttierrryy.duu_oooommtttttte 5.01 | Time 5: tumour volume: 118.61,
tumour_volumet
thenot.herryy.duuu.ocoeetttttaae 4.06 ... Time 29; tumour_volumes 4.82,
chomoolhhccayy...usssoooooooaaao 11.26
Example 1 acticn history:
Time 0: chemotherapy_dosagee 0, radioctherayy_dosaee: Time 1: chemotheraay__osage: 0, radioohheray__dsagee: Time themotherapy_dooagee 0, rediothhrrpy_ddosgee Time 3: chemotheraayydooagee 5, radiocherapy_dosage 0 Time 4: chemotherapy_dosage: 0,
16

---

Continuously Updating Digital Twins using Large Language Models
aedoothhraay_doaagee Time chenotherapy_doagge: 0, radiotherapy_dosage ...
| Time 29: chemotherapy_ 0, radiotherapy_dooage:
Example 1 state future:
Time 30: tumcur_volume: 4.52, clenntharrry...mug.onnntttttaaee 5.62
Given the following state history:
Time
0: cumour_volure 429.03, ciemetheraap__.tuuuoooooeeee cot.uuurgoocccntttaiiiooii
Time 1: tumour_ pooouuooollooooo
625. 94,
5.00 Time 2: tumour _ol ume 602.07,
9.32 | Time 3: jumour_volumee
539.74,
10.36
Time 4; tumour_ socour_vlllne ume: 385.34.
wwwpotaaerayy..uuugcocceeeteeeee 5.04 hetmottteerapy_duu_coooooeoe chemot.eerayy_drrgg arr.rpapyy.duugcoommmtrraiaaio 8.24
Time 5: tumour camour_volumes volume: 270.77,
6.30
... Time 29: tumour volume: 11.19.
sumour_volume-
And the follewing action history:
Time 0: chemetherapy_dossge: 5, radiotherapy_doagge
Time chemotherapy_doagge: 5, Time 2: : 5, radiotherapy__osaaee Time 5, radiotherapy radiocherapy_dosage: _dsagee 2 Time 4: bhammtherapy_dossee 5, padiothheaay__dosee 2 Time 5: chemotherapy_dosage 0, radiotherapy_dosage
radiootherapy_dosaege
3: chemotherapy_
Time 29: chemotherapy_dene
0, radlotherapy_dosag
Simulate the next timestep's state, for all state variables. Follow the exact format of the state history.
B.3. System Prompt
Additionally, we provide the LLM with the following system prompt to encourage the output to follow proper formatting:
You are an expert at simulating dynamical systems. Respond only with the simulation in the exact format requested. Do not use the characters or anywhere. Ensure that you simulate exactly the desired number of timesteps for each state variable.
C. Experiment Details
We now detail our set-ups for the experiments $6.
C.1. Fixed CF Environment
For this experiment, we use data from the UK Cystic Fibrosis Registry from 2008-2013, which records annual follow-ups for patients with CF in the UK. We extract the first 1000 patients that have annual recordings in every year from 2008-2013 (ordered by patient ID), and this acts as the training dataset for each method. We extract the next 100 patients, and use this as validation set. Finally, we extract the next 50 patients, and use this as the testing set. For each patient, we consider three critical state variables:
FEVIPP: The forced expiratory volume in 1 second percentage compared to the standard for people of that age. This is critical value for measuring CF progression, where low FEV1 PP scores indicate advanced disease progression.
Weight: Patient weight in kg. Advanced CF progression can lead to weight lose due to malabsorption of nutrients and increased energy expenditure.
Hei Hhig Patient height em. Advanced CF progression can lead to growth impairment due to malabsorption of nutrients and potential loss of bone density.
17

---

Continuously Updating Digital Twins using Large Language Models
We also consider the action variable:
Dornase Alfa: A binary action, denoting if the patient is receiving treatment with dornase alfa. Dornase alfa is treatment used to manage CF, which can assist with mucus breakdown in CF patients, reducing viscosity and improving airway clearance. It helps lung function and reduces the frequency of respiratory infections, potentially stabilising or slowing the decline of FEV1PP.
ensure that each patient has annual recordings for each above variables from 2008-200 For the testing set, we supply each method with yhree-year input history, from 2008-201 1, and assess state simulation error for the next three years (2011-2013)
For CALM-DT, we use GPT-4o, accessed via the Azure OpenAl Service with version 2024-02-01, as the base LLM with the temperature = 0, and we set K, as:
'General description': 'The data is from patient with cystic fibrosis. The time unit is in years.'
'FEVIPP': 'Ferced expiratory volume in 1 second compared to the standard for that age.' "Wiight': 'Patient weight in kg.'
'Height': 'Patient height in cm.' 'Dornase_Alfa: 'A treatment which stabilise slow the decline of FEVI.'
For D, we the training dataset of 1000 patients. We also set 1, 3, = 3, =
We conduct bi-encoder retrieval fine-tuning as described in Appendix A using D, to construct the contrastive learning training dataset. For each sample, we choose C = candidate samples, and we set the B = 2 lowest scoring as the negative candidates for each target sample. We use GPT-4o Mini to generate textual summaries of the time-series for this training dataset. We score the candidate samples using the CRPS calculated from five simulated three-year futures compared to the true future, using GPT-4o Mini for simulation. We use ModernBERT (Warner et al., 2024) as the base for the encoders di and Φe. using the implementation from the Transformer: Python library (Wolf al., 2020). We conduct training for 8 epochs with batch size of 16, learning rate of 5 x 10-5, and temperature of 0.07, using the Adam optimizer (Kingma & Ba, 2015) as implemented in PyTorch (Paszke et al., 2019).
C.2. Fixed NSCLC Environment
For this experiment, we generate data from a bio-mathematical pharmacokinetic- pharmacodynamic model designed in Geng al. (2017), which models tumour volume under chemo- and radiotherapy. We generate trajectories for 500 patients with 60 daily time-steps each. We generate validation and testing sets of 100 patients each. Each patient trajectory contains two state variables:
Eumour.volume. Cancer tumour volume, in cm3 This is the primary measurement for NSCLC disease progression.
Concentration of the chemotherapy drug vinblastine in the patient, in mg/m²
We also consider action variables:
chemotherapy.dosage Current dosage of the chemotherapy drug vinblastine, in mg/m².
radiotherapyydosage: Radiation dosage, in Gy.
In testing, we supply each method with an input 30-day history and assess simulation error for the next 30 days.
For CALM-DT, we use GPT-4o, accessed via the Azure OpenAl Service with version 2024-02-01, as the base LLM with the temperature 0, and set K,
GGeneall description': 'The data describes treatment responses conbined chemo and radiation therapy for non-small coll lung cancer patients, generated from bio- mathematical model. The time unit is in days.' cammour_volum!!! *Volume of the tumcur with units cm" wwwphhhrraayddooooonneeeeeeeeeee with units mg/m"3."
'Concentration of the chemotherapy drug vinblastine
18

---

Continuously Updating Digital Twins using Large Language Models
'chemotherrayy_deage'' "Dosage of the chemotherapy drug vinblastine with units mg/n"3. 'radiotherapy__desee:: 'Dosage of the radiotherapy with units Gy.'
For D, we use the training dataset of 500 patients. We also set r 1, 30, 30, 5.
We conduct bi-encoder retrieval fine-tuning described in Appendix A using D, to construct the contrastive learning training dataset. For each sample, we choose C 3 candidate samples, and we set the B = 2 lowest scoring as the negative candidates for each larget sample. We use GPT-4o to generate textual summaries of the time-series for this training dataset. We score the candidate samples with the average MSE between three simulated 10-day futures and the true future, using GPT-4o for simulation. We use ModernBERT (Warner et al., 2024) as the base for the encoders oe and des using the implementation from the Trans transformers Python library (Wolf et al., 2020). We conduct training for epochs with a batch size of 16, learning rate of 5 10-5, and temperature of t 0.07, using the Adam W optimiser (Kingma & Ba, 2015) implemented in PyTorch (Paszke et al., 2019).
C.3. A Ablations
For the ablation experiments in $6.2, use the standard CF dataset and set-up, except for the stated ablation change.
C.3.1. SAMPLE SELECTION
For the sample selection ablation, for the zero-shot method we set = 0. For the random sampling method, instead of selecting using bi-encoder retrieval, we simply randomly sample samples from D,. For the encoder selection without fine-tuning, we set Φi and &e as ModernBERT (Warner et al., 2024) and do not conduct fine-tuning. For the encoder selection without appended summaries, we do not append natural language summaries to encoder inputs during training and inference.
For the LLM-based selection, construct the following prompt that instructs the LLM to choose the top each CF samples for the specific target:
Target system history: <TARGET>.
Here are <N> related systems. Return only the indices of the <e> most similar histories to the target, with no other text. Do not repeat any indices. Separate the indices with commas
Related system history: (ATASETIO]>> Related system history: <DATASET[]]> Related system history: <DATASET(2) [2]>
Related system <N> history: <DATASET [N]>
Indices of the <c> most similar histories:
We use GPT-4o to conduct selection, using this prompt. Finally, for the full context ablation Cy = Dy, we supply all samples in Dy as context. Note that the LLMM-based selection and full context approaches are only applicable the entire dataset can fit in the context window of an LLM. For the CF data, the entire dataset consists of approximately 100, 000 tokens, it does fits into most modern L.LM context windows, however this will generally not be the case for larger datasets.
C.3.2. BASE LLM
For the base LLM ablation, we set the base LLM as either GPT-4o (version 2024-02-01) GPT-4o mini (version 2024-10-011 11-1-10----prieeee or GPT-3.5 Turbo (version 2024-10-01-previee)) all accessed via the Azure OpenAl
service. We source the MMLU scores used in our visualisation from https: :tttep:://ppppeeee httpp/ppppwwtteeeeee www.ssiithhhee....m www.cooeeccooeeeeeeoooeeoeeeee cwm com/sota/ a mul i ttask-tkkaee wattttakkaagggggee
mmlu.
19

---

Continuously Updating Digital Twins using Large Language Models
C.3.3. CONTEXT SET SIZE
For our context set size ablation, we vary c 50,
C.4. Ivacaftor Experiments
C.4.1. INTRODUCING NEW ACTION
For the illustrative experiments used to demonstrate how CALM-DT can seamlessly adapt to changes in environment, we extract a different D, and test on a different testing set from the UK Cystic Fibrosis Registry. In this case, we extract all patient records from 2010-2013 that are treated with Ivacaftor in 2013 (its first year in the dataset) in 168 patients, and we use the last 50 (ordered by patient ID) as the testing set (extending their records to 2010-2015, so we can test the yere simulation accuracy with three-year input history). We extract the same state variables as the previous experiment, however the action variable we consider now is Ivacaftor, which is binary variable indicating whether the patient is receiving treatment with Ivacaftor.
D,. This results
Since we wish to use these experiments to investigate how CALM-DT would respond to a totally novel action, we want to construct a scenario where the base LLMs will have no internal knowledge about the action's effect, so that all its insights come from either the updated K, D-- Since Ivacaftor has well-known effects now, it introduced in 2012, we rename it in the dataset to Drug X, to remove the effect of any prior knowledge that the base LLMs may have about its efficacy for CF treatment. We also tried this experiment using a more realistic, yet still fake, CF drug Pamee-Pulmree--eee
is less clearly a placeholder than Drug X, to test whether the LLM could be speculating about what Druq X actually is, and if it affects the results. We noticed no difference between these settings.
We use the same fine-tuned encoders &t and de for this experiment as the previous experiment, showing that the encoders do not need re-training after environment changes, only requiring one initial fine-tuning run in environment &g. We use largely the same experimental settings as in $6.1, although now with the expanded D,, and we add the following entry to K,:
DDug X 'A cystic fibrosis treatment that clinical trial results suggest can initially improve lung function by 10.6 percentage points'
This description reflects likely high-level takeaway that would have from reading the 48-week clinical trial on Ivacaftor prior to its approval in 2012 (Ramsey et al., 2011), without requiring excessive expertise nor effort to derive more formal description.
C.4.2. INCORPORATING NEW DATA
For $6.4 we use a similar set-up. However, we now consider how three-year simulation accuracy for patients with Ivacaftor would progress with each passing year, and the resulting annual release of data from the UK CF registry. For the setting 'One Year' we use data from 2010-2013 to form D,, for 'Two Years' we use data from 2010-2014, and for 'Three Years' we use 2010-2015, With each extra year of data, the selected context samples from D, will have extra year post Ivacaftor treatment in their respective futures.
D. Raw Results for Ablation Plots
Here we provide the raw results used to create the ablation plots in $6.2. Table contains simulation results across different base LLMs, while Table 7 contains simulation results across different context set sizes.
Table 6. Base LLM ablation results. Averaged over 10 runs, with 95% Cls.
Base LLM
MSE (4)
MAE (L)
GPT-3.5 Turbo
162.203 = 5.367
8.364 0.183
GPT-4o Mini
64.179 = 0.637
5.001 0.032
GPT-4o
55.336 + 0.811
4.634 + 0.045
20

---

Continuously Updating Digital Twins using Large Language Models
Table? 7. Context size ablation results. Averaged over 10 runs, with 95% Cls.
MSE (U)
MAE (4)
74,816 = 0,411
5.241 + 0.021
64.985 + 1.047
5.013 + 0.053
56.556 0.364
4.681 + 0.010
3 55.860 0.544
4.674 0.029
5 $5.336
4.634 + 0.045
10
59.717 = 0.529
4.891 + 0.024
E. Benchmark Methods
Here we detail the benchmark DT implementations. We implement three simple baselines of constant prediction (Constant), -----eree--eighhbbree (1-NN), and K n--ncares--eeihhbor (K-NN), For the more sophisticated DT baselines, we adapt the open source code from Holt et al. (2024), from the public GitHub https: : ///g / thub. com/ samhol t. //DDTw wi neen, for use with our target datasets, and we use largely the same hyperparameter settings as in their work. We compare against a neural ODE (Chen et al., 2018) (DyNODE) (Alvarez al., 2020), a mechanistic discovery model (SINDy) (Brunton et al., 2016), Transformer model (Transformer) (Melnychuk et al., 2022), an RNN (RNN), and an LLM-driven hybrid digital twin discovery method (HDTwin) (Holt et al., 2024).
Constant
For constant prediction, we simply repeat the last observed state in the input history for all steps in the simulation horizon.
1-NN
For I-NN, we calculate the Euclidean distance between the target system's 's state history, and the state histories of all training examples. We select the most similar training sample, and use its future states as predictions for the target system.
K-NN
For K-NN, we calculate the Euclidean distance between the state history of the target system, and the state histories of all training examples. We select the K most similar training samples, and use a weighted average of their futures (weighted by similarity) to predict the future of the target system. We report results for the the best performing value. For the CF dataset, we use K 12. For NSCLC data, we use 13.
DyNODE
DyNODE is neural network-basen dynamics model (Alvarez et al., 2020), that models system dynamics by incorporating control into the standard neural ODE framework (Chen et al., 2018). We implement DyNODE with a 3-layer MLP, with a hidden dimension of 128, with tanh activation functions, and Xavier weight initialisation (Kumar, 2017). We optimise for the MSE of next-state prediction, using an Adam optimiser (Kingma & Ba, 2015), with a learning rate of 0.01, batch size of 1,000 and early stopping with a patience of 20 for 2,000 epochs.
Transformer
Causal Transformer is state-of-the-an model for estimating counterfactual outcomes (Melnychuk et al., 2022). Due to the design for the estimation of counterfactual outcomes in treatment effect settings, this method typically incorporates three separate transformer networks, for processing covariates, past treatments, and past outcomes, respectively. We follow the implementation by Holt et al. (2024), and instead implement only a single transformer to model the past outcomes, which applicable to our datasets. This consists of a standard transformer encoder, with input normalisation according to the training dataset. We encode input observed dimension of the state-action into an embedding vector dimension of size 250 through a linear layer, followed by the addition of standard positional encoder (Melnychuk al., 2022); this is then fed into a transformer encoder layer, with head size of 10, dropout 0. and the output of this is then fed into a linear layer to reconstruct the next state. We train this model using the Adam W optimiser with learning rate of 0.00003 and step learning rate scheduler of step size 1.0 and gamma 0.95; we also implement gradient clipping to 0.7, with batch size of 1, 1,000 and early stopping with a patience of 20 for 2,000 epochs.
RNN
21

---

Continuously Updating Digital Twins using Large Language Models
Recurrent Neural Networks (Graves et al., 2007) are widely used for time series prediction. We implement this with input normalisation according the training dataset. The model consists of gated recurrent unit RNN mapping the state-action dimension to hidden dimension of size 250, with two layers. The output is then fed to a linear layer to convert the hidden dimension back to the state dimension for next step prediction. We use an Adam optimiser, with a learning rate of 0.01, batch size of 1,000 and early stopping with patience of 20 for 2,000 epochs.
SINDY
Sparse Identification of Nonlinear Dynamies (SINDy) (Brunton et al.. 2016) is a data-driven discovery method for the governing equations of dynamical system. It iteratively performs sparse regression identify the best representation of the dynamical system. In our implementation, we use a polynomial library of order two, Finite difference approximations are used to compute time derivatives from the input time-series data, of order one. The alpha parameter is set at 0.5 and the sparsity threshold is set at 0.02.
library of candidate functions to
HDTwin
HDTwin is an automatic hybrid DT discovery method, using code-generating LLM to propose and iteratively refine DT model definitions involving white- and black-box components. The LLM proposes initially white-box mechanistic methods, which are fit the training data and evaluated on validation set. The evaluation metrics and then fed back into the LLM, and targeted improvements are made to the model, such incorporating my complex, black-box components.
We use GPT-4o with temperature 0.7 as the code-generating LLM, allowing 20 generation/rreinemment iterations, with a patience of 5, and we select the best performing model on the validation set as the final DT definition. Each generation, the suggested model that is trained to optimise for the MSE of next state prediction, using the Adam optimiser with a learning rate of 0.01 batch size of 1,000, early stopping with patience of 20 for 2,000 epochs. For the model refinement stage, we set K 16 for the number of previous models to keep in memory and guide suggestions.
F. Further Fixed Environment Results
We now report some further comparative results between CALM-DT and other DT methods in more fixed environments. We examine some simple di- and tritrophic ecological environments, of hare-lynx and algae-faagellaterrofffe population dynamies respectively, using the datasets from Bonnaffé & Coulson (2023). With these data, we wish to investigate how methods perform in scenarios with very small training sets, simple dynamics, and actions. In these settings, traditional deep learning approaches can sometimes struggle due over-fitting, failing to capture the underlying simple dynamics, while simpler baselines often perform best. For these experiments, due to the small datasets, encoder fine-tuning is impractical, so we use simple random selection to construct Cy for CALM-DT, with context set size = 2 for the Hare-Lynx (HL) dataset and c = 5 for the Plankton dataset.
Setup. We split the Hare-Lynx dataset into nine samples of 10 years each, and we set the first six samples the training set, and use last three samples as the testing set, examining five-year simulation performance with five-year input history. There are two state variables:
Hare: Annual count of hare pelts, serving as a proxy for the hare population size, in tens of thousands.
Lynx: Annual count of lynx pelts, serving as proxy for the lynx population size, tens of thousands
We split the Aggae-FlagellateRRoiie Rotifer dataset into 10 samples of 10 days each, and we set the first six samples as the training set, and use last four samples as the testing set, examining five-day simulation performance with five-day input history. There are three state variables:
algae: Daily count of algae, serving as the primary prey.
flagellate: Daily count of flagellate, acting as the intermediate predators and prey.
rotifer: Daily count of rotifers, representing the top predators.
Simulation performances for the hare-lynx and
rotifer data reported in Tables 8 and 9, respectively.
Takeaway. CALM-DY DT demonstrates its robust performance with this extended set of results. It achieves the best results among deep learning methods in these simpler, ddaa environments. This indicates that CALM-DT, leveraging the
22

---

Continuously Updating Digital Twins using Large Language Models
Table DT simulation comparisons of ditrophic hare-lynx population dynamies. Sorted by MSF. Averaged 20 runs, presented with
95% Cls.
Model
MSE (L)
MAE (1)
HDTwin
1.11 x 10 - 1.93 10a
29.6 9.21
Transformer
2.52 x 10 796
31.7 + 5.44
Constant
1.73 10 +
SINDY
1.05 10 0.00
26.5
DyNODE
895 + 212
22.1 2.65
1-NN
704
18.6
RNN
563 + 39.5
0.611
CALM-DT
453 - 54.3
15.3 0.999
K-NN (K 3)
368 + 0
15.7
Table DT simulation comparisons of tritrophic algae-flagellate-rriifee population dynamics. Sorted by MSE, Averaged over 20 runs, presented with 95% Cls.
Model
MSE (4)
MAE (L)
RNN
0.156 + 8.01 x 10-3
0.354 + 7.44 10-3
SINDY
0.0265 + 0
0.0994 + 0
1-NN
0.0178 + 0
0.0748 +
K-NN (K = 2)
0.0164 = 0
0.0947 0
HDTwin
2.89 x 10 1.48
10-3
0.0316 + 8.58 10-3
DyNODE
2.57 x 10-3 + 10-3 0.0341
6.98 10-3
Transformer
1.66 x 3 10 0.0283
5.70 10-3
CALM-DT
3.87 x + x 10 0.0101 = 5 10
Constant
1.00 x +0
5.40 x +0
sample efficiency of LLMs, and their bias towards simple numerical outputs (Gruver al., 2024), does not excessively overfit underperform on datasets where simple baselines excel beyond other deep learning approaches. CALM-DTT is adept simulating simple systems, well as the more complex scenarios from $
G. Simulation of Time to Key Events
To evaluate simulation accuracy from another angle, beyond raw MSE/MAE for simulated states, we examine the accuracy of critical event timing. Specifically, we examine the error simulated vs real death times for untreated NSCLC patients.
model for NSCLC from Geng al. (2017) to generate training and test data, although in this case generate trajectories of patients who receive treatment for 60 days. In this setup, patients experience extensive tumour growth and, using the threshold of 13em tumour diameter denote death, as is done in Geng et al. (2017), patient death can frequently occur within this 60-day untreated time-frame. As before, each DT method provided with a 30-day input history and tasked with simulating the patient's ' trajectory for the subsequent 30 days. In Table 10 we report the error (in days) for simulated death compared to actual death.
Setup. We utilise the hetpraoookiieec--pphaaaaddvddeee
Takeaway. CALM-DT demonstrates competitive performance in simulating accurate times death for untreated NSCLC patients. It ranks the third best method in this metric. This suggests CALM-DT has utility in forecasting clinically relevant event timings, complementing its raw simulation accuracy showcased in $6.1.
H. Sample Selection Ablations on NSCLC
We conduct similar sample selection ablations to those in $6.2, now using the NSCLC dataset. We assess the contributions of the two main components our sample selection scheme: (1) fine-tuning the encoders and (2) appending natural language
23

---

Continuously Updating Digital Twins using Large Language Models
Table 10. Comparison of DT simulated time death errors (days) for untreated NSCI.C cancer patients. Averaged five runs, with 95% Cls.
Model
Time to death MAE
RNN
10.25 =
Transformer
6.32 + 1.72
HDTwin
5.89 + 0.193
CALM-DT
5.19 = 0.496
SINDY
4.96 +
DyNODE
4.91 + 0.146
summaries the time-series inputs provided to the encoders.
Setup. The experiments are conducted on the NSCLC dataset as described in $6.1. We vary the sample selection strategy for CALM-DT by enabling or disabling encoder fine-tuning and the inclusion of LLM-generated time-series summaries. The "No fine-tunng/suummry condition uses Mode raBERT (Warner et al., 2024) pre-trained encoders for Φz and Å. without any task-specific fine-tuning or summaries. 'No fine-tuning" uses the same pre-trained encoders with appended summaries to inputs at inference time. 'No summary' uses fine-tuned encoders but without appended summaries during training or inference. 'CALM-DT' represents the full proposed method with both fine-tuned encoders and appended summaries. Table 11 reports the simulation performances.
Table CALM-DT NSCLC performance with different C2 selection methods. Averaged over 10 runs, with 95% Cls. Ordered by MSE,
Cj Selection method
MSE (L)
MAE (4)
No summary
101 + 8.72
4.43 + 0.0748
No fine- tine-tunin/ssummaan
89.3 - 19.1
4.30 + 0.159
No fine-tuning
85.7 7.03
4.26 + 0.095
CALM-DT
79.4 8.57
4.28 = 0.157
Takeaway. The results on the NSCLC dataset are broadly consistent with those observed for CF in $6.2, with the complete CALM-DT method, which incorporates both encoder fine-tuning and natural language summaries, achieving the best performance. Interestingly, and in contrast the CF setting, fine-tuning the encoders without appending natural language summaries ("No summary') results in the poorest performance this dataset. This may be due to the increased input length for the NSCLCC data (30 time-steps), compared to CF data (3 time-steps). With longer sequences, the raw numerical data is inherently more complex. During fine-tuning on long, purely numerical sequences, the encoder faces higher risk of latching onto spurious correlations or superficial numerical patterns that are not generalisable for effective retrieval. The appended summaries provide critical high-level semantic guidance in this case, helping the NLP encoder to discern meaningful long-range trends that cannot extract from numerical inputs alone. Without this semantic anchor, the fine-tuning process for longer sequences might lead the encoder to learn less robust representations, hence the poor performance. This highlights strong synergistic benefit between LLM-genenann
summaries and encoder fine-tun fine-tuning for longer, more complex time-series inputs, where summaries become crucial for guiding the fine-tuning process towards learning genuinely informative features for retrieval rather than overfitting to spurious correlations in raw numerical data.
24


Reviews:
[{"review_id": "MYvx2zMdO7", "reviewer": "Reviewer_Qbx4", "summary": "This paper proposes a way to use a frozen LLM (e.g. GPT-4o) to construct an auto-regressive model of the temporal evolution of a few variables, like a medical patient's height, weight, and lung function measurement, in response to certain interventions (administration of medications). The main insight is that using an LLM instead of a hand-designed quantitative model allows the simulator to adapt to changes in the state or action space without requiring new iterations of manual modeling.  They devise a scheme for retrieving similar trajectories from a dataset for use in in-context learning, based on fine-tuning encoders using a contrastive loss that is itself based on the LLM. They show that their method forecasts lung function measurements with less error than some other machine learning based approaches on a cystic fibrosis dataset (CF), and they show an example of how their methodology adapts to introduction to a new CF treatment without requiring retraining.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your thoughtful comments and suggestions. We address the following:\n\n- (A) Ivacaftor experiments\n- (B) Uncertainty\n- (C) Simple baselines\n- (D) Domain-specific model\n- (E) Tokenization\n\n---\n**(A) Ivacaftor experiments**\n\nWe agree that more robust evidence is necessary for demonstrating our method's adaptability. Initially, limited sample size and few iterations contributed to high variance in results. To rectify this, we've increased test set size to 50 patients and performed 20 simulation iterations, resulting in clearer outcomes.\n\nTable 1: Adapting to new action\n|Method|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|No update|59.7$\\pm$0.472|4.95$\\pm$0.0166|\n|$K$ update|54.4$\\pm$ 0.472|4.75$\\pm$0.0242|\n|$K$ + $D$ update| 50.4 $\\pm$ 0.477| 4.28 $\\pm$ 0.0251|\n\nTable 2: Learning from new data\n|Context future|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|One year|50.4$\\pm$0.477|4.28$\\pm$0.0251|\n|Two years|50.0$\\pm$1.00|4.29$\\pm$0.0468|\n|Three years|47.8$\\pm$1.01|4.19$\\pm$0.0523|\n\nWe now have more robust and interpretable results. Table 1 demonstrates that updating K and incorporating Ivacaftor trajectories into D both significantly improve simulation accuracy, as evidenced by substantial reductions in MSE and MAE, illustrating CALM-DT's capability to adapt effectively to new actions. Similarly, in Table 2, we see that CALM-DT can learn from new data, as there is a clear improvement in simulation from using 1 to 3 years of context data.\n\n**_Update:_** We have **improved our experimental set-ups in Sections 6.3 and 6.4**, giving **more clear takeaways**.\n\n---\n**(B) Uncertainty**\n\nWe acknowledge the need for deeper analysis of simulation uncertainty. To address this, we provide illustrative plots demonstrating variability across simulations of cancer tumours (please see our response to reviewer dKC6 for context) under certain settings (Zero, one, and five shot) in our anonymous repository [here](https://anonymous.4open.science/r/CALM-DT-Rebuttals-65B2). The dark line is the true trajectory, and the grey lines are individual simulations. With more context, simulation variance decreases, thus reflecting meaningful epistemic uncertainty. Quantitatively, average simulation variance across the NSCLC dataset decreases from 2.79 (zero-shot) to 1.58 (five-shot)\n\nAlso, we note that in our encoder finetuning, we use the Continuous Ranked Probability Score (CRPS) to guide the selection of positive and negative samples for contrastive learning. Since CRPS measures how well the simulated distribution aligns with the true outcome, this training procedure encourages selection of related samples that calibrate the uncertainty of the LLM well.\n\n**_Update:_** We **include illustrative plots of CALM-DT simulations**, showing how context reduces simulation uncertainty.\n\n---\n**(C) Simple baselines**\n\nWe appreciate your suggestion to benchmark our method against simpler baselines. We now include constant prediction and nearest-neighbour baselines for the CF data:\n\n|Model|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|Constant prediction|86.8|5.84|\n|1-NN| 107|6.96|\n|K-NN (K=12)|65.1|5.47|\n \nCALM-DT remains the significantly best performing simulation method in both MSE and MAE.\n\n**_Update:_** We have **expanded our baseline methods** in Section 6.1 to include constant prediction, 1-NN, and K-NN.\n\n---\n**(D) Domain-specific model**\n\nWe agree that it is very useful to give context of SOTA domain-specific methods. The provided paper reports a RMSE for _FEV1pp_ (which we also simulate) of 6.78 over 6 months for patients on Ivacaftor. From our Ivacaftor experiment, using our most performant setting, CALM-DT's _FEV1pp_ RMSE for 1 year is 8.11, and for 3 years is 8.58 (note we can only give yearly errors, as this is the granularity of the UK CF registry data). Using this domain-specific model as an upper bound on performance, we see that CALM-DT performs relatively well, especially given its low expertise requirements and seamless adaptability to changes in environment. We believe this added comparison strengthens the significance of our method.\n\n**_Update:_** We have **added a discussion in Section 6.1** comparing our results to the provided reference.\n\n---\n**(E) Tokenization**\n\nWe agree on the importance of considering tokenization impacts. Since we propose a simulation method that is compatible with any LLM, tokenization is not bespoke for CALM-DT. Although tokenization in GPT-4o (the model we use in experiments) is undisclosed, typical tokenization approaches (e.g., BPE) inherently limit numerical precision. Continuous variables are discretised into tokens, and so we suggest caution in scenarios where high precision is necessary.\n\n**_Update:_** We **extend our discussion in Section 7** to elaborate on LLM limitations.\n\n---\n\nThank you once again. We hope that we have addressed all your comments, and we greatly appreciate your feedback.", "claims_and_evidence": "Their methodology does seem more capable in principle of adapting to changes in the state and action space without expert human modeling intervention, and this feature makes this research direction promising. But I do not find their demonstration of the method's in-context adaptation to a new Ivacaftor action (Section 6.3) very compelling. In particular, it is concerning that the mean absolute error increased when trajectories that include Ivacaftor were introduced (Table 4, MAE, K update vs K + D update). The amount of variability in Table 4 and Table 5 also makes it difficult to evaluate the (i) the capability of the methodology to adapt to a new action (Table 4) and (ii) the capability of the model to learn from additional data (Table 5).\n\nAlso, they claim (Table 1) that their method \"allows uncertainty in simulation\" (presumably implemented by running simulations multiple times), but there is no analysis of the variability in model outputs and so there's no reason to believe that this variability is meaningful (especially since the simulation kernel LLM was not trained using a prediction loss that would in theory relate to the distribution in outputs to the epistemic uncertainty in the predictions).", "methods_and_evaluation_criteria": "The dataset they use does seem suitable for demonstrating their methodology. However, given the lack of a mechanistic principle for this methodology (i.e. the model does not seem to be trained to minimize prediction error), more evaluation is needed to understand whether the predictions are meaningful. I would have liked to (i) see simpler baselines in Table 2 (constant prediction, K-Nearest-Neighbors), and (ii) randomly selected plots of concrete predictions of this model (with multiple simulations to convey something about the variability of the outputs and any LLM-related artifacts) compared to the ground truth values and baseline models.\n\nIn order to better convey whether this evaluation is meaningful, the paper could compare the prediction error against state-of-the-art longitudinal models in the evaluation domain (not only against generic machine learning models or models in the digital twins literature). For example, I would like to know how the prediction error compares to that of this recent paper: \"Predicting lung function decline in cystic fibrosis: the impact of initiating ivacaftor therapy\", Respiratory Research 2024. I understand that a systematic comparison to this model might not be possible due to data limitations, but do the predictions have comparable levels of error? How might the types of errors produced by this method differ from those produced by a hand-designed model? Yes, the paper's proposed approach doesn't require human modeling, but the paper should investigate the tradeoffs of the proposed methodology with alternative approaches.", "theoretical_claims": "No.", "experimental_designs_or_analyses": "No.", "relation_to_broader_scientific_literature": "As mentioned above, the paper does not adequately evaluate the proposed method relative to the broader scientific literature. For example, it is not clear how this methodology compares to state-of-the-art models from the biostatistics literature, like \"Predicting lung function decline in cystic fibrosis: the impact of initiating ivacaftor therapy\", Respiratory Research 2024. Clearly, the proposed methodology requires less manual effort, but at what cost?", "essential_references_not_discussed": "See \"Relation to Broader Scientific Literature\" above.", "other_strengths_and_weaknesses": "I think that the capability of LLMs to adapt to changes in state and action space parameterizations is an important idea, and I think this paper identified a suitable setting to investigate these ideas. The paper is also clearly written. I have concerns about the significance of the paper, due to a lack of connection to state-of-the-art models in the evaluation domain (which is biostatistics / medical informatics).", "other_comments_or_suggestions": "No.", "questions_for_authors": "1. How does your model's prediction accuracy compare to that of expert models like the Respiratory Research paper I cited above? If a comparison is not possible, are there any other works outside of the digital twins literature that can help ground these results and help readers determine the potential impact of this approach to this domain?\n\n2. Is the model's uncertainty (probability distribution on forecasts) meaningful or interpretable in any way? For example, are there multiple modes of disease progression that it captures?\n\n3. What is the tokenization that the LLM emits for quantitative predictions? Does each digit typically get one token? Do the forecasts have any artifacts related to tokenization or use of language modality for prediction?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "gZfkQBvMF9", "reviewer": "Reviewer_Y6u8", "summary": "The paper addresses the challenge of maintaining the relevance of digital twins in dynamic environments where state/action variables and relevant information constantly change. The authors frame digital twinning as an in-context learning problem using LLMs. They propose CALM-DT, which uses fine-tuned encoders for sample retrieval, enabling accurate simulation across diverse state-action spaces during in-context learning. \nThe paper Identifies the limitations of existing DTs in dynamic environments (need for re-design or re-training) and its main contributions are: (1) Establishing design requirements for DTs for dynamic environments; (2) Demonstrating that LLMs can meet these requirements and proposing CALM-DT, which adapts to changes in its modeling environment without re-design or re-training; (3) Developing a simulation method that adjusts the information supplied to the LLM mid-generation to handle excessive context window lengths.\nThe paper empirically showing that CALM-DT outperforms existing DTs and can adapt to changes in modeling environments.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your thoughtful comments and suggestions. We address the following:\n\n- (A) LLM reliance\n- (B) Further experiments\n- (C) Application-specific metrics\n- (D) LLM sample selection\n- (E) Actions\n---\n**(A) LLM reliance**\n\nWe agree it is important to elaborate on hallucinations, bias, and failures that can arise due to tokenization and formatting. \n- **Hallucination** can result in implausible patterns, spurious spikes/dips, or inconsistencies with known domain constraints. These can be difficult to predict, so careful analysis of outputs is critical. \n- **Biases** in training corpora can influence model predictions, potentially leading to disparities in simulations across populations. \n- Typical **tokenization** (e.g. BPE) can limit precision, as continuous variables are discretised, obliging caution in scenarios where high precision is necessary. \n- **Correctly structured outputs** cannot be guaranteed, although, in practice, we rarely experienced such issues. At times, textual explanations were included in outputs.\n\n**_Update:_** We have **extended Section 7** to expand on the above.\n\n---\n**(B) Further experiments**\n\nWe agree that demonstrating generalisation is crucial. Therefore, we evaluate CALM-DT on three additional datasets (as in [1]):\n1) Non-Small Cell Lung Cancer (NSCLC) patients undergoing chemo- and radiotherapy (See Table 2 in response to reviewer dKC6)\n2) Di-trophic ecological dynamics (Hare-Lynx population) (See Table 1 below)\n3) Tri-trophic ecological dynamics (Algae-Flagellates-Rotifers population) (See Table 2 below)\n\nThe results consistently demonstrate CALM-DT's superiority across these diverse settings.\n\nTable 1: Hare-Lynx 5 day simulation\n|Model|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|HDTwin|$1.11\\times10^{4}\\pm1.93\\times10^4$|$29.6\\pm9.21$|\n|Transformer|$2.52\\times10^3\\pm796$|$31.7\\pm5.44$|\n|SINDy|$1.05\\times10^3\\pm0.00$|$26.5\\pm0.00$|\n|DyNODE|$895\\pm212$|$22.1\\pm2.65$|\n|RNN|$563\\pm39.5$|$19.7\\pm0.611$|\n|CALM-DT|$453\\pm54.3$|$15.3\\pm0.999$|\n\nTable 2: Algae-flagellates-rotifers 5 day simulation\n|Model|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|RNN|$0.156\\pm8.01\\times10^{-3}$|$0.354\\pm7.44\\times10^{-3}$|\n|SINDy|$0.0265\\pm0$|$0.0994\\pm0$|\n|HDTwin|$2.89\\times10^{-3}\\pm1.48\\times10^{-3}$|$0.0316\\pm8.58\\times10^{-3}$|\n|DyNODE|$2.57\\times10^{-3}\\pm1.05\\times10^{-3}$|$0.0341\\pm6.98\\times10^{-3}$|\n|Transformer|$1.66\\times10^{-3}\\pm7.54\\times10^{-4}$|$0.0283\\pm5.70\\times10^{-3}$|\n|CALM-DT|$3.87\\times10^{-4}\\pm4.65\\times10^{-5}$|$0.0101\\pm5.55\\times10^{-4}$|\n\n**_Update:_** We have **extended Section 6.1** to include these 3 datasets.\n\n---\n**(C) Application-specific metrics**\n\nWe agree on the importance of application-specific metrics, and include an evaluation of critical event prediction. On NSCLC data (without treatments) we simulate time to patient death (set at tumour diameter of 13cm [2]). The table below shows the error (in days) for simulated death compared to actual death.\n\n|Model|Error|\n|---|---|\n|RNN|$10.25\\pm0$|\n|Transformer|$6.32\\pm1.72$|\n|HDTwin|$5.89\\pm0.193$|\n|CALM-DT|$5.19\\pm0.496$|\n|SINDY|$4.96\\pm0$|\n|DyNODE|$4.91\\pm0.146$|\n\nCALM-DT achieves third best. This, combined with the strong performance above, indicates the accuracy of CALM-DT's simulations overall and in capturing critical event timings.\n\n**_Update:_** We have **added an experiment on time-to-death simulation** to the appendix.\n\n---\n**(D) LLM sample selection**\n\nThank you for suggesting this insightful comparison with LLM-based sample selection. We test this on the CF dataset, querying an LLM, with the entire training dataset as context, for the top 5 samples for the current history. We see that CALM-DT is significantly better than this in both MSE and MAE.\n\n|Sample selection|MSE($\\downarrow$)|MAE($\\downarrow$)|\n|---|---|---|\n|LLM-based selection|65.6$\\pm$2.19|$4.88\\pm0.116$|\n|CALM-DT|55.3$\\pm$0.811|4.63$\\pm$0.045|\n\nAlso, this is infeasible when training data exceeds the LLM context limit, e.g. for the NSCLC dataset. Our method for encoder finetuning with contrastive learning, determining positive/negative samples based on the simulation accuracy they induce, gives a useful signal to the encoder, resulting in better selections than an LLM.\n\n**_Update:_** We have **added this ablation** to Section 6.2.\n\n---\n**(E) Actions**\n\nConsistent with [1], we consider a deterministic policy in testing. That is, at each simulation time point, we apply the same action that was applied to the test sample.\n\n**_Update:_** We **clarify action sampling in Section 6**.\n\n---\nThank you once again. We hope that we have addressed all your comments, and we greatly appreciate your feedback.\n\n---\n[1] Holt, S., Liu, T. and van der Schaar, M., 2024. Automatically Learning Hybrid Digital Twins of Dynamical Systems\n\n[2] Geng, C., Paganetti, H. and Grassberger, C., 2017. Prediction of treatment response for combined chemo-and radiation therapy for non-small cell lung cancer patients using a bio-mathematical model", "claims_and_evidence": "The paper’s claims are generally well-supported, with a couple points for improvement.\n\n1. LLM Reliance- The performance of CALM-DT is heavily reliant on the underlying LLM. It would be beneficial to see a more thorough discussion of the limitations and potential risks associated with LLM biases, hallucinations, and failures. \n\n2. More experiments- The experiments are primarily focused on modeling CF progression.  While this is a relevant and complex application, it is important to examine the generalization of CALM-DT to other domains. The authors should provide more discussion and evidence on how CALM-DT could be applied to different types of dynamic systems.\n\n3. More evaluation metrics- The paper primarily uses MSE and MAE for evaluation. It would be helpful to include other evaluation measures relevant to the specific application such as predicting critical events.", "methods_and_evaluation_criteria": "The proposed method and evaluations are appropriate for addressing the problem. As noted- another evaluation metrics would be good.", "theoretical_claims": "No obvious problem.", "experimental_designs_or_analyses": "The paper is primarily centered on the CF domain. To strengthen the findings, the authors should broaden the empirical analysis to include additional domains and demonstrate CALM-DT's performance in more diverse settings. This would address concerns about the model's ability to generalize.\nIn the ablation study for sample selection, the paper compares different encoder-based methods. A relevant baseline would be to evaluate a selection strategy that uses another LLM (maybe a smaller one) to choose the context set $C_f$ based on the history, instead of relying on a trained encoder. This would provide insight into the effectiveness of the encoder approach compared to a more direct LLM-driven selection.", "relation_to_broader_scientific_literature": "This work is inspired by the broader context of LLMs and their ability to handle in-context learning and time-series data. These capabilities suggest that LLMs can function as adaptive data mechanisms, with applications in areas like medicine and finance.", "essential_references_not_discussed": "None", "other_strengths_and_weaknesses": "The paper lacks clarity regarding how CALM-DT samples actions during the generation process. Key details about the action policy implementation are unclear and require further explanation.", "other_comments_or_suggestions": "None.", "questions_for_authors": "None.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "FUXhDL4Rtk", "reviewer": "Reviewer_SWpa", "summary": "This paper presents CALM-DT, a framework using large language models to create digital twins that can update continuously without redesign or retraining. Unlike traditional approaches, CALM-DT handles new variables and incorporates new information through in-context learning. Testing on cystic fibrosis patient data shows it outperforms existing methods and adapts seamlessly to changes like new treatments, making it valuable for dynamic real-world applications.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your thoughtful comments and suggestions. We address the following:\n\n- (A) Additional settings\n- (B) Time-series summary ablation\n- (C) Prompts\n- (D) World models\n- (E) LLM thoughts on 'drug X'\n\n---\n**(A) Additional settings**\n\nWe evaluate CALM-DT on three additional datasets:\n1) Non-Small Cell Lung Cancer (NSCLC) patients undergoing chemo- and radiotherapy (See Table 2 in our response to reviewer dKC6)\n2) Di-trophic ecological system of hare and lynx population dynamics (See Table 1 in our response to reviewer Y6u8)\n3) Tri-trophic ecological system of algae, flagellates, and rotifers (See Table 2 in our response to reviewer Y6u8)\n\nCALM-DT consistently outperforms, achieving the lowest MSE across all datasets and the lowest MAE on all but NSCLC. This shows the generalisability of CALM-DT and its capability to accurately model various dynamical systems.\n\n**_Update:_** We have **extended Section 6.1 with these 3 datasets**.\n\n---\n**(B) Time series summary ablation**\n\nWe conduct ablations for the LLM generated summaries for sample selection. We compare standard CALM-DT, using an encoder finetuned and tested with summaries appended to the time-series, to the use of finetuned encoders that are trained and tested without summaries on CF and NSCLC data. We also compare pretrained encoders, with/without summaries appended at inference time.\n\n[Link to table 1: CF results](https://anonymous.4open.science/r/CALM-DT-Rebuttals-65B2/CF_summary_ablation_results.png)\n\n[Link to table 2: NSCLC results](https://anonymous.4open.science/r/CALM-DT-Rebuttals-65B2/NSCLC_summary_ablation_results.png)\n\nOn both datasets, appending LLM generated summaries allows the encoders to select better samples. This is true in the finetuned case, and the pretrained case.\n\n**_Update:_** We have **added an additional ablation to Section 6**, showing the importance of LLM generated summaries in sample selection.\n\n---\n**(C) Prompts**\n\nThank you for raising this point. In line 667, there would _not_ be an actual weight provided, as this is the _variable descriptions_ part of the prompt (in lines 664-671, the state/action variables are described). You are correct that the _X_ values in the supplied prompt would be replaced with actual values. We will make this clear by providing a full prompt in the appendix.\n\n**_Update:_** We have **added a full prompt to the appendix**. \n\n---\n**(D) World models**\n\nWe clarify that we see DTs as a class of world model with particular connotations. It is crucial that DTs (not necessarily world models in general) exhibit **continuous time dynamics** [1], to allow simulation of arbitrary length, and since a DT is tied to a specific individual system, it should **update its dynamics alongside it, as the system and its environment change** [2]. While world models can focus on more 'static' environments, **DTs must be designed to update**. Our method fits these DT requirements, given the adaptability which we show, and that LLMs can be prompted to simulate with arbitrary horizons and step sizes. We agree that a better contextualisation of this positioning is required, and, given space limitations, we will include an overview of relevant world models, especially those that incorporate LLMs, in our related works.  \n\nWe maintain that we are the first to propose context-adaptive simulations, enabled by sample retrieval, for LLM-based world models, which is essential to allow data-driven insights in unseen state-action pairs, without fine-tuning. While prior studies have indeed explored the use of LLMs as world models, they typically rely on static context/prompts during simulation, or require fine tuning to be performant. It is a further novelty that we show how LLM time-series in-context learning ability scales (Section 6.2).\n\n**_Update:_** We have **extended our related works** to build on the above comparison with world models.\n\n---\n**(E) LLM thoughts on 'drug X'**\n\nThank you for this insightful suggestion. We queried the LLM on drug X, and indeed Ivacaftor was one of its suggested options. To avoid this potential 'data leakage' we instead create a 'fake' drug name which is less clearly a placeholder than drug X. We replace 'drug X' with a more realistic, yet fake, CF drug name - 'Pulmurex' - and we see that it makes no appreciable difference to the post Ivacaftor results. Querying the LLM on Pulmurex, it no longer suggests it could be a placeholder for Ivacaftor.\n\n**_Update:_** We have **changed 'drug X' to a more plausible drug name** in our Ivacaftor experiments.\n\n---\nThank you once again. We hope that we have addressed all your comments, and we greatly appreciate your feedback.\n\n---\n[1] Chen, H., Yang, J., Chen, J., Wang, S., Wang, S., Wang, D., Tian, X., Yu, Y., Chen, X., Lin, Y. and He, Y., 2024. Continuous-Time Digital Twin with Analogue Memristive Neural Ordinary Differential Equation Solver.\n\n[2] National Academies of Sciences. Foundational research gaps and future directions for digital twins. 2023", "claims_and_evidence": "The authors only test their methodology in a single setting. For the general claims they are trying to make (proposing this as a general method), it seems important to have at least 3 or so settings. It seems hard to tell how generalizable some of the choices the authors make are across settings, and I think the effectiveness of certain choices would plausibly vary a lot by application setting.\n\nOther than that, as far as I could tell, their claims and experiments were sound (with the exception of the things mentioned below).", "methods_and_evaluation_criteria": "As mentioned above, I think the authors should have tested the method in more than one setting to make claims as general as they do (e.g. the title): as of right now, the work functions more so as a case study.\n\n> However, since time-series data may differ significantly from typical NLP training distributions, we enhance each trajectory’s textual representation by appending an LLM-generated summary of its trends.\n\nAs far as I could tell, you do not validate with an ablation that appending an LLM-generated summary helps and how much. While I think this is probably quite context-specific (as I would guess many aspects of the method are). This seems especially important given that this is one of the points that the authors discuss as being an area of novelty (\"Additionally, novelty arises in our sample-selection method, as we are the first to propose retrieval of time-series data by leveraging LLM generated summaries to enhance NLP encoder capabilities.\").", "theoretical_claims": "I don't believe there are any theoretical claims in the paper.", "experimental_designs_or_analyses": "Looking at the prompts, it's often not clear what is part of the actual prompt and what would be substituted with different values: e.g. in line 667, would there be an actual weight number provided? Would the `X` values be replaced with actual values later in the prompt? This seems inconsistent with providing the years. I think giving an example of the prompt in which all the variables are given explicitly (but having some way to highlight them as variables) would be helpful to better understand the setup.", "relation_to_broader_scientific_literature": "There is no mention in the paper of the relationship between digital twins and \"world models\". It's not clear to me what the difference is, and this makes it harder to assess the novelty of the paper is: that LLMs are relatively good world models is something that has already been studied quite a bit (even using in-context learning to simulate consequences of actions). For instance: [this paper](https://aclanthology.org/2025.coling-main.503.pdf), but there are likely many other works in this area. For example, based on the work linked, claims like the following seem likely incorrect to me:\n\n> To the best of our knowledge, CALM-DT is the first proposed context-adaptive simulation method, that dynamically adjusts its knowledge and data base mid-generation.\n\nAs of right now my understanding is that the main novel contribution of this paper may be combining retrieval with using LLMs as world models (a relatively simple scaffolding change whose effectiveness is probably quite context-dependent), plus doing an in-depth case study in one specific application area. \n\nAnother area of claimed novelty may be the adaptation on the fly to new dynamics (e.g. new treatment options). However, this also likely has precedents in the literature: although most literature on world models is about static dynamics, I would be surprised if there wasn't any work that shows that e.g. LLMs are able to adjust their predictions on the fly when changing the rules of a game. A related line of work is that of LLMs as simulators of human behavior: even there, the premise is that LLMs would be able to predict human behavior in unseen situations, generalizing to new dynamics (e.g. [Generative Agent Simulations of 1,000 People](https://arxiv.org/abs/2411.10109)).\n\nI think a much deeper engagement with analogues of this idea across the LLM literature is missing, as it seems essential to situate the contribution of the work. This is the main factor that makes me lean towards not recommending acceptance, paired with the limited scope of the evaluation.", "essential_references_not_discussed": "I don't know references off the top of my head as this is not my main area of expertise, but mentioned something above that I could find with a quick search. My guess is that there are many other papers in that vein.", "other_strengths_and_weaknesses": "Nothing I didn't already mention above!", "other_comments_or_suggestions": "Line ~380: \"acros\" -> \"across\"\nLine 075: \"accomodate\" -> \"accommodate\"\nLine 205: \"flexbily\" -> \"flexibly\"\nLine ~375: \"chane\" -> \"change\"\n\nTypo in one of the LLM prompts: \"measurments\" should be \"measurements\"\n\n(About half of these typos were found by Claude.)", "questions_for_authors": "I think it would be interesting to ask the LLMs used in your experiments to hypothesize what \"drug X\" is referring to. I wouldn't be surprised if – when asked – they would be able to infer that it is Ivacaftor. I don't think this is a major methodological issue, but just wanted to point out that simple renaming may not be *entirely* sufficient to isolate the effect of your method, and this is something one could try to measure explicitly.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "fn0agIe06h", "reviewer": "Reviewer_dKC6", "summary": "This paper proposes CALM-DT (Context-Adaptive Language Model-based Digital Twin), a novel digital twin framework that leverages large language models (LLMs) for simulation of dynamical systems.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your thoughtful comments and suggestions. We give answers to the following:\n\n- (A) Is the context window exceeded?\n---\n\n**(A) Is the context window exceeded?**\n\nThank you for raising this point. You are correct in saying that the initial cystic fibrosis (CF) dataset we investigated does not exceed the LLM context limit (its combined textual representation of all samples is approximately 100k tokens) and it can therefore fit entirely within the LLM's context window. However, we have now **tested this scenario of including the entire training dataset in context as a further ablation**, and we find that it **leads to suboptimal results, significantly underperforming compared to our sample selection method** with context set size $c=5$ (See below table, which is our original Table 3 with the new ablation 'Whole dataset in context' added). \n\nTable 1: Sample selection ablations\n| Sample selection                 | MSE ($\\downarrow$) | MAE ($\\downarrow$) |\n|----------------------------------|--------------------|--------------------|\n| $\\text{CALM-DT}_\\text{Zero}$     | 74.816 $\\pm$ 0.411 | 5.241 $\\pm$ 0.021  |\n| $\\text{CALM-DT}_\\text{Random}$   | 73.761 $\\pm$ 3.221 | 5.224 $\\pm$ 0.100  |\n| $\\text{CALM-DT}_\\text{No train}$ | 67.055 $\\pm$ 0.894 | 4.953 $\\pm$ 0.040  |\n| Whole dataset in context         | 65.3 $\\pm$ 3.90    | 4.81$\\pm$0.102     |\n| $\\text{CALM-DT}$                 | 55.336 $\\pm$ 0.811 | 4.634 $\\pm$ 0.045  |\n\nThis finding **aligns with our existing context size ablation study in Section 6.2**, which demonstrates that optimal performance is achieved with $c=5$, and addition of more samples leads to performance degradation. These results further suggest that including excessive, potentially irrelevant samples degrades simulation performance. This observation is **supported by existing literature on LLM performance degradation with excessive context lengths** [1, 2].\n\nAdditionally, we have now **conducted experiments on a larger dataset** to evaluate simulation performance for patients with Non-Small Cell Lung Cancer (NSCLC). We consider a dataset of 500 patients, each with 60 daily values recorded for the state variables 'Tumour volume' and 'Chemotherapy concentration,' as well as the action variables 'Chemotherapy dosage' and 'Radiotherapy dosage'. The size of each instance for this dataset is therefore substantially larger than in our previous CF experiment, making it **infeasible to tokenize the entire dataset and fit it within the LLM's context window** (the full dataset amounts to approximately 350K tokens). As a result, context sample selection is crucial in this setting.\n\nOur method demonstrates **strong performance on this dataset as well**, providing further evidence for the efficacy of our approach (See table below comparing 30 day simulation accuracy of CALM-DT with baseline models). CALM-DT achieves the highest accuracy in terms of MSE, and the second highest in terms of MAE, again using context set size of $c=5$, and GPT-4o as the base LLM.\n\nTable 2: 30 day simulation results on NSCLC dataset.\n| Model       | MSE ($\\downarrow$)       | MAE ($\\downarrow$) |\n|-------------|--------------------------|--------------------|\n| SINDy| $1.90 \\times 10^4 \\pm 0$ | $37.6 \\pm 0$       |\n| Transformer | $116 \\pm 52.7$           | $5.86 \\pm 2.44$    |\n| RNN         | $115 \\pm 4.35$           | $6.04 \\pm 0.645$   |\n| DyNODE      | $104 \\pm 63.6$           | $4.67 \\pm 2.06$    |\n| HDTwin      | $80.6 \\pm 11.8$          | $3.42 \\pm 0.717$   |\n| CALM-DT     | $79.4\\pm8.57$            | $4.28\\pm0.157$     |\n\nUpdate: We have **run an additional sample selection ablation** for the CF experiment and included results in Section 6.2, evaluating the use of the **entire training dataset as a context set**. Furthermore, we have conducted an **additional experiment on a larger NSCLC dataset, which exceeds the LLM's context limit**. The results of this experiment are now included in Section 6.1.\n\n---\n\nThank you once again. We hope that we have addressed all your comments, and we greatly appreciate your feedback.\n\n---\n\n[1] Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157–173, 2024\n\n[2] Li, T., Zhang, G., Do, Q.D., Yue, X. and Chen, W., Long-context llms struggle with long in-context learning, 2024. URL https://arxiv.org/abs/2404.02060.", "claims_and_evidence": "Key claim: LLMs can serve as digital twins that continuously update without re-design or retraining. \nYes it is supported by the experiments", "methods_and_evaluation_criteria": "Yes the evaluations make sense", "theoretical_claims": "The paper does not present new formal proofs (e.g., for convergence or bounds).", "experimental_designs_or_analyses": "Yes, the designs look valid.", "relation_to_broader_scientific_literature": "Introduces LLM-based, context-adaptive simulation, which relates to ongoing work in time-series forecasting via large language models but extends it by including actions/policies and retrieval-based updates.", "essential_references_not_discussed": "Not that I am aware of.", "other_strengths_and_weaknesses": "None", "other_comments_or_suggestions": "I don't have additional comments", "questions_for_authors": "Does the evaluation exceed the model's context window (i.e. 128k)? It seems not.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper introduces an approach for leveraging LLMs to create digital twins (DT) capable of continuous updates without retraining. The core idea of framing DT adaptation as an in-context learning problem addresses a significant limitation in traditional DT methodologies and is conceptually strong. The authors demonstrate their method's ability to adapt to new actions and incorporate new data within the Cystic Fibrosis case study, showcasing the potential of this approach.
Reviewers raised some concerns regarding the initial empirical evaluation beyond the primary dataset and the comparison to domain-specific state-of-the-art models. The authors added experiments and discussion in rebuttal addressing these points. It is important to note that the method's performance is inherently tied to the capabilities and limitations of the underlying LLM, including potential biases and computational overhead. The authors provided substantial revisions and clarifications during the rebuttal phase, which satisfied several reviewers and led to score increases. Overall, the paper presents a promising direction for dynamic digital twins. Further validation across diverse domains could strengthen the claims.
Decision: Accept (poster)