Digital Twins for Patient Care via Knowledge Graphs and Closed-Form
  Continuous-Time Liquid Neural Networks
Digital twin technology has is anticipated to transform healthcare, enabling
personalized medicines and support, earlier diagnoses, simulated treatment
outcomes, and optimized surgical plans. Digital twins are readily gaining
traction in industries like manufacturing, supply chain logistics, and civil
infrastructure. Not in patient care, however. The challenge of modeling complex
diseases with multimodal patient data and the computational complexities of
analyzing it have stifled digital twin adoption in the biomedical vertical.
Yet, these major obstacles can potentially be handled by approaching these
models in a different way. This paper proposes a novel framework for addressing
the barriers to clinical twin modeling created by computational costs and
modeling complexities. We propose structuring patient health data as a
knowledge graph and using closed-form continuous-time liquid neural networks,
for real-time analytics. By synthesizing multimodal patient data and leveraging
the flexibility and efficiency of closed form continuous time networks and
knowledge graph ontologies, our approach enables real time insights,
personalized medicine, early diagnosis and intervention, and optimal surgical
planning. This novel approach provides a comprehensive and adaptable view of
patient health along with real-time analytics, paving the way for digital twin
simulations and other anticipated benefits in healthcare.
Logan Nye
Digital Twins for Patient Care via Knowledge Graphs and Closed-Form Continuous-Time Liquid Neural Networks

###### Abstract

Digital twin technology has is anticipated to transform healthcare, enabling personalized medicines and support, earlier diagnoses, simulated treatment outcomes, and optimized surgical plans. Digital twins are readily gaining traction in industries like manufacturing, supply chain logistics, and civil infrastructure. Not in patient care, however. The challenge of modeling complex diseases with multimodal patient data and the computational complexities of analyzing it have stifled digital twin adoption in the biomedical vertical. Yet, these major obstacles can potentially be handled by approaching these models in a different way. This paper proposes a novel framework for addressing the barriers to clinical twin-modeling created by computational costs and modeling complexities. We propose structuring patient health data as a knowledge graph and using closed-form continuous-time "liquid" neural networks (CfCs) for real-time analytics. By synthesizing multimodal patient data and leveraging the flexibility and efficiency of CfCs and knowledge graph ontologies, our approach enables real-time insights, personalized medicine, early diagnosis and intervention, and optimal surgical planning. This novel approach provides a comprehensive and adaptable view of patient health along with real-time analytics, paving the way for digital twin simulations and other anticipated benefits in healthcare.

informatics, artificial intelligence, deep learning, decision support, clinical model, precision medicine,

## I Introduction

Digital twins are an emerging technology poised to revolutionize every sector of industry.

These same principles can logically carry to healthcare as well. Digital twins are expected to enable precision medicine, personalized therapeutics, earlier diagnoses, and optimized treatment outcomes via simulation capabilites [1]. So far, however, they are still largely absent. While other verticals like manufacturing, systems engineering, infrastructure, and others have begun realizing these advantages, healthcare is more challenging. The computational demands and inherent challenges of modeling complex pathologies leads to steep expenses and missed opportunities. We propose a novel method of modeling a digital twin for patient care that could finally enable this idea. Our approach combines two powerful technologies: (1) knowledge graph representations [2], and (2) closed-form continuous-time liquid neural networks (CfCs) [3]. Together, they provide a comprehensive and adaptable view of individual patient health data that can also be efficiently reflected in real-time, ultimately improving bringing us closer to our end-goal: a true digital twin for patient care.

## II Digital Twin Technology

### _What Are Digital Twins?_

Digital twins are virtual representations of physical entities, processes, or systems that leverage real-time data and advanced analytics to optimize performance, enable predictive maintenance, and drive innovation. In the healthcare industry, digital twins can revolutionize patient care, clinical research, and healthcare infrastructure management. The concept of digital twins first arose at NASA and gained traction after Gartner named digital twins as one of its top 10 strategic technology trends for 2017 [1]. They estimated that by 2020, 21 billion connected sensors and endpoints would enable digital twins for billions of things [2].

### _Digital Twins in Healthcare_

A digital twin's architecture comprises three core components: the physical entity, the virtual representation, and the data management system [3]. These components are interconnected through an IoT (Internet of Things) network, enabling real-time synchronization and communication. In healthcare, the physical entity can range from an individual patient to an entire hospital. Data
is collected through sensors, wearables, or other IoT devices, capturing vital parameters such as heart rate, blood pressure, and body temperature [4]. The virtual representation is a data-driven model that mirrors the physical entity's behavior, state, and properties. It is created using a combination of mathematical models, machine learning algorithms, and simulation techniques [5].

### _Twins-enabled Healthcare Analytics_

Mathematical models are utilized to represent complex biological systems, such as organ function, metabolic pathways, or disease progression [6]. These models can be deterministic (e.g., differential equations) or stochastic (e.g., Monte Carlo simulations). Advanced analytics techniques, such as predictive analytics, prescriptive analytics, and real-time analytics, are applied to derive insights and facilitate decision-making [7]. These techniques often involve the application of machine learning and artificial intelligence algorithms, including supervised, unsupervised, and reinforcement learning techniques, which are employed to analyze and predict patterns within the collected data [8]. Deep learning architectures, such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs), have shown promising results in modeling patient-specific medical conditions [9]. In addition, simulation techniques, like agent-based modeling and discrete event simulation, can be used to recreate the dynamic behavior of healthcare processes or systems, allowing for the evaluation of various intervention strategies and resource allocation scenarios [10, 11].

### _A Valuable Clinical Tool_

Healthcare digital twins require secure, scalable, and efficient storage solutions to handle vast amounts of structured and unstructured data [12]. Technologies like distributed file systems (e.g., Hadoop Distributed File System) and cloud-based storage services are commonly used. Data processing involves cleaning, transforming, and integrating data from multiple sources to ensure accuracy and consistency. Techniques like data wrangling, normalization, and feature extraction are employed in this stage [13]. Digital twins are valuable to healthcare because they facilitate personalized medicine [14], enable early diagnosis and intervention [15], enhance clinical trials [16], support remote patient monitoring [17], optimize healthcare facilities [18], enable predictive maintenance [19], and improve medical education and training [20]. These benefits contribute to improved patient outcomes, operational efficiency, and cost savings in the healthcare industry.

## III Knowledge Graphs

### _What are Knowledge Graphs?_

Knowledge graphs are a graph-based data structure for representing structured and semi-structured data [4]. By encoding entities as nodes and relationships as edges, knowledge graphs allow for complex querying and reasoning over large datasets, making them a natural choice for representing patient health data [5]. Medical ontologies, such as the Systematized Nomenclature of Medicine - Clinical Terms (SNOMED CT) [6] and the Human Phenotype Ontology (HPO) [7], provide the foundation for our knowledge graph representation, ensuring accurate and consistent terminology.

### _Problems Solved by Knowledge Graphs_

Knowledge graph is a modern and effective method for harmonizing enterprise data, allowing representation and operationalization

Knowledge graph is a modern and effective method for harmonizing enterprise data, allowing representation and operationalization of data, data sources, and databases of all types. As we progress further into the AI era, the increasing amount of data is being utilized for business benefits and advantages, steadily transforming data into knowledge [32]. In this context, knowledge graphs are gaining popularity in enterprises that seek to connect the dots between the data world and the business world more effectively.

### _Ontologies and Formal Semantics_

Ontologies represent the backbone of the formal semantics of a knowledge graph. As the data schema of the graph, they serve as a contract between the developers of the knowledge graph and its users regarding the meaning of the data in it. A user could be another human being or a software application that wants to interpret the data in a reliable and precise way. Ontologies ensure a shared understanding of the data and its meanings. When formal semantics are used to express and interpret the data of a knowledge graph, there are a number of representation and modeling instruments.

Classes

Most often an entity description contains classification of the entity with respect to a class hierarchy. For instance, when dealing with general news or business information there could be classes Person, Organization and Location. Persons and organizations can have a common super class Agent. Location usually has numerous sub-classes, e.g. Country, Populated place, City, etc. The notion of class is borrowed by the object-oriented design, where each entity should belong to exactly one class.

Relationship Types
The relationships between entities are usually tagged with types, which provide information about the nature of the relationship, e.g. friend, relative, competitor, etc. Relation types can also have formal definitions, e.g. that parent-of is an inverse relation of child-of and they both are special cases of relative-of, which is a symmetric relationship. Or defining that sub-region and subsidiary are transitive relationships.

Categories

An entity can be associated with categories, which describe some aspect of its semantics, e.g. "Big four consultants" or "XIX century composers". A book can belong simultaneously to all these categories: "Books about Africa", "Bestseller", "Books by Italian authors", "Books for kids", etc. Often the categories are described and ordered into a taxonomy

Paired with complementary AI technologies such as machine learning and natural language processing, knowledge graphs are enabling new opportunities for leveraging data and quickly becoming a fundamental component of modern data systems [33]. With the rapid advancements in machine learning and knowledge representation through knowledge graphs, these technologies have the potential to improve the accuracy of outcomes and augment the potential of machine learning approaches [38].

At the core of a knowledge graph is a knowledge model, a collection of interlinked descriptions of concepts, entities, relationships, and events. Knowledge graphs put data into context through linking and semantic metadata, providing a framework for data integration, unification, analytics, and sharing. These graphs, also known as semantic networks, represent a network of real-world entities, such as objects, events, situations, or concepts, and illustrate the relationship between them. This information is typically stored in a graph database and visualized as a graph structure.

Knowledge graphs consist of three main components: nodes, edges, and labels. Nodes can represent objects, places, or people, while edges define the relationship between nodes. Labels provide further information about the relationships or nodes. These graphs are often fueled by machine learning, using natural language processing (NLP) to construct a comprehensive view of nodes, edges, and labels through a process called semantic enrichment.

Ontologies are frequently mentioned in the context of knowledge graphs, creating a formal representation of the entities in the graph. They are usually based on a taxonomy but can contain multiple taxonomies, thus maintaining a separate definition. Since both knowledge graphs and ontologies are represented through nodes and edges and are based on the Resource Description Framework (RDF) triples, they tend to resemble each other in visualizations.

The Web Ontology Language (OWL) is an example of a widely adopted ontology, supported by the World Wide Web Consortium (W3C), an international community that champions open standards for the internet's longevity. This organization of knowledge is supported by technological infrastructure such as databases, APIs, and machine learning algorithms, which help people and services access and process information more efficiently.

Knowledge graphs work by combining datasets from various sources, which frequently differ in structure. Schemas, identities, and context work together to provide structure to diverse data. These components help distinguish words with multiple meanings, allowing systems like Google's search engine algorithm to differentiate between different meanings of words like "Apple."

Knowledge graphs have various use cases, including popular consumer-facing applications like DBPedia and Wikidata, which are knowledge graphs for data on Wikipedia.org. Another example is the Google Knowledge Graph, which is represented through Google Search Engine Results Pages (SERPs), serving information based on people's searches. Knowledge graphs also have applications in other industries, such as healthcare, by organizing and categorizing relationships within medical research to assist providers in validating diagnoses and identifying individualized treatment plans.

Key characteristics of knowledge graphs include combining features of several data management paradigms such as databases, graphs, and knowledge bases. Knowledge graphs, represented in RDF, provide the best framework for data integration, unification, linking, and reuse due to their expressivity, performance, interoperability, and standardization.

## IV Liquid Neural Networks

### _Closed-Form Continuous-Time Liquid Neural Networks (CfCs)_.

Continuous-depth neural models, where the derivative of the model's hidden state is defined by a neural network, have facilitated advanced sequential data processing capabilities [18]. However, these models rely on advanced numerical differential equation (DE) solvers, resulting in substantial overhead in terms of computational cost and model complexity. Closed-form Continuous-depth (CfC) networks offer a solution to these limitations [35].

CfC networks are derived from the analytical closed-form solution of an expressive subset of time-continuous models, eliminating the need for complex DE solvers altogether [35]. Experimental evaluations have
demonstrated that CfC networks outperform advanced recurrent models over a diverse set of time-series prediction tasks, including those with long-term dependencies and irregularly sampled data [35]. These findings open new opportunities to train and deploy rich, continuous neural models in resource-constrained settings that demand both performance and efficiency.

ODE-based continuous neural network architectures have shown promise in density estimation applications [19, 20, 21, 22] and modeling sequential and irregularly sampled data [23, 24, 25, 26]. While these ODE-based neural networks can perform competitively with advanced discretized recurrent models on relatively smaller benchmarks, their training and inference are slow due to the use of advanced numerical DE solvers [27]. The complexity of the task increases (i.e., requiring more precision) [36] in open-world problems such as medical data processing, self-driving cars, financial time-series, and physics simulations.

The research community has worked on solutions for resolving the computational overhead and facilitating the training of neural ODEs. These solutions include relaxing the stiffness of a flow by state augmentation techniques [28, 29, 37], reformulating the forward-pass as a root-finding problem [30, 38], using regularization schemes [31, 32, 33, 39], and improving the inference time of the network [34, 40].

CfC networks, derived from closed-form solutions, provide a fundamental solution to the limitations of ODE-based models [35]. These networks do not require any solver to model data and yield significantly faster training and inference speeds while retaining the expressiveness of their ODE-based counterparts. The closed-form solution enables the formulation of a neuron model that can be scaled to create flexible, highly performant architectures on challenging sequential datasets.

Continuous-time neural networks (CTNNs) are a class of machine learning systems that excel in representation learning for spatiotemporal decision-making tasks [18]. These models are typically represented by continuous differential equations. However, the expressive power of CTNNs is bottlenecked when deployed on computers due to the limitations of numerical differential equation solvers. This constraint has hindered the scaling and understanding of various natural physical phenomena, including the dynamics of nervous systems [18].

To circumvent this bottleneck, researchers have sought closed-form solutions for the given dynamical systems. Although finding closed-form solutions is generally intractable, it has been demonstrated that it is possible to efficiently approximate the interaction between neurons and synapses-- the fundamental building blocks of natural and artificial neural networks--constructed by liquid time-constant networks in closed form [18].

This closed-form solution is achieved by computing a tightly bounded approximation of the solution of an integral appearing in liquid time-constant dynamics, which previously had no known closed-form solution [18]. The introduction of closed-form continuous-time liquid neural networks (CfCs) has significant implications for the design of continuous-time and continuous-depth neural models. For example, since time appears explicitly in closed form, complex numerical solvers are no longer required [18]. As a result, CfCs are between one and five orders of magnitude faster in training and inference compared to their differential equation-based counterparts [18].

Moreover, CfCs, derived from liquid networks, demonstrate excellent performance in time-series modeling, outperforming advanced recurrent neural network models [18]. They can scale remarkably well compared to other deep learning instances, making them ideal for tackling the diverse and irregularly sampled data inherent in patient health records and hospital databases.

## V Methodology & Application

### _Knowledge Graph Construction._

Our approach to constructing the knowledge graph involves three main steps: data collection, entity extraction, and relationship modeling. We gather data from electronic health records, clinical trials, and genomic databases to ensure a comprehensive representation of patient health. Entities such as diseases, symptoms, and treatments are extracted using natural language processing techniques [11] and linked to their corresponding concepts in established medical ontologies, such as SNOMED CT [6] and HPO [7]. Relationships between entities are modeled using both domain-specific and general-purpose relationship types [12], facilitating the integration of diverse data sources and enabling complex querying recorded values of 0.7362 and 0.7373, respectively, representing a considerable improvement compared to reported accuracy and reliability studies of the past.

### _Closed-Form Continuous-Time Liquid Neural Network Integration._

To integrate CfCs with the knowledge graph, we employ a two-step process: feature extraction and network training. First, features are extracted from the knowledge graph using graph embedding techniques, such as node2vec [13] or GraphSAGE [14]. These embeddings capture the topological structure and semantic information of the graph, which are then used as inputs to the CfC model. Next, the CfC model is trained using a combination of supervised and unsupervised learning techniques to
predict various patient health outcomes, such as disease progression, treatment response, and surgical outcomes.

Our approach combines the versatile structure and potent semantic representations of knowledge graphs with the computational efficiency and plasticity of closed-form continuous-time liquid neural networks (CfCs) to create digital twins for patient care. The integration of these two technologies forms a more true-to-life model of patient health that enables real-time healthcare analytics.

By integrating knowledge graphs with CfCs, we can build powerful predictive models and facilitate personalized care that leads to improved patient outcomes. This combination enables real-time analytics and adaptability, essential for early diagnosis and intervention, tailoring treatment plans to each patient's unique needs, and simulating surgical procedures and therapeutic strategies.

### _Real-Time Analytics and Simulation._

To enable real-time analytics and simulation, our digital twin system continuously updates the knowledge graph and CfC model as new patient data becomes available. Incremental graph updates are achieved using efficient graph maintenance algorithms [15], while the CfC model is updated using online learning techniques [16]. This continuous updating process allows healthcare professionals to access up-to-date patient health information and model predictions, thereby enabling more informed and accurate decision-making.

### _Surgical and Intervention Planning._

Digital twins can be used to simulate surgical procedures and therapeutic strategies by incorporating detailed anatomical and physiological models [17]. Our approach integrates these models with the knowledge graph and CfC predictions, allowing healthcare providers to optimize treatment plans and minimize potential risks. By combining patient-specific data with the latest medical knowledge, our digital twin system facilitates personalized care and improves patient outcomes.

## IV Evaluation and Validation

To assess the effectiveness of our digital twin approach, we will perform a series of experiments comparing our method to traditional techniques, such as deep learning models [10] and Bayesian networks [18]. We will evaluate the performance of our method using metrics such as accuracy, precision, recall, and F1-score for various prediction tasks, as well as computational efficiency and scalability. Furthermore, we will conduct clinical studies to investigate the impact of our digital twin system on patient outcomes and healthcare decision-making.

## V Conclusion

Our approach to digital twin technology combines the flexible structure and powerful semantic representations of knowledge graphs with the computational efficiency and plasticity of closed-form continuous-time liquid neural networks (CfCs) to revolutionize patient care. By synthesizing multimodal patient data and leveraging the flexibility and efficiency of CfCs, it becomes possible to create digital twins that enable real-time healthcare analytics, personalized medicine, early diagnosis and intervention, and improved surgical planning. This groundbreaking approach holds the promise to finally bring digital twins to the medical space, unlocking insights that benefit individual patients and entire healthcare systems alike.
