Table of Contents
Fetching ...

Automatically Learning Hybrid Digital Twins of Dynamical Systems

Samuel Holt, Tennison Liu, Mihaela van der Schaar

TL;DR

This work proposes an evolutionary algorithm that employs Large Language Models to autonomously propose, evaluate, and optimize HDTwins, and reveals that HDTwinGen produces generalizable, sample-efficient, and evolvable models, significantly advancing DTs' efficacy in real-world applications.

Abstract

Digital Twins (DTs) are computational models that simulate the states and temporal dynamics of real-world systems, playing a crucial role in prediction, understanding, and decision-making across diverse domains. However, existing approaches to DTs often struggle to generalize to unseen conditions in data-scarce settings, a crucial requirement for such models. To address these limitations, our work begins by establishing the essential desiderata for effective DTs. Hybrid Digital Twins ($\textbf{HDTwins}$) represent a promising approach to address these requirements, modeling systems using a composition of both mechanistic and neural components. This hybrid architecture simultaneously leverages (partial) domain knowledge and neural network expressiveness to enhance generalization, with its modular design facilitating improved evolvability. While existing hybrid models rely on expert-specified architectures with only parameters optimized on data, $\textit{automatically}$ specifying and optimizing HDTwins remains intractable due to the complex search space and the need for flexible integration of domain priors. To overcome this complexity, we propose an evolutionary algorithm ($\textbf{HDTwinGen}$) that employs Large Language Models (LLMs) to autonomously propose, evaluate, and optimize HDTwins. Specifically, LLMs iteratively generate novel model specifications, while offline tools are employed to optimize emitted parameters. Correspondingly, proposed models are evaluated and evolved based on targeted feedback, enabling the discovery of increasingly effective hybrid models. Our empirical results reveal that HDTwinGen produces generalizable, sample-efficient, and evolvable models, significantly advancing DTs' efficacy in real-world applications.

Automatically Learning Hybrid Digital Twins of Dynamical Systems

TL;DR

This work proposes an evolutionary algorithm that employs Large Language Models to autonomously propose, evaluate, and optimize HDTwins, and reveals that HDTwinGen produces generalizable, sample-efficient, and evolvable models, significantly advancing DTs' efficacy in real-world applications.

Abstract

Digital Twins (DTs) are computational models that simulate the states and temporal dynamics of real-world systems, playing a crucial role in prediction, understanding, and decision-making across diverse domains. However, existing approaches to DTs often struggle to generalize to unseen conditions in data-scarce settings, a crucial requirement for such models. To address these limitations, our work begins by establishing the essential desiderata for effective DTs. Hybrid Digital Twins () represent a promising approach to address these requirements, modeling systems using a composition of both mechanistic and neural components. This hybrid architecture simultaneously leverages (partial) domain knowledge and neural network expressiveness to enhance generalization, with its modular design facilitating improved evolvability. While existing hybrid models rely on expert-specified architectures with only parameters optimized on data, specifying and optimizing HDTwins remains intractable due to the complex search space and the need for flexible integration of domain priors. To overcome this complexity, we propose an evolutionary algorithm () that employs Large Language Models (LLMs) to autonomously propose, evaluate, and optimize HDTwins. Specifically, LLMs iteratively generate novel model specifications, while offline tools are employed to optimize emitted parameters. Correspondingly, proposed models are evaluated and evolved based on targeted feedback, enabling the discovery of increasingly effective hybrid models. Our empirical results reveal that HDTwinGen produces generalizable, sample-efficient, and evolvable models, significantly advancing DTs' efficacy in real-world applications.

Paper Structure

This paper contains 42 sections, 15 equations, 8 figures, 12 tables, 1 algorithm.

Figures (8)

  • Figure 1: HDTwinGen: evolutionary framework. The process begins with user-provided modeling context $\mathcal{S}^{\textrm{context}}$ and $\mathcal{D} = \{\mathcal{D}_{\text{train}}, \mathcal{D}_{\text{val}}\}$. 1) In iteration $g$, the modeling agent generates model specification as a Python program $f_{\theta, \omega(\theta)}$. 2) Parameters are optimized using the offline optimization tool to yield $f_{\theta, \omega^*(\theta)}$. 3) The HDTwin is evaluated based on model loss $\upsilon$ and component-wise loss $\delta$. Subsequently, the model pool $\mathcal{P}^{(g)}$ is updated with top-$K$ models. 4) The evaluation agent provides targeted feedback for model improvement $H^{(g)}$ by analyzing models in $\mathcal{P}^{(g)}$ using performance metrics requirements outlined in $\mathcal{S}^{context}$. This iterative loop repeats for $G$ iterations.
  • Figure 2: Out of distribution shifts. On a variation of the Lung Cancer (with Chemo. & Radio.), HDTwinGen is more robust to OOD shifts in unseen state-action distributions.
  • Figure 3: HDTwinGen effectively evolves HDTwin. Validation MSE of the HDTwin generated in each iteration, showing the Pareto-front of the best generated HDTwin (Top-1 HDTwin), and the generated HDTwin per generation step---additionally with a few of the HDTwins labeled with their model descriptions. HDTwinGen can efficiently understand, modify, and hence evolve the HDTwin to achieve a better-fitting model (\ref{['HDTwinGenEvolution']}).
  • Figure 4: COVID-19 unobserved intervention. The symbolic code-based representation of HDTwin can be easily adapted to unobserved interventions through targeted adjustments of parameters.
  • Figure 5: HDTwinGen Illustrative Example in Operation. HDTwinGen can generate and further evolve HDTwins for a particular system based on user-given system requirements and a dataset $\mathcal{D}=\{ \mathcal{D}_{\text{train}}, \mathcal{D}_{\text{test}}\}$ of state-action trajectories. First, the system requirements---which include dataset statistics are incorporated into a prompt and fed into the modeling agent that returns the code for the HDTwin. This HDTwin is then trained on the training dataset $\mathcal{D}_{\text{train}}$, and a validation loss is computed with $\mathcal{D}_{\text{val}}$. In subsequent generations, the evaluation agent is given the existing generated top-$K$ HDTwins, their corresponding validation losses, and validation losses per component, and is asked to reflect on how to improve the HDTwin. This provides detailed, actionable feedback, leveraged from its inherent understanding, and provides this as detailed verbal feedback as $H$, whereby this feedback is next used with the modeling agent to generate the next HDTwin [P3]. This process iterates several generation times, and the best-performing HDTwin (w.r.t. validation performance) is returned. Overall, this produces an HDTwin that fulfills [P1-P3].
  • ...and 3 more figures