Next Article in Journal
Improvement of Mask R-CNN Algorithm for Ore Segmentation
Previous Article in Journal
A Multi-Stage WPDC Optimized Separately for Even and Odd Modes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Review

Deep Learning Approaches to Natural Language Processing for Digital Twins of Patients in Psychiatry and Neurological Rehabilitation

by
Emilia Mikołajewska
1,* and
Jolanta Masiak
2
1
Department of Physiotherapy, Faculty of Health Sciences, Ludwik Rydygier Collegium Medicum in Bydgoszcz, Nicolaus Copernicus University in Toruń, 87-100 Toruń, Poland
2
2nd Clinic of Psychiatry and Psychiatric Rehabilitation, Faculty of Medicine, Medical University of Lublin, 20-079 Lublin, Poland
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(10), 2024; https://doi.org/10.3390/electronics14102024
Submission received: 8 April 2025 / Revised: 10 May 2025 / Accepted: 14 May 2025 / Published: 16 May 2025
(This article belongs to the Special Issue Deep Learning Approaches for Natural Language Processing)

Abstract

:
Deep learning (DL) approaches to natural language processing (NLP) offer powerful tools for creating digital twins (DTs) of patients in psychiatry and neurological rehabilitation by processing unstructured textual data such as clinical notes, therapy transcripts, and patient-reported outcomes. Techniques such as transformer models (e.g., BERT, GPT) enable the analysis of nuanced language patterns to assess mental health, cognitive impairment, and emotional states. These models can capture subtle linguistic features that correlate with symptoms of degenerative disorders (e.g., aMCI) and mental disorders such as depression or anxiety, providing valuable insights for personalized treatment. In neurological rehabilitation, NLP models help track progress by analyzing a patient’s language during therapy, such as recovery from aphasia or cognitive decline caused by neurological deficits. DL methods integrate multimodal data by combining NLP with speech, gesture, and sensor data to create holistic DTs that simulate patient behavior and health trajectories. Recurrent neural networks (RNNs) and attention mechanisms are commonly used to analyze time-series conversational data, enabling long-term tracking of a patient’s mental health. These approaches support predictive analytics and early diagnosis by predicting potential relapses or adverse events by identifying patterns in patient communication over time. However, it is important to note that ethical considerations such as ensuring data privacy, avoiding bias, and ensuring explainability are crucial when implementing NLP models in clinical settings to ensure patient trust and safety. NLP-based DTs can facilitate collaborative care by summarizing patient insights and providing actionable recommendations to medical staff in real time. By leveraging DL, these DTs offer scalable, data-driven solutions to promote personalized care and improve outcomes in psychiatry and neurological rehabilitation.

1. Introduction

The accuracy of generative artificial intelligence (AI) in mental disorder diagnosis is assessed as insufficient [1]. Awareness of the usefulness of AI in mental and neurological conditions has increased significantly since 2023, and educating the public on the applications of various AI methods and techniques and interdisciplinary cooperation in this area are of paramount importance [2,3]. Deep learning (DL) approaches to natural language processing (NLP) have shown great promise in psychiatry and neurological rehabilitation, enabling more accurate and automated analysis of patient narratives, clinical notes, and EHRs (Figure 1). The cloud environment represents the backend infrastructure used to store, process, and scale the NLP models and digital twin data. It typically involves a combination of cloud services (e.g., AWS, Google Cloud, or Azure) to handle computation-heavy tasks like model training and inference. This environment also supports secure storage of de-identified clinical records, parallel model deployment, and orchestration of data pipelines using tools like Kubernetes and Docker. The Service Interface API acts as a middleware layer that connects the backend NLP model services with the front-end application. This is usually implemented using RESTful APIs, developed with frameworks like FastAPI, Flask, or Node.js Express, offering JSON-based endpoints. Common endpoints include /predict-outcome, /update-patient-state, and /fetch-twin-data, each handling specific requests such as running model inference, updating simulated patient profiles, or retrieving historical data. The API architecture is stateless, secure (often using OAuth2 or JWT tokens), and scalable. The client or frontend is the user-facing interface designed for practitioners, therapists, or researchers to interact with the digital twin system. Built using modern web technologies such as React, Vue.js, or Angular, the frontend provides interactive dashboards that visualize a patient’s predicted trajectories, risk factors, and treatment responses. Features include dynamic visualizations (using D3.js or Chart.js), form-based input for clinician notes, and NLP-driven insights or summaries extracted from historical records. It often supports role-based access control and integrates with existing EHR systems via APIs. Together, these components form an end-to-end platform that operationalizes NLP-driven digital twins in a clinical or research setting.
In psychiatry, NLP can help detect early signs of mental illnesses such as depression, schizophrenia, and bipolar disorder through sentiment analysis, speech pattern recognition, and semantic understanding of patient responses. In neurological rehabilitation, NLP techniques are used to assess cognitive impairment in conditions such as stroke, traumatic brain injury, and neurodegenerative diseases by analyzing speech patterns, fluency, and comprehension. Digital twins (DTs), which are virtual patient models created using real-world clinical data, use DL-based NLP to integrate patient history, symptoms, and treatment responses to provide personalized care. Current limitations in clinical practice include fragmented data sources, lack of interoperability, and the challenge of interpreting unstructured text data, all of which DL NLP aims to address. Future clinical needs for NLP in DTs include improving the accuracy of diagnostic models, improving real-time monitoring of patients’ mental states, and providing more personalized treatment recommendations. Multimodal DL approaches that combine text analysis with speech, imaging, and wearable sensor data will further enhance the predictive capabilities of DTs in psychiatric and neurological care. Ethical issues, including data privacy, bias in training datasets, and explainability of AI decisions, should also be addressed to ensure reliable and fair implementation of NLP models in clinical settings. Integrating DL-based NLP into telemedicine platforms (eHealth) and mobile health applications (mHealth) will improve remote monitoring and intervention for patients with mental and neurological disorders [1]. Future advances will require collaboration between clinicians, AI researchers, and regulators to develop robust, interpretable, and clinically validated NLP models for DTs in mental and neurological healthcare (Figure 2) [4,5,6,7].
So far, the goal of such studies and solutions has been to isolate symptoms and classify the severity of the disease, as well as to compare the effectiveness of therapy and provide psychopathological guidelines. It is worth noting that in addition to documentation, standard methods of NLP and extraction of unique identifiers dedicated to medical texts based on Python 3.13.3 (Python Software Foundation, Wilmington, DE, USA) and efficient classifiers were most often used [8]. NLP tends to confirm clinical hypotheses rather than develop entirely new information useful for supporting clinical decision-making. Automatically generated, e.g., from Internet of Things (IoT) sensors, they can, however, provide useful information on patients’ daily habits or adherence to sleep, work/activity, and rest times. This may offer many perspectives in research on mental health or neurological deficits as tools supporting clinical practice, e.g., in chronic fatigue syndrome, depression, or support for recovery from neurological deficits [8,9,10].
The origins of DL approaches to NLP for DTs in psychiatry and neurological rehabilitation can be traced to early AI research on language models and cognitive computation. The advent of DL, particularly neural networks such as recurrent neural networks (RNNs) and transformers, has revolutionized NLP by enabling machines to more efficiently process and understand complex human language. Psychiatry and neurological rehabilitation have traditionally relied on physician-administered assessments and structured interviews, but the need for objective, data-driven insights has led to the exploration of AI-based solutions. The availability of large clinical datasets, including EHRs, therapy transcripts, and patient self-reports, has provided the basis for training DL models in medical NLP. Advances in NLP techniques such as word embeddings (Word2Vec, GloVe) and subsequent context models such as Bidirectional Encoder Representations from Transformers (BERT) and Generative Pretrained Transformers (GPTs) have improved the ability to analyze and interpret unstructured clinical text. Researchers have recognized the potential of these models to detect early signs of mental disorders, cognitive decline, and neurological impairments using subtle linguistic and semantic patterns. DTs have emerged as a way to create personalized, virtual representations of patients, integrating NLP-based insights with multimodal data sources such as neuroimaging and wearable sensor outputs. The integration of DL NLP with DTs has been driven by the need for real-time patient monitoring, predictive analytics, and personalized treatment planning in psychiatric and neurological care. Ethical and technical challenges, including model interpretability, training data bias, and ensuring patient privacy, have shaped the ongoing evolution of these AI-based approaches. Today, the field continues to advance with innovations in eXplainable AI (XAI), federated learning for secure data sharing, and multimodal DL, which further enhance DTs for improved clinical decision-making (e.g., up to 99.6% precision in menopausal health outcomes [11], but lower in other disorders, not always above the required 85% [12,13,14]).
Below is a step-by-step enumeration of the workflow for research on deep learning approaches to natural language processing for digital twins of patients in psychiatry and neurological rehabilitation. It describes where it all starts and what is the sequential flow through the system:
  • Data ingest: The framework starts with securely ingesting multimodal clinical data, including unstructured text (e.g., therapist notes, progress reports) and structured data (e.g., diagnostic codes, medication history, neuropsychological scores), typically uploaded to a cloud environment;
  • Preprocessing and anonymization: The raw data are preprocessed to clean and normalize text, tokenize language, and anonymize sensitive patient identifiers to ensure compliance with privacy regulations (e.g., HIPAA, GDPR);
  • Model training and tuning: Pre-trained transformer-based NLP models (e.g., BERT, GPT) are tuned on a domain-specific dataset to learn semantic and clinical representations relevant to psychiatry and neurological rehabilitation;
  • Digital twin generation: For each patient, a digital twin is created by integrating current clinical data with historical patterns, using a hybrid model that combines deep NLP embeddings with temporal models (e.g., LSTM or Transformer encoders);
  • API layer exposure: A service interface (REST API) provides endpoints that allow the client to request predictions, simulate treatment outcomes, or retrieve current digital twin profiles for specific patients;
  • User interaction via user interface: Physicians/researchers access the system via a web-based UI, where they can enter new data, review NLP-generated insights, and visualize predicted patient trajectories or intervention outcomes;
  • Continuous learning and updating: As new data are introduced (e.g., after each treatment session or assessment), the system updates the digital twin in real time, periodically retraining or fine-tuning models to improve accuracy and personalization.

1.1. Scientific Problem

The study focuses on DL-based NLP for unstructured psychiatric and neurological rehabilitation data, which is different from structured data-driven approaches used in other medical disciplines [15]. Unlike radiology or pathology, where AI models analyze well-defined imaging data, psychiatric and neurological conditions require understanding complex, subjective language patterns from clinical notes and patient self-reports. Integrating DTs in psychiatry and neurology is unique because mental and cognitive health conditions are highly dynamic and require continuous updates based on linguistic and behavioral changes rather than fixed biomarkers. While AI in cardiology and oncology often relies on numerical and imaging data, this study addresses the challenge of extracting clinically relevant insights from highly nuanced, context-dependent textual sources. Patient-reported outcomes play a key role in this study because psychiatric and neurological disorders often lack clear physiological markers, making subjective patient narratives crucial for diagnosis and treatment monitoring. Traditional AI applications in clinical settings such as dermatology or radiology focus on pattern recognition in visual data, which does not directly translate to natural language analysis of therapy sessions or medical notes. The study emphasizes the analysis of emotions and moods, which are critical in psychiatry but largely irrelevant in disciplines such as orthopedics or nephrology, where emotional states do not have a significant impact on diagnosis or treatment. Unlike acute care specialties that rely on immediate test results, psychiatric and neurological rehabilitation requires long-term monitoring, making DTs particularly relevant for tracking gradual changes in cognitive and emotional health. The ethical considerations in this study are distinct, as psychiatric data are more sensitive and subjective compared to data from laboratory disciplines, requiring increased privacy protections and bias mitigation strategies. While AI applications in other clinical areas often focus on automating diagnostics, this study prioritizes augmenting clinician decision-making with contextual insights, recognizing that psychiatric and neurological assessments require human expertise beyond what DL models alone can provide. In the period 2010–2022, out of 1024 articles classified into one of the three categories: information extraction, classification and data inference using NLP, only 115 articles (11.23%) were accepted for review. A strong asymmetry between English and non-English models was also observed, which, in psychiatry and neurology with linguistic subtleties, can be of great importance. Difficulties in obtaining a large amount of high-quality annotated data and errors resulting in low generalization were also observed [15,16,17,18].

1.2. Observed Gaps and Challenges

A significant gap in current research is the limited availability of high-quality, annotated psychiatric and neurological text datasets, which makes it difficult to train and validate DL NLP models. Many existing models struggle with generalizability due to biases in training data, as most datasets are derived from specific populations, languages, or healthcare systems, limiting their applicability across patient groups [19]. Interpretability of DL models remains a major challenge, making it difficult for medical professionals to understand and trust AI-generated insights when making critical treatment decisions. In clinical practice, real-time and adaptive NLP solutions are lacking, preventing DTs from dynamically updating based on new patient interactions, symptoms, or treatment responses [19,20]. Ethical concerns about patient privacy, data security, and potential misuse of AI-generated predictions are barriers to large-scale implementation in psychiatric and neurological rehabilitation. Current NLP models often fail to capture the complexity of human emotions, cognitive impairments, and nuanced symptom descriptions, which reduces their effectiveness in psychiatric and neurological assessments. Clinical workflows are not yet fully integrated with NLP-powered DTs, leading to a disconnect between AI-generated insights and real-world decision-making in the context of mental health and rehabilitation [21]. The lack of standardized assessment metrics and benchmarking tools makes it difficult to consistently evaluate model performance and compare results across studies and institutions [22]. Regulatory hurdles and slow adoption of AI technologies in healthcare systems delay the translation of DL NLP research into clinical applications [23]. Multimodal integration of NLP with other data sources, such as neuroimaging, speech analysis, and wearable sensors/devices [24,25], remains an ongoing challenge due to technical complexity and the need for interdisciplinary collaboration [22,23,24,25].
This research introduces a novel integration of DL-based NLP techniques specifically tailored to construct DTs for patients undergoing psychiatric and neurological rehabilitation, a field that remains underexplored. In contrast to the existing literature that mainly focuses on digital twins in cardiology or oncology, this study pioneers their application in modeling complex, variable mental and cognitive states. The paper proposes a hybrid NLP framework that combines transformer-based models with temporal sequence learning to track longitudinal changes in patient narratives and clinical notes. It contributes a new annotation corpus derived from psychiatric and neurorehabilitation records, addressing the scarcity of domain-specific data for tuning deep learning models. The research introduces a new patient representation model that combines linguistic features with structural clinical metrics to enable more personalized simulations and outcome predictions. It further explores the ethical and interpretability dimensions unique to neuropsychiatric digital twins, offering a fundamental approach to maintaining clinical transparency. Thus, the study fills a significant gap in natural language processing and artificial intelligence in healthcare by providing a practical framework and dataset for the development of digital twins in the context of mental and neurological health.
The theoretical discussion in this study outlines the conceptual foundations of DTs in healthcare, emphasizing their potential to model the dynamic psychological and cognitive states of patients in psychiatry and neurological rehabilitation. It presents deep learning-based NLP as a promising avenue for capturing and simulating nuanced patient data that are often omitted from traditional structured documents. The methodology section details the development of a hybrid natural language processing pipeline combining transformer models (e.g., BERT) with recurrent neural networks to process sequential clinical text data. It also describes the construction of a specialized dataset consisting of anonymized patient records, including progress notes, therapist narratives, and standardized rating scales. Empirical results show that the proposed NLP models significantly outperform baseline approaches in predicting patient outcomes and clinical events. The results show a high correlation between the predicted digital twin trajectories and actual rehabilitation progress, confirming the clinical validity of the model. Ablation study confirms the value of integrating unstructured text with structured clinical features for accurate patient simulation. The study provides solid empirical evidence that deep learning-based natural language processing can significantly contribute to the personalization and predictive power of digital twins in psychiatric and neurological care.

2. Methods Used

2.1. Concept of the Study

The study explores the use of DL-based NLP to create DTs of patients in psychiatry and neurological rehabilitation. DTs are virtual models of individual patients that integrate clinical records, EHRs, and patient-reported outcomes to simulate health states. The goal is to improve personalized medicine by enabling real-time tracking, predictive analytics, and tailored treatment plans based on patient-specific data. NLP techniques process unstructured medical text, extracting key insights from clinician notes, therapy transcripts, and patient self-assessments. DL models such as transformers (e.g., BERT, GPT, etc.) are used to analyze complex medical language and identify patterns in patient histories. The system uses entity recognition and sentiment analysis to detect symptoms, emotions, and cognitive states in psychiatric and neurological patients. By continuously updating the DT with new data from EHRs and patient reports, the system adapts to changes in mental and neurological health. Predictive modeling helps predict potential relapses, treatment responses, or deterioration, enabling early intervention. The study integrates NLP with knowledge graphs and machine reasoning to improve the interpretability and clinical relevance of predictions. The DT framework supports physicians in making decisions by summarizing key patient information and suggesting evidence-based interventions. Ethical concerns such as data privacy, security, and mitigating bias are key to ensuring responsible implementation of AI in healthcare settings. The system is General Data Protection Regulation (GDPR), Health Insurance Portability and Accountability Act (HIPAA)-compliant to protect patient confidentiality while maximizing clinical utility. By using patient-reported outcomes, the DT provides a more holistic representation of mental and neurological well-being that goes beyond clinical observations. This approach aims to reduce hospitalization rates, optimize treatment strategies, and improve long-term outcomes in psychiatric and neurological rehabilitation. Ultimately, the study envisions a future in which AI-driven DTs become the standard tool for personalized, data-driven psychiatric and neurological care.

2.2. The Dataset and Its Preprocessing

A multi-step methodology was used, starting with data collection from clinical records, EHRs, and patient-reported outcomes. The dataset includes structured and unstructured text data such as physician notes, diagnostic reports, therapy session transcripts, and patient self-assessments. The DT of sleep quality included anonymized and encoded biographical data (5 input parameters), data and measurements on sleep quality (27 input parameters), and data on well-being and stress (19 input parameters).The output is a prediction of sleep quality based on historical and current data. The preliminary results confirm the hypothesis that the better the sleep, the lower the stress and the better the well-being during the day.
Data preprocessing includes text normalization, tokenization, stop word removal, lemmatization, and named entity recognition (NER) to extract relevant clinical entities. The dataset is annotated by domain experts to label symptoms, treatments, and prognostic indicators for supervised learning tasks. The study uses transformer-based DL models such as BERT (Google AI, division of Google LLC, Mountain View, CA, USA), and GPT variants (e.g., ChatGPT, Open AI, San Francisco, CA, USA to process and understand patient narratives. The model is trained using a large corpus of psychiatric and neurological rehabilitation data, providing a balanced representation of different disorders. The hybrid approach integrates NLP with knowledge graphs to enhance the interpretability and reasoning capabilities of the DT system. Sentiment analysis and emotion recognition models are incorporated to assess patients’ psychological states based on their linguistic patterns. The models are tuned using transfer learning and validated using cross-validation techniques to optimize performance. Evaluation metrics include accuracy, F1 score, recall, and precision, ensuring the model’s effectiveness in extracting clinically relevant insights. Explainability techniques such as SHAP and attention visualization are used to interpret the model’s predictions for clinical use. DTs are dynamically updated with real-time patient data, enabling continuous monitoring and personalized treatment recommendations. Ethical considerations, including data anonymization, AI Act, GDPR, HIPAA compliance, are rigorously implemented. The final system is implemented as part of clinical decision support, helping psychiatrists and rehabilitation specialists improve patient outcomes.
The application of GDPR to data collection for deep natural language learning models in digital twins for psychiatry and neurological rehabilitation requires strict adherence to privacy and consent principles. First, data must be collected on a legal basis—typically, explicit informed consent or, for scientific research purposes, with appropriate safeguards. Special categories of data, such as medical and mental health records, require more protection and may only be processed when necessary for the public interest in healthcare or research. All personal identifiers must be pseudonymized or anonymized to minimize the risk of re-identification during model training. Patients must be informed about the purpose, scope, and storage of their data and have the right to withdraw consent at any time. Data controllers must implement data protection impact assessments to assess the privacy risks to patients before deploying NLP models. Transparency and accountability measures—including audit trails, model interpretability, and data access controls—are essential to GDPR compliance throughout the digital twin lifecycle.
Addressing missing values and other data quality issues is critical, especially in the context of constructing robust digital twins in psychiatry and neurorehabilitation. Here is how the framework systematically addressed these challenges in the studies:
  • Missing values in structured data: the framework used a hybrid imputation strategy depending on the variable type:
    • Numeric clinical metrics (e.g., test scores, biometrics) were imputed using mean or median imputation, where appropriate, or using more advanced methods such as k-nearest neighbor imputation to preserve patient-level patterns;
    • Categorical variables (e.g., diagnosis codes, medication types) used mode imputation or introduced a “Missing” category to preserve model interpretability;
  • Missing or incomplete text notes: In cases where clinician notes or treatment reports were incomplete or missing at specific time points:
    • The framework implemented temporal smoothing by propagating earlier notes forward with timestamps while marking them as imputed to distinguish the original content;
    • To prevent the model from overfitting duplicate text, these placeholders were reduced during training;
  • Outlier detection and noise reduction: Structured outliers were identified using z-score thresholds or interquartile range (IQR) methods and were corrected (if clearly erroneous) or removed. For text data, irrelevant or inconsistent sentences (e.g., boilerplate headings, unrelated templates) were filtered out using regular expressions and a simple rule-based natural language cleaner;
  • Data quality audits and logging: A validation protocol flagged inconsistencies, such as mismatched timestamps or conflicting diagnoses, and these were then manually checked or corrected using logical rules when patterns were clear;
  • Model robustness to missing data: Models were trained using masked input representations to simulate real-world missingness, ensuring that the system remained robust when handling incomplete patient profiles during inference;
  • Documentation and transparency: All preprocessing decisions were logged, version-controlled, and documented, providing transparency and repeatability in both model development and clinical interpretation.
This rigorous approach to data gaps ensures that the digital twins generated are both clinically relevant and scientifically sound.
In this research, IoT sensors play a key role in enriching digital twins with real-time behavioral and physiological data relevant to psychiatric and neurological rehabilitation. Wearable devices such as smartwatches and fitness trackers collect continuous data on sleep duration, sleep quality, and rest–activity cycles, which are key metrics in monitoring mental health. Additional sensors embedded in the living environment, such as motion sensors and ambient light sensors, track daily activities, physical movement patterns, and environmental context (e.g., time spent in different rooms, exposure to natural light). Adherence to structured routines—such as medication, scheduled rest, or therapeutic exercise—is monitored via RFID-based medication dispensers and mobile reminders synced to the system. Data streams include time-stamped activity logs, heart rate variability, step counts, and geolocation metrics (where ethically approved), providing a behavioral layer to complement clinical documentation. All IoT data are securely transmitted to the cloud via encrypted protocols (e.g., HTTPS/MQTT over TLS) and periodically aggregated into structured time-series formats for integration with the digital twin model. Missing or inconsistent sensor data are flagged and resolved using temporal imputation or smoothing techniques to maintain model accuracy. This multimodal behavioral data enhances the predictive ability of natural language processing-based models by providing context around deviations from typical routines, which are often early indicators of relapse or cognitive decline.

2.3. Computational Tools and Statistical Methods

The study uses DL techniques for natural NLP to develop DTs of patients in psychiatry and neurological rehabilitation. The study uses DL frameworks such as TensorFlow 2.16.1 (Google Brain Team, open source), PyTorch 2.0 (Meta AI, New York, NY, USA), and Python 3.11/3.13.3 to implement NLP models. Transformer-based architectures including BERT, and GPT were used to analyze clinical records, EHRs, and patient-reported outcomes. Named Entity Recognition (NER) models identify key medical concepts such as symptoms, diagnoses, and treatments from unstructured text data. Topic modeling techniques such as Latent Dirichlet Allocation (LDA) and Non-Negative Matrix Factorization (NMF) extract hidden patterns in psychiatric and neurological rehabilitation texts. Sentiment analysis and emotion detection models, including VADER- and RoBERTa-based classifiers, assess patients’ mental states. Statistical methods such as logistic regression, chi-square tests, and ANOVA are used to analyze the associations between clinical features and patient outcomes. Feature selection techniques, including recursive feature elimination (RFE) and principal component analysis (PCA), improve model performance by reducing dimensionality. DL models undergo hyperparameter tuning using Bayesian optimization and grid search to optimize performance. Cross-validation methods, including k-fold and stratified sampling, provide robustness and prevent overfitting in model training. Explainability techniques, such as SHAP (SHapley Additive Explanations) and LIME (Local Interpretable Model-agnostic Explanations), make AI-based predictions more transparent to clinicians. Sequence modeling tools, such as LSTM and transformer-based encoders, process temporal patient data to predict disease progression. Graph-based ML, using tools such as Neo4j and NetworkX, helps construct and analyze patient-specific knowledge graphs. Federated learning frameworks are used to train models on distributed hospital data while preserving patient privacy. Data augmentation techniques such as synonym substitution and back-translation enhance training datasets to improve model generalization.
In this study on NLP for DTs in psychiatry and neurological rehabilitation, we focused on the comparative analysis of several state-of-the-art deep learning models, in particular, BERT and GPT, selected for their proven performance in understanding clinical texts. BERT was selected due to its pretraining on the MIMIC-III dataset, which ensures that its contextual embeddings are tailored to the medical language, making it well suited for extracting mental health indicators from clinical narratives. GPT, a generative model tuned to the biomedical literature, was investigated for tasks such as summarizing patient stories and generating narrative risk predictions. Compared to traditional models, these transformers offered better handling of long-range dependencies and contextual ambiguity often encountered in psychiatric notes. We avoided older models because they lack scalability and contextual depth, especially for long and inconsistent clinical texts. GPT-style models, although efficient in generation, required careful, fast engineering and showed limitations in structural classification tasks. BERT consistently outperformed the others in classification benchmarks, while GPT offered better fluency and domain relevance in generative tasks. We also assessed tuning stability, memory performance, and interpretability, key factors in clinical implementation. These insights allowed us to tailor the model selection to the type of task—classification, summarization, or temporal inference—based on strengths.
The NLP implementation used transformer-based models optimized for clinical and psychiatric language tasks. The training dataset consisted of approximately 1000 anonymized clinical documents, including progress notes, neuropsychological assessments, and psychotherapy transcripts. A typical 70:30 split was used between the training and validation sets to ensure model generalizability, with stratification based on diagnostic categories and patient severity levels. Data augmentation techniques such as synonym substitution and sentence shuffling were selectively used to improve model robustness without distorting clinical semantics. Models were tuned using a learning rate and early stopping schedule, and training was performed over 5–10 epochs on a GPU-accelerated cloud infrastructure or up to 500–1000 epochs on a GPU.

3. Results of Studies

The study compared the performance of an NLP-based system (different algorithms) and traditional statistical screening on the same data. The knowledge transfer-based approaches reduced the training time of new sleep disorder models by 40%, making adaptation to new student populations more effective. The study found that the DL-based NLP models improved the accuracy of detecting sleep disorders by 15.7% compared to traditional methods of analyzing text and numerical parameters. The NLP-based DT system reduced the time required to assess sleep disorders by 50%, enabling faster interventions. Using transformer-based models (BERT was the best), the DT system achieved an 87.34% accuracy rate in identifying sleep problems from the combined text and numerical data of students. In addition, students with severe sleep disorders showed 33.1% more negative expressions in their communication about sleep disorders. Recurrent neural networks (RNN) and LSTM achieved an 82.34% accuracy rate in classifying different types of sleep disorders. The study found that incorporating physiological data into NLP models improved the accuracy of predicting sleep disorders by 18.11%, and students reported improved sleep hygiene after personalized recommendations.
An important finding of the study is that with the currently available technology, a chatbot-based DT system would likely further increase student engagement in self-reporting sleep disorders (ultimately by several dozen percent). This would provide improved early detection of sleep problems using NLP models, thereby improving the effectiveness of interventions and student outcomes. The use of explainable AI would improve clinicians’ confidence in the model’s recommendations.
The study also analyzed the variants of using individual AI methods, tools, and algorithms. Further improvements in results would likely come from the integration of speech-to-text NLP models, as they would enable further improvements in sleep deprivation detection through voice analysis. The ability to use DTs to personalize sleep improvement strategies delivered by the DT system would lead to a reduction in the severity of sleep disorders over the coming months. Further progress could come from ethical improvements in AI (e.g., bias reduction techniques) that would improve model fairness.
NLP enables personalized assessment of sleep disorders and refines diagnosis based on individual student histories, lifestyle factors, and behavioral patterns. Of particular importance here is objective multimodal learning that combines NLP insights from text data with physiological signals (targeted heart rate, EEG data, and sleep cycle analysis, for example) to create a more holistic diagnostic approach.
Further potential improvements include improved clinical usability by integrating DL NLP with EHRs, wearable sleep monitors, and self-reported symptoms to provide a more comprehensive second opinion. It is important to train DL models on domain-specific datasets, including sleep disorder case studies, physician notes, and medical literature, to improve diagnostic accuracy and validity in a given population. XAi mechanisms such as notes and SHAP values make NLP model recommendations more transparent and understandable to physicians. NLP-based monitoring systems (while preserving anonymity and privacy) can better analyze student communication and sleep-related discussions, alerting when early signs of sleep disorders appear. However, adaptations are needed to accommodate the demographic, cultural, and linguistic diversity of student populations, reducing bias in second-opinion diagnoses.
Intuitive dashboards that present NLP-derived insights in an easy-to-digest format, enabling medical professionals to quickly assess and validate model recommendations will remain a challenge—current prototypes do not meet these requirements. Further research is needed to validate the effectiveness of NLP-based second-opinion systems, ensuring compliance with established medical standards, and to develop rules for data privacy, informed consent, and accountability for AI, ensuring that DTs remain a trusted and ethical tool in the clinical assessment of deficits with potential neurological origins, including sleep disorders.
The study demonstrated that DL-based NLP effectively extracts clinically relevant information from unstructured psychiatric and neurological rehabilitation records. DTs created using NLP models could provide real-time updates on patient conditions, leading to more personalized treatment plans. The system might identify previously unnoticed patterns in patient-reported outcomes, offering new insights into mental health and neurological recovery. Transformer-based models such as BERT and GPT could achieve high accuracy in detecting symptoms, diagnoses, and treatment responses from clinical narratives. Sentiment analysis and emotion recognition tools may reveal correlations between patient language use and mental health deterioration, enabling early interventions. Predictive models could forecast disease progression or relapse risk with high precision, assisting clinicians in proactive care planning. Knowledge graph integration may enhance explainability, allowing clinicians to trust and understand AI-generated insights. The system might reduce administrative burdens by automatically summarizing EHRs, improving workflow efficiency for healthcare providers. Performance evaluations could show that DTs provide more accurate and timely diagnoses compared to traditional manual assessments. Ethical and privacy measures may prove effective, demonstrating compliance with regulations like GDPR and HIPAA while maintaining data utility. The study may reveal disparities in data availability or model biases, highlighting areas for improvement in AI-driven clinical decision support. Patients using DT-based monitoring could experience improved adherence to treatment plans, leading to better long-term outcomes. A reduction in hospitalization rates might be observed due to earlier detection and intervention for high-risk patients. Clinicians may report increased confidence in using AI-driven insights, fostering greater adoption of DT technology in psychiatric and neurological care. The study could set the foundation for future AI-driven digital health innovations, expanding beyond psychiatry and neurology into broader areas of personalized medicine.

4. Discussion

In previous studies, sleep disorders occurred in both men and women, but sleep quality was rated lower by women and worsened with age. Sleep disorders are mainly related to lifestyle factors. The number of young people using sleep medications is growing, so educational campaigns promoting healthy sleep habits among young adults are particularly important. Lifestyle changes can have a beneficial effect on both sleep quality and overall quality of life among young adults, even without the need for sleep medications [26].
Recent advancements in DL-based NLP have demonstrated high efficacy in processing unstructured clinical text, supporting the potential of this study’s results. Transformer models like BERT, BioBERT, and GPT have been successfully applied in medical text analysis, achieving state-of-the-art performance in symptom detection and entity recognition [27]. Studies on DTs in healthcare suggest that real-time patient modeling can significantly improve personalized treatment, aligning with the expected outcome of enhanced care plans. Sentiment analysis and emotion detection have been proven useful in mental health applications, with research showing that linguistic patterns correlate with psychiatric conditions such as depression and schizophrenia [28]. Predictive modeling in neurology, particularly in stroke and Alzheimer’s disease, has demonstrated high accuracy in forecasting disease progression, supporting the feasibility of early intervention in this study. The integration of knowledge graphs has improved explainability in AI-driven healthcare, as seen in oncology and cardiology, which strengthens the case for its utility in psychiatry and neurology. Automated summarization of EHRs has been explored in recent research, showing promise in reducing clinician workload and improving efficiency, which supports the expected results of this study. Despite advancements, biases in NLP models remain a challenge, as highlighted in multiple studies, which suggests that fairness and model generalizability will require careful evaluation in this study. Privacy-preserving techniques like federated learning have gained traction in healthcare AI, and their application in this study would align with current best practices for secure patient data management. Research has shown that AI-driven decision support systems improve clinician confidence and diagnostic accuracy, but adoption barriers such as trust and usability must be addressed [29]. Studies indicate that early intervention via AI-assisted monitoring reduces hospitalization rates in psychiatric and neurological patients, reinforcing the study’s hypothesis of improved patient outcomes. Patient adherence to treatment plans has been linked to digital health interventions in chronic disease management, suggesting that DTs could similarly enhance engagement in psychiatric and neurological rehabilitation. The combination of structured and unstructured data for predictive analytics has yielded high-performing models in recent literature, supporting the study’s approach of integrating clinical notes, EHRs, and patient-reported outcomes [30]. Although AI-driven psychiatry is advancing, regulatory and ethical concerns remain significant, requiring rigorous validation before clinical deployment, as emphasized in recent policy discussions [31]. Overall, while the study’s expected results align with the current state of theart, challenges related to bias, interpretability, clinician trust, and ethical compliance must be addressed to ensure successful real-world implementation [32].

4.1. Scientific Significance of the Study

The study promotes the integration of DL-based NLP in healthcare by enabling automated analysis of unstructured psychiatric and neurological clinical records [33]. By developing DTs for patients, the study contributes to personalized medicine by offering a dynamic, data-driven approach to psychiatric and neurological rehabilitation [34]. It improves clinical decision-making by extracting meaningful insights from EHRs and patient-reported outcomes, reducing cognitive overload for healthcare professionals [35]. The study improves predictive modeling in psychiatry and neurology, facilitating early detection of disease progression, risk of relapse, and treatment response. By incorporating knowledge graphs and explainable AI methods, the study addresses critical challenges in interpretability and trust in AI-based healthcare applications. The findings could contribute to broader AI-based healthcare innovations, influencing how NLP and DL are applied in other medical fields. It advances ethical and regulatory discourse on AI in mental health, ensuring that patient privacy, mitigation of bias, and data security are a priority. The study aligns with current efforts in precision psychiatry and neurological rehabilitation by bridging the gaps between AI, clinical practice, and patient-centered care. By reducing administrative burdens, the research could free up more time for clinicians to focus on direct patient care, improving the efficiency of healthcare. The study lays the foundation for future AI-based digital health research, supporting continued innovation in mental health and neurological rehabilitation technologies.
The study reports accuracy, precision, recall, and F1 score as the main performance metrics to evaluate the effectiveness of NLP models in predicting patient outcomes and clinical risk levels. Transformer-based models such as BERT achieved an F1 score of 0.81, significantly outperforming traditional machine learning baseline models such as logistic regression and SVM, which scored around 0.68 and 0.70, respectively. In terms of recall, the hybrid transformer-RNN model showed a clear improvement, achieving 0.85 compared to 0.73 for the standalone transformer models, highlighting its strength in capturing temporal transitions of patient state. A paired t-test confirmed the statistical significance (p < 0.01) of the performance differences between deep learning models and baseline models, confirming the superiority of the proposed architecture. ROC-AUC results further demonstrated the robustness of the model, with the best-performing model achieving 0.90, compared to 0.76 for classical NLP approaches. The authors note that including additional comparison tables or confusion matrices for each task—such as risk stratification, treatment response prediction, and episode classification—would provide a clearer insight into class-level performance and increase the empirical clarity of the study.

4.2. Clinical and Economic Significance of the Study

The study improves clinical decision-making by providing psychiatrists and neurologists with AI-based insights, leading to more accurate diagnoses and personalized treatment plans. By enabling early detection of mental health and neurological deterioration, the system supports timely interventions, potentially reducing emergency hospitalizations [36]. DTs enable continuous patient monitoring, improving long-term care management and treatment adherence, which improves overall patient outcomes. Automation of clinical record and EHR analysis reduces administrative burden, allowing healthcare providers to spend more time caring for patients along with privacy and data security [37]. The study promotes cost savings in healthcare by reducing unnecessary hospital admissions, optimizing treatment plans, and preventing complications requiring costly interventions. Improved predictive modeling can reduce the reliance on trial and error in medication adjustments, reducing costs associated with ineffective treatments and adverse drug reactions. The DT approach can lead to more efficient allocation of healthcare resources, ensuring priority care for high-risk patients [38]. By integrating patient-reported outcomes, the system improves patient engagement, leading to improved self-management and reduced long-term healthcare costs. This study supports value-based healthcare models in which improved patient outcomes are consistent with reduced healthcare spending, which benefits both providers and payers [39]. The economic benefits extend beyond the clinical setting, as AI-based mental health support can reduce absenteeism and productivity losses associated with mental and neurological disorders [40].

4.3. Social and Ethical Significance of the Study

The study contributes to improving mental health care by making psychiatric and neurological treatment more data-driven, personalized, and accessible. By enabling early detection and intervention, the system helps reduce the societal burden of mental health and neurological disorders, including their impact on families and caregivers [41,42]. Integration of patient-reported outcomes promotes patient empowerment by encouraging individuals to actively participate in their healthcare journey. Emphasis is placed on ethical development of AI, ensuring that DL models are transparent, explainable, and free from biases that could lead to disparities in mental health care [43]. The study reinforces the importance of privacy and security by implementing a GDPR- and HIPAA-compliant framework to protect sensitive patient data. It promotes healthcare equity by making AI-based advanced mental health and neurological support available to underserved populations, including rural and low-income communities [44]. The research strengthens trust between clinicians, patients, and AI by ensuring that DTs act as tools to augment, rather than replace, human judgment [45]. The social stigma associated with mental health care may decrease as AI-based solutions normalize continuous monitoring and proactive care [46]. Ethical challenges, such as informed consent and AI accountability, are addressed through rigorous validation, stakeholder engagement, and transparent reporting [47]. By promoting responsible applications of AI in healthcare, the study contributes to broader discussions about the role of technology in shaping the future of medical ethics and human well-being [48].

4.4. Limitations

Previous and current research on DL approaches to NLP for DTs in psychiatry and neurological rehabilitation often suffer from limited and biased datasets because clinical text data are sparse, heterogeneous, and difficult to standardize [49]. Many models are trained on general-purpose corpora rather than specialized medical texts, leading to decreased accuracy in capturing domain-specific nuances in psychiatric and neurological language [50]. Interpretability of DL NLP models remains a challenge, making it difficult for clinicians to trust AI-based insights and integrate them into decision-making processes [51]. Ethical concerns, including data privacy and informed consent, have limited large-scale implementation, as sensitive patient data must be anonymized and securely stored to comply with regulations such as GDPR and HIPAA [52]. Most studies focus on retrospective data analysis rather than real-time applications, making it difficult to develop NLP models that dynamically update and adapt to changing patient conditions. Existing NLP models struggle with multilingual and culturally diverse patient populations because most datasets and algorithms are designed for English or high-resource languages, which limits generalizability [53]. Integration of NLP-based insights into DT frameworks is still in its infancy, and research on how these models interact with other data modalities such as neuroimaging, physiological signals, and wearable sensor data is limited [54]. There is a lack of standardized assessment metrics for psychiatric and neurological NLP applications, making it difficult to compare studies and assess model performance in real-world clinical settings [55]. Many current studies are based on small sample sizes or narrowly defined conditions, which reduces the robustness and applicability of findings to broader patient populations. While DL NLP has shown promise, its clinical adoption remains limited due to regulatory barriers, resistance from healthcare professionals, and the need for extensive validation before implementation in real-world settings (Table 1) [56].

4.5. Directions for Further Research

Future research should focus on developing larger, high-quality clinical datasets that include diverse linguistic, demographic, and cultural representations to improve the generalizability of DL NLP models [57]. Researchers should explore multimodal approaches to DL that integrate NLP with speech analysis, neuroimaging, physiological data, and wearable sensor outputs to create more comprehensive DTs [58]. Improving the interpretability and explainability of DL models is critical to gaining clinician trust and ensuring that AI-based insights can be meaningfully integrated into psychiatric and neurological care [59]. Research should explore real-time applications of NLP for continuous patient monitoring, enabling early detection of mental health crises or cognitive decline, facilitating timely interventions and prediction (Figure 3) [60].
Developing privacy-preserving AI techniques (including post-quantum AIs), such as federated learning and differential privacy, will be essential to ensuring secure data sharing and compliance with ethical and legal frameworks [61]. Future research should focus on domain-specific NLP models trained on psychiatric and neurological texts, improving their ability to accurately capture medical jargon, symptom descriptions, and patient narratives [62]. More work is needed to refine transfer learning and small-shot learning methods (including for rare diseases) that allow NLP models to be trained efficiently using limited labeled clinical data [63]. Researchers should standardize evaluation metrics and benchmark datasets to facilitate comparison of different DL NLP models in psychiatric and neurological rehabilitation [64]. Exploring the integration of NLP-powered DTs with clinical workflows and EHR systems will help bridge the gap between research and real-world implementation [65,66]. Collaboration between AI researchers, clinicians, ethicists, and policymakers is necessary to ensure that advances in DL NLP are aligned with clinical needs, ethical considerations, and regulatory requirements [67,68].

5. Conclusions

This study shows that DL-based NLP can effectively extract meaningful insights from psychiatric and neurological rehabilitation records, achieving over 85% accuracy in detecting symptoms. Integration of DTs enables real-time patient monitoring, with predictive models predicting disease progression with an F1 score of 0.88 in identifying high-risk patients. By analyzing EHRs and patient-reported outcomes, the system improves treatment personalization, reducing hospitalization rates by an estimated 20–30%.Automated clinical note summarization reduces documentation time for healthcare providers by 40%, allowing for greater focus on patient care. Mood and emotion analysis tools achieve a 90% accuracy rate in detecting mood swings, increasing early intervention strategies in psychiatric care. Economic evaluations suggest that implementing AI-powered DTs could reduce healthcare costs by approximately up to USD 10,000 per patient per year through optimized resource allocation and early intervention. Overall, this study provides a foundation for AI-powered personalized psychiatry and neuroscience, demonstrating that DL and NLP can significantly improve clinical decision-making, patient outcomes, and healthcare efficiency.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/electronics14102024/s1, Sample dataset (csv), sample code (txt).

Author Contributions

E.M. and J.M.; methodology, E.M. and J.M.; software, E.M. and J.M.; validation, E.M. and J.M.; formal analysis, E.M. and J.M.; investigation, E.M. and J.M.; resources, E.M. and J.M.; data curation, E.M. and J.M.; writing—original draft preparation, E.M. and J.M.; writing—review and editing, E.M. and J.M.; visualization, E.M. and J.M.; supervision, E.M. and J.M.; project administration, E.M. and J.M.; funding acquisition, E.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The sample dataset is provided as Supplementary Material.

Acknowledgments

Dariusz Mikołajewski, Faculty of Computer Science, Kazimierz Wielki University in Bydgoszcz, provided some of the software needed to complete this study.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AIArtificial Intelligence
BERTBidirectional Encoder Representations from Transformers
DLDeep Learning
GDPRGeneral Data Protection Regulation
GPTGeneral Pretrained Trasformer
HIPAAHealth Insurance Portability and Accountability Act
NLPNatural Language Processing
XAIeXplainable Artificial Intelligence

References

  1. Xian, X.; Chang, A.; Xiang, Y.T.; Liu, M.T. Debate and Dilemmas Regarding Generative AI in Mental Health Care: Scoping Review. Interact. J. Med. Res. 2024, 13, e53672. [Google Scholar] [CrossRef] [PubMed]
  2. Sezgin, E.; McKay, I. Behavioral health and generative AI: A perspective on future of therapies and patient care. NPJ Ment. Health Res. 2024, 3, 25. [Google Scholar] [CrossRef]
  3. Banerjee, S.; Dunn, P.; Conard, S.; Ali, A. Mental Health Applications of Generative AI and Large Language Modeling in the United States. Int. J. Environ. Res. Public Health 2024, 21, 910. [Google Scholar] [CrossRef] [PubMed]
  4. Timmons, A.C.; Duong, J.B.; Simo Fiallo, N.; Lee, T.; Vo, H.P.Q.; Ahle, M.W.; Comer, J.S.; Brewer, L.C.; Frazier, S.L.; Chaspari, T. A Call to Action on Assessing and Mitigating Bias in Artificial Intelligence Applications for Mental Health. Perspect. Psychol. Sci. 2023, 18, 1062–1096. [Google Scholar] [CrossRef] [PubMed]
  5. Blease, C.; Torous, J. ChatGPT and mental healthcare: Balancing benefits with risks of harms. BMJ Ment. Health 2023, 26, e300884. [Google Scholar] [CrossRef]
  6. Smith, K.A.; Hardy, A.; Vinnikova, A.; Blease, C.; Milligan, L.; Hidalgo-Mazzei, D.; Lambe, S.; Marzano, L.; Uhlhaas, P.J.; Ostinelli, E.G.; et al. Digital Mental Health for Schizophrenia and Other Severe Mental Illnesses: An International Consensus on Current Challenges and Potential Solutions. JMIR Ment. Health 2024, 11, e57155. [Google Scholar] [CrossRef]
  7. Khosravi, M.; Izadi, R.; Azar, G. Factors Influencing the Engagement with Electronic Mental Health Technologies: A Systematic Review of Reviews. Adm. Policy Ment. Health 2024, 52, 415–427. [Google Scholar] [CrossRef]
  8. Le Glaz, A.; Haralambous, Y.; Kim-Dufor, D.H.; Lenca, P.; Billot, R.; Ryan, T.C.; Marsh, J.; DeVylder, J.; Walter, M.; Berrouiguet, S.; et al. Machine Learning and Natural Language Processing in Mental Health: Systematic Review. J. Med. Internet Res. 2021, 23, e15708. [Google Scholar] [CrossRef]
  9. O’Leary, A.; Lahey, T.; Lovato, J.; Loftness, B.; Douglas, A.; Skelton, J.; Cohen, J.G.; Copeland, W.E.; McGinnis, R.S.; McGinnis, E.W. Using Wearable Digital Devices to Screen Children for Mental Health Conditions: Ethical Promises and Challenges. Sensors 2024, 24, 3214. [Google Scholar] [CrossRef]
  10. Mikołajewska, E.; Mikołajewski, D. Integrated IT environment for people with disabilities: A new concept. Cent. Eur. J. Med. 2014, 9, 177–182. [Google Scholar] [CrossRef]
  11. Eyre, H.; Alba, P.R.; Gibson, C.J.; Gatsby, E.; Lynch, K.E.; Patterson, O.V.; DuVall, S.L. Bridging information gaps in menopause status classification through natural language processing. JAMIA Open 2024, 7, ooae013. [Google Scholar] [CrossRef] [PubMed]
  12. Wang, Y.; Yu, Y.; Liu, Y.; Ma, Y.; Pang, P.C. Predicting Patients’ Satisfaction with Mental Health Drug Treatment Using Their Reviews: Unified Interchangeable Model Fusion Approach. JMIR Ment. Health 2023, 10, e49894. [Google Scholar] [CrossRef] [PubMed]
  13. Ikram, M.; Shaikh, N.F.; Vishwanatha, J.K.; Sambamoorthi, U. Leading Predictors of COVID-19-Related Poor Mental Health in Adult Asian Indians: An Application of Extreme Gradient Boosting and Shapley Additive Explanations. Int. J. Environ. Res. Public Health 2022, 20, 775. [Google Scholar] [CrossRef]
  14. Engineer, M.; Kot, S.; Dixon, E. Investigating the Readability and Linguistic, Psychological, and Emotional Characteristics of Digital Dementia Information Written in the English Language: Multitrait-Multimethod Text Analysis. JMIR Form. Res. 2023, 7, e48143. [Google Scholar] [CrossRef]
  15. Crema, C.; Attardi, G.; Sartiano, D.; Redolfi, A. Natural language processing in clinical neuroscience and psychiatry: A review. Front. Psychiatry 2022, 13, 946387. [Google Scholar] [CrossRef]
  16. Romano, M.F.; Shih, L.C.; Paschalidis, I.C.; Au, R.; Kolachalama, V.B. Large Language Models in Neurology Research and Future Practice. Neurology 2023, 101, 1058–1067. [Google Scholar] [CrossRef] [PubMed]
  17. Darer, J.D.; Pesa, J.; Choudhry, Z.; Batista, A.E.; Parab, P.; Yang, X.; Govindarajan, R. Characterizing Myasthenia Gravis Symptoms, Exacerbations, and Crises from Neurologist’s Clinical Notes Using Natural Language Processing. Cureus 2024, 16, e65792. [Google Scholar] [CrossRef]
  18. Ariño, H.; Bae, S.K.; Chaturvedi, J.; Wang, T.; Roberts, A. Identifying encephalopathy in patients admitted to an intensive care unit: Going beyond structured information using natural language processing. Front. Digit. Health 2023, 5, 1085602. [Google Scholar] [CrossRef]
  19. Katsoulakis, E.; Wang, Q.; Wu, H.; Shahriyari, L.; Fletcher, R.; Liu, J.; Achenie, L.; Liu, H.; Jackson, P.; Xiao, Y.; et al. Digital twins for health: A scoping review. NPJ Digit. Med. 2024, 7, 77. [Google Scholar] [CrossRef]
  20. Wang, H.; Arulraj, T.; Ippolito, A.; Popel, A.S. From virtual patients to digital twins in immuno-oncology: Lessons learned from mechanistic quantitative systems pharmacology modeling. NPJ Digit. Med. 2024, 7, 189. [Google Scholar] [CrossRef]
  21. Sandrone, S. Digital Twins in Neuroscience. J. Neurosci. 2024, 44, e0932242024. [Google Scholar] [CrossRef] [PubMed]
  22. Barnova, K.; Mikolasova, M.; Kahankova, R.V.; Pelc, M.; Martinek, R. Implementation of artificial intelligence and machine learning-based methods in brain–computer interaction. Comput. Biol. Med. 2023, 163, 107135. [Google Scholar] [CrossRef] [PubMed]
  23. Świetlicka, A.; Gugała, K.; Jurkowlaniec, A.; Śniatała, P.; Rybarczyk, A. The stochastic, Markovian, Hodgkin-Huxley type of mathematical model of the neuron. Neural Netw. World 2015, 25, 219–239. [Google Scholar] [CrossRef]
  24. Rojek, I.; Mikołajewski, D.; Dostatni, E.; Kopowski, J. Specificity of 3D Printing and AI-Based Optimization of Medical Devices Using the Example of a Group of Exoskeletons. Appl. Sci. 2023, 13, 1060. [Google Scholar] [CrossRef]
  25. Mikołajczyk, T.; Kłodowski, A.; Mikołajewska, E.; Fausti, D.; Petrogalli, G. Design and control of system for elbow rehabilitation: Preliminary findings. Adv. Clin. Exp. Med. 2018, 27, 1661–1669. [Google Scholar] [CrossRef]
  26. Błońska, B.K.; Gotlib, J. Prevalence of sleep disorders among students. Prz. Med. Uniw. Rzesz. Nar. Inst. Leków Warszawie 2012, 4, 485–497. [Google Scholar]
  27. Sai, S.; Gaur, A.; Sai, R.; Chamola, V.; Guizani, M.; Rodrigues, J.J.P.C. Generative AI for Transformative Healthcare: A Comprehensive Study of Emerging Models, Applications, Case Studies, and Limitations. IEEE Access 2024, 12, 31078–31106. [Google Scholar] [CrossRef]
  28. Thacharodi, A.; Singh, P.; Meenatchi, R.; Tawfeeq Ahmed, Z.H.; Kumar, R.R.S.; V, N.; Kavish, S.; Maqbool, M.; Hassan, S. Revolutionizing healthcare and medicine: The impact of modern technologies for a healthier future—A comprehensive review. Health Care Sci. 2024, 3, 329–349. [Google Scholar] [CrossRef]
  29. Mroczkowska, R.; Szlenk-Czyczerska, E.; Szwamel, K.; Fiszer, R. Mediation role of health behaviours in the relation between mental resilience and cardiovascular risk in young adults with a diagnosed congenital heart defect. BMC Public Health 2025, 25, 943. [Google Scholar] [CrossRef]
  30. Adibi, S.; Rajabifard, A.; Shojaei, D.; Wickramasinghe, N. Enhancing Healthcare through Sensor-Enabled Digital Twins in Smart Environments: A Comprehensive Analysis. Sensors 2024, 24, 2793. [Google Scholar] [CrossRef]
  31. Egger, J.; de Paiva, L.F.; Luijten, G.; Krittanawong, C. Is DeepSeek-R1 a Game Changer in Healthcare?—A Seed Review. TechRxiv 2025. [Google Scholar] [CrossRef]
  32. Kawala-Janik, A.; Bauer, W.; Al-Bakri, A.; Cichon, K.; Podraza, W. Implementation of low-pass fractional filtering for the purpose of analysis of electroencephalographic signals. Lect. Notes Electr. Eng. 2019, 496, 63–73. [Google Scholar]
  33. Noeikham, P.; Buakum, D.; Sirivongpaisal, N. Architecture designing of digital twin in a healthcare unit. Health Inform. J. 2024, 30, 14604582241296792. [Google Scholar] [CrossRef]
  34. Talal, M.; Zaidan, A.A.; Zaidan, B.B.; Albahri, A.S.; Alamoodi, A.H.; Albahri, O.S.; Alsalem, M.A.; Lim, C.K.; Tan, K.L.; Shir, W.L.; et al. Smart Home-based IoT for Real-time and Secure Remote Health Monitoring of Triage and Priority System using Body Sensors: Multi-driven Systematic Review. J. Med. Syst. 2019, 43, 42. [Google Scholar] [CrossRef] [PubMed]
  35. Jat, A.S.; Grønli, T.M.; Ghinea, G.; Assres, G. Evolving Software Architecture Design in Telemedicine: A PRISMA-based Systematic Review. Healthc. Inform. Res. 2024, 30, 184–193. [Google Scholar] [CrossRef] [PubMed]
  36. Mohsin, A.H.; Zaidan, A.A.; Zaidan, B.B.; Albahri, A.S.; Albahri, O.S.; Alsalem, M.A.; Mohammed, K.I. Real-Time Remote Health Monitoring Systems Using Body Sensor Information and Finger Vein Biometric Verification: A Multi-Layer Systematic Review. J. Med. Syst. 2018, 42, 238. [Google Scholar] [CrossRef]
  37. Świetlicka, A.; Kolanowski, K. Homogeneous ensemble model built from artificial neural networks for fault detection in navigation systems. J. Comput. Appl. Math. 2023, 432, 115279. [Google Scholar] [CrossRef]
  38. Alhammad, N.; Alajlani, M.; Abd-Alrazaq, A.; Epiphaniou, G.; Arvanitis, T. Patients’ Perspectives on the Data Confidentiality, Privacy, and Security of mHealth Apps: Systematic Review. J. Med. Internet. Res. 2024, 26, e50715. [Google Scholar] [CrossRef]
  39. Rezaeibagha, F.; Win, K.T.; Susilo, W. A systematic literature review on security and privacy of electronic health record systems: Technical perspectives. Health Inf. Manag. 2015, 44, 23–38. [Google Scholar] [CrossRef]
  40. Oostendorp, R.A.B.; Bakker, I.; Elvers, H.; De Hertogh, W.; Samwel, H. Cervicogenic somatosensory tinnitus: An indication for manual therapy plus education? Part 2: A pilot study. Man. Ther. 2015, 23, 106–113. [Google Scholar] [CrossRef]
  41. Kawala-Sterniuk, A.; Pelc, M.; Martinek, R.; Wójcik, G.M. Editorial: Currents in biomedical signals processing—Methods and applications. Front. Neurosci. 2022, 16, 989400. [Google Scholar] [CrossRef]
  42. Rezaeibagha, F.; Mu, Y. Distributed clinical data sharing via dynamic access-control policy transformation. Int. J. Med. Inform. 2016, 89, 25–31. [Google Scholar] [CrossRef] [PubMed]
  43. Alsahli, S.; Hor, S.Y.; Lam, M. Factors Influencing the Acceptance and Adoption of Mobile Health Apps by Physicians During the COVID-19 Pandemic: Systematic Review. JMIR mHealth uHealth 2023, 11, e50419. [Google Scholar] [CrossRef]
  44. Albahri, A.S.; Al-Qaysi, Z.T.; Alzubaidi, L.; Alnoor, A.; Albahri, O.S.; Alamoodi, A.H.; Bakar, A.A. A Systematic Review of Using Deep Learning Technology in the Steady-State Visually Evoked Potential-Based Brain-Computer Interface Applications: Current Trends and Future Trust Methodology. Int. J. Telemed. Appl. 2023, 2023, 7741735. [Google Scholar] [CrossRef]
  45. Albahri, A.S.; Alnoor, A.; Zaidan, A.A.; Albahri, O.S.; Hameed, H.; Zaidan, B.B.; Peh, S.S.; Zain, A.B.; Siraj, S.B.; Masnan, A.H.B.; et al. Hybrid artificial neural network and structural equation modelling techniques: A survey. Complex Intell. Syst. 2022, 8, 1781–1801. [Google Scholar] [CrossRef] [PubMed]
  46. Mohammed, K.I.; Zaidan, A.A.; Zaidan, B.B.; Albahri, O.S.; Alsalem, M.A.; Albahri, A.S.; Hadi, A.; Hashim, M. Real-Time Remote-Health Monitoring Systems: A Review on Patients Prioritisation for Multiple-Chronic Diseases, Taxonomy Analysis, Concerns and Solution Procedure. J. Med. Syst. 2019, 43, 223. [Google Scholar] [CrossRef] [PubMed]
  47. Almahdi, E.M.; Zaidan, A.A.; Zaidan, B.B.; Alsalem, M.A.; Albahri, O.S.; Albahri, A.S. Mobile Patient Monitoring Systems from a Benchmarking Aspect: Challenges, Open Issues and Recommended Solutions. J. Med. Syst. 2019, 43, 207. [Google Scholar] [CrossRef]
  48. Vorisek, C.N.; Lehne, M.; Klopfenstein, S.A.I.; Mayer, P.J.; Bartschke, A.; Haese, T.; Thun, S. Fast Healthcare Interoperability Resources (FHIR) for Interoperability in Health Research: Systematic Review. JMIR Med. Inform. 2022, 10, e35724. [Google Scholar] [CrossRef]
  49. Panozzo, L.; Harvey, P.; Adams, M.J.; O’Connor, D.; Ward, B. Communication of advance care planning decisions: A retrospective cohort study of documents in general practice. BMC Palliat. Care 2020, 19, 108. [Google Scholar] [CrossRef]
  50. Antonowicz, P.; Podpora, M.; Rut, J. Digital Stereotypes in HMI—The Influence of Feature Quantity Distribution in Deep Learning Models Training. Sensors 2022, 22, 6739. [Google Scholar] [CrossRef]
  51. Ayaz, M.; Pasha, M.F.; Alzahrani, M.Y.; Budiarto, R.; Stiawan, D. The Fast Health Interoperability Resources (FHIR) Standard: Systematic Literature Review of Implementations, Applications, Challenges and Opportunities. JMIR Med. Inform. 2021, 9, e21929, Erratum in JMIR Med. Inform. 2021, 9, e32869. [Google Scholar] [CrossRef] [PubMed]
  52. Klin, B.; Podpora, M.; Beniak, R.; Gardecki, A.; Rut, J. Smart Beamforming in Verbal Human-Machine Interaction for Humanoid Robots. IEEE Robot. Autom. Lett. 2023, 8, 4689–4696. [Google Scholar] [CrossRef]
  53. Ozga, W.K.; Zapała, D.; Wierzgała, P.; Porzak, R.; Wójcik, G.M. Acoustic Neurofeedback Increases Beta ERD During Mental Rotation Task. Appl. Psychophysiol. Biofeedback 2019, 44, 103–115. [Google Scholar] [CrossRef] [PubMed]
  54. Bistroń, M.; Piotrowski, Z. Efficient Video Watermarking Algorithm Based on Convolutional Neural Networks with Entropy-Based Information Mapper. Entropy 2023, 25, 284. [Google Scholar] [CrossRef]
  55. Lenarczyk, P.; Piotrowski, Z. Parallel blind digital image watermarking in spatial and frequency domains. Telecommun. Syst. 2013, 54, 287–303. [Google Scholar] [CrossRef]
  56. Durneva, P.; Cousins, K.; Chen, M. The Current State of Research, Challenges, and Future Research Directions of Blockchain Technology in Patient Care: Systematic Review. J. Med. Internet. Res. 2020, 22, e18619. [Google Scholar] [CrossRef]
  57. Park, E.H.; Watson, H.I.; Mehendale, F.V.; O’Neil, A.Q. Clinical Evaluators. Evaluating the Impact on Clinical Task Efficiency of a Natural Language Processing Algorithm for Searching Medical Documents: Prospective Crossover Study. JMIR Med. Inform. 2022, 10, e39616. [Google Scholar] [CrossRef]
  58. Ming, Y.; Zhang, T. Efficient Privacy-Preserving Access Control Scheme in Electronic Health Records System. Sensors 2018, 18, 3520. [Google Scholar] [CrossRef]
  59. Entzeridou, E.; Markopoulou, E.; Mollaki, V. Public and physician’s expectations and ethical concerns about electronic health record: Benefits outweigh risks except for information security. Int. J. Med. Inform. 2018, 110, 98–107. [Google Scholar] [CrossRef]
  60. Sondej, T.; Jannasz, I.; Sieczkowski, K.; Targowski, T.; Olszewski, R. Validation of a new device for photoplethysmographic measurement of multi-site arterial pulse wave velocity. Biocybern. Biomed. Eng. 2021, 41, 1664–1684. [Google Scholar] [CrossRef]
  61. Jeyaraman, N.; Jeyaraman, M.; Yadav, S.; Ramasubramanian, S.; Balaji, S.; Muthu, S.; Lekha, P.C.; Patro, B.P. Applications of Fog Computing in Healthcare. Cureus 2024, 16, e64263. [Google Scholar] [CrossRef]
  62. Rozanowski, K.; Sondej, T.; Lewandowski, J. First approach for design of an autonomous measurement system to aid determination of the psychological profile of soldiers. In Proceedings of the 22nd International Conference Mixed Design of Integrated Circuits and Systems, MIXDES 2015, Torun, Poland, 25–27 June 2015; pp. 53–57. [Google Scholar]
  63. Carrasco Ramirez, J.G. AI in Healthcare: Revolutionizing Patient Care with Predictive Analytics and Decision Support Systems. J. Artif. Intell. Gen. Sci. 2024, 1, 31–37. [Google Scholar] [CrossRef]
  64. Shi, J.; Yuan, R.; Yan, X.; Wang, M.; Qiu, J.; Ji, X.; Yu, G. Factors Influencing the Sharing of Personal Health Data Based on the Integrated Theory of Privacy Calculus and Theory of Planned Behaviors Framework: Results of a Cross-Sectional Study of Chinese Patients in the Yangtze River Delta. J. Med. Internet. Res. 2023, 25, e46562. [Google Scholar] [CrossRef] [PubMed]
  65. Mendis, L.; Karmakar, D.; Palaniswami, D.; Brownfoot, F.; Keenan, E. Cross-Database Evaluation of Deep Learning Methods for Intrapartum Cardiotocography Classification. IEEE J. Transl. Eng. Health Med. 2025, 13, 123–135. [Google Scholar] [CrossRef]
  66. Al-Issa, Y.; Ottom, M.A.; Tamrawi, A. eHealth Cloud Security Challenges: A Survey. J. Healthc. Eng. 2019, 2019, 7516035. [Google Scholar] [CrossRef]
  67. Abbas, A.; Khan, S.U. A review on the state-of-the-art privacy-preserving approaches in the e-health clouds. IEEE J. Biomed. Health Inform. 2014, 18, 1431–1441. [Google Scholar] [CrossRef]
  68. Alabdulatif, A.; Khalil, I.; Mai, V. Protection of electronic health records (EHRs) in cloud. In Proceedings of the 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 3–7 July 2013; pp. 4191–4194. [Google Scholar] [CrossRef]
Figure 1. eHealth service-oriented architecture and place of NLP DTs in it (own version).
Figure 1. eHealth service-oriented architecture and place of NLP DTs in it (own version).
Electronics 14 02024 g001
Figure 2. Framework of EHR system with DT (own version).
Figure 2. Framework of EHR system with DT (own version).
Electronics 14 02024 g002
Figure 3. Model of prediction network with DT (own version).
Figure 3. Model of prediction network with DT (own version).
Electronics 14 02024 g003
Table 1. Detailed and specific limitations regarding dataset quality, real-world implementation, and interdisciplinary coordination when applying DL approaches to NLP for patient DTs in psychiatry and neurological rehabilitation.
Table 1. Detailed and specific limitations regarding dataset quality, real-world implementation, and interdisciplinary coordination when applying DL approaches to NLP for patient DTs in psychiatry and neurological rehabilitation.
AreaLimitationDescription
Dataset quality limitationsData scarcity
and fragmentation
Psychiatric and neurological data are often fragmented across systems (EHRs, therapy notes, imaging centers). Unstructured text formats dominate (e.g., physician notes, patient diaries), making standardization and preprocessing for DL models difficult.
Lack of annotated clinical NLP corporaAnnotated datasets in the psychiatry and neurological rehabilitation domains are rare due to privacy constraints and annotation complexity. Domain-specific terminology and specific expressions used by physicians require expert annotators, which increases costs and time.
Noise and ambiguity in languageClinical notes often contain abbreviations, colloquialisms, incomplete sentences, or idiosyncratic language that is not suitable for general NLP models. Psychiatric data include subjective descriptions, making the quality and consistency of labels poor.
Demographic and linguistic biasExisting datasets may underrepresent certain age groups, socioeconomic backgrounds, or non-native speakers, leading to biased models that do not perform well across populations.
Challenges of real-world implementationModel generalizability and robustnessDL models trained on data from one institution may not generalize to another due to differences in language use, documentation style, and patient demographics. Minor changes in clinical wording or patient populations can lead to significant performance degradation.
Data privacy and ethical barriersStringent regulations (e.g., HIPAA, GDPR) limit access to longitudinal patient records. Real-time implementation raises concerns about consent, re-identification, and data management, especially for sensitive psychiatric information.
Interpretability and clinician trustDL models (especially transformers such as BERT- or GPT-based models) are black boxes, making clinicians wary of using their results to make critical decisions. Lack of explainability hinders clinical adoption and regulatory approval.
Integration into clinical workflowsEmbedding NLP tools into hospital systems in real time is technically challenging and may require custom APIs, EHR vendor collaboration, and workflow redesign. Risk of alert fatigue or misalignment with clinical priorities exists if models are not context-aware.
Limitations of interdisciplinary coordinationMisalignment of goals and metricsClinicians prioritize patient outcomes and safety, while data scientists may focus on metrics such as F1 score, leading to misalignment in model evaluation. There is difficulty matching what is clinically meaningful with what can be measured statistically.
Communication barriersClinical experts may not be trained in AI concepts; data scientists may misunderstand medical nuances. Collaborative design of digital twins often suffers from terminological ambiguity and disciplinary silos.
Time and resource constraintsClinicians often have limited time for iterative feedback on model development or annotation tasks. Interdisciplinary teams require ongoing funding and coordination, which is rare in many research settings.
Validation and continuous updateEnsuring the continued clinical validity of digital twins requires long-term collaboration and frequent retraining, which can be difficult to coordinate across disciplines.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mikołajewska, E.; Masiak, J. Deep Learning Approaches to Natural Language Processing for Digital Twins of Patients in Psychiatry and Neurological Rehabilitation. Electronics 2025, 14, 2024. https://doi.org/10.3390/electronics14102024

AMA Style

Mikołajewska E, Masiak J. Deep Learning Approaches to Natural Language Processing for Digital Twins of Patients in Psychiatry and Neurological Rehabilitation. Electronics. 2025; 14(10):2024. https://doi.org/10.3390/electronics14102024

Chicago/Turabian Style

Mikołajewska, Emilia, and Jolanta Masiak. 2025. "Deep Learning Approaches to Natural Language Processing for Digital Twins of Patients in Psychiatry and Neurological Rehabilitation" Electronics 14, no. 10: 2024. https://doi.org/10.3390/electronics14102024

APA Style

Mikołajewska, E., & Masiak, J. (2025). Deep Learning Approaches to Natural Language Processing for Digital Twins of Patients in Psychiatry and Neurological Rehabilitation. Electronics, 14(10), 2024. https://doi.org/10.3390/electronics14102024

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop