Multi-dimensional comparative learning disease prediction method and system based on large model enhancement

By constructing a global disease map and a sub-map of patient visits, and combining frequency domain, hierarchical, and temporal comparative learning, and integrating treatment response features, the problems of scarce labels, noise interference, and missing semantic hierarchy in disease prediction in EHR data are solved, achieving higher disease prediction accuracy and robustness.

CN121839097APending Publication Date: 2026-04-10YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing disease prediction methods suffer from problems such as scarce labels, class imbalance, noise interference, and missing semantic levels in EHR data, resulting in insufficient robustness and accuracy, making it difficult to effectively utilize frequency domain features and characterize the dynamic evolution of diseases.

Method used

We employ a multidimensional contrastive learning approach based on large model enhancement, combining graph neural networks, contrastive learning, and large language models. By constructing a global disease map and a patient visit submap, we perform frequency domain enhanced contrastive learning, patient visit submap-level contrastive learning, and temporal contrastive learning, and integrate treatment response features to improve the accuracy and robustness of disease representation.

Benefits of technology

It achieves synergistic optimization of global consistency, temporal coherence, and hierarchical structure, significantly improving the accuracy and interpretability of disease prediction, and can achieve significant performance improvements on real-world datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121839097A_ABST
    Figure CN121839097A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-dimensional comparative learning disease prediction method and system based on large model enhancement, provides a multi-dimensional comparative learning framework LLM-MDCLF, and is oriented to multi-label disease prediction under real world electronic health records. According to the framework, joint modeling is carried out from three paths of global, local and clinical semantics: in a global level, a frequency domain enhanced disease global graph is introduced, a high-frequency co-occurrence rule shared across patients is described through adaptive high-frequency mask disturbance, and robustness in a sparse and high-noise scene is improved; on the local individual level, modeling a patient disease course track based on time sequence comparison learning of the treatment subgraphs, and capturing a disease dynamic evolution process; on the semantic level, positive sample scarcity and false negative sample interference are relieved by combining subgraph comparison of an ICD hierarchical structure, treatment response characteristics generated by a large language model are introduced, the disease trend after intervention is explicitly described, and the method does not only depend on static diagnosis coding.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical artificial intelligence and clinical decision support system, and particularly relates to a multi-label disease prediction method based on electronic health records (EHR). BACKGROUND

[0002] Disease prediction is a key task to support clinical decision and medical resource allocation. With the popularity of electronic health records (EHR), deep learning-based prediction models, such as recurrent neural networks and graph neural networks, have been widely applied to mine the evolution rules of diseases from EHR data.

[0003] However, real-world EHR data often faces challenges such as label scarcity, class imbalance, high noise, and sparsity. Although existing methods use self-supervised techniques such as contrastive learning to alleviate the data labeling problem to some extent, their application in the EHR scenario still has obvious limitations, resulting in insufficient prediction performance and robustness. The existing technology has the following problems: Lack of frequency domain modeling perspective: existing methods usually only model in the time domain or graph structure, failing to effectively utilize frequency domain features. This leads to poor robustness of the model in sequences with abnormal fluctuations or low-frequency dominance, making it difficult to extract stable disease co-occurrence patterns from noisy environments.

[0004] Positive and negative sample imbalance and false negative sample interference: EHR data is naturally sparse, resulting in extremely limited positive samples in contrastive learning. Existing methods usually treat samples of different diseases as negative samples, which will misjudge a large number of semantically related potential positive samples as negative samples (i.e. "false negative samples"), dilute the supervision signal, and destroy the structure of the feature space.

[0005] Lack of modeling of treatment response characteristics: most existing methods treat diseases as static entities, relying only on ICD codes for representation, and fail to capture the dynamic evolution process of diseases after clinical intervention. For example, acute and chronic diseases have completely different responses to treatment, and ignoring this dimension makes it impossible for the model to accurately predict individualized disease trajectories. SUMMARY

[0006] The present application aims to solve the above problems, and provides a multi-dimensional contrastive learning disease prediction method and system based on large model enhancement. The method combines graph neural networks (GNN), contrastive learning (Contrastive Learning), and large language model (LLM) enhancement technology to address the problems of label scarcity, class imbalance, noise interference, and semantic hierarchy loss in EHR data, and improve the accuracy, robustness, and explainability of disease prediction.

[0007] The technical solution of the present application is as follows: A multidimensional contrastive learning-based disease prediction method based on large model enhancement includes the following steps: Construct a global disease graph and a patient visit subgraph. The global disease graph is used to depict the co-occurrence structure of diseases across patients, while the patient visit subgraph is used to capture the disease interaction patterns during individual patient visits. Based on the constructed graph structure, multi-dimensional contrastive learning is performed to learn global disease co-occurrence representation and individual disease course evolution representation; multi-dimensional contrastive learning includes at least frequency domain enhanced contrastive learning of the global disease graph, level contrastive learning of the medical visit subgraph, and temporal contrastive learning of the medical visit subgraph. Enhance the clinical semantics of disease representation by using treatment response features generated from large language models; By integrating features obtained from multi-dimensional comparative learning with treatment response features, and through temporal modeling and attention mechanisms, the system outputs multi-label disease prediction results for patients' future.

[0008] Furthermore, the frequency domain enhancement contrast learning of the global disease map specifically includes: A two-dimensional Fourier transform is performed on the node embedding representation of the global disease graph to obtain its frequency domain representation; Calculate the spectral energy in the frequency domain representation and generate an adaptive high-frequency mask based on the spectral energy; An adaptive high-frequency mask is used to filter the frequency domain to enhance high-frequency co-occurrence modes and suppress noise; Perform an inverse Fourier transform on the filtered frequency domain representation to obtain the frequency-enhanced graph embedding representation; Based on the frequency-domain enhanced graph embedding representation, the neighbor contrast loss is calculated to optimize the model.

[0009] Furthermore, the generation of the adaptive high-frequency mask specifically includes: Based on normalized spectral energy and preset threshold Through function Calculate the mask weights; Among them, except for the center point of the spectrum Except for the position whose weight is fixed at 1, the weights of the other positions are determined by... This allows for the determination of an approximate threshold selection while maintaining differentiability.

[0010] The above methods improve the robustness and discriminativeness of the model in sparse and noisy environments: by introducing frequency-domain enhanced global disease graph contrastive learning, this invention is the first to model disease co-occurrence relationships from a frequency domain perspective in disease prediction tasks. Utilizing an adaptive high-frequency masking perturbation strategy, it is possible to enhance the capture of high-frequency co-occurrence patterns shared across patients and effectively suppress noise interference, thereby learning more stable and discriminative disease representations in sparse and noisy real-world EHR data.

[0011] Further, the clinic sub-graph hierarchical contrast learning specifically comprises: Obtaining embedding representations of sub-class diseases in the clinic sub-graph and embedding representations of corresponding parent class disease categories; Calculating a loss function, the loss function being used to pull the distance between each sub-class disease embedding and its correct parent class category embedding in the representation space, while pushing away the distance between it and other parent class category embeddings.

[0012] Further, the loss function of the hierarchical contrast learning :

[0013] wherein, and are normalized sub-class disease embeddings and parent class category embeddings respectively, is an inner product, is a temperature coefficient.

[0014] Through the above method, the problem of dilution of supervised signals caused by the scarcity of positive samples and false negative samples is effectively alleviated: by designing a clinic sub-graph contrast mechanism based on the ICD semantic hierarchy, the parent-child class inheritance relationship in the disease ontology is explicitly utilized. This mechanism not only expands the effective positive sample constraints by mining hierarchical semantic information, but also identifies and suppresses the misleading signals of false negative samples caused by coarse-grained negative sample division, thereby preventing the loss of discriminative features and significantly improving the generalization ability of the model under the long-tail distribution.

[0015] Further, the treatment response feature generated by the large language model specifically comprises: Constructing a prompt word to guide the large language model to divide the disease into “curable type” or “continuous treatment type” according to the ICD code of the disease; Receiving the classification result output by the large language model and encoding it into a treatment response feature vector ; In the time series modeling process, the treatment response feature vector is integrated into the update of the patient's hidden state.

[0016] Through the above method, the ability to describe individualized disease evolution and treatment response is enhanced, making the prediction more in line with clinical reality: by combining clinic sub-graph time series contrast learning with treatment response features generated by a large language model (LLM), the invention can dynamically capture the disease development trajectory of individual patients. Instead of treating diseases as static labels, the model can perceive the dynamic evolution of diseases (such as healing, remission, or chronic management) after clinical interventions (such as medication, surgery), thereby generating more accurate and interpretable prediction results that are closer to real clinical processes.

[0017] Further, the method uses an M-GRU module for time series modeling, and the update gate and the reset gate are calculated by the following formula: , , wherein, and are indication vectors, respectively indicating specific diseases and disease categories appearing in the first visits; and are embedding representations at the disease level and the category level, respectively; are learnable parameters.

[0018] Further, after the fusion of the features obtained by the multi-dimensional contrast learning and the treatment response features, a time decay attention mechanism is used to aggregate the representations of multiple visits, specifically: The attention score of each time step visit representation is calculated ; The attention score is weighted and corrected by the time decay vector , to obtain , wherein is a decay factor; The corrected score is normalized by softmax to obtain the attention weight ; The attention weight is used to weight and sum the visit representations at each time step to obtain the final patient representation for prediction.

[0019] Further, the overall loss function of the method is composed of the main task loss and multiple contrast learning loss terms: , wherein, represents the binary cross-entropy loss of the main task; is the frequency domain enhanced contrast loss, which is used to enhance the semantic consistency of the global disease co-occurrence structure; and correspond to the visit disease subgraph and the visit disease category subgraph time series contrast loss, respectively, and together realize the time series consistency modeling at the dynamic visit subgraph level; is the hierarchical contrast loss for maintaining the semantic hierarchical relationship between the parent-child disease concepts, is the corresponding weight coefficient set for each loss term.

[0020] The application also comprises a multi-dimensional contrastive learning disease prediction system based on large model enhancement, and applies a multi-dimensional contrastive learning disease prediction method based on large model enhancement, comprising: a graph construction module for constructing a disease global graph and a patient visit subgraph; a global contrastive learning module for performing frequency domain enhancement-based contrastive learning based on the disease global graph; an individual contrastive learning module for performing time series contrastive learning and hierarchical semantic contrastive learning based on the patient visit subgraph; a treatment response enhancement module for introducing treatment response features generated by a large language model; a prediction module for fusing various types of representations and outputting future disease diagnosis prediction results of the patient.

[0021] Compared with the existing technology, the application has the following advantages: 1. Global consistency, time series continuity and hierarchical structure are synergistically optimized: the framework innovatively unifies the contrastive learning mechanisms of the frequency domain (global), time series (individual) and hierarchy (semantic) into one model. The three mechanisms synergize with each other, so that the disease representation learned finally has the sharing of global patterns, the dynamics of individual disease courses and the hierarchy of medical concepts, thereby providing a more information-rich and more reasonable structured feature basis for downstream disease prediction tasks; 2. Significant performance improvement on real-world datasets: the experimental results on two public large-scale EHR datasets MIMIC-III and MIMIC-IV show that the LLM-MDCLF framework of the application significantly outperforms a series of advanced baseline models in terms of weighted F1 score (w-F1) and Top-k recall rate (R@k) and other key indicators, fully verifying the effectiveness, advancement and generalization of the method in complex clinical scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 The figure is a schematic diagram of the LLM-MDCLF model framework of the application.

[0023] Figure 2 The figure is a frequency domain enhancement schematic diagram.

[0024] Figure 3 The figure is a contrast strategy schematic diagram.

[0025] Figure 4 The figure is a disease treatment response enhancement large model prompt word schematic diagram.

[0026] Figure 5 The figure is an ablation loss result bar chart.

[0027] Figure 6Figure for sensitivity experiment results on MIMIC-III dataset.

[0028] Figure 7 Figure for sensitivity experiment results on MIMIC-IV dataset.

[0029] Figure 8 Figure for comparison of results of different models on common disease and rare disease prediction tasks.

[0030] Figure 9 Figure for comparison results. DETAILED DESCRIPTION

[0031] It should be noted that the relational terms, such as first and second, and the like, are used solely to distinguish one from another entity or action, without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0032] The features and nature of the present application will become more apparent from the detailed description set forth below, taken in conjunction with the accompanying drawings.

[0033] Referring to Figures 1-9 , a multi-dimensional contrast learning disease prediction method based on large model enhancement, as shown in Figure 1 , the LLM-MDCLF framework proposed in the present application fuses global, hierarchical and time sequence three-dimensional modeling mechanisms: at the global level, the frequency domain enhancement is used to depict the disease co-occurrence relationship, at the individual level, the hierarchical and time sequence contrast learning is combined to capture the patient disease course dynamics and semantic association; meanwhile, the treatment response features generated by the large language model are introduced to enhance the semantic expression. Finally, after the integration of M-GRU and attention mechanism, the model realizes the accurate prediction of multi-label diseases, with high accuracy and robustness. Including the following contents: Disease global graph and visit sub-graph construction: Disease global graph construction: a disease global graph is constructed to depict the potential association relationship between all diseases. Its adjacency matrix counts the co-occurrence strength of diseases in all patient visits, which is used to capture the indirect disease connection across patients, defined as follows: , wherein, is the normalized disease co-occurrence frequency, is a set threshold. When the co-occurrence frequency of a disease pair is lower than the threshold, its weight is set to 0 to suppress the noise introduced by extremely low frequency co-occurrence. It is worth noting that the adjacency matrix is allowed to be asymmetric to reflect the possible asymmetric influence direction between different diseases.

[0034] Subsequently, a disease category global graph is further constructed to depict the higher-level disease category association. Each disease is mapped to its corresponding disease category according to the ICD code, which is defined as follows:

[0035] wherein, is the original diagnosis label set of the i-th sample, denotes the mapping function from ICD code to disease category, is the mapped category set.

[0036] Based on the disease category set , the adjacency matrix of the disease category global graph is constructed in the same way as formula , which captures the semantic co-occurrence patterns between diseases at the category level, providing a structural basis for subsequent hierarchical semantic modeling and temporal information fusion.

[0037] Visit subgraph construction: Diseases will appear, subside or disappear in the process of multiple visits of the same patient. To depict this temporal evolution process, the present application is based on the global graph adjacency matrix and , at the i-th visit of the patient, the corresponding visit subgraph and category visit subgraph are intercepted from the two types of global graphs respectively. The construction and encoding process of the two subgraphs are consistent. The following will be illustrated only by taking the disease visit subgraph as an example.

[0038] To fully model the association patterns between diseases, four feature matrices are defined: , , , . Among them, and represent the embedding representation of the specific diseases diagnosed in the current visit and their disease categories, and represent the embedding of the neighbor nodes corresponding to these diseases and categories. Among them, is the number of diseases involved in this visit, ​​for the number of disease categories, for the embedding dimension. The above matrix jointly encodes the structural relationship and semantic cues related to the disease course, providing distinguishable representations for subsequent prediction.

[0039] After aggregating the information of the disease nodes and their neighbor nodes, the representation of the subgraph corresponding to the visit is defined as: , , wherein, represents the disease node representation within the subgraph, represents its neighbor representation; ( ) is an indicator vector marking the actual diseases (and disease categories) appearing in the visit; ( ) is an indicator vector marking the associated diseases adjacent to these diseases (and disease categories). The symbol represents element-wise multiplication.

[0040] Subsequently, each subgraph representation is mapped to a hidden space. Specifically: , wherein, is an activation function, is a trainable linear transformation matrix, is the hidden dimension.

[0041] Multi-dimensional enhanced contrastive learning: The present application proposes a multi-dimensional enhanced contrastive learning framework based on the disease global graph and the visit subgraph, including three constraints of frequency domain, time sequence and hierarchy: frequency domain enhanced contrastive learning is performed on the global graph, the high and low frequency component separation and perturbation are used to alleviate the sparsity and long tail problem and strengthen the global semantics; time sequence contrastive learning is performed on the visit subgraph, the dynamic evolution of the individual disease course is depicted by constraining the adjacent visit representations; at the same time, hierarchical contrastive learning is introduced, the consistency constraint is performed on the representations of the sub-class diseases and their parent categories, and the cross-level semantic alignment is maintained. The three mechanisms work together to make the disease representation have global consistency, time sequence continuity and hierarchical structured expression.

[0042] Disease global graph frequency domain enhanced contrastive learning: as shown in Figure 2 , after constructing the disease global graph, the present application introduces a frequency domain view enhancement mechanism (as shown in Figure 2 ) on the node embedding thereof, and combines the subsequent contrastive learning strategy to form a frequency domain enhanced learning framework of the disease global graph. This module improves the discriminability and robustness of the global disease embedding through frequency domain perturbation and neighborhood contrast constraint.

[0043] The specific procedure is as follows. Given a global graph embedding , first perform a two-dimensional Fourier transform on it: , is the two-dimensional Fourier transform function; and perform a centering shift on the spectrum: , is the centering shift function; In actual implementation, the above operations are performed on two views of the global graph embedding and respectively, that is, they enter the frequency domain enhancement branch as input .

[0044] Subsequently, the spectral energy is calculated: , and normalized: , denotes the median of a set of numerical values; wherein is a stabilizing term to avoid the denominator approaching 0.

[0045] Based on the normalized energy , an adaptive high-frequency mask is constructed: , wherein , is used to implement approximate threshold filtering while maintaining differentiability, with higher weights obtained for high-energy regions and other regions suppressed. denotes the separation of tensors from the computational graph; After that, the spectrum is mask-filtered: , Then, through inverse Fourier transform and spectrum de-centering, the enhanced graph embedding is restored to the time domain representation: , This process is equivalent to performing frequency domain enhancement on the original embedding , : low-frequency components retain global co-occurrence structures, ensuring stability; high-frequency components are selectively amplified or suppressed under the action of the adaptive mask , highlighting distinguishable difference features. Ultimately, the enhanced global disease representation provides clearer discriminant boundaries in subsequent neighbor contrast training and improves robustness to noise interference.

[0046] To exploit the proximity property of diseases and their clinical co-occurring neighbors in the representation space, a neighborhood-aware contrastive learning objective is adopted on the global disease graph (see Figure 3 ). Each disease node is aligned with multiple positive samples instead of a single corresponding node: (i) its cross-view corresponding node, and (ii) its neighbor nodes in the same view and cross-view. This multi-positive sample design combines the global co-occurrence structure and cross-view consistency, while avoiding overfitting to a single positive pair. Figure 1

[0047] First, the effective positive sample number of a node is calculated, which contains the node itself and its neighbors in both views. Let be the adjacency matrix, then we have: , Subsequently, the similarity of the sample pair is temperature scaled and exponentiated: , where is the temperature coefficient.

[0048] Based on this, the intra-view similarity matrix and cross-view similarity matrix are defined. Let be the node embedding in two views, then: , , where is a similarity measure such as cosine similarity.

[0049] For each node , the numerator of the positive sample consists of three parts: the cross-view positive pair of itself (the corresponding node of the same node in two views): , the contribution of intra-view neighbors (the similarity of node and its neighbor in the same view): , and the contribution of cross-view neighbors (the similarity between node in the first view and its neighbor in the second view): , Combining the three parts, we get the total contribution of the positive sample of node : , The denominator represents the total similarity of all candidate contrastive items and removes the self-alignment item of the node itself in the same view​ : , The neighbor contrast loss of a node is defined as: , The overall loss is obtained by averaging over all nodes: , This loss allows each node to simultaneously pull closer multiple positive samples, including intra-view neighbors and cross-view neighbors, instead of a single positive pair; meanwhile, by normalization, it avoids highly connected nodes from dominating the gradient too much. This structure explicitly combines global co-occurrence structure and cross-view consistency, improving the robustness and discriminativeness of representation learning. Figure 1

[0050] Temporal contrastive learning on visit subgraphs: To enhance the model's ability to distinguish between different diseases, the present application introduces a temporal contrastive learning module on the visit subgraphs and combines a noise enhancement mechanism to improve the model's robust modeling ability for different disease combinations. The process is as follows: First, the disease hidden embedding and neighbor hidden embedding extracted from the visit subgraph and the visit category subgraph are combined and represented as a vector On this basis, a structured disturbance is injected into to generate an enhanced view, obtaining: , , where is the noise intensity (such as 0.1), is the scaling coefficient, and the sign direction of the original representation is preserved. This design applies amplitude disturbance without destroying the semantic direction, enabling the model to learn representations that are insensitive to slight representation shifts, thereby adapting to complex disease combinations and heterogeneous visit patterns.

[0051] In the contrastive learning phase, the visit sequence of the same patient is modeled in time sequence. The unenhanced representation of the first visit of this patient and the enhanced representation of the last visit are retained, and the InfoNCE loss is used for optimization: , where is the temperature coefficient, represents the similarity measure (such as cosine similarity). The numerator corresponds to the paired views of the same patient at different times, and the denominator considers the end representations of other patients as negative samples. For patients with only a single visit, the enhanced view can still serve as a positive sample pair, so this mechanism works regardless of the length of the sequence.

[0052] ​The temporal contrastive learning scheme captures two types of information: one is the representation change of the patient's disease course as time goes on, and the other is the stable consistency constraint between different visit stages. Combined with structured noise enhancement, the model's representation on the time axis is both more stable and more discriminative, enabling it to maintain higher sensitivity to disease progression characteristics and achieve better generalization ability.

[0053] Visit sub-layer contrastive learning: This contrastive learning module utilizes the hierarchical correspondence between "sub-class diseases and "parent class disease categories" to constrain the semantic structure in the encoding space. The goal is to bring the representation of each specific disease (sub-class) closer to its disease category (parent class), while pushing the representation of the disease away from parent class representations that do not belong to the same category, thereby obtaining a medical coding representation with hierarchical discriminability.

[0054] Specific definitions are as follows. Let the sub-class disease representation at time step be: , and the corresponding parent class (disease category) representation be: , where is the number of sub-classes, and is the number of parent classes. Let the parent class index of sub-class be

[0055] For each sub-class node , the hierarchical semantic contrastive loss is written as: , where denotes the L2 normalized representation, is the inner product, equivalent to the cosine similarity, and is the temperature coefficient. The numerator corresponds to the correct sub-class-parent class pairing, and the denominator enumerates all possible parent classes, so this form is equivalent to a softmax cross-entropy with temperature scaling.

[0056] The overall hierarchical contrastive learning objective is: This loss is only calculated on the sub-graph corresponding to the patient's last visit. The reason is that the patient's last visit is usually closest to the true outcome (subsequent diagnosis conclusion and disease progression), and the disease code at this time better reflects the clinically effective state. Focusing the hierarchical constraint on this stage can prioritize optimizing the disease representation that is most critical for prediction, enhancing the model's discriminability and generalization stability in downstream disease prediction.

[0057] LLM treatment response enhancement: In disease prediction research, traditional models usually only focus on the state change of the disease itself and combine its time series information to predict the next diagnosis of the patient. However, the real clinical diagnosis and treatment process is much more complex than this assumption. Patients often receive multiple treatment methods including medication, surgery, etc. during a hospitalization, making the subsequent development of the disease show a diversified trend: some diseases can be cured by single treatment, and the subsequent recurrence probability is very low; while some chronic or refractory diseases need long-term management, and patients may still show related symptoms in subsequent visits.

[0058] In view of the deficiency of the traditional model in capturing the dynamic change after the treatment of the disease, the application proposes to introduce a large model assisted disease treatment response enhancement mechanism. Specifically, a large language model (LLM) is used to automatically determine the treatment response type of the disease based on the ICD-9 code, and output a single numerical label (without any additional text or explanation) to form a disease treatment response feature vector . Among them, the value 0 represents a curable disease (such as pneumonia

[486] , appendicitis [540.9], etc.), and the value 1 represents a disease that needs continuous treatment (such as diabetes [250.0], hypertension [401.9], etc.).

[0059] To this end, the disease treatment response feature embedding is defined as:

[0060] Among them, is a prompt word constrained large language model discriminant function, and its output rule is:

[0061] Therefore, , where is the total number of diseases.

[0062] In specific implementation, an LLM prompt word template (LLM Prompt) as shown in Figure 4 is designed. The prompt word clearly stipulates that the system needs to perform a binary classification task based on the ICD-9 code, that is, to judge whether the disease needs long-term management. The classification rules are as follows: (1) Cancer diseases (ICD-9: 140-239) are automatically determined as 1; (2) Postoperative status V code is determined as 0; (3) Acute attack of chronic disease (such as acute heart failure [428.0]) is still determined as 1; (4) Diseases that cannot be clearly judged are defaulted to 1.

[0063] The large model directly outputs a classification result (0 or 1) after receiving the prompt word, and the generated label is used as a treatment response feature of the disease. This feature can effectively supplement the deficiencies of traditional models in treatment feedback modeling, enabling the model to consider both disease properties and treatment responses when predicting disease development trends, thereby obtaining more dynamic prediction capabilities that are consistent with clinical practice.

[0064] Model disease prediction: The present application uses M-GRU to perform time series modeling on the visit subgraph of each patient to capture the dynamic changes of the disease course during multiple visits. Unlike standard GRU, M-GRU is structurally modified for matrix input, explicitly fusing specific disease information and its superior disease category information at each visit, and introducing treatment response-related features, thereby more accurately describing the evolution of patient status over time.

[0065] At time step , the update form of the hidden state is: , wherein, is the update gate, is the candidate hidden state, is an additional hidden vector obtained by fusing the treatment response feature, used to emphasize the change trend of the disease state after intervention.

[0066] To explicitly utilize multi-granularity disease information in the gating unit, the present application introduces both the original disease embedding and the corresponding disease category embedding into the update gate and the reset gate. Specifically: , , wherein, and are indicator vectors, respectively marking the specific disease and its disease category appearing in the th visit; and are embedding representations at the disease level and the category level, respectively; is a learnable parameter. This design enables the gating mechanism to simultaneously perceive fine-grained diagnosis levels and classification levels, thereby encoding hierarchical consistency in hidden state updates.

[0067] After obtaining the hidden state at each time step, the main activation is extracted using dimension-wise max pooling to obtain the representation of each visit: , Subsequently, to distinguish the contributions of different time steps, the present application introduces time decay attention. First, the attention score is calculated for each time step input vector ,​ where, is the learnable parameter, is the length of the visit sequence.

[0068] To highlight the influence of recent visits on the current state, we introduce a time decay vector: , and perform element-wise weighting correction: , Then, we get the attention weights by softmax normalization: , Finally, we aggregate the visit representations at each time step using the weights to get the time-aware representation of the patient: , This design works through three synergies. First, the M-GRU hidden state continuously passes the patient's disease evolution over time. Second, the gating unit explicitly integrates the multi-granularity structure information of diseases and disease categories, and superimposes the treatment response signal . Third, the time-decay attention highlights the explanatory power of recent visits on the patient's current state. Thus, we can get a robust and discriminative dynamic visit representation to provide a structured time-series input for subsequent disease prediction tasks.

[0069] Loss function: Finally, the model loss function expression is as follows: , where, represents the binary cross-entropy (BCE) loss of the main task; is the frequency domain enhanced contrast loss, which is used to enhance the semantic consistency of the global disease co-occurrence structure; and correspond to the visit disease subgraph and visit disease category subgraph time series contrast loss, respectively, which together realize the time series consistency modeling at the level of dynamic visit subgraph; is the hierarchical contrast loss used to maintain the semantic hierarchical relationship between parent-child disease concepts.

[0070] In the optimization process, the corresponding weight coefficients need to be set for each loss term. Generally speaking, for datasets with more uneven disease distribution or more prominent long-tail characteristics, the weight of should be appropriately increased to strengthen the global unsupervised signal constraint on the overall semantic structure.

[0071] This loss design constructs a multi-dimensional collaborative contrastive learning framework: the frequency domain level models the global pattern, the sub-layer level models intra- and cross-patient relationships, and the hierarchical semantic level models the conceptual structure, thereby realizing a unified multi-task optimization mechanism at the global, local, and semantic levels.

[0072] This application also includes a multidimensional contrastive learning disease prediction system based on large model enhancement, which applies a multidimensional contrastive learning disease prediction method based on large model enhancement, including: The graph construction module is used to build a global disease graph and a patient visit subgraph. The global contrastive learning module is used for frequency domain enhancement contrastive learning based on the global disease map; The individual comparison learning module is used for temporal comparison learning and hierarchical semantic comparison learning based on the patient visit subgraph; The treatment response enhancement module is used to incorporate treatment response features generated by the large language model; The prediction module is used to fuse various representations and output the patient's future disease diagnosis prediction results.

[0073] experiment: Evaluation metrics: For the diagnostic prediction task, this application uses the following evaluation metrics to assess model performance: Weighted F1 score (w-F1): Used to measure the overall performance of the model across all diagnostic categories. It can provide a more reasonable evaluation when the class distribution is imbalanced, and is particularly suitable for multi-label classification scenarios.

[0074] Top-k recall (R@k): Used to evaluate the proportion of correct diagnoses included in the top k predictions, thus reflecting the model's ability to identify the most relevant diagnoses.

[0075] Dataset Description: To verify the effectiveness of the proposed model, experiments were conducted on two publicly available clinical electronic medical record datasets, MIMIC-III and MIMIC-IV. The statistical information is shown in Table 1. Due to some time overlap between 2013 and 2019, to avoid sample redundancy and data leakage, 10,000 patient samples were randomly selected from MIMIC-IV for experimental analysis.

[0076] Table 1 Dataset Details

[0077] Baseline Models: To evaluate the performance of the LLM-MDCLF framework, it was compared with ten baseline models covering traditional statistical methods and deep learning techniques: RETAIN (2016): Diagnostic prediction model that identifies key historical visit records and clinical features through a reverse temporal attention mechanism.

[0078] Dipole (2017): Utilizes a bidirectional recurrent neural network to process electronic health record (EHR) data, integrating past and future visit information.

[0079] Timeline (2018): Models the time-varying influence of chronic disease diagnoses on future visits through temporal decay factors of medical codes.

[0080] Deepr (2016): End-to-end deep learning system that extracts features from medical records and predicts future risks based on local clinical patterns.

[0081] GRAM (2017): Integrates medical ontologies into deep learning models, utilizing hierarchical relationships and related medical concepts to construct strong disease representations.

[0082] G-BERT (2019): Captures medical code relationships through graph neural networks (GNNs) and incorporates a Transformer-based encoder for prediction.

[0083] HiTANet (2020): Hierarchical temporal attention network that combines time-aware Transformers to simulate physicians' risk prediction decision-making processes.

[0084] CGL (2021): Applies co-graph learning and TF-IDF analysis of patient-disease interactions to optimize patient embedding representations.

[0085] Chet (2022): Models clinical associations between diseases and patients through dynamic graphs, exploring potential embedding spaces.

[0086] BioDynGrap (2024): Dynamic graph encoding combined with temporal reasoning to capture the evolutionary nature of disease progression.

[0087] HiLSTD (2023): Hierarchical self-attention model that integrates local and global features for effective prediction of heart failure.

[0088] IICL (2024): Integrates graph modeling and contrastive learning to capture explicit and implicit disease relationships for enhanced patient representations.

[0089] LLM-DG (2025): Combines discharge summaries and large language model enhancements to model patients inter- and intra- to enhance patient representations.

[0090] Parameter design: In the experimental setup, the model parameters were randomly initialized, while the hyperparameters and activation functions were carefully tuned on the validation set. Specifically, the threshold was set to 0.01; the dimensions of the global embedding matrix were both 48, the dimensions of the visit subgraph hidden embedding were set to 32, and the attention dimensions were also set to 32.

[0091] In the diagnosis prediction task, the MIMIC-III and MIMIC-IV datasets used the M-GRU structure with cell dimensions of 256 and 350, respectively; the dimensions of the treatment response embedding were consistent with the corresponding M-GRU cells, and the dropout for all layers was set to 0.25.

[0092] Based on a comprehensive consideration of the balance between F1 value and recall rate, the loss function weight was set to: 、 、 The same configuration was used for both datasets.

[0093] The model training used the Adam optimizer with a learning rate of 0.01 and 100 training rounds. All experiments were completed on a Linux-based computing platform with hardware configurations including an NVIDIA RTX 3090 (24GB of video memory), 24GB of memory, and an Intel Xeon Gold 6133 CPU. The experimental environment was built based on the PyTorch framework, fully utilizing GPU parallel acceleration to significantly improve model training and inference efficiency.

[0094] Through experimental verification, the proposed model performed excellently on the MIMIC-III and MIMIC-IV datasets. Through experiments on different modules, the importance of multi-dimensional contrastive learning and large model enhancement in disease prediction was verified.

[0095] Table 2 Diagnosis prediction results on MIMIC-III and MIMIC-IV datasets, evaluated using w-F1 and R@k

[0096] This table 2 shows the diagnosis prediction results of the model on the MIMIC-III and MIMIC-IV two public electronic medical record datasets, with the evaluation indicators being weighted F1 value (w-F1) and top-k recall rate (R@k). Overall, the proposed LLM-MDCLF achieved the best performance on both datasets, demonstrating its robustness and generalization ability in complex clinical scenarios.

[0097] ​In the comparative method, the traditional time series model (RETAIN, Deepr, Dipole) is limited to linear memory structure, and it is difficult to capture the nonlinear disease dependence across visits, so the overall performance is low. The model based on graph modeling (GRAM, G-BERT, CGL, Chet) has improved in modeling multiple disease co-occurrence structure, but its expression ability is still limited due to insufficient integration of semantic layer information. BioDynGraph and IICL have relatively improved on the MIMIC-III dataset by introducing dynamic graphs and contrastive learning mechanisms, with w-F1 reaching 25.21% and 24.87%, respectively.

[0098] In contrast, LLM-DG and LLM-MDCLF both introduce large model knowledge enhancement at the semantic modeling level. It is worth noting that LLM-MDCLF further combines frequency domain enhancement and multi-dimensional semantic contrastive strategies, achieving significant outperformance on both datasets: on MIMIC-III, w-F1, R@10, and R@20 reach 26.91%, 30.51%, and 40.27%, respectively; on MIMIC-IV, it further improves to 31.07%, 34.21%, and 43.16%, respectively, all of which are superior to LLM-DG.

[0099] The results show that the multi-dimensional enhancement contrastive learning mechanism proposed by LLM-MDCLF can effectively capture the multi-frequency dependence and hierarchical semantic association between diseases, thereby achieving higher accuracy and generalization in the disease prediction task across datasets.

[0100] Ablation experiment: Table 3 Ablation loss results

[0101] Table 3 and Figure 5 The ablation experiment results of the model on the MIMIC-III and MIMIC-IV datasets are shown to verify the independent contribution and synergistic effect of key components such as disease global graph frequency domain enhancement modeling (Global), visit subgraph time series modeling (Temporal), visit subgraph hierarchical modeling (Hierarchy), and treatment response enhancement (Treatment Response). The results show that removing any module will cause a significant decrease in performance, indicating that each module plays an important role in the overall framework.

[0102] Specifically, after removing the Global module, the w-F1 on MIMIC-III and MIMIC-IV drops to 24.57% and 29.84%, respectively, and the R@20 drops to 37.87% and 41.55%, respectively. This indicates that the frequency domain enhanced global modeling can effectively capture the high-frequency co-occurrence characteristics and shared patterns across patients, and is an important part of improving disease prediction accuracy and recall rate.

[0103] When the Temporal module is removed, the performance on MIMIC-III decreases the most (w-F1 from 26.91% to 23.33%, R@20 from 40.27% to 37.80%). This indicates that temporal contrast learning is crucial in modeling disease evolution paths and inter-visit dependencies. Without this module, the model cannot fully capture the dynamic characteristics of the disease course, resulting in a significant decrease in recall rate, especially in long-term prediction scenarios.

[0104] After removing the Hierarchy module, the w-F1 on MIMIC-III and MIMIC-IV drops to 24.91% and 30.73%, respectively, and the R@20 drops to 38.87% and 42.58%, respectively. This result shows that hierarchical semantic modeling can significantly improve the structural consistency and semantic differentiation ability of the model under a multi-level label system, helping to improve the recall performance of long-tail categories.

[0105] Removing the Treatment Response module has the most significant impact on MIMIC-IV (w-F1 from 31.07% to 26.40%, R@20 from 43.16% to 38.86%), indicating that the treatment response features generated by the large model effectively compensate for the deficiencies of traditional diagnosis embeddings in the semantic level, and can significantly improve the recognition rate and recall ability of the model for chronic diseases and persistent disease courses.

[0106] In summary, the four modules complement each other in function: the Global module strengthens cross-patient semantic sharing, the Temporal module captures dynamic changes in the disease course, the Hierarchy module maintains semantic structural consistency, and the Treatment Response module introduces clinical feedback and semantic enhancement. The complete model achieves the highest w-F1 and R@k indicators on both datasets, fully verifying the effectiveness and robustness of LLM-MDCLF in multi-source feature fusion, temporal modeling, and semantic enhancement.

[0107] Meta-learning: To verify the effectiveness of the LLM-MDCLF model in real clinical prediction tasks, three patients (denoted as P1, P2, and P3) were randomly selected from the MIMIC-III dataset. – Case studies were conducted and the prediction results were quantified and explained based on ICD-9-CM codes. The experiments compared the performances of Chet and GCL with LLM-MDCLF in terms of the number of correctly predicted diseases (TP), the number of missed diagnoses (FN), the recall rate R@40, and the weighted F1 indicator. The results are shown in Table 1, where the left table lists the correctly predicted and missed diagnosis codes for each model, and the right table visualizes the prediction performance. Overall, the average R@40 and F1 of LLM-MDCLF are higher than those of the baseline models, indicating its stability and accuracy in complex multi-disease coexistence scenarios. Figure 9

[0108] Patient (Cardiovascular and respiratory complications): The true diagnoses included coronary atherosclerotic heart disease (414.01), pneumonia (486), pacemaker implantation status (V45.81), heart failure (428.0), and atrial fibrillation (427.31). LLM-MDCLF successfully identified 6 diseases and only missed 3 (997.3 postoperative infection, 263.9 malnutrition, 518.5 respiratory failure), with R@40=0.67 and F1=0.2449. In contrast, Chet and GCL each missed 4 diseases, with R@40=0.56. The results show that LLM-MDCLF captures high-frequency co-occurrence relationships (such as the coupling of 414.01 and 428.0) through frequency domain enhancement, enabling better identification of complex cardiorespiratory diseases.

[0109] Patient (Circulatory and digestive system diseases): The main diseases included gastrointestinal bleeding (578.9), hypertension (401.9), anemia (285.1), hyponatremia (276.51), and urinary tract infection (599.0). LLM-MDCLF accurately predicted 5 diseases and missed 4 (569.84 colonic perforation, 569.82 intestinal fistula, 425.1 hypertrophic cardiomyopathy, etc.), with R@40=0.63 and F1=0.2083, significantly higher than Chet and GCL (R@40=0.50, F1=0.1667). The model performs well in capturing the interaction features of the circulatory and digestive systems, indicating that its hierarchical semantics and temporal contrast mechanism can make full use of the ICD-9 hierarchy.

[0110] Patient (Metabolic and chronic disease complications): ​Diseases include obesity (278.00), hyperlipidemia (272.4), hypertension (401.9), chronic pulmonary disease (519.19), dilated cardiomyopathy (425.4), anemia (285.9). LLM-MDCLF correctly identifies 6, misses 4 (V10.41 history of malignant tumor, V44.0 stoma status, V12.72 history of diabetes, V15.82 history of surgery), R@40=0.60, F1=0.2400. In contrast, Chet and GCL miss more (5-6), average F1 drops to below 0.20. LLM-MDCLF distinguishes between curable and long-term management diseases (e.g. 401.9, 272.4) with the help of LLM-generated treatment response features, effectively improving the precision and consistency of chronic disease identification.

[0111] In summary, LLM-MDCLF achieves R@40=0.67 / 0.63 / 0.60, average F1=0.23 in three random patient samples, significantly better than the baseline. The model can combine the hierarchical semantics of ICD-9, frequency domain comorbidity features, and treatment response signals to achieve high-precision multi-label prediction of complex disease courses, providing more interpretable and robust support for clinical decision-making.

[0112] Impact of loss weight: To evaluate the impact of key hyperparameters on model performance, the present application conducts a systematic sensitivity experiment. The model training contains multiple auxiliary loss terms, and the weight coefficients (i.e. 、 、 、 ) of different loss terms will directly affect the optimization process and the final prediction results. To analyze the role of these weights in overall performance, we adjust their values one by one and observe the model performance.

[0113] Given that the second and third losses are both derived from the temporal comparison mechanism of the visit subgraph, they are highly related in function, and the present application combines the two into the same weight group, denoted as , to reduce variable interference and highlight key factors. The final experiment sets three weight perturbation schemes: Only change , while fixing and ; Only change , while fixing and ; Only change , while fixing and .

[0114] Figure 6The sensitivity results are shown on the MIMIC-III dataset. Figure 7 The corresponding results on the MIMIC-IV dataset are presented. The results show that the weights of each loss term have different impacts on the overall prediction performance. A reasonable weight configuration can maintain the core performance of the main task while enhancing the synergistic effect between different auxiliary objectives, thereby improving overall prediction accuracy and model stability.

[0115] Impact: To evaluate the frequency domain enhanced contrast learning loss weights for the global disease map. To assess the impact on model performance, this application conducted sensitivity experiments on the MIMIC-III and MIMIC-IV datasets.

[0116] On the MIMIC-III dataset, as Increasing from 0.001 to 0.05 resulted in a continuous improvement in model performance. The optimal value is achieved when the F1 score is 0.2698. When the value is further increased to 0.1, the performance tends to plateau. This trend indicates that moderately increasing the weight of global contrast in the frequency domain helps enhance the model's capture of high-frequency semantic patterns, thereby improving the stability of global disease relationship modeling and prediction; however, when... When the frequency domain contrast signal is too large, it will interfere with the gradient update of the main task, leading to optimization offset and performance degradation.

[0117] On the MIMIC-IV dataset, the trend is basically the same as that of MIMIC-III, but the performance peaks are more pronounced. The model in... The frequency domain enhancement mechanism achieved its best performance at 0.3116, followed by a slight decrease. These results indicate that in larger-scale, more structurally complex medical record data, the frequency domain enhancement mechanism significantly improves the global representation quality of the model.

[0118] Overall, The model exhibits a unimodal sensitivity to performance: too small It is difficult to effectively guide global semantic alignment, and the excessive size This will weaken the learning signal for the main task. Based on the results of both sets of experiments, this application ultimately selected... This is a unified setting to achieve the optimal balance between primary task optimization and global comparison constraints.

[0119] Impact: To analyze the temporal comparison of the patient visit subgraph, learn the loss weights. To assess the impact on model performance, this application conducted controlled variable experiments on the MIMIC-III and MIMIC-IV datasets.

[0120] On the MIMIC-III dataset, the model achieves the best performance at with a Best F1 of 0.2687. As increases, the performance fluctuates slightly and shows a downward trend, and after , the performance decreases significantly. This phenomenon indicates that too strong dynamic contrast constraints can cause the model to overfit the temporal neighboring relationship in short sequence scenarios, thereby weakening the global semantic consistency. A moderately smaller helps the model capture the evolution pattern between visits while avoiding disturbing the main task optimization.

[0121] On the MIMIC-IV dataset, the model achieves the best performance at with a Best F1 of 0.3074. Compared to MIMIC-III, the larger data size and longer time span enable the moderate weight of temporal contrast learning to better reflect the advantages of dynamic consistency constraints, thereby improving the overall prediction ability and convergence stability. In summary,

[0122] the model performance also shows a single-peak sensitivity feature. A smaller helps capture key evolution features at the temporal level, while an excessively large will cause dynamic subgraph representation over-regularization, affecting the global optimization effect. Based on the results of the two experiments, the is finally fixed at 0.01 to balance between temporal consistency modeling and main task optimization.

[0123] Influence of the visit subgraph hierarchy: To explore the influence of the visit subgraph hierarchy on the model performance, the sensitivity experiment is performed on the MIMIC-III and MIMIC-IV datasets. This module performs parent-child semantic alignment in the disease ontology hierarchical structure to constrain the structural consistency between different hierarchical embeddings, thereby improving the semantic robustness and interpretability of the model. On the MIMIC-III dataset, the model achieves the best performance at

[0124] with a Best F1 of 0.2659, and then as increases, the performance shows a slow downward trend. This result shows that in the scenario of small sample size and shallow class hierarchy, a moderate semantic hierarchy constraint can maintain the consistency between parent-child class representations, while an excessively large will weaken the dominant role of the main task gradient, causing the model to learn to deviate.

[0125] ​​On the MIMIC-IV dataset, the model exhibits a clear unimodal trend. When As the value increased from 0.001 to 0.05, the model performance gradually improved. The best F1 score reached a peak of 0.3077, followed by a slight decrease. This trend indicates that, under more complex disease hierarchies and richer sample distributions, hierarchical contrastive learning has a significant beneficial effect on semantic structure preservation, and reasonable weight settings can effectively promote the consistency of multi-level representations.

[0126] Overall, The changes in weights exhibit a unimodal sensitivity to model performance: excessively small weights fail to adequately reinforce hierarchical semantic constraints, while excessively large weights lead to over-regularization, weakening the model's task-fitting ability. Based on the results of both sets of experiments, this application ultimately selects... This is the default setting, aiming to achieve an optimal balance between maintaining the hierarchical structure and optimizing tasks.

[0127] Prediction of common and emerging diseases: In medical practice, a common disease refers to a diagnosis that has already appeared in a patient's medical history, while an emerging disease is one that first appears during visit T+1 and has not been diagnosed in the previous visit T. Predicting common diseases relies on accurately extracting diagnostic patterns from the historical record, while predicting emerging diseases requires discovering the implicit relationship between known conditions and potential new diagnoses.

[0128] Figure 8 The results of different models on prediction tasks for common diseases and emerging diseases are presented. Overall, the proposed LLM-MDCLF achieves significant advantages in both types of tasks, validating its robustness and generalization ability in multi-frequency disease prediction scenarios.

[0129] In the common disease prediction task (Figure (a)), LLM-MDCLF achieved R@10 and R@40 metrics of 20.84% ​​and 25.95%, respectively, both surpassing existing methods. This performance improvement stems from the frequency-domain enhanced global disease graph mechanism introduced at the global level. Through Fourier transform and adaptive high-frequency mask perturbation, it effectively strengthens high-frequency co-occurrence patterns and suppresses low-frequency noise, enabling the model to more accurately capture stable co-occurrence relationships among common diseases. Simultaneously, the multi-view contrastive learning strategy allows the model to optimize representations at both the global and local levels, thereby improving the discriminative power and feature consistency of high-frequency diseases.

[0130] In the rare disease prediction task (Fig. (b)), the R@10 and R@40 of LLM-MDCLF reached 9.67% and 24.93%, respectively, where the R@10 was slightly lower than the Chet model, and the R@40 was significantly ahead of all baselines. This advantage benefited from the model's adoption of the visit sub-graph hierarchy and temporal contrast learning at the individual level, combined with the treatment response features generated by the large language model (LLM), which strengthened the modeling of the potential semantics and treatment evolution of low-frequency diseases. Through hierarchical semantic alignment and dynamic trajectory contrast, the model can still maintain stable discrimination ability and cross-frequency generalization in data sparse scenarios.

[0131] In summary, LLM-MDCLF achieves the coordinated optimization of high-frequency and long-tail diseases through frequency-enhanced global modeling and hierarchical local temporal modeling. This mechanism achieves leading performance in both common and rare disease prediction tasks, fully verifying the effectiveness of its frequency-aware denoising, multi-dimensional semantic contrast, and treatment response enhancement strategies, providing a unified and efficient solution for multi-frequency disease prediction in complex clinical scenarios.

[0132] The above-described embodiments only express the specific implementation of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the protection scope of the present application. It should be noted that for ordinary skilled persons in the art, without departing from the technical concept of the present application, a number of modifications and improvements can be made, which are within the protection scope of the present application.

Claims

1. A multidimensional contrastive learning-based disease prediction method based on large model enhancement, characterized in that, Includes the following steps: Construct a global disease graph and a patient visit subgraph. The global disease graph is used to depict the co-occurrence structure of diseases across patients, while the patient visit subgraph is used to capture the disease interaction patterns during individual patient visits. Based on the constructed graph structure, multi-dimensional contrastive learning is performed to learn global disease co-occurrence representation and individual disease course evolution representation; multi-dimensional contrastive learning includes at least frequency domain enhanced contrastive learning of the global disease graph, level contrastive learning of the medical visit subgraph, and temporal contrastive learning of the medical visit subgraph. Enhance the clinical semantics of disease representation by using treatment response features generated from large language models; By integrating features obtained from multi-dimensional comparative learning with treatment response features, and through temporal modeling and attention mechanisms, the system outputs multi-label disease prediction results for patients' future.

2. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 1, characterized in that, The disease global map frequency domain enhanced contrast learning specifically includes: A two-dimensional Fourier transform is performed on the node embedding representation of the global disease graph to obtain its frequency domain representation; Calculate the spectral energy in the frequency domain representation and generate an adaptive high-frequency mask based on the spectral energy; An adaptive high-frequency mask is used to filter the frequency domain to enhance high-frequency co-occurrence modes and suppress noise; Perform an inverse Fourier transform on the filtered frequency domain representation to obtain the frequency-enhanced graph embedding representation; Based on the frequency-domain enhanced graph embedding representation, the neighbor contrast loss is calculated to optimize the model.

3. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 2, characterized in that, The generation of the adaptive high-frequency mask specifically includes: Based on normalized spectral energy and preset threshold Through function Calculate the mask weights; Among them, except for the center point of the spectrum Except for the position whose weight is fixed at 1, the weights of the other positions are determined by... This allows for the determination of an approximate threshold selection while maintaining differentiability.

4. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 1, characterized in that, The specific aspects of the sub-layer-level comparison learning for medical visits include: Obtain the embedding representation of the subclass disease in the medical visit subgraph and the embedding representation of its corresponding parent class disease category; Calculate the loss function, which is used to bring each subclass disease embedding closer to its correct parent class embedding in the representation space, while pushing it further away from other parent class embeddings.

5. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 4, characterized in that, The loss function of the hierarchical contrastive learning : in, and These are the normalized subclass disease embeddings and parent class category embeddings, respectively. For inner product, This is the temperature coefficient.

6. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 1, characterized in that, The therapeutic response features generated by the large language model specifically include: Construct prompt words to guide the large language model to classify diseases into "curable" or "requiring continuous treatment" based on their ICD codes; It receives the classification results output by a large language model and encodes them as a treatment response feature vector. ; In the time series modeling process, the treatment response feature vector It is integrated into the patient's hidden status updates.

7. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 1, characterized in that, The method employs an M-GRU module for timing modeling, and the M-GRU update gate... and reset door Calculated using the following formula: , , in, and As indicator vectors, each is labeled with a specific symbol. The specific diseases that occurred during the second visit and their respective disease categories; and These are embedding representations at the disease level and the category level, respectively; These are learnable parameters.

8. The disease prediction method based on large model enhancement and multidimensional contrastive learning according to claim 1, characterized in that, After fusing the features obtained from multi-dimensional contrastive learning with the treatment response features, a time-decay attention mechanism is used to weight and aggregate the representations from multiple visits, specifically: Calculate attention scores for each time step of the visit. ; Through the time decay vector The attention score is weighted and adjusted to obtain ,in It is the attenuation factor; The attention weights are obtained by performing softmax normalization on the corrected scores. ; Using attention weights The patient visit representations at each time step are weighted and summed to obtain the final patient representation used for prediction.

9. A multidimensional contrastive learning-based disease prediction method based on large model enhancement according to claim 1, characterized in that, The overall loss function of the method It consists of a weighted sum of the main task loss and multiple contrastive learning loss terms: , in, This represents the binary cross-entropy loss of the main task; A frequency-domain enhanced contrast loss is used to enhance the semantic consistency of the global disease co-occurrence structure; and The temporal comparison loss corresponds to the subgraph of the disease visited and the subgraph of the disease category visited, respectively, and together they achieve temporal consistency modeling at the dynamic subgraph level. Hierarchical contrast loss is used to preserve the semantic hierarchy between parent and child disease concepts. Set appropriate weighting coefficients for each loss item.

10. A multidimensional contrastive learning disease prediction system based on large model enhancement, characterized in that, The application of the multidimensional contrastive learning disease prediction method based on large model enhancement as described in any one of claims 1-9 includes: The graph construction module is used to build a global disease graph and a patient visit subgraph. The global contrastive learning module is used for frequency domain enhancement contrastive learning based on the global disease map; The individual comparison learning module is used for temporal comparison learning and hierarchical semantic comparison learning based on the patient visit subgraph; The treatment response enhancement module is used to incorporate treatment response features generated by the large language model; The prediction module is used to fuse various representations and output the patient's future disease diagnosis prediction results.