Language-Based Digital Twins for Elderly Cognitive Assistance


Abstract

Digital twins have emerged as a promising paradigm for personalized healthcare, enabling modeling of individual behavior and health trajectories. In cognitive health, early detection of Mild Cognitive Impairment (MCI) remains challenging, where language and conversational patterns serve as non-invasive biomarkers. In this work, we propose a language-based digital twin framework that leverages large language models (LLMs) to mimic the conversational behavior of elderly individuals by incorporating stylometric cues and contextual metadata.

To evaluate fidelity and cognitive consistency, we introduce a multi-head conditional variational autoencoder (cVAE) that jointly measures reconstruction quality and predicts cognitive scores. Experiments on the I-CONECT dataset show that the digital twin preserves identity-specific characteristics and achieves reconstruction and MoCA prediction errors comparable to real data, while outperforming baseline GPT-generated responses. These results highlight the potential of language-based digital twins as a scalable and non-invasive approach for personalized and continuous cognitive health monitoring.

1 Introduction↩︎

Digital twins are virtual representations of physical entities that are continuously updated using real-world data, enabling simulation, analysis, and prediction of system behavior. Originally developed in engineering, they have emerged as a promising paradigm in healthcare for building personalized and dynamic computational models of individuals by integrating multimodal data such as clinical records, physiological signals, and behavioral observations. The increasing availability of conversational data has further enabled modeling of human cognition through language and interaction patterns. Unlike conventional machine learning models that focus solely on prediction, digital twins support continuous and individualized behavioral modeling, making them particularly suitable for capturing subtle and longitudinal cognitive changes.

Mild Cognitive Impairment (MCI) is a transitional stage between normal aging and dementia, where early detection is critical for timely intervention [1]. However, traditional diagnostic approaches rely on structured assessments and neuroimaging, which are costly, infrequent, and limited in capturing gradual changes in everyday behavior [2]. Language and speech have emerged as scalable and non-invasive biomarkers of cognitive decline, with features such as lexical diversity, fluency, and pauses correlating with cognitive status [3]. Naturalistic conversational data, in particular, provide richer and more temporally informative signals than constrained clinical tasks [4].

Despite these advances, most existing approaches focus on prediction rather than personalized and holistic modeling. Similarly, prior digital twin research in healthcare primarily targets physiological or population-level representations, with limited attention to individual-specific linguistic and behavioral characteristics.

To address this gap, we propose a language-based digital twin framework that models individual conversational behavior using LLMs. The proposed approach captures linguistic style, temporal dynamics, and cognitive signatures by incorporating stylometric cues such as pause and tempo, along with contextual metadata, enabling the generation of personalized responses that resemble real human behavior. Fig. 1 illustrates the overall architecture of the proposed framework.

Figure 1: Overview of the proposed language-based digital twin framework. The model integrates textual content, stylometric features (pause and tempo), and participant metadata to learn personalized conversational behavior and enable cognitive assessment.

To evaluate response fidelity and cognitive consistency, we introduce a conditional variational autoencoder (cVAE)-based evaluator that measures reconstruction quality and predicts cognitive scores. Experiments on the I-CONECT dataset [5] demonstrate that the proposed digital twin preserves identity-specific characteristics and retains cognitively relevant information, enabling accurate estimation of cognitive status.

Overall, this work advances digital twin modeling from population-level representations toward individualized, language-centered approaches, enabling scalable and personalized monitoring of cognitive health in elderly populations. The implementation details are available at GitHub.

2 Related Works↩︎

Digital twins have emerged as a promising paradigm in healthcare, enabling personalized and dynamic computational representations of patients for monitoring, prediction, and decision support [6][8]. Unlike static predictive models, digital twins of individuals require continuous updating, personalization, and integration of heterogeneous data sources such as clinical records, behavioral signals, and sensor data [6], [8]. Recent advances in large language models (LLMs) further enable effective processing of unstructured and multimodal data, providing a strong foundation for adaptive digital twin systems.

In cognitive health, digital twins are particularly relevant due to the gradual and multifactorial nature of neurocognitive decline, where conditions such as Mild Cognitive Impairment (MCI) manifest across language, behavior, and daily activities. Prior work has explored digital twins for modeling cognitive states and predicting decline. For instance, Sprint et al. [9] proposed HDTwin, integrating diverse cognitive-health signals using LLMs, while Lammert et al. [10] developed an LLM-based framework for personalized clinical decision-making. Fard et al. [11] introduced a Transformer-based approach to capture temporal linguistic patterns. Beyond cognitive health, digital twin systems have also been applied in domains such as cardiac modeling and precision medicine [12], [13].

A related line of work explores conversational agents and digital twins for cognitive support. A-CONECT [14] presents an LLM-based system for dementia intervention, where personalized digital twins are trained on participant-specific conversational data to simulate patient interactions and evaluate conversational strategies at scale. However, the evaluation primarily focuses on overall conversational similarity, with limited investigation of long-term behavioral evolution and future cognitive trajectory modeling.

Despite these advances, existing digital twin frameworks largely focus on physiological modeling, prediction, or population-level simulation, with limited attention to fine-grained linguistic and behavioral patterns. In particular, prior works do not explicitly model conversational dynamics, stylistic features, or temporal interaction patterns at the individual level.

In contrast, our approach introduces a personalized language-based digital twin that models and reproduces individual conversational behavior, capturing linguistic style, temporal dynamics, and cognitive signatures. This shift from population-level or predictive modeling toward individualized behavioral emulation distinguishes our framework and enables more accurate and personalized modeling of cognitive states.

3 Methodology↩︎

3.0.0.1 Digital Twin Formulation:

In this work, we conceptualize the language-based digital twin as a personalized, data-driven model that captures and reproduces an individual’s conversational behavior over time. Unlike traditional predictive models that map inputs to outputs, the digital twin aims to emulate underlying behavioral and cognitive patterns by leveraging longitudinal conversational data and metadata. This enables the model to generate realistic responses while reflecting individual-specific linguistic style, temporal dynamics, and cognitive characteristics. By continuously conditioning on participant-specific information, the proposed framework aligns with the core principles of digital twins, namely personalization, dynamic representation, and behavioral fidelity.

3.1 Language Digital Twin↩︎

We model a language-based digital twin using an LLM to mimic the conversational style and linguistic behavior of an individual. We adopt GPT-4.1-mini as the base model and adapt it through supervised fine-tuning.

3.1.0.1 Data Preprocessing and Stylometric Augmentation:

To capture individual speaking patterns, we augment transcripts with stylometric annotations reflecting temporal speech dynamics. Specifically, we introduce:

  • PAUSE: \(\{\texttt{NONE}, \texttt{SHORT}, \texttt{MED}, \texttt{LONG}, \texttt{VLONG}\}\)

  • TEMPO: \(\{\texttt{SLOW}, \texttt{MED}, \texttt{FAST}, \texttt{VFAST}\}\)

These tokens encode timing and rhythm, allowing the model to learn both semantic content and temporal characteristics correlated with cognitive states [3].

3.1.0.2 Supervised Fine-Tuning (SFT):

Training data is formatted as system, user, and assistant messages. The system prompt defines the mimicry task, the user prompt includes the question and metadata (e.g., participant ID, age, gender, interview date, topic), and the assistant response corresponds to the participant’s answer enriched with stylometric tokens.

Given input \(x = (q, m)\), where \(q\) is the question and \(m\) is metadata, the model is trained to generate response \(y\): \[\mathcal{L}_{\text{SFT}} = - \mathbb{E}_{(x,y)} \left[ \log p_{\theta}(y|x) \right].\]

3.2 cVAE-Based Evaluator↩︎

We introduce a multi-head Conditional Variational Autoencoder (cVAE) [15] to evaluate response quality and cognitive alignment. The model assesses similarity between generated and real responses while predicting Mild Cognitive Impairment (MCI) scores.

3.2.0.1 Model Architecture:

The cVAE is conditioned on question \(q\), metadata \(m\), and response \(y\). The encoder maps these inputs to a latent representation: \[q_{\phi}(z|q,m,y).\] The latent space is parameterized by mean \(\mu\) and log-variance \(\log \sigma^2\). The decoder reconstructs the response: \[p_{\theta}(y|q,m,z).\]

3.2.0.2 Multi-Head Design:

A second head predicts an MCI-related score from \(z\): \[\hat{s} = f(z),\] where \(f(\cdot)\) is a regression function.

3.2.0.3 Loss Function:

Training combines reconstruction, KL divergence, and MCI prediction losses: \[\mathcal{L}_{\text{rec}} = \mathbb{E}\left[\|y - \hat{y}\|^2\right],\] \[\mathcal{L}_{\text{KL}} = -\frac{1}{2} \mathbb{E}\left[1 + \log \sigma^2 - \mu^2 - \exp(\log \sigma^2)\right],\] \[\mathcal{L}_{\text{MCI}} = \mathbb{E}\left[\|s - \hat{s}\|^2\right],\] \[\mathcal{L} = \mathcal{L}_{\text{rec}} + \mathcal{L}_{\text{KL}} + \lambda \mathcal{L}_{\text{MCI}},\] where \(\lambda\) controls the importance of cognitive prediction, with higher weight assigned to the MCI loss.

The cVAE acts as a challenger by measuring how closely generated responses match real linguistic and cognitive patterns. Unlike standard similarity metrics, it provides joint evaluation of stylistic fidelity and cognitive relevance.

4 Experimental Results↩︎

4.1 Dataset↩︎

We utilize the I-CONECT dataset [5], derived from a randomized clinical trial on conversational engagement in older adults (75+), including both cognitively normal and MCI participants. Unlike datasets based on constrained tasks [16][18], I-CONECT captures naturalistic, longitudinal conversations, making it suitable for modeling individual language patterns. It includes multimodal data such as transcripts, interaction dynamics, and metadata.

From approximately 70 participants, we select five individuals with the most sessions to ensure sufficient longitudinal data. This subset includes two males and three females aged 77–83, with MoCA scores ranging from 19 to 29. Repeated evaluations (every six months) enable modeling of temporal cognitive changes. MoCA (Montreal Cognitive Assessment) is a 30-point cognitive screening tool assessing domains such as memory, attention, language, and executive function, where lower scores indicate greater impairment.

4.2 Data Preprocessing and Fine-tuning↩︎

Original transcripts contained ASR errors; we reprocessed audio using Whisper [19]. Speaker roles were separated using pyannote diarization [20], ensuring accurate extraction of participant responses. Session-level embeddings were generated using Sentence-BERT [21] and reduced via PCA to obtain topic descriptors for cVAE inputs. We fine-tune GPT-4.1-mini as the base model. Training shows stable convergence, with decreasing loss and increasing accuracy, as illustrated in Fig. 2.

Figure 2: Normalized loss and accuracy of the digital twin.

4.3 Feature Extraction↩︎

We extract two feature types: embeddings and sentiment.

4.3.0.1 Embedding Features:

Sentence-level embeddings are computed using the model all-mpnet-base-v2 [21]. Since each question or answer may contain multiple sentences, we aggregate sentence embeddings using mean and standard deviation to obtain fixed-length representations.

4.3.0.2 Sentiment Features:

We use the distilbert [22] model to extract sentiment scores per sentence, aggregated using mean and standard deviation for both questions and answers.

4.4 Feature Analysis↩︎

We evaluate identity preservation using an SVM classifier to determine whether generated responses can be attributed to the correct participant.

Table 1 shows results across embedding, sentiment, and combined features for real, GPT, and digital twin responses. The digital twin achieves accuracy close to real data across all settings, while the base GPT model performs significantly worse (e.g., 44.15 vs. 48.55 vs. 19.90 for embedding Mean+STD). Similar trends are observed for other features.

These results indicate that the digital twin effectively captures individual linguistic patterns. Combining embeddings and sentiment yields the highest performance, particularly when using both mean and standard deviation.

Table 1: Identity detection accuracy (in %) under different feature configurations. We consider three representations: Mean, STD, and All. For each response, sentence-level features are first extracted and then aggregated using their mean (Mean) and standard deviation (STD) to form the response-level representation. In addition, the entire response is processed directly to obtain a single feature vector (All). Mean+STD shows the joint feature vectors of Mean and STD.
Participant GPT Digital Twin
Embedding Mean 48.35 19.44 42.90
STD 35.64 21.70 32.99
All 47.12 21.02 36.86
Mean+STD 48.55 19.90 44.15
Sentiment Mean 50.64 24.31 41.17
STD 44.62 23.36 41.27
All 46.61 22.36 29.87
Mean+STD 48.37 23.28 41.73
Embedding+Sentiment Mean 49.96 20.87 43.55
STD 42.83 22.24 37.56
All 49.27 22.25 37.54
Mean+STD 50.95 21.51 44.42

6pt

4.5 Digital Twin Evaluation↩︎

To further evaluate the proposed language digital twin, we conduct an experiment focusing on response quality and cognitive (MoCA score) prediction. The cVAE model is trained on real question–answer pairs with participant metadata, including age, interview time, and contextual information. It is then used to evaluate responses from three sources: (1) real participant responses, (2) a base (raw) GPT model, and (3) the fine-tuned (FT) model representing the digital twin.

Figure 3: Normalized loss function of the cVAE model for the first 20 epochs.

The cVAE serves a dual purpose: measuring reconstruction quality via Mean Squared Error (MSE) and predicting MoCA scores from the input question, generated response, and metadata, enabling joint evaluation of linguistic fidelity and cognitive consistency. Fig. 3 illustrates the training dynamics of the cVAE model, showing a steady decrease in loss over the first 20 epochs, which indicates stable convergence.

Table 2: Reconstruction error (ranging from 0 to 1) for real responses and responses generated by the digital twin. Low error values across all participants indicate that the digital twin closely reproduces the linguistic and contextual characteristics of real responses.
Participant # P1 P2 P3 P4 P5
Real Response 0.0094 0.0078 0.0077 0.0078 0.0086
Digital Twin 0.0098 0.0084 0.0094 0.0094 0.0089

8pt

Table 2 reports reconstruction errors for real responses and the responses generated by digital twin across five participants. The digital twin closely matches real responses, with only slight increases (e.g., 0.0094 vs. 0.0098 for Participant 1), and errors remaining within a narrow range (0.0077–0.0098), indicating strong similarity and effective capture of linguistic patterns.

Table 3: MoCA score prediction error for the real participants, their corresponding data generated by raw GPT and the digital twins.
Participant # P1 P2 P3 P4 P5
Real Participant 0.94 0.58 1.05 0.40 1.03
Raw GPT 3.53 5.08 4.60 4.95 4.59
Digital Twin 0.92 0.55 1.06 0.41 1.08

10pt

Table 3 presents MoCA prediction errors for real responses, raw GPT, and digital twin outputs. The digital twin closely aligns with real data across participants (e.g., 0.94 vs. 0.92), while the base GPT shows substantially higher errors (3.53–5.08), indicating poor cognitive alignment.

Overall, the digital twin maintains low prediction errors (0.40–1.08), demonstrating its ability to preserve cognitively relevant information and captures linguistically and cognitally relevant patterns. These results highlight its potential as a non-invasive tool for continuous cognitive monitoring and early detection of cognitive decline.

5 Conclusion and Future Works↩︎

5.0.0.1 Conclusion:

We introduced a language-based digital twin framework for modeling cognitive behavior in elderly individuals. By leveraging large language models and incorporating stylometric cues such as pause and tempo, the approach captures both linguistic style and temporal dynamics. Through supervised fine-tuning, the digital twin generates personalized responses that closely resemble real conversations.

To evaluate response fidelity and cognitive consistency, we proposed a cVAE-based framework that jointly measures reconstruction quality and cognitive prediction. Results show that the digital twin captures individual-specific linguistic patterns and achieves reconstruction and MoCA prediction errors comparable to real data, while outperforming baseline GPT-generated responses. These findings demonstrate that language-based digital twins can serve as a reliable and non-invasive tool for monitoring cognitive health.

5.0.0.2 Future Work:

We plan to extend this framework to a multimodal digital twin by incorporating additional modalities from the I-CONECT dataset, such as audio and video. Integrating vocal features and facial expressions will enable improved modeling of affective and behavioral signals, leading to more accurate and comprehensive digital twins. This extension has the potential to enhance cognitive assessment and support robust monitoring of cognitive decline in real-world settings. A limitation of this study is the relatively small sample size; future work will involve evaluating the proposed framework on a larger and more diverse cohort to improve generalizability and robustness. Additionally, we will investigate generalization across participants to further assess the robustness of the proposed framework.

Acknowledgments↩︎

This work was partially supported by a PennAITech award from the National Institute on Aging (Grant No. P30AG073105), the Knoebel Institute for Healthy Aging (KIHA), and the National Institute on Aging under Grants R01AG051628 and R01AG056102.

References↩︎

[1]
R. C. Petersen, B. Caracciolo, C. Brayne, S. Gauthier, V. Jelic, and L. Fratiglioni, “Mild cognitive impairment: A concept in evolution,” Journal of internal medicine, vol. 275, no. 3, pp. 214–228, 2014.
[2]
C. R. Jack Jr et al., “NIA-AA research framework: Toward a biological definition of alzheimer’s disease,” Alzheimer’s & dementia, vol. 14, no. 4, pp. 535–562, 2018.
[3]
I. Martı́nez-Nicolás, T. E. Llorente, F. Martı́nez-Sánchez, and J. J. G. Meilán, “Ten years of research on automatic voice and speech analysis of people with alzheimer’s disease and mild cognitive impairment: A systematic review article,” Frontiers in Psychology, vol. 12, p. 620251, 2021.
[4]
M. R. Lima et al., “Evaluating spoken language as a biomarker for automated screening of cognitive impairment,” Communications Medicine, 2025.
[5]
H. H. Dodge et al., “Internet-based conversational engagement randomized controlled clinical trial (i-CONECT) among socially isolated adults 75+ years old with normal cognition or mild cognitive impairment: Topline results,” The Gerontologist, vol. 64, no. 4, p. gnad147, 2024.
[6]
B. H. Tudor et al., “A scoping review of human digital twins in healthcare applications and usage patterns,” npj Digital Medicine, vol. 8, no. 1, p. 587, 2025.
[7]
H. Khoshfekr Rudsari et al., “Digital twins in healthcare: A comprehensive review and future directions,” Frontiers in Digital Health, vol. 7, p. 1633539, 2025.
[8]
M. Nadeem, S. Kostic, M. Dornhöfer, C. Weber, and M. Fathi, “A comprehensive review of digital twin in healthcare in the scope of simulative health-monitoring,” Digital Health, vol. 11, p. 20552076241304078, 2025.
[9]
G. Sprint, M. Schmitter-Edgecombe, and D. Cook, “Building a human digital twin (HDTwin) using large language models for cognitive diagnosis: Algorithm development and validation,” JMIR Formative Research, vol. 8, p. e63866, 2024.
[10]
J. Lammert et al., “Large language models-enabled digital twins for precision medicine in rare gynecological tumors,” NPJ Digital Medicine, vol. 8, no. 1, p. 420, 2025.
[11]
A. P. Fard, M. H. Mahoor, M. Alsuhaibani, and H. H. Dodge, “Linguistic-based mild cognitive impairment detection using informative loss,” Computers in Biology and Medicine, vol. 176, p. 108606, 2024.
[12]
J. Corral-Acero et al., “The ‘digital twin’to enable the vision of precision cardiology,” European heart journal, vol. 41, no. 48, pp. 4556–4564, 2020.
[13]
B. Björnsson et al., “Digital twins to personalize medicine,” Genome medicine, vol. 12, no. 1, p. 4, 2019.
[14]
J. Hong et al., “A-conect: Designing ai-based conversational chatbot for early dementia intervention,” in ICLR 2024 workshop on large language model (LLM) agents, 2024.
[15]
K. Sohn, H. Lee, and X. Yan, “Learning structured output representation using deep conditional generative models,” Advances in neural information processing systems, vol. 28, 2015.
[16]
J. T. Becker, F. Boiler, O. L. Lopez, J. Saxton, and K. L. McGonigle, “The natural history of alzheimer’s disease: Description of study cohort and accuracy of diagnosis,” Archives of neurology, vol. 51, no. 6, pp. 585–594, 1994.
[17]
S. Luz, F. Haider, S. de la Fuente Garcia, D. Fromm, and B. MacWhinney, “Alzheimer’s dementia recognition through spontaneous speech,” Frontiers in computer science, vol. 3. Frontiers Media SA, p. 780169, 2021.
[18]
S. Luz, F. Haider, S. De La Fuente, D. Fromm, and B. MacWhinney, “Detecting cognitive decline using speech only: The adresso challenge. arXiv 2021,” arXiv preprint arXiv:2104.09356.
[19]
A. Radford, J. W. Kim, T. Xu, G. Brockman, C. McLeavey, and I. Sutskever, “Robust speech recognition via large-scale weak supervision,” in International conference on machine learning, 2023, pp. 28492–28518.
[20]
H. Bredin et al., “Pyannote. Audio: Neural building blocks for speaker diarization,” in ICASSP 2020-2020 IEEE international conference on acoustics, speech and signal processing (ICASSP), 2020, pp. 7124–7128.
[21]
N. Reimers and I. Gurevych, “Sentence-bert: Sentence embeddings using siamese bert-networks,” in Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), 2019, pp. 3982–3992.
[22]
V. Sanh, L. Debut, J. Chaumond, and T. Wolf, “DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter,” arXiv preprint arXiv:1910.01108, 2019.

  1. Corresponding author: Mohammad H. Mahoor ().↩︎