<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">JAI</journal-id>
<journal-id journal-id-type="nlm-ta">JAI</journal-id>
<journal-id journal-id-type="publisher-id">JAI</journal-id>
<journal-title-group>
<journal-title>Journal on Artificial Intelligence</journal-title>
</journal-title-group>
<issn pub-type="epub">2579-003X</issn>
<issn pub-type="ppub">2579-0021</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">59607</article-id>
<article-id pub-id-type="doi">10.32604/jai.2025.059607</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>A Knowledge-Enhanced Disease Diagnosis Method Based on Prompt Learning and BERT Integration</article-title>
<alt-title alt-title-type="left-running-head">A Knowledge-Enhanced Disease Diagnosis Method Based on Prompt Learning and BERT Integration</alt-title>
<alt-title alt-title-type="right-running-head">A Knowledge-Enhanced Disease Diagnosis Method Based on Prompt Learning and BERT Integration</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Zhang</surname><given-names>Zheng</given-names></name></contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Wu</surname><given-names>Hengyang</given-names></name>
<email>wuhy@sspu.edu.cn</email></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Wang</surname><given-names>Na</given-names></name></contrib>
<aff id="aff-1">
<institution>School of Computer and Information Engineering, Shanghai Polytechnic University</institution>, <addr-line>Shanghai, 201209</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Hengyang Wu. Email: <email>wuhy@sspu.edu.cn</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2025</year></pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>19</day>
<month>03</month>
<year>2025</year>
</pub-date>
<volume>7</volume>
<issue>1</issue>
<fpage>17</fpage>
<lpage>37</lpage>
<history>
<date date-type="received">
<day>12</day>
<month>10</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>26</day>
<month>12</month>
<year>2024</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2025 The Authors.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Published by Tech Science Press.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_JAI_59607.pdf"></self-uri>
<abstract>
<p>This paper proposes a knowledge-enhanced disease diagnosis method based on a prompt learning framework. Addressing challenges such as the complexity of medical terminology, the difficulty of constructing medical knowledge graphs, and the scarcity of medical data, the method retrieves structured knowledge from clinical cases via external knowledge graphs. The method retrieves structured knowledge from external knowledge graphs related to clinical cases, encodes it, and injects it into the prompt templates to enhance the language model&#x2019;s understanding and reasoning capabilities for the task. We conducted experiments on three public datasets: CHIP-CTC, IMCS-V2-NER, and KUAKE-QTR. The results indicate that the proposed method significantly outperforms existing models across multiple evaluation metrics. Additionally, ablation studies confirmed the critical role of the knowledge injection module, as the removal of this module resulted in a significant drop in F1 score. The experimental results demonstrate that the proposed method not only effectively improves the accuracy of disease diagnosis but also enhances the interpretability of the predictions, providing more reliable support and evidence for clinical diagnosis.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Knowledge enhancement</kwd>
<kwd>disease diagnosis</kwd>
<kwd>prompt learning</kwd>
<kwd>BERT</kwd>
<kwd>knowledge graph</kwd>
</kwd-group>
<funding-group>
<award-group id="awg1">
<funding-source>National Natural Science Foundation of China</funding-source>
<award-id>62162014</award-id>
</award-group>
</funding-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Disease diagnosis is the process of identifying and confirming a patient&#x2019;s illness by analyzing symptoms, medical history, physical examinations, and various medical test data to determine the underlying causes and guide treatment. Accurate diagnosis is not only the foundation for formulating treatment plans but also critical for preventing disease progression and transmission, improving the efficiency of medical resource utilization, and reducing healthcare costs.</p>
<p>Initially, people primarily relied on doctors&#x2019; experience and knowledge for diagnosis, using methods such as patient interviews, physical examinations, and laboratory tests. However, this simple and mechanical approach clearly could not produce optimal diagnostic results. To address issues of subjectivity, time consumption, and risks of misdiagnosis or missed diagnosis, knowledge engineering methods were later adopted [<xref ref-type="bibr" rid="ref-1">1</xref>]. These methods utilize rule-based matching techniques to determine text categories. However, in recent years, with the rapid development of technologies such as big data and cloud computing, the internet has experienced an explosive growth in information. The vast amount of textual data has posed significant challenges to traditional classification methods.</p>
<p>With the accumulation of large-scale clinical data, statistical analysis has emerged as a crucial tool for disease diagnosis. For instance, Lv et al. [<xref ref-type="bibr" rid="ref-2">2</xref>] and colleagues developed classification models for diagnosing sleep quality and diseases using methods such as multinomial logistic regression and discriminant analysis. These models are suitable for use during the early stages of diagnosis to categorize diseases. However, as data complexity and medical data volume increase exponentially, statistical methods face limitations in handling multidimensional and nonlinear relationships. Machine learning-based disease prediction models have reframed disease prediction as a classification problem [<xref ref-type="bibr" rid="ref-3">3</xref>&#x2013;<xref ref-type="bibr" rid="ref-5">5</xref>]. However, these methods also exhibit constraints when dealing with complex multidimensional medical data, requiring extensive labeled datasets and often lacking generalizability across various disease contexts [<xref ref-type="bibr" rid="ref-6">6</xref>].</p>
<p>In addition, with the rapid advancement of artificial intelligence and natural language processing technologies, the use of deep learning models for text classification to assist in disease diagnosis has become a significant area of research. Many diagnostic tasks involve extracting and classifying disease-related information from unstructured text. Supported by NLP techniques, text classification models can efficiently process and analyze large volumes of clinical text data. Among them, the BERT model, as a powerful natural language processing tool, has demonstrated outstanding performance in many text classification tasks. Onan [<xref ref-type="bibr" rid="ref-6">6</xref>] proposed an innovative hierarchical graph-based text classification framework, which captures the complex relationships between nodes through a dynamic fusion mechanism of contextual node embeddings and the BERT model. Although these methods have achieved good results in classification accuracy and stability, they still require improvements in structured reasoning and integration of medical knowledge [<xref ref-type="bibr" rid="ref-7">7</xref>].</p>
<p>To address this issue, this paper proposes an integrated approach that combines pre-trained language models with knowledge graphs for extracting and processing structured knowledge from clinical texts, which is then applied to disease prediction tasks. While the focus of this study appears to be on text classification, the process plays a significant supporting role in diagnostic tasks. By classifying patient symptoms and medical history, the model identifies associations between specific symptoms and diseases, providing accurate diagnostic recommendations. Experimental results indicate that the proposed method achieves superior performance on publicly available disease diagnosis datasets. Furthermore, the experiments demonstrate that prompt-based knowledge injection effectively guides language models to grasp relevant medical knowledge, significantly enhancing reasoning performance. This approach transforms raw text into high-quality semantic vectors and maps these representations to specific terms through designed functions. This method not only enhances semantic expression but also provides rich contextual and structured knowledge support for disease prediction, improving the model&#x2019;s performance and reliability in practical applications. The implementation steps and experimental results are elaborated in the subsequent sections.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>The continuous advancement of information technology has driven the development of intelligent clinical decision support systems. The widespread application of machine learning models has significantly improved the effectiveness of these systems, particularly in the field of disease prediction. The evolution of these models has gone through several stages: from the early expert rule-based models, to models based on statistical analysis and case-based reasoning, and finally to the current advanced models utilizing machine learning and deep learning techniques [<xref ref-type="bibr" rid="ref-8">8</xref>]. At the same time, breakthroughs in the field of natural language processing (NLP) have introduced innovative tools and techniques, opening up new perspectives for disease diagnosis and providing unprecedented possibilities.</p>
<sec id="s2_1">
<label>2.1</label>
<title>Disease Diagnosis</title>
<p>In these early disease diagnosis methods, rule-based research primarily relied on the analysis of medical literature and case data. Expert rule-based disease diagnosis methods involved the collection of expert diagnostic experiences to form disease diagnosis pathways, thus creating expert systems. A typical example of such an expert system is the MYCIN expert system [<xref ref-type="bibr" rid="ref-9">9</xref>], developed by Shortliffe in 1976, which became a foundational model for many subsequent expert systems in the medical field. However, many techniques are unable to explain the processes involved in disease monitoring and data inference. To address this, Aamir et al. [<xref ref-type="bibr" rid="ref-10">10</xref>] proposed a fuzzy rule-based diabetes classification system which combines fuzzy logic with the cosine amplitude method. They developed two fuzzy classifiers, and the proposed model demonstrated high predictive accuracy. Sanz et al. [<xref ref-type="bibr" rid="ref-11">11</xref>] further developed a new approach based on the Fuzzy Rule-Based Classification System (FRBCS) by integrating it with Interval-Valued Fuzzy Sets (IV-FRBCS). They validated the applicability and effectiveness of this method in medical diagnostic classification problems, demonstrating it potential in improving diagnostic accuracy in comple medical scenarios. With the accumulation of large-scale clinical data, statistical analysis has become an important method for disease diagnosis. Researchers use statistical analysis to uncover potential correlations between patient characteristics and medical indicators, thereby providing new perspectives and approaches for disease prediction and diagnosis. As a result, statistically based disease diagnosis methods have become increasingly significant in medical research and practice. Yadav et al. [<xref ref-type="bibr" rid="ref-12">12</xref>] discussed statistical modeling and prediction techniques for various infectious diseases, addressing the issue of single-variable data related to infectious diseases. They proposed fitting time series models and making predictions based on the best-fit model, offering a more accurate approach to forecasting the spread and development of infectious diseases.</p>
<p>Recently, neural network-based disease diagnosis methods have emerged and gradually become a hot topic of research. Researchers are focused on developing new algorithms and models that integrate multi-source information, such as clinical data, medical imaging, and biomarkers, to enhance the accuracy and reliability of diagnoses. These advancements aim to improve diagnostic capabilities by leveraging the power of deep learning in processing complex medical data. Wang and Li employed machine learning methods, combined with large-scale clinical databases, to develop a statistical-based disease prediction model. This model successfully achieved diagnostic predictions for multiple diseases, offering new insights into personalized disease diagnosis. Their approach represents a significant advancement in tailoring diagnoses to individual patient data. On the other hand, to address the challenge of assigning specific stages in the diagnosis of clinical diseases with long courses and staging characteristics, Ma et al. [<xref ref-type="bibr" rid="ref-13">13</xref>] proposed a gout staging diagnosis method based on deep reinforcement learning. They first used a candidate binary classification model library to accurately diagnose gout, and then refined the binary classification results by applying predefined medical rules for gout diagnosis. Additionally, some scholars have integrated diagnostic rules into deep neural networks for bladder cancer staging, significantly mitigating the drawback of cancer staging methods based on deep convolutional neural networks that tend to overlook clinicians&#x2019; domain knowledge and expertise. Additionally, to address the impact of imbalanced medical record samples on the training and predictive performance of disease prediction models, the academic community has proposed various solutions for training models on small and imbalanced datasets [<xref ref-type="bibr" rid="ref-14">14</xref>,<xref ref-type="bibr" rid="ref-15">15</xref>]. These methods aim to improve model robustness and accuracy when faced with limited or skewed data distributions, which is a common challenge in medical data analysis.</p>
<p>However, despite the numerous advantages brought by neural network-based disease diagnosis methods, there are still some shortcomings. First, the aforementioned methods often require large amounts of labeled data for training, and annotating medical data typically demands significant time and effort from expert physicians, making it costly and time-consuming. Second, due to the complexity and diversity of medical data, existing machine learning models may struggle to adapt well to various diseases and clinical scenarios, leading to insufficient generalization capability of the models. Through further reading and research, it was found that many scholars have proposed different improvement methods to address this challenge. For example, Luo et al. [<xref ref-type="bibr" rid="ref-16">16</xref>] first proposed a new multi-modal heterogeneous graph model to represent medical data, which helps address the label allocation challenges within the same cluster, enabling more precise targeting of desired medical information. Similarly, Xie et al. [<xref ref-type="bibr" rid="ref-17">17</xref>] proposed a knowledge-based dynamic prompt learning (KBDPT) method that integrates medical knowledge with pre-trained language models, enhancing diagnostic models&#x2019; expressiveness and generalizability. At the same time, Ge et al. [<xref ref-type="bibr" rid="ref-18">18</xref>]. proposed a domain knowledge-enhanced multi-label classification (DKEC) method for electronic health records, addressing the issue of previous work neglecting the incorporation of domain knowledge from medical guidelines. They introduced a label attention mechanism and a simple yet effective group training method based on label similarity. This method greatly improves applicability to minority (tail) class label distributions. Moreover, cross-modal knowledge enhancement approaches have gained attention. For instance, the DIE-CDK [<xref ref-type="bibr" rid="ref-19">19</xref>] method combines visual and textual information, leveraging cross-modal knowledge to enhance fine-grained classification, particularly for tasks involving complex features. Inspired by this approach, this study integrates medical knowledge graphs and multimodal information to improve model accuracy and adaptability in complex diagnostic tasks. Compared to existing methods, the proposed prompt-learning-based knowledge enhancement framework not only leverages cross-modal knowledge but also uses designed prompt templates to better understand structured information in medical knowledge graphs. This approach expands the model&#x2019;s medical knowledge coverage, improves comprehension of complex disease characteristics, and significantly enhances model interpretability and robustness, demonstrating superior adaptability and accuracy in diagnostic tasks.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Application of the BERT Model in Disease Diagnosis</title>
<p>BERT (Bidirectional Encoder Representations from Transformers), proposed by Google in 2018, is an advanced pre-trained natural language processing (NLP) model. This model has achieved state-of-the-art results in various NLP tasks, including but not limited to text classification, named entity recognition (NER), and question-answering systems (QA). Recently, the research community has begun exploring the potential of the BERT model in the medical field. By integrating multi-source information such as clinical texts and medical literature, the BERT model can absorb and learn rich medical knowledge, thereby providing more precise auxiliary information in the disease diagnosis process. The bidirectional contextual modeling capability of the BERT model gives it a significant advantage in understanding the complex contexts of medical texts, offering comprehensive informational support for disease diagnosis.</p>
<p>In the research on medical named entity recognition algorithms, Tian et al. [<xref ref-type="bibr" rid="ref-7">7</xref>] first proposed a method based on pre-trained language models. This method utilizes the BERT model to generate sentence-level feature vector representations of short text data and combines it with recurrent neural networks (RNN) and transfer learning models to classify medical short texts. Xu et al. [<xref ref-type="bibr" rid="ref-20">20</xref>] developed a medical text classification model (CMNN) that combines BERT, convolutional neural networks (CNN), and bidirectional long short-term memory networks (BiLSTM) to address the efficiency and accuracy challenges in medical text classification. This model showed improvements in evaluation metrics such as accuracy, precision, recall, and F1 score compared to traditional deep learning models.</p>
<p>As advanced NLP technologies gradually penetrate the medical field, the BioBERT model has emerged. This model is specifically optimized for the biomedical domain, demonstrating significant advantages in the understanding and processing of medical texts. Sharaf et al. [<xref ref-type="bibr" rid="ref-21">21</xref>] provided a detailed analysis and overview of a systematic BioBERT fine-tuning method aimed at meeting the unique needs of the healthcare field. This approach includes annotating data for medical entity recognition and classification tasks, as well as applying specialized preprocessing techniques to handle the complexity of biomedical texts.</p>
<p>Recently, pre-trained language models have achieved significant success in many question-answering tasks [<xref ref-type="bibr" rid="ref-22">22</xref>,<xref ref-type="bibr" rid="ref-23">23</xref>]. However, while these models encompass a wide range of knowledge, they perform poorly in structured reasoning. Additionally, considering the previously mentioned issues, such as the low efficiency of medical data annotation, these limitations pose further challenges. This paper aims to enhance structured reasoning using knowledge graphs and leverage the BERT model&#x2019;s outstanding performance in text classification tasks. The primary focus of this research is on how to effectively utilize language models and knowledge graphs for reasoning, thereby achieving the goal of significantly improving disease prediction accuracy.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Task Formulation</title>
<p>Given clinical information and electronic medical records of a patient, where <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>i</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mtext>th</mml:mtext></mml:mrow></mml:math></inline-formula> word in the text and <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mrow><mml:mtext>N</mml:mtext></mml:mrow></mml:math></inline-formula> represents the total number of words, this research aims to predict the disease type <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> that the patient has based on the content of <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mi>x</mml:mi></mml:math></inline-formula>. Therefore, this task can be represented as learning a model <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:mrow><mml:mtext>f</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> with parameters <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:mi>&#x03B8;</mml:mi></mml:math></inline-formula>. Given an input <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:mi>x</mml:mi></mml:math></inline-formula>, <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:mrow><mml:mtext>f</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> outputs a predicted result <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>&#x03F5;</mml:mi><mml:mrow><mml:mi>&#x1D4B4;</mml:mi></mml:mrow></mml:math></inline-formula>. Here, <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:mrow><mml:mi>&#x1D4B4;</mml:mi></mml:mrow></mml:math></inline-formula> is the set of labels for all candidate disease types.</p>
<p>This paper utilizes prompt learning to accomplish the task, converting it from a classification problem into a language modeling problem. The original classification problem is formulated as fitting <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mi>Y</mml:mi><mml:mo>=</mml:mo><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>X</mml:mi><mml:mo>;</mml:mo><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. The transformed language modeling problem is formulated as fitting <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:mi>Y</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>T</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>X</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mspace width="negativethinmathspace" /><mml:mo>;</mml:mo><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, where <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>T</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>X</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> represents the prompt template used to encapsulate the original text into a new input.</p>
</sec>
<sec id="s4">
<label>4</label>
<title>Methodology</title>
<p>The overall method structure of this paper is shown in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>. The diagram presents an innovative method combining knowledge graphs with the BERT model to enhance semantic understanding in medical text analysis tasks. The approach primarily consists of the following components: a knowledge graph, an entity and relationship recognition layer, a context understanding and semantic enhancement layer, a knowledge integration and application layer, a sequence modeling network, and a masked language model (MLM) training task. This structure effectively improves semantic comprehension and precise identification of entity relationships in text.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Method structure diagram</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-1.tif"/>
</fig>
<p>Firstly, the knowledge graph module serves as a rich source of background knowledge, storing information such as disease names, symptoms, and treatments. By providing structured relational information between entities, the knowledge graph supports the model in understanding medical terms and their associations within the text. Based on this, the entity and relationship recognition layer identifies key entities (e.g., diseases and symptoms) in the text and determines the relationships between them. This layer extracts core medical information from the text, laying a foundation for subsequent semantic understanding. Next, the context understanding and semantic enhancement layer integrates structured information from the knowledge graph to enhance the semantic representation of entities and relationships. This enables the model to gain a more comprehensive understanding of the medical entities&#x2019; meanings. By leveraging the contextual information from the knowledge graph, this layer optimizes the representation of entities, facilitating more precise analysis and prediction in downstream tasks. The knowledge integration and application layer applies the information from the knowledge graph to specific medical analysis tasks, such as disease classification and symptom recognition, broadening the model&#x2019;s scope of application. The sequence modeling network, comprising input, hidden, and output layers, processes the fused information from the knowledge graph&#x2019;s entity vectors and BERT embeddings. This network structure captures the complex sequential and contextual dependencies among medical entities, improving the accuracy of entity representation and enhancing text sequence modeling, thereby delivering higher precision in medical text analysis. Finally, the model undergoes training using the masked language model (MLM) task. By randomly masking words in the text and predicting them, this task further improves the model&#x2019;s semantic understanding within its context. The MLM task helps the model adapt better to complex medical text environments, enhancing its ability to recognize the contextual relationships of medical entities and their associations accurately.</p>
<p>In conclusion, this method achieves knowledge-driven semantic enhancement by deeply integrating knowledge graphs with the BERT model, providing more accurate and comprehensive semantic understanding in medical text analysis tasks. This approach has significant practical value for applications in medical text processing and prediction.</p>
<sec id="s4_1">
<label>4.1</label>
<title>Knowledge Retrieval</title>
<p>Clinical texts contain many conceptual and structured forms of knowledge, such as symptoms, diagnoses, and treatment plans. Knowledge retrieval is capable of identifying and extracting key medical concepts and relationships. For example, &#x201C;type 2 diabetes&#x201D; is a common chronic disease, characterized primarily by persistently elevated blood glucose levels. The diagnostic criteria include fasting blood glucose and HbA1c levels. Common symptoms include excessive thirst, hunger, frequent urination, weight loss, and fatigue. Through knowledge retrieval, it can extract structured knowledge such as causes, related complications, risk factors, and more. This type of knowledge plays an important auxiliary role in disease prediction. A knowledge graph is utilized to structure various types of medical information, providing comprehensive support for disease diagnosis. The knowledge graph employed in this study includes entities such as &#x201C;disease,&#x201D; &#x201C;symptom,&#x201D; &#x201C;diagnostic method,&#x201D; and &#x201C;treatment.&#x201D; The relationship types span categories like &#x201C;causes,&#x201D; &#x201C;used for treatment,&#x201D; and &#x201C;exhibits symptoms.&#x201D; For instance, the entity &#x201C;hyperglycemia&#x201D; is connected to &#x201C;type 2 diabetes&#x201D; through a &#x201C;causes&#x201D; relationship, while &#x201C;type 2 diabetes&#x201D; is also associated with &#x201C;kidney disease&#x201D; through a &#x201C;complication&#x201D; relationship. By leveraging this graph structure, the model enhances logical reasoning during the diagnostic process by utilizing these relationship pathways, leading to more accurate disease predictions. The structured advantages of knowledge graphs make them highly relevant and applicable in medical tasks, particularly in complex and diverse disease scenarios. They effectively address the limitations of models solely relying on data training. Therefore, this paper utilizes the following methods to achieve knowledge retrieval from the text:</p>
<p>Given the clinical text x of a patient, we process x by performing tasks such as tokenization and part-of-speech tagging, resulting in a set of vocabulary <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>n</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>. First, we apply the named entity recognition (NER) model <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>N</mml:mi><mml:mi>E</mml:mi><mml:mi>R</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> to identify the set of entities <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> &#x003D; {<inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>.
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">&#x2190;</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>N</mml:mi><mml:mi>E</mml:mi><mml:mi>R</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>Let the knowledge graph be <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>E</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, where the entity set is <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>. V may include entities such as &#x201C;type 2 diabetes,&#x201D; &#x201C;hyperglycemia,&#x201D; &#x201C;insulin,&#x201D; &#x201C;weight gain,&#x201D; etc. The edge set <italic>E</italic> may include relationships such as &#x201C;is symptom,&#x201D; &#x201C;use for treatment,&#x201D; &#x201C;causes,&#x201D; and others. Next, for each entity <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> extracted from the text, we find the corresponding entity <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> in the knowledge graph. The key to this matching process is determining whether <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represent the same or similar concepts. This process can be implemented using a similarity function <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:mrow><mml:mtext>sim</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. The entities <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are considered a match when <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mrow><mml:mtext>sim</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> reaches a certain threshold <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mrow><mml:mi mathvariant="normal">&#x03B8;</mml:mi></mml:mrow></mml:math></inline-formula>. When the conditions <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mrow><mml:mtext>E</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2203;</mml:mi><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mrow><mml:mtext>G</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>E</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mrow><mml:mtext>E</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2203;</mml:mi><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mrow><mml:mtext>G</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>E</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x003A;</mml:mo><mml:mrow><mml:mtext>sim</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2265;</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03B8;</mml:mi></mml:mrow></mml:math></inline-formula> are satisfied, they are considered to represent the same or related entities.</p>
<p>Next, for each pair of matched entities, we search for all possible reasoning paths P in the knowledge graph. Relationships in the knowledge graph can be represented in the form of triples <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, where <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>G</mml:mi></mml:math></inline-formula> are entities, and <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:mi>r</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>R</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the relationship. The goal of inference is to find possible paths P from entity <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> to <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>in</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>n</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></disp-formula></p>
<p>For each pair of matched entities <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, collect all possible reasoning paths, <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, thereby obtaining structured knowledge between entities extracted from clinical texts. This knowledge is then utilized for further analysis and applications, such as disease prediction and relationship inference. For example, the entity extracted from the text <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> &#x003D; &#x201C;type 2 diabetes&#x201D;, and the next step is to find the matching entity in the knowledge graph vt &#x003D; &#x201C;Type 2 Diabetes&#x201D;. If the similarity function <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:mrow><mml:mtext>sim</mml:mtext></mml:mrow><mml:mtext>&#x00A0;</mml:mtext><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2265;</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03B8;</mml:mi></mml:mrow></mml:math></inline-formula>, they are considered a match. Finding the path P: (&#x201C;Type 2 Diabetes&#x201D;, &#x201C;causes&#x201D;, &#x201C;High Blood Sugar&#x201D;) &#x2192; (&#x201C;High Blood Sugar&#x201D;, &#x201C;leads to&#x201D;, &#x201C;Kidney Disease&#x201D;). Next, collect and record the path, constructing the reasoning chain from &#x201C;Type 2 Diabetes&#x201D; to &#x201C;Kidney Disease&#x201D;.
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mrow><mml:mtext>Paths</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mo movablelimits="false">&#x22C3;</mml:mo><mml:mrow><mml:mrow><mml:mtext>all valid&#xA0;</mml:mtext></mml:mrow><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>v</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>The following section presents a simplified example of a knowledge inference path related to &#x201C;type 2 diabetes&#x201D; as shown in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>. This visualization highlights the logical connections and relationships encoded in the knowledge graph, aiding the diagnostic reasoning process.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Example of a knowledge inference path for &#x201C;Type 2 Diabetes&#x201D;</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-2.tif"/>
</fig>
<p>Next, we will represent the structured knowledge along these reasoning paths.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Knowledge Representation</title>
<p>The reasoning paths from the collection are concatenated into a single text sequence. This concatenated text is then represented as a vector <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mi>k</mml:mi></mml:math></inline-formula> using a model.</p>
<p>(1) Reasoning Path Representation</p>
<p>Each reasoning path <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is converted into a readable text sequence, with each path consisting of a series of triples <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>r</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. These triples can be transformed into text, where each triple is expressed in the form of &#x201C;Entity 1 reaches Entity 2 through Relationship.&#x201D; For example, given a reasoning path <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, it can be converted into the text: &#x201C;Entity <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> reaches Entity <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> through Relationship <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>, and <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> reaches Entity <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mrow><mml:mtext>g</mml:mtext></mml:mrow><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> through Relationship <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:msub><mml:mrow><mml:mtext>r</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>.&#x201D; Assuming the knowledge graph contains the following triples: (&#x201C;Type 2 Diabetes&#x201D;, &#x201C;causes&#x201D;, &#x201C;High Blood Sugar&#x201D;), (&#x201C;High Blood Sugar&#x201D;, &#x201C;leads to&#x201D;, &#x201C;Kidney Disease&#x201D;), the conversion to text would be: &#x201C;Type 2 Diabetes reaches High Blood Sugar through causes, and reaches Kidney Disease through leads to.&#x201D;</p>
<p>After converting the path into text, the pre-trained BERT model <italic>M</italic> is used to transform the text <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>P</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> into a vector representation <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>(2) Text Vectorization Model Selection (BERT)</p>
<p>The input text <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>P</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is first tokenized by the BERT model, breaking it down into subword units. For example, the input text &#x201C;Type 2 diabetes through causes to hyperglycemia and leads to kidney disease&#x201D; might be tokenized into subwords such as &#x201C;Type 2,&#x201D; &#x201C;diabetes,&#x201D; &#x201C;through,&#x201D; &#x201C;causes,&#x201D; etc. Each subword unit is mapped to its corresponding ID in the BERT vocabulary. After tokenization, the units are encoded into embedding vectors. These embedding vectors are then processed through BERT&#x2019;s multi-layer Transformer encoder, capturing the contextual relationships and dependencies among the tokens. This process generates a semantic representation of the text, expressed by the following formula:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>B</mml:mi><mml:mi>E</mml:mi><mml:mi>R</mml:mi><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>&#x003A;</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>B</mml:mi><mml:mi>E</mml:mi><mml:mi>R</mml:mi><mml:mi>T</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>P</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub></mml:math></disp-formula>where:</p>
<p><inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the input text sequence.</p>
<p><inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the text vector representation output by the BERT model.</p>
<p>The function f<sub>BERT</sub> transforms the text sequence <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> into its vector representation <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. Here, <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> contains the semantic information of the input text <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>The BERT model outputs the vector representation of the text <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> as:
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the vector representation obtained by processing the input text sequence <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> through the BERT model, <inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the final text vector representation obtained through the processing of the mapping function <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mrow><mml:mtext>M</mml:mtext></mml:mrow></mml:math></inline-formula>. The final text vector representation is obtained through a mapping function M. This additional mapping function consists of one or more fully connected layers combined with activation functions (e.g., ReLU) or nonlinear transformations. These layers can perform dimensionality reduction or expansion on the high-dimensional vectors output by BERT, aligning them with the semantic space of the knowledge graph. The function takes the BERT output embeddings as input and further processes them, adapting the general embeddings from BERT into task-specific semantic representations suitable for medical applications.</p>
<p>(3) Output Vector Extraction</p>
<p>In the text vectorization model selection mentioned earlier, we used the BERT model to convert the input text sequence <inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:msub><mml:mi>T</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> into the vector representation <inline-formula id="ieqn-67"><mml:math id="mml-ieqn-67"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. During this process, we typically choose to use the special token <inline-formula id="ieqn-68"><mml:math id="mml-ieqn-68"><mml:mo stretchy="false">[</mml:mo><mml:mrow><mml:mtext>CLS</mml:mtext></mml:mrow><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>, and its corresponding vector is used as the overall representation of the entire input text. This comprehensive representation is denoted as <inline-formula id="ieqn-69"><mml:math id="mml-ieqn-69"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">[</mml:mo><mml:mn>0</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Prompt Template</title>
<p>The design of prompt templates plays a critical role in this method. In this study, templates incorporating soft tokens and masked tokens (MASK) were designed to enhance the model&#x2019;s understanding of medical information. For instance, for the input &#x201C;Type 2 diabetes is a chronic disease,&#x201D; a corresponding template might be &#x201C;Type 2 diabetes is a [MASK] chronic [SOFT] disease,&#x201D; where [MASK] and [SOFT] represent key positions requiring the model&#x2019;s reasoning. In this template, soft tokens help the model capture the diverse characteristics of different diseases, reducing noise during the template generation process and enhancing the model&#x2019;s generalization ability. Masked tokens focus the model&#x2019;s attention on critical reasoning content, minimizing distractions from irrelevant information and improving diagnostic accuracy. For example, when the input text is &#x201C;The patient exhibits symptoms of hyperglycemia, suspected to have Type 2 diabetes,&#x201D; the template can be constructed as &#x201C;The patient exhibits [MASK] symptoms, suspected to have [SOFT] disease.&#x201D; This template enables the model to extract the association between &#x201C;hyperglycemia&#x201D; and &#x201C;Type 2 diabetes,&#x201D; emphasizing specific symptoms while maintaining a comprehensive consideration of disease categories. The following sections detail the steps for constructing prompt templates and configuring specific tokens to ensure the model input conforms to BERT&#x2019;s optimal format, enhancing its performance in diagnostic tasks.</p>
<p>(1) Construction of Prompt Template</p>
<p>To effectively utilize the BERT model for text vectorization, we first need to preprocess the original input text x to construct a proper prompt template <inline-formula id="ieqn-70"><mml:math id="mml-ieqn-70"><mml:mrow><mml:mtext>Template</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> that meets the input format requirements of the BERT model. This prompt template will generate a text <inline-formula id="ieqn-71"><mml:math id="mml-ieqn-71"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> that contains special tokens and specific vocabulary. The text <inline-formula id="ieqn-72"><mml:math id="mml-ieqn-72"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> contains special tokens such as [MASK], soft tokens, and other relevant vocabulary. These elements help the model focus on specific parts of the input and guide the prediction process, enhancing the performance of tasks like classification or inference.</p>
<p>For example:</p>
<p>Original input text x: &#x201C;Type 2 diabetes is a chronic metabolic disease.&#x201D;</p>
<p>Prompt template <inline-formula id="ieqn-73"><mml:math id="mml-ieqn-73"><mml:mrow><mml:mtext>Template</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>: &#x201C;Type 2 diabetes is a [MASK] [SOFT] disease.&#x201D;</p>
<p>Generated preprocessed text <inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: &#x201C;Type 2 diabetes is a [MASK] [SOFT] disease.&#x201D;</p>
<p>(2) Expression of Template Conversion
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msup><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mrow><mml:mtext>Template</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mrow><mml:mtext>soft</mml:mtext></mml:mrow><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mrow><mml:mtext>mask</mml:mtext></mml:mrow><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext>w</mml:mtext></mml:mrow><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents either words from the original text or other words added based on the context. Suppose we want to convert the original text x into the template <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow></mml:math></inline-formula>. This can be achieved by inserting special tokens and soft labels. A specific example is as follows:</p>
<p>Original input text <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow></mml:math></inline-formula>: &#x201C;Type 2 diabetes is a chronic metabolic disease.&#x201D;</p>
<p>Converted preprocessed text <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: &#x201C;Type 2 diabetes is a [MASK] [SOFT] disease.&#x201D; It can be represented as:</p>
<p><inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:msup><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> &#x003D; Template (x) &#x003D; [&#x201C;&#x4E8C;&#x578B;&#x7CD6;&#x5C3F;&#x75C5;&#x201D;, soft, &#x201C;&#x662F;&#x4E00;&#x79CD;&#x201D;, mask, &#x201C;&#x6027;&#x201D;, soft, &#x201C;&#x75BE;&#x75C5;&#x201D;.]</p>
<p>(3) Vector Representation and Processing</p>
<p>Using the pre-trained model M, the preprocessed text <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is transformed into a set of vectors <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>. Each vector <inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> corresponds to a word or token in the preprocessed text <inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>, where:</p>
<p><inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the vector corresponding to the <italic>soft token</italic>. <inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the vector corresponding to the <italic>mask token</italic>.</p>
<p>For example, for the original input text x: &#x201C;Type 2 diabetes is a chronic metabolic disease.&#x201D;, the generated vector set can be explained as follows:</p>
<p><inline-formula id="ieqn-86"><mml:math id="mml-ieqn-86"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>: The vector corresponding to the first word in the original text, &#x201C;Type 2 diabetes&#x201D;.</p>
<p><inline-formula id="ieqn-87"><mml:math id="mml-ieqn-87"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>: The vector corresponding to the <italic>soft token</italic>.</p>
<p><inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>: The vector corresponding to the second word in the original text, &#x201C;is a&#x201D;. <inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>: The vector corresponding to the <italic>mask token</italic>.</p>
<p><inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>: The vector corresponding to the third word in the original text, &#x201C;disease&#x201D;.</p>
<p>Other vectors follow similarly, with each vector representing the respective words or tokens in the preprocessed text.</p>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Prediction</title>
<p>The text <inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:msup><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> containing the <italic>mask</italic> and the <italic>new soft token</italic> is input into a pre-trained language model for forward inference. This produces representations for each token. The representation at the <italic>mask</italic> position is then used for a <italic>verbalizer</italic> prediction.</p>
<p>Given the modified input <inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:msup><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>, it is formalized as:
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msup><mml:mrow><mml:mtext>x</mml:mtext></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></disp-formula></p>
<p>Feed <inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:msup><mml:mi>x</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> into the pre-trained language model <italic>M</italic>, and perform forward inference to obtain the vector representations for each <inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>k</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi></mml:math></inline-formula>:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msubsup><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></disp-formula></p>
<p>Extract the representation <inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> of the mask token from the model output.</p>
<p>Use a verbalizer function <inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow></mml:math></inline-formula> to map <inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> to a specific vocabulary term. The <inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:mi>v</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>b</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>z</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mspace width="thinmathspace" /><mml:mspace width="thinmathspace" /><mml:mi>V</mml:mi></mml:math></inline-formula> is a mapping from the vector space to the vocabulary, typically used to convert the model&#x2019;s predicted vector into a specific word.
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:mrow><mml:mtext>predicted word</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>The specific steps are as follows:</p>
<p>(1) Calculate the similarity between <inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and the embedding vectors of each word in the vocabulary to obtain a probability distribution. For example, if the embedding vector for each word in the vocabulary is <inline-formula id="ieqn-100"><mml:math id="mml-ieqn-100"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, then the probability distribution is given by:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:mrow><mml:mtext>similarity</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>mask</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mrow><mml:mtext>e</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:math></disp-formula></p>
<p>(2) Based on the computed similarities, select the word with the highest probability as the prediction result.</p>
<p>(3) Vector Processing</p>
<p>The formula for replacing the original <inline-formula id="ieqn-101"><mml:math id="mml-ieqn-101"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> vector with the average of <inline-formula id="ieqn-102"><mml:math id="mml-ieqn-102"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and other related vectors <inline-formula id="ieqn-103"><mml:math id="mml-ieqn-103"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is as follows:
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:msubsup><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>n</mml:mi></mml:mfrac><mml:msubsup><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></disp-formula>where:</p>
<p><inline-formula id="ieqn-104"><mml:math id="mml-ieqn-104"><mml:msubsup><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is the updated <inline-formula id="ieqn-105"><mml:math id="mml-ieqn-105"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> vector, <inline-formula id="ieqn-106"><mml:math id="mml-ieqn-106"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the original soft token vector, <inline-formula id="ieqn-107"><mml:math id="mml-ieqn-107"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents related vectors (e.g., corresponding to related tokens or words), <italic>n</italic> is the number of related vectors used in the calculation.</p>
<p>Finally, after replacing the original <inline-formula id="ieqn-108"><mml:math id="mml-ieqn-108"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> with <inline-formula id="ieqn-109"><mml:math id="mml-ieqn-109"><mml:msubsup><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, we obtain the updated vector set: {<inline-formula id="ieqn-110"><mml:math id="mml-ieqn-110"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msubsup><mml:mi>k</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>w</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, which will be used in the next steps of the model processing.</p>
<p>To better understand how the construction of prompt templates affects model performance, this study compares different template designs in subsequent experiments. For instance, besides the designed template &#x201C;Type 2 diabetes is a [MASK] chronic [SOFT] disease,&#x201D; we also tested a simple template without soft tokens and masked markers: &#x201C;The patient exhibits symptoms, suspected to have a disease.&#x201D; In this comparative template, the model directly receives complete sentences without specific markers guiding its focus on particular features and diagnostic relationships.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Experimental Settings</title>
<sec id="s5_1">
<label>5.1</label>
<title>Datasets</title>
<p>In this paper, experiments were conducted on the CHIP-CTC, IMCS-V2-NER, and KUAKE-QTR datasets. CHIP-CTC, one of the experimental datasets, originates from a bench-marking task released at the CHIP2019 conference. As shown in <xref ref-type="table" rid="table-1">Table 1</xref>, the number of samples in the CHIP-CTC, IMCS-V2-NER, and KUAKE-QTR datasets includes the training, validation, and test samples. All text data is sourced from real clinical trials, including 22,962 entries in the training set, 7682 entries in the validation set, and 10,000 entries in the test set. The dataset is available at <italic><ext-link ext-link-type="uri" xlink:href="https://github.com/zonghui0228/chip2019task3">https://github.com/zonghui0228/chip2019task3</ext-link></italic> <italic>(accessed on 26 December 2024)</italic>. Although CHIP-CTC is primarily a short text classification dataset, its data includes medical information about symptoms, medical history, and other relevant details. These attributes allow us to test the model&#x2019;s performance in medical text classification tasks, showcasing its ability to provide preliminary feature extraction capabilities for disease diagnosis.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Datasets</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Number of samples/Datasets</th>
<th>CHIP-CTC</th>
<th>IMCS-V2-NER</th>
<th>KUAKE-QTR</th>
</tr>
</thead>
<tbody>
<tr>
<td>Number of training samples</td>
<td>22,962</td>
<td>2472</td>
<td>24,174</td>
</tr>
<tr>
<td>Number of vaildation samples</td>
<td>7682</td>
<td>833</td>
<td>2913</td>
</tr>
<tr>
<td>Number of test samples</td>
<td>10,000</td>
<td>811</td>
<td>5465</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The IMCS-V2-NER dataset, used as another experimental dataset, comes from the Named Entity Recognition task in the IMCS2 dataset developed by the School of Data Science at Fudan University. It includes 2472 entries in the training set, 833 entries in the validation set, and 811 entries in the test set. The dataset is available at <italic><ext-link ext-link-type="uri" xlink:href="https://github.com/lemuria-wchen/imcs21">https://github.com/lemuria-wchen/imcs21</ext-link></italic> <italic>(accessed on 26 December 2024)</italic>. This dataset primarily serves to validate the model&#x2019;s capability in medical entity and term recognition, which is crucial for extracting diseases, symptoms, and treatment plans in diagnostic tasks.</p>
<p>The KUAKE-QTR dataset, used as another experimental dataset, includes 24, 174 entries in the training set, 2913 entries in the validation set, and 5465 entries in the test set.</p>
<p>The dataset is available at <italic><ext-link ext-link-type="uri" xlink:href="https://tianchi.aliyun.com/dataset/95414">https:/tianchi.aliyun.com/dataset/95414</ext-link></italic> <italic>(accessed on 26 December 2024)</italic>. While this dataset mainly evaluates the alignment between query terms and landing page titles, its inclusion of medical terminology and entity matches also aids in testing the model&#x2019;s ability to infer relationships between symptoms and diseases. Furthermore, although these datasets are not explicitly designed for disease diagnosis, they play a vital role in verifying the proposed model&#x2019;s adaptability to multiple tasks and its performance in broader medical text processing scenarios. These datasets help validate the model&#x2019;s effectiveness in extracting medical text information, laying the groundwork for extending its application to more complex real-world diagnostic tasks, such as clinical case reports and electronic health records.</p>
</sec>
<sec id="s5_2">
<label>5.2</label>
<title>Baseline</title>
<p>When evaluating our proposed method, we established a comprehensive set of baseline models to ensure rigorous and fair comparison. These baselines were selected to represent robust benchmarks in the field, including both traditional machine learning algorithms and advanced deep learning techniques.</p>
<p>SVM [<xref ref-type="bibr" rid="ref-24">24</xref>]: Support Vector Machines (SVMs) classify text categories using hyperplanes, excelling at handling linear and nonlinear problems. SVMs are well-suited for tasks like sentiment analysis and spam detection.</p>
<p>CNN [<xref ref-type="bibr" rid="ref-25">25</xref>]: Convolutional Neural Networks (CNNs) extract local features from text through convolution layers, enabling quick identification of critical information. They are ideal for content understanding and classification tasks.</p>
<p>RNN [<xref ref-type="bibr" rid="ref-26">26</xref>]: Recurrent Neural Networks (RNNs) are particularly effective in text classification tasks due to their ability to process sequential data and capture long-term dependencies.</p>
<p>Attention [<xref ref-type="bibr" rid="ref-27">27</xref>]: The Attention mechanism assigns higher weights to important words or phrases, improving focus on critical information and optimizing classification performance.</p>
<p>BiLSTM [<xref ref-type="bibr" rid="ref-28">28</xref>]: Bidirectional Long Short-Term Memory Networks (BiLSTMs) combine forward and backward LSTM layers, offering advantages in capturing semantic dependencies within text.</p>
<p>BiRNN [<xref ref-type="bibr" rid="ref-28">28</xref>]: Bidirectional Recurrent Neural Networks (BiRNNs) capture information in both forward and backward text sequences, enhancing the understanding of long-term dependencies.</p>
<p>BERT [<xref ref-type="bibr" rid="ref-29">29</xref>]: BERT employs bidirectional encoding and pre-training to capture semantic and contextual features of text. It performs exceptionally well across various text classification tasks.</p>
<p>BioBERT [<xref ref-type="bibr" rid="ref-30">30</xref>]: BioBERT is a pre-trained model specifically designed for biomedical text. Trained on medical literature, it excels in understanding medical terminology and performing biomedical tasks. Compared to general-purpose BERT, BioBERT is better suited for processing medical and biological contexts.</p>
<p>These baseline models provide a reliable reference for evaluating our approach, enabling a clearer demonstration of its advantages in addressing specific text classification tasks.</p>
</sec>
</sec>
<sec id="s6">
<label>6</label>
<title>Results and Analysis</title>
<p>This section presents our experimental results and provides an analysis of these outcomes. The evaluation metrics employed include precision, recall, and F1 score, which are commonly used in text classification experiments. Precision measures the proportion of true positives (TP) among all samples predicted as positive by the model, reflecting the accuracy of positive predictions. It is calculated using the formula: <inline-formula id="ieqn-111"><mml:math id="mml-ieqn-111"><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>FP</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>, where FP represents false positives. Recall measures the proportion of actual positive samples correctly predicted by the model, indicating the model&#x2019;s coverage of positive samples. It is calculated using the formula: <inline-formula id="ieqn-112"><mml:math id="mml-ieqn-112"><mml:mrow><mml:mtext>R</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>FN</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>, where FN represents false negatives. F1 score is the harmonic mean of precision and recall, providing a balanced evaluation of the model&#x2019;s performance in terms of both metrics. It is calculated using the formula: <inline-formula id="ieqn-113"><mml:math id="mml-ieqn-113"><mml:mrow><mml:mtext>F</mml:mtext></mml:mrow><mml:mn>1</mml:mn><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mrow><mml:mtext>R</mml:mtext></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mtext>P</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>R</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>.</p>
<sec id="s6_1">
<label>6.1</label>
<title>Comparison Experiments</title>
<p>To ensure the reliability of the experiments, we repeated each experiment three times and used the average values as the final results. The experimental results are shown in <xref ref-type="table" rid="table-2">Table 2</xref> and <xref ref-type="fig" rid="fig-3">Figs. 3</xref>&#x2013;<xref ref-type="fig" rid="fig-6">6</xref>.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Comparative experimental results</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th></th>
<th align="center" colspan="3">KUAKE-QTR</th>
<th align="center" colspan="3">IMCS-V2-NER</th>
<th align="center" colspan="3">CHIP-CTC</th>
</tr>
<tr>
<th></th>
<th align="center">P</th>
<th align="center">R</th>
<th align="center">F1</th>
<th align="center">P</th>
<th align="center">R</th>
<th align="center">F1</th>
<th align="center">P</th>
<th align="center">R</th>
<th align="center">F1</th>
</tr>
</thead>
<tbody>
<tr>
<td>SVM</td>
<td>0.571</td>
<td>0.502</td>
<td>0.534</td>
<td>0.467</td>
<td>0.439</td>
<td>0.452</td>
<td>0.472</td>
<td>0.236</td>
<td>0.314</td>
</tr>
<tr>
<td>CNN</td>
<td>0.622</td>
<td>0.542</td>
<td>0.579</td>
<td>0.677</td>
<td>0.648</td>
<td>0.662</td>
<td>0.671</td>
<td>0.622</td>
<td>0.645</td>
</tr>
<tr>
<td>RNN</td>
<td>0.774</td>
<td>0.673</td>
<td>0.719</td>
<td>0.763</td>
<td>0.703</td>
<td>0.731</td>
<td>0.743</td>
<td>0.727</td>
<td>0.734</td>
</tr>
<tr>
<td>BiLSTM</td>
<td>0.873</td>
<td>0.825</td>
<td>0.853</td>
<td>0.824</td>
<td>0.779</td>
<td>0.800</td>
<td>0.850</td>
<td>0.806</td>
<td>0.827</td>
</tr>
<tr>
<td>Attention</td>
<td>0.686</td>
<td>0.534</td>
<td>0.600</td>
<td>0.704</td>
<td>0.672</td>
<td>0.687</td>
<td>0.684</td>
<td>0.653</td>
<td>0.668</td>
</tr>
<tr>
<td>BiRNN</td>
<td>0.844</td>
<td>0.792</td>
<td>0.817</td>
<td>0.758</td>
<td>0.728</td>
<td>0.742</td>
<td>0.763</td>
<td>0.749</td>
<td>0.755</td>
</tr>
<tr>
<td>BERT</td>
<td>0.936</td>
<td>0.913</td>
<td>0.924</td>
<td>0.941</td>
<td>0.916</td>
<td>0.928</td>
<td>0.919</td>
<td>0.914</td>
<td>0.916</td>
</tr>
<tr>
<td>BioBERT</td>
<td>0.949</td>
<td>0.923</td>
<td>0.935</td>
<td>0.953</td>
<td>0.932</td>
<td>0.942</td>
<td>0.935</td>
<td>0.920</td>
<td>0.927</td>
</tr>
<tr>
<td>Ours</td>
<td>0.967</td>
<td>0.942</td>
<td>0.949</td>
<td>0.957</td>
<td>0.935</td>
<td>0.945</td>
<td>0.951</td>
<td>0.927</td>
<td>0.938</td>
</tr>
</tbody>
</table>
</table-wrap><fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Performance of different benchmark models and the propoesd model on the KUAKE-QTR dataset</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-3.tif"/>
</fig><fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Performance of different benchmark models and the propoesd model on the CHIP-CTC dataset</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-4.tif"/>
</fig><fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Performance of different benchmark models and the proposed model on the IMCS-V2-NER dataset</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-5.tif"/>
</fig><fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>Trend chart of various model F1 values on different datasets</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-6.tif"/>
</fig>
<sec id="s6_1_1">
<label>6.1.1</label>
<title>Overview</title>
<p>In this study, we evaluated the performance of various models, including classical and deep learning approaches, across multiple datasets: KUAKE-QTR, IMCS-V2-NER, and CHIP-CTC. The primary metrics used for evaluation were accuracy and F1 score, providing a comprehensive insight into the models&#x2019; classification and generalization abilities.</p>
</sec>
<sec id="s6_1_2">
<label>6.1.2</label>
<title>Accuracy Comparison across Models</title>
<p>The bar charts show the accuracy comparison of models such as SVM, CNN, RNN, BLSTM, Attention, BiRNN, BERT, BioBERT, and a custom model (&#x201C;ours&#x201D;) across three different datasets. The custom model consistently outperformed the other models on all datasets, achieving the highest accuracy in each case: KUAKE-QTR: The &#x201C;ours&#x201D; model achieved an accuracy of 93.6%, surpassing models like BERT (91.1%) and BioBERT (92.1%). IMCS-V2-NER: The &#x201C;ours&#x201D; model reached 94.7% accuracy, again outperforming BERT (92.1%) and BioBERT (92.9%). CHIP-CTC: The custom model recorded an accuracy of 94.5%, followed closely by BERT at 92.1% and BioBERT at 93.2%.</p>
<p>These results illustrate that advanced models (BERT, DistBERT) and our custom model generally exhibit superior accuracy compared to traditional models like SVM and CNN, especially in complex language understanding tasks.</p>
</sec>
<sec id="s6_1_3">
<label>6.1.3</label>
<title>F1 Score Trend across Datasets</title>
<p>The line chart visualizes the F1 score trends for different models across the three datasets, reflecting consistency and robustness in performance. The &#x201C;ours&#x201D; model achieves the highest F1 score on all datasets, indicating its effectiveness in handling diverse data characteristics. Notably, the performance gap between classical and deep learning models widens significantly, emphasizing the importance of sophisticated architectures for improved natural language processing.</p>
<p>The experimental results demonstrate that our method achieved the best performance across all three datasets, proving its feasibility and effectiveness. Furthermore, these results highlight the significant impact of incorporating medical knowledge into the model through the prompt-learning framework in enhancing its performance.</p>
</sec>
</sec>
<sec id="s6_2">
<label>6.2</label>
<title>Ablation Study</title>
<p>This section aims to analyze the effectiveness of each module in our proposed method. To achieve this, we first remove the knowledge representation component from our method. As seen in the first row of <xref ref-type="table" rid="table-3">Table 3</xref>, removing the knowledge representation results in a significant drop of 0.2 in the F1 score. This is because knowledge representation is a core component of our method, which injects structured knowledge obtained from the knowledge graph into the language model, thereby enhancing the model&#x2019;s understanding of medical domain knowledge and improving performance on medical diagnostic tasks.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Ablation experiment results</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th></th>
<th align="center">P</th>
<th align="center">R</th>
<th align="center">F1</th>
</tr>
</thead>
<tbody>
<tr>
<td>Our method</td>
<td>0.93</td>
<td>0.92</td>
<td>0.91</td>
</tr>
<tr>
<td>Remove knowledge</td>
<td>0.90</td>
<td>0.88</td>
<td>0.89</td>
</tr>
<tr>
<td>Basic symptom template</td>
<td>0.89</td>
<td>0.84</td>
<td>0.86</td>
</tr>
<tr>
<td>Symptom-disease-relation template</td>
<td>0.90</td>
<td>0.82</td>
<td>0.85</td>
</tr>
<tr>
<td>Complex context template</td>
<td>0.88</td>
<td>0.84</td>
<td>0.86</td>
</tr>
<tr>
<td>Direct mapping verbalizer</td>
<td>0.92</td>
<td>0.91</td>
<td>0.91</td>
</tr>
<tr>
<td>Extended vocabulary verbalizer</td>
<td>0.91</td>
<td>0.90</td>
<td>0.90</td>
</tr>
<tr>
<td>Synonym tolerant verbalizer</td>
<td>0.90</td>
<td>0.87</td>
<td>0.89</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Subsequently, we modified the prompt template, changing it to: &#x201C;The characteristics of Type 2 Diabetes include [MASK] nature, and it is also manifested as [SOFT] disease.&#x201D; From rows 2 to 4 of <xref ref-type="table" rid="table-3">Table 3</xref>, it can be observed that the prompt template used in our method achieves the best performance, while other prompt templates do not perform as well. We believe this may be due to the presence of excessive or irrelevant words in the prompt templates, which could introduce noise into the language model&#x2019;s reasoning process.</p>

<p>This study conducts systematic ablation tests to evaluate the impact of knowledge enhancement modules, diverse prompt template designs, and label verbalization strategies on disease diagnosis performance. It compares the efficacy of basic symptom templates, explicit symptom-disease relation templates, and complex context templates in contextual encoding, while assessing label mapping approaches including direct term matching, expanded vocabulary, and synonym tolerance. Findings highlight that knowledge integration strengthens reasoning capabilities, whereas excessive contextual complexity introduces noise.</p>
<p>In this study, we designed various templates and verbalizers to enhance the model&#x2019;s performance in medical text classification tasks. Basic Symptom Template: Focuses on symptom information for inference, suitable for simple symptom classification tasks. Symptom-Disease-Relation Template: Introduces symptom-disease associations, improving the model&#x2019;s diagnostic accuracy. Complex Context Template: Handles more intricate contextual relationships, such as patient medical history or symptom combinations, enhancing the model&#x2019;s performance in multidimensional scenarios. On Verbalizers, Direct Mapping Verbalizer: Simplifies reasoning by directly mapping symptoms to specific diseases. Extended Vocabulary Verbalizer: Expands the vocabulary to improve recognition of different expressions and synonyms. Synonym Tolerant Verbalizer: Strengthens the model&#x2019;s understanding of synonyms and semantically similar terms, improving robustness across diverse expressions.</p>
<p>The combination of these templates and verbalizers allows the model to flexibly handle different layers of information in medical text, achieving favorable results in disease diagnosis tasks.</p>
</sec>
<sec id="s6_3">
<label>6.3</label>
<title>Model Interpretability Study</title>
<p>This section aims to analyze the interpretability of the model. Unlike general text classification tasks, in disease diagnosis tasks, users are additionally concerned with the interpretability of the results. An unexplainable prediction result is unacceptable to users. Therefore, to verify the model&#x2019;s explainability across diverse clinical cases, we introduced a multi-case validation approach to ensure consistency and transparency in its reasoning processes. The cases include diabetes, hypertension, hyperlipidemia, and coronary heart disease, covering a variety of symptoms, medical histories, and complex comorbidity scenarios. This ensures the comprehensiveness and applicability of the explainability analysis. For example, a case involving a 55-year-old male patient with diabetes was selected to visualize the reasoning process through illustrative diagrams.</p>
<p>Using the clinical case in <xref ref-type="fig" rid="fig-7">Fig. 7</xref> as an example, we can observe the knowledge retrieved during the knowledge retrieval phase, including: &#x201C;Type 2 diabetes is a common chronic disease,&#x201D; &#x201C;Its main characteristic is persistently elevated blood sugar levels,&#x201D; and &#x201C;Frequent drinking, eating, and urination are common symptoms.&#x201D; From this knowledge, we can identify which key pieces of information from the clinical case are related to the final prediction. In other words, we can clearly understand which knowledge elements led the model to make the current prediction.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>Disease diagnosis flowchart based on clinical cases</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-7.tif"/>
</fig>
<p>Through analyzing multiple clinical cases, we observed that the model consistently traced its reasoning paths across different conditions, ensuring transparency and reliability in the diagnostic process. This multi-case validation approach not only improves the model&#x2019;s explainability in complex clinical scenarios but also provides clinicians with clearer reasoning references, thereby enhancing the model&#x2019;s credibility.</p>
<p>In addition, to facilitate readers&#x2019; understanding, this paper not only explains the evaluation metrics but also demonstrates the advantages of the proposed method through relevant examples. <xref ref-type="fig" rid="fig-8">Figs. 8</xref>&#x2013;<xref ref-type="fig" rid="fig-10">10</xref> show the specific example.</p>
<fig id="fig-8">
<label>Figure 8</label>
<caption>
<title>Disambiguation of medical terms</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-8.tif"/>
</fig><fig id="fig-9">
<label>Figure 9</label>
<caption>
<title>Long-tail medical entity recognition</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-9.tif"/>
</fig><fig id="fig-10">
<label>Figure 10</label>
<caption>
<title>Medical text classification</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="JAI_59607-fig-10.tif"/>
</fig>
<p>The specific examples presented show that the model proposed in this paper addresses the issues of insufficient domain knowledge and difficulties in long-tail entity recognition in existing models. The predicted disease conditions are closer to actual clinical outcomes. These examples further illustrate the innovation and superiority of our approach, allowing readers to intuitively understand the improvements and advantages over traditional methods.</p>
</sec>
</sec>
<sec id="s7">
<label>7</label>
<title>Conclusion</title>
<p>In this paper, we propose a knowledge-enhanced disease diagnosis method based on a prompt learning framework. This method leverages an external knowledge graph to retrieve relevant knowledge from clinical cases and then encodes this structured knowledge into prompt templates. By incorporating this encoded knowledge, the language model&#x2019;s understanding of the task is improved, resulting in more accurate disease diagnosis outcomes. Experimental results demonstrate that the proposed method effectively enhances the performance of language models in disease diagnosis tasks. Additionally, the model exhibits strong interpretability, providing users with supporting evidence related to the diagnostic results.</p>
<p>In the future, when integrating prompt learning with knowledge graphs for medical diagnosis, several practical challenges need to be addressed. Firstly, data privacy is a critical issue. Since medical data involves sensitive patient information, the construction of knowledge graphs must strictly comply with data protection laws to ensure patient data is not misused. Secondly, the maintenance and updating of medical knowledge graphs pose cost and technical challenges. Clinical medical knowledge evolves rapidly, and continuously incorporating the latest information into knowledge graphs to ensure diagnostic accuracy is a persistent difficulty. These challenges highlight the need for in-depth research on data privacy protections and knowledge update technologies when advancing the practical application of these methods, ensuring the safety and practicality of diagnostic tools.</p>
<p>We will explore additional methods for knowledge injection. Furthermore, we will investigate more advanced knowledge editing techniques to integrate medical knowledge into the reasoning process of language models.</p>
</sec>
</body>
<back>
<ack>
<p>We extend our gratitude to all individuals and institutions that supported this work.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>This research was supported by the National Natural Science Foundation of China (Grant No. 62162014).</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>Zheng Zhang proposed the research problem and designed the research plan, implemented and optimized the model, processed and analyzed medical text data, optimized prompt templates and wrote the initial draft of the manuscript and made multiple rounds of revisions. Hengyang Wu, the corresponding author, provided the overall research framework and academic support, oversaw the research approach, manuscript content, and scientific rigor, ensured the accuracy of the results and the academic value of the publication, and supervised the revisions and final approval of the manuscript. Na Wang provided key guidance on research design and data processing methods, optimized the experimental design to ensure the accuracy and validity of the data, and assisted in model optimization and result analysis, and contributed important technical reviews of the manuscript. All authors reviewed the results and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>Due to the nature of this research, participants of this study did not agree for their data to be shared publicly, so supporting data is not available.</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest to report regarding the present study.</p>
</sec>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Qu</surname> <given-names>C</given-names></string-name>, <string-name><surname>Bi</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Application of association rules based on Apriori algorithm in disease diagnosis</article-title>. <source>China Comput Commun</source>. <year>2015</year>;<volume>16</volume>(<issue>16</issue>):<fpage>8</fpage>&#x2013;<lpage>9, 11</lpage> <comment>(In Chinese)</comment>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lv</surname> <given-names>X</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Yao</surname> <given-names>D</given-names></string-name></person-group>. <article-title>Research on sleep quality evaluation and disease diagnosis based on statistical classification model</article-title>. <source>Value Eng</source>. <year>2018</year>;<volume>37</volume>(<issue>22</issue>):<fpage>273</fpage>&#x2013;<lpage>5</lpage> <comment>(In Chinese)</comment>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chattopadhyay</surname> <given-names>S</given-names></string-name>, <string-name><surname>Davis</surname> <given-names>RM</given-names></string-name>, <string-name><surname>Menezes</surname> <given-names>DD</given-names></string-name>, <string-name><surname>Singh</surname> <given-names>G</given-names></string-name>, <string-name><surname>Acharya</surname> <given-names>RU</given-names></string-name>, <string-name><surname>Tamura</surname> <given-names>T</given-names></string-name></person-group>. <article-title>Application of Bayesian classifier for the diagnosis of dental pain</article-title>. <source>J Med Syst</source>. <year>2012</year>;<volume>36</volume>(<issue>3</issue>):<fpage>1425</fpage>&#x2013;<lpage>39</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s10916-010-9604-y</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Battineni</surname> <given-names>G</given-names></string-name>, <string-name><surname>Sagaro</surname> <given-names>GG</given-names></string-name>, <string-name><surname>Chinatalapudi</surname> <given-names>N</given-names></string-name>, <string-name><surname>Amenta</surname> <given-names>F</given-names></string-name></person-group>. <article-title>Applications of machine learning predictive models in the chronic disease diagnosis</article-title>. <source>J Pers Med</source>. <year>2020</year>;<volume>10</volume>(<issue>2</issue>):<fpage>21</fpage>. doi:<pub-id pub-id-type="doi">10.3390/jpm10020021</pub-id>; <pub-id pub-id-type="pmid">32244292</pub-id></mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lin</surname> <given-names>D</given-names></string-name>, <string-name><surname>Vasilakos</surname> <given-names>AV</given-names></string-name>, <string-name><surname>Tang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yao</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Neural networks for computer-aided diagnosis in medicine: a review</article-title>. <source>Neurocomputing</source>. <year>2016</year>;<volume>216</volume>(<issue>6</issue>):<fpage>700</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.neucom.2016.08.039</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Onan</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Hierarchical graph-based text classification framework with contextual node embedding and BERT-based dynamic fusion</article-title>. <source>J King Saud Univ Comput Inf Sci</source>. <year>2023</year>;<volume>35</volume>(<issue>7</issue>):<fpage>101610</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.jksuci.2023.101610</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tian</surname> <given-names>H</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>C</given-names></string-name></person-group>. <article-title>Research on medical short text classification algorithm based on BERT model</article-title>. <source>J Yili Norm Univ (Nat Sci Ed)</source>. <year>2021</year>;<volume>15</volume>(<issue>4</issue>):<fpage>50</fpage>&#x2013;<lpage>7</lpage>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hu</surname> <given-names>M</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>X</given-names></string-name>, <string-name><surname>Sun</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Shen</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>T</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>A disease prediction model based on dynamic sampling and transfer learning</article-title>. <source>Chin J Comput</source>. <year>2019</year>;<volume>42</volume>(<issue>10</issue>):<fpage>2339</fpage>&#x2013;<lpage>54</lpage>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><surname>Shortliffe</surname> <given-names>E</given-names></string-name></person-group>. <source>Computer-based medical consultations: MYCIN</source>. Vol. <volume>2</volume>. <publisher-loc>New York, NY, USA</publisher-loc>: <publisher-name>Elsevier</publisher-name>; <year>2012</year>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Aamir</surname> <given-names>KM</given-names></string-name>, <string-name><surname>Sarfraz</surname> <given-names>L</given-names></string-name>, <string-name><surname>Ramzan</surname> <given-names>M</given-names></string-name>, <string-name><surname>Bilal</surname> <given-names>M</given-names></string-name>, <string-name><surname>Shafi</surname> <given-names>J</given-names></string-name>, <string-name><surname>Attique</surname> <given-names>M</given-names></string-name></person-group>. <article-title>A fuzzy rule-based system for classification of diabetes</article-title>. <source>Sensors</source>. <year>2021</year>;<volume>21</volume>(<issue>23</issue>):<fpage>8095</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s21238095</pub-id>; <pub-id pub-id-type="pmid">34884099</pub-id></mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Sanz</surname> <given-names>JA</given-names></string-name>, <string-name><surname>Galar</surname> <given-names>M</given-names></string-name>, <string-name><surname>Jurio</surname> <given-names>A</given-names></string-name>, <string-name><surname>Brugos</surname> <given-names>A</given-names></string-name>, <string-name><surname>Pagola</surname> <given-names>M</given-names></string-name>, <string-name><surname>Bustince</surname> <given-names>H</given-names></string-name></person-group>. <article-title>Medical diagnosis of cardiovascular diseases using an interval-valued fuzzy rule-based classification system</article-title>. <source>Appl Soft Comput</source>. <year>2014</year>;<volume>20</volume>(<issue>4</issue>):<fpage>103</fpage>&#x2013;<lpage>11</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.asoc.2013.11.009</pub-id>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Yadav</surname> <given-names>SK</given-names></string-name>, <string-name><surname>Akhter</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Statistical modeling for the prediction of infectious disease dissemination with special reference to COVID-19 spread</article-title>. <source>Front Public Health</source>. <year>2021</year>;<volume>9</volume>:<fpage>645405</fpage>. doi:<pub-id pub-id-type="doi">10.3389/fpubh.2021.645405</pub-id>; <pub-id pub-id-type="pmid">34222166</pub-id></mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ma</surname> <given-names>C</given-names></string-name>, <string-name><surname>Pan</surname> <given-names>C</given-names></string-name>, <string-name><surname>Ye</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Ren</surname> <given-names>H</given-names></string-name>, <string-name><surname>Huang</surname> <given-names>H</given-names></string-name>, <string-name><surname>Qu</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Gout staging diagnosis method based on deep reinforcement learning</article-title>. <source>Processes</source>. <year>2023</year>;<volume>11</volume>(<issue>8</issue>):<fpage>2450</fpage>. doi:<pub-id pub-id-type="doi">10.3390/pr11082450</pub-id>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>He</surname> <given-names>H</given-names></string-name>, <string-name><surname>Garcia</surname> <given-names>EA</given-names></string-name></person-group>. <article-title>Learning from imbalanced data</article-title>. <source>IEEE Trans Knowl Data Eng</source>. <year>2009</year>;<volume>21</volume>(<issue>9</issue>):<fpage>1263</fpage>&#x2013;<lpage>84</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TKDE.2008.239</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Branco</surname> <given-names>P</given-names></string-name>, <string-name><surname>Torgo</surname> <given-names>L</given-names></string-name>, <string-name><surname>Ribeiro</surname> <given-names>RP</given-names></string-name></person-group>. <article-title>A survey of predictive modeling on imbalanced domains</article-title>. <source>ACM Comput Surv</source>. <year>2017</year>;<volume>49</volume>(<issue>2</issue>):<fpage>1</fpage>&#x2013;<lpage>50</lpage>. doi:<pub-id pub-id-type="doi">10.1145/2907070</pub-id>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Luo</surname> <given-names>F</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>X</given-names></string-name></person-group>. <article-title>IMAS&#x002B;&#x002B;: an intelligent medical analysis system enhanced with deep graph neural networks</article-title>. In: <conf-name>Proceedings of the 30th ACM International Conference on Information &#x0026; Knowledge Management</conf-name>; <year>2021</year>. p. <fpage>4754</fpage>&#x2013;<lpage>8</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3459637.3481966</pub-id>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Xie</surname> <given-names>J</given-names></string-name>, <string-name><surname>Li</surname> <given-names>X</given-names></string-name>, <string-name><surname>Yuan</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Guan</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Jiang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Guo</surname> <given-names>X</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Knowledge-based dynamic prompt learning for multi-label disease diagnosis</article-title>. <source>Knowl Based Syst</source>. <year>2024</year>;<volume>286</volume>:<fpage>111395</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.knosys.2024.111395</pub-id>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Ge</surname> <given-names>X</given-names></string-name>, <string-name><surname>Williams</surname> <given-names>RD</given-names></string-name>, <string-name><surname>Stankovic</surname> <given-names>JA</given-names></string-name>, <string-name><surname>Alemzadeh</surname> <given-names>H</given-names></string-name></person-group>. <article-title>DKEC: domain knowledge enhanced multi-label classification for electronic health records</article-title>. <comment>arXiv:2310.07059. 2023</comment>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Guo</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>H</given-names></string-name>, <string-name><surname>Ma</surname> <given-names>L</given-names></string-name>, <string-name><surname>Luo</surname> <given-names>X</given-names></string-name>, <string-name><surname>Xie</surname> <given-names>S</given-names></string-name></person-group>. <article-title>DIE-CDK: a discriminative information enhancement method with cross-modal domain knowledge for fine-grained ship detection</article-title>. <source>IEEE Trans Circuits Syst Video Technol</source>. <year>2024</year>;<volume>34</volume>(<issue>11</issue>):<fpage>10646</fpage>&#x2013;<lpage>61</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TCSVT.2024.3407057</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Xu</surname> <given-names>L</given-names></string-name>, <string-name><surname>Li</surname> <given-names>D</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>H</given-names></string-name>, <string-name><surname>Tang</surname> <given-names>D</given-names></string-name>, <string-name><surname>Lei</surname> <given-names>H</given-names></string-name></person-group>. <article-title>Medical text classification based on neural network</article-title>. <source>Comput Eng Sci</source>. <year>2023</year>;<volume>45</volume>(<issue>6</issue>):<fpage>1116</fpage>&#x2013;<lpage>22</lpage>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Sharaf</surname> <given-names>S</given-names></string-name>, <string-name><surname>Anoop</surname> <given-names>VS</given-names></string-name></person-group>. <article-title>An analysis on large language models in healthcare: a case study of BioBERT</article-title>. <comment>arXiv:2310.07282. 2023</comment>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Raffel</surname> <given-names>C</given-names></string-name>, <string-name><surname>Shazeer</surname> <given-names>N</given-names></string-name>, <string-name><surname>Roberts</surname> <given-names>A</given-names></string-name>, <string-name><surname>Lee</surname> <given-names>K</given-names></string-name>, <string-name><surname>Narang</surname> <given-names>S</given-names></string-name>, <string-name><surname>Matena</surname> <given-names>M</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Exploring the limits of transfer learning with a unified text-to-text transformer</article-title>. <source>J Mach Learn Res</source>. <year>2020</year>;<volume>21</volume>(<issue>140</issue>):<fpage>1</fpage>&#x2013;<lpage>67</lpage>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Liao</surname> <given-names>W</given-names></string-name>, <string-name><surname>Zeng</surname> <given-names>B</given-names></string-name>, <string-name><surname>Yin</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wei</surname> <given-names>P</given-names></string-name></person-group>. <article-title>An improved aspect-category sentiment analysis model for text sentiment analysis based on RoBERTa</article-title>. <source>Appl Intell</source>. <year>2021</year>;<volume>51</volume>(<issue>6</issue>):<fpage>3522</fpage>&#x2013;<lpage>33</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s10489-020-01964-1</pub-id>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Cortes</surname> <given-names>C</given-names></string-name>, <string-name><surname>Vapnik</surname> <given-names>V</given-names></string-name></person-group>. <article-title>Support-vector networks</article-title>. <source>Mach Learn</source>. <year>1995</year>;(<issue>20</issue>):<fpage>273</fpage>&#x2013;<lpage>97</lpage>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>LeCun</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Bottou</surname> <given-names>L</given-names></string-name>, <string-name><surname>Bengio</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Haffner</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Gradient-based learning applied to document recognition</article-title>. <source>Proc IEEE</source>. <year>1998</year>;<volume>86</volume>(<issue>11</issue>):<fpage>2278</fpage>&#x2013;<lpage>324</lpage>. doi:<pub-id pub-id-type="doi">10.1109/5.726791</pub-id>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Elman</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Finding structure in time</article-title>. <source>Cogn Sci</source>. <year>1990</year>;<volume>14</volume>(<issue>2</issue>):<fpage>179</fpage>&#x2013;<lpage>211</lpage>. doi:<pub-id pub-id-type="doi">10.1207/s15516709cog1402_1</pub-id>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Bahdanau</surname> <given-names>D</given-names></string-name></person-group>. <article-title>Neural machine translation by jointly learning to align and translate</article-title>. <comment>arXiv:1409.0473. 2014</comment>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Schuster</surname> <given-names>M</given-names></string-name>, <string-name><surname>Paliwal</surname> <given-names>KK</given-names></string-name></person-group>. <article-title>Bidirectional recurrent neural networks</article-title>. <source>IEEE Trans Signal Process</source>. <year>1997</year>;<volume>45</volume>(<issue>11</issue>):<fpage>2673</fpage>&#x2013;<lpage>81</lpage>. doi:<pub-id pub-id-type="doi">10.1109/78.650093</pub-id>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Devlin</surname> <given-names>J</given-names></string-name>, <string-name><surname>Chang</surname> <given-names>MW</given-names></string-name>, <string-name><surname>Lee</surname> <given-names>K</given-names></string-name>, <string-name><surname>Toutanova</surname> <given-names>K</given-names></string-name>, <string-name><surname>Hulburd</surname> <given-names>E</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>D</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>BERT: pre-training of deep bidirectional transformers for language understanding</article-title>. <comment>arXiv:1810.04805. 2018</comment>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lee</surname> <given-names>J</given-names></string-name>, <string-name><surname>Yoon</surname> <given-names>W</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>S</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>D</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>S</given-names></string-name>, <string-name><surname>So</surname> <given-names>CH</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>BioBERT: a pre-trained biomedical language representation model for biomedical text mining</article-title>. <source>Bioinformatics</source>. <year>2020</year>;<volume>36</volume>(<issue>4</issue>):<fpage>1234</fpage>&#x2013;<lpage>40</lpage>. doi:<pub-id pub-id-type="doi">10.1093/bioinformatics/btz682</pub-id>; <pub-id pub-id-type="pmid">31501885</pub-id></mixed-citation></ref>
</ref-list>
</back></article>