A sepsis early warning method based on causal chain alignment lightweight large language model

By aligning lightweight large language models with causal chains, a causal graph is constructed and an interpretable inference chain is generated. This solves the problems of lag and high resource consumption in the early warning of sepsis in existing technologies, and realizes efficient and accurate sepsis early warning in the ICU environment.

CN122158162APending Publication Date: 2026-06-05CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI
Filing Date
2026-02-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing early warning technologies for sepsis suffer from problems such as lag, insufficient specificity, and high resource consumption, making it difficult to achieve efficient and interpretable clinical decision-making in resource-constrained medical environments.

Method used

We employ a lightweight large language model based on causal chain alignment to provide interpretable early warning of sepsis by constructing a causal graph, weighting nodes, filtering outlier data, generating causal chains, and combining them with the lightweight large language model for reasoning.

Benefits of technology

It improves the accuracy and stability of early warning of sepsis, reduces the computational resource requirements, and enables rapid deployment and interpretable reasoning in ICU environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122158162A_ABST
    Figure CN122158162A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of intelligent medical treatment, and particularly relates to a sepsis early warning method based on a causal chain alignment lightweight large language model, comprising obtaining clinical time series data of a sepsis patient in a period before the onset of the disease, and constructing a causal graph according to the characteristics of the data of each patient; based on medical knowledge, weighting two nodes with an edge relationship in the causal graph; converting the clinical data of a patient to be diagnosed into natural language text, and screening abnormal data therefrom, taking the abnormal data as a root node to screen a causal chain from the causal graph; taking the natural language text and the causal chain of the patient as inputs of a lightweight large language model, judging whether the patient will have a sepsis attack within N hours in the future, and giving a reasoning chain. The present application effectively improves the stability and accuracy of sepsis early warning on the basis of maintaining the advantages of low computational overhead and easy deployment in a real ICU environment of the lightweight model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of intelligent medical care and artificial intelligence, and specifically relates to an early warning method for sepsis based on a lightweight large language model with causal chain alignment. Background Technology

[0002] Sepsis is a life-threatening organ dysfunction caused by a dysregulation of the host's response to infection, and it is one of the syndromes with the highest mortality rate in critical care medicine. According to domestic and international studies, the incidence of sepsis in intensive care units (ICUs) is significantly higher than that in general hospitalized patients. In some large tertiary hospital ICUs, the annual incidence rate can reach 20%–40%, and the mortality rate of severe sepsis and septic shock remains as high as 35%–50%. Because the early clinical manifestations of sepsis are insidious and its progression is rapid, if it is not identified and intervened before organ function deteriorates, the patient's risk of death will increase exponentially.

[0003] Existing clinical early warning technologies still have significant limitations in practical applications. Traditional clinical scoring systems, such as the Sequential Organ Failure Assessment (SOFA), the rapid sequential organ failure assessment (qSOFA), and the National Early Warning Score (NEWS), while easy to implement, often rely on obvious physiological abnormalities, exhibit significant lag, struggle to capture early, hidden risks, and frequently miss atypical cases. Infection biomarkers (such as CRP and PCT), although commonly used, lack specificity, are easily affected by non-infectious inflammation, and cannot be used as a sole diagnostic criterion. With the development of artificial intelligence technology, predictive models based on machine learning and deep learning have shown the potential to outperform traditional scoring methods. However, ICU clinical data generally suffers from high missing rates and irregular sampling, and existing models often rely on forced imputation, which easily introduces noise and bias. More importantly, mainstream machine learning and deep learning models are often "black box" systems, unable to explain the pathophysiological logic behind the warnings, making it difficult for clinicians to trust and adopt their recommendations. Although large language models (LLMs) have powerful semantic understanding capabilities, general-purpose ultra-large-scale models (such as GPT-5) consume huge amounts of computational resources and pose data privacy risks, making them difficult to deploy in resource-constrained hospitals.

[0004] Therefore, there is an urgent need for a method that can intelligently provide early risk warnings of sepsis and offer interpretable reasoning. This method should not only assist clinicians in making timely and effective decisions through an interpretable reasoning process, but also be lightweight to enable rapid deployment and efficient operation in resource-constrained healthcare environments. Summary of the Invention

[0005] To address the problems existing in current technologies and to achieve interpretable, accurate, and resource-efficient clinical decision-making in the early stages of sepsis, this invention proposes an early sepsis warning method based on a lightweight large language model aligned to causal chains, specifically including the following steps:

[0006] S1. Obtain clinical time-series data of sepsis patients in the period before the onset of the disease. This data includes vital signs data, laboratory test data and demographic data. Construct a causal graph based on the characteristics of each patient's data.

[0007] S2. Based on medical knowledge, weight the two nodes with edge relationships in the causal graph;

[0008] S3. Convert the clinical data of the patients to be diagnosed into natural language text, and filter out abnormal data. Use the abnormal data as the root node to filter out the causal chain from the causal graph.

[0009] S4. The patient's natural language text and causal chain are used as input to a lightweight large language model. The lightweight large language model determines whether the patient will experience a sepsis attack within the next N hours based on the input content and provides the inference chain.

[0010] The beneficial effects of this invention are as follows: This invention provides an early warning method for sepsis based on a lightweight large language model with causal chain alignment. Starting from multidimensional clinical time series, it extracts key causal paths in the evolution of sepsis through PCMCI+ temporal causal structure construction and medical prior knowledge enhancement. Simultaneously, it combines clinical thought chain data generated by a large teacher model and uses LoRA technology to efficiently fine-tune the parameters of the lightweight large language model, enabling the model to acquire domain-specific clinical reasoning capabilities. Furthermore, through the construction of causal chain-guided prompts, the model can follow the real pathological causal links during reasoning, outputting more interpretable risk prediction results. In summary, this invention effectively improves the stability, accuracy, and clinical interpretability of early sepsis warning while maintaining the advantages of lightweight models with low computational overhead and ease of deployment in real ICU environments. Attached Figure Description

[0011] Figure 1 This is a flowchart of the sepsis early warning method based on a lightweight large language model with causal chain alignment as described in this invention.

[0012] Figure 2 This is a flowchart illustrating the patient text description generation process described in this invention.

[0013] Figure 3 This is a structural diagram of the patient prompt words constructed according to the present invention. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] This invention proposes an early warning method for sepsis based on a lightweight large language model with causal chain alignment, specifically including the following steps:

[0016] S1. Obtain clinical time-series data of sepsis patients in the period before the onset of the disease. This data includes vital signs data, laboratory test data and demographic data. Construct a causal graph based on the characteristics of each patient's data.

[0017] S2. Based on medical knowledge, weight the two nodes with edge relationships in the causal graph;

[0018] S3. Convert the clinical data of the patients to be diagnosed into natural language text, and filter out abnormal data. Use the abnormal data as the root node to filter out the causal chain from the causal graph.

[0019] S4. The patient's natural language text and causal chain are used as input to a lightweight large language model. The lightweight large language model determines whether the patient will experience a sepsis attack within the next N hours based on the input content and provides the inference chain.

[0020] like Figure 1 This embodiment describes the sepsis early warning method based on a lightweight large language model aligned with causal chains proposed in this invention from four parts: data acquisition and semantic transformation, structural causal model construction, knowledge distillation and lightweight model fine-tuning, and causal chain-guided reasoning prediction.

[0021] This embodiment is validated using the standard dataset from the large-scale public challenge Early Prediction of Sepsis from ClinicalData: The PhysioNet / Computing in Cardiology Challenge 2019, and the ICU dataset extracted from the large-scale public medical database MIMIC-IV according to the challenge rules. Both datasets use a unified data structure and variable standards, ensuring the comparability and generalization of the method of this invention across different data sources.

[0022] First, multidimensional clinical time-series data of ICU patients were acquired. The clinical variables used in this invention are derived from continuous monitoring data during the patients' hospitalization, including three main categories: vital signs, laboratory tests, and demographic data, totaling 40 clinical variables. Specifically, vital signs indicators include: heart rate (HR), pulse oxygen saturation (O2Sat), body temperature (Temp), systolic blood pressure (SBP), mean arterial pressure (MAP), diastolic blood pressure (DBP), respiratory rate (Resp), and end-tidal carbon dioxide partial pressure (EtCO2). Laboratory test indicators include: base excess (BaseExcess), bicarbonate (HCO3), and inhaled oxygen concentration (F). iO2 (%), pH, arterial blood carbon dioxide partial pressure PaCO2 (mmHg), arterial blood oxygen saturation SaO2 (%), aspartate aminotransferase AST (IU / L), blood urea nitrogen BUN (mg / dL), alkaline phosphatase Alkaline phosphatase (IU / L), blood calcium (mg / dL), chloride (mmol / L), creatinine (mg / dL), direct bilirubin (mg / dL) (mg / dL), Glucose (mg / dL), Lactate (mg / dL), Magnesium (mmol / dL), Phosphate (mg / dL), Potassium (mmol / L), Total Bilirubin (mg / dL), Troponin I (ng / mL), Hematocrit (%), Hemoglobin (g / dL), Partial Coagulation Active enzyme time (PTT) (in seconds), white blood cell count (WBC) (count / L), fibrinogen (mg / dL), platelet count (count / mL); demographic data include: age (years), gender (0 for female, 1 for male), ICU unit identifier (Unit 1 (MICU), Unit 2 (SICU), time from admission to ICU (HospAdmTime) (h), and ICU stay duration (ICULOS) (h).

[0023] Furthermore, the patient data used in this invention may also include a unique patient identifier (Patient ID) and an observation timestamp. Based on the Sepis-3 clinical diagnostic criteria, a SepisLabel was generated for each time point to indicate whether the patient had entered the sepsis risk window. Specifically, at the current time... It is already at the actual onset time of sepsis Within the first 6 hours (i.e., meeting the requirements) When ), define SepisLabel = 1; otherwise, when When this occurs, SepsisLabel is defined as 0. This embodiment uses the above-described unified method to construct the data foundation for early sepsis warning.

[0024] This embodiment proposes an early warning method for sepsis based on a lightweight large language model with causal chain alignment, comprising the following steps:

[0025] Step 1: Combining Figure 2 The system acquires multidimensional clinical time-series data of patients within a preset observation window, calculates the statistical characteristics of the time-series data, and converts the numerical features into natural language semantic descriptions based on predefined medical reference ranges and semantic rules to obtain natural language text describing the patient's physiological state. For example, for a specific indicator, it is necessary to acquire parameters such as the mean and extreme values ​​of the indicator within the observation window, and determine whether the indicator is within a predefined medical reference range or whether the rate of change is within the normal range to form an evaluation of the indicator. Then, combined with the patient's demographic information, a final patient text description is formed.

[0026] Step 2: Use the PCMCI+ algorithm to mine the temporal causal skeleton from clinical data, combine medical knowledge to weight the importance of variables, construct a structural causal model containing time-delayed causal relationships, and quantify the strength of causal edges;

[0027] S201: Timing Causality Detection Based on PCMCI+ Algorithm

[0028] Multivariate clinical time series after step S1 It adopts the PCMCI+ time-delay causality discovery algorithm from the open-source computing framework and sets the maximum time delay. The PCMCI+ algorithm identifies causal relationships between variables under different lags through conditional independence tests. For any two variables... 𝑖 , 𝑗 and lag PCMCI+ tests the conditional independence. If the conditional independence hypothesis is rejected, then a causal edge is considered to exist, and PCMCI+ outputs the lag adjacency tensor. This represents the adjacency matrix when the time delay parameter is τ. Adjacency matrix The element in the i-th row and j-th column represents whether parameter i from time τ ago is independent of parameter j at the current time. If they are independent, then... ,otherwise .

[0029] At this point, the entire set of causal edges can be represented as:

[0030] ;

[0031] in, For a set of feature nodes; It is a set of adjacency matrices; This represents the adjacency matrix when the time delay parameter is τ. .

[0032] S202: Causal Edge Extraction and Causal Strength Quantification

[0033] PCMCI+ also provides conditional correlation statistics (such as partial correlation coefficient ParCorr) for each causal edge.

[0034] Causality strength is defined as the absolute value of the partial correlation coefficient.

[0035] Specifically, use The mask guarantees that "weights are assigned only to existing edges": ,in This represents the Hadamard element-wise product. Let represent the partial correlation coefficient matrix between nodes when the time delay is τ. By weighting the adjacency matrix using these partial correlation coefficients, a weighted causal graph is obtained, represented as follows: , For the set of causal strengths, This represents the causal strength matrix between nodes when the time delay is τ.

[0036] S203: Causal structure modification and weight enhancement incorporating medical knowledge:

[0037] Building upon the statistical causal results mined by PCMCI+, this embodiment further introduces prior knowledge from clinical medicine to provide medical constraints and supplements to the causal structure. This prior knowledge includes the organ system affiliation of each clinical variable (e.g., cardiovascular system, respiratory system, kidney function, liver function, coagulation function, etc.), whether it is a SOFA score-related item, and its clinical importance level in the occurrence and progression of sepsis. This medical prior knowledge is organized in the form of structured rules to guide the weighted correction of causal strength.

[0038] Specifically, based on the statistical causal results mined by PCMCI+, medical prior knowledge is introduced to fuse and correct the importance of variables, and the weights of causal edges are enhanced, thereby constructing the final causal structure under medical constraints, including:

[0039] 1. Based on the pathological mechanisms and clinical scoring system related to sepsis, the variable set was analyzed. Perform medical stratification and construct a medical priority function:

[0040]

[0041] in, This represents a set of key pathological variables; in this embodiment, it refers to characteristic indicators that directly affect the determination of whether a patient has sepsis. This represents the set of variables related to the scoring system; in this embodiment, it refers to the set of variables that affect the scoring system. Indicators such as white blood cell concentration can be used as indicators to judge sepsis, so they are included in the set of key pathological variables. While the patient's body temperature does not directly affect the judgment of sepsis onset, changes in body temperature may be related to white blood cell concentration due to inflammation in the body. Therefore, body temperature is included in the set of relevant variables in the scoring system. .

[0042] 2. Based on the cause-and-effect diagram The out-degree and in-degree of each node are statistically analyzed as characteristic indicators.

[0043]

[0044]

[0045] in, This represents the in-degree of the i-th node in the causal graph; This represents the out-degree of the i-th node in the causal graph.

[0046] Then, the topological importance of the i-th node in the causal graph is calculated. , is represented as:

[0047]

[0048] Where, 𝜆1 and 𝜆2 are balance coefficients.

[0049] 3. The importance score for integrative medicine and topology is:

[0050]

[0051] in, These represent computational fusion medicine and topological importance scores, respectively. When, the weighting coefficients of topological importance and priority.

[0052] 4. Based on the importance score after fusion, the enhancement coefficient of the i-th node in the causal graph is defined as:

[0053]

[0054] The causal strength after medical enhancement is defined as:

[0055]

[0056] The weight matrix is ​​updated as follows:

[0057]

[0058] For causal relationships that are not identified by statistical methods but are clearly established in medicine, corresponding causal edges can be added based on medical rules, and preset initial weights can be assigned. These edges are then uniformly incorporated into the causal graph, which is ultimately represented as follows:

[0059]

[0060] Specifically, regarding the standard dataset S201 of Early Prediction of Sepsis from Clinical Data: ThePhysioNet / Computing in Cardiology Challenge 2019... It combines efficiency and algorithm performance. The organ system attribution of clinical variables in S203 is shown in Table 1.

[0061] Table 1. Organ System Attribution Table for Clinical Variables

[0062] Organ system Representative clinical variables cardiovascular system HR (heart rate), MAP (mean arterial pressure), SBP (systolic blood pressure), DBP (diastolic blood pressure), Lactate Respiratory system <![CDATA[Resp (Respiratory rate), O2Sat (Pulse oximetry saturation), FiO2 (Fraction of inspired oxygen)]]> Renal function system Creatinine (creatinine) and BUN (blood urea nitrogen) Liver function system Bilirubin_total (total bilirubin), Bilirubin_direct (direct bilirubin), AST (aspartate aminotransferase) Coagulation system Platelets (platelet count), PTT (partial thromboplastin time), Fibrinogen (fibrinogen) Blood system WBC (white blood cell count), Hct (hematocrit), Hgb (hemoglobin) Metabolic / Inflammatory System Temp (body temperature), Glucose (blood sugar) Sepsis outcome variables (target) Sepsis Label

[0063] Statistical information on the causal structure model in S204 is shown in Tables 2 and 3:

[0064] Table 2. Top eight key clinical variables in terms of composite importance

[0065] Ranking Variable name Importance score Organ system 1 MAP (Mean Arterial Pressure) 0.96 cardiovascular system 2 Lactate 0.91 Metabolic system 3 WBC (white blood cell count) 0.88 Blood system 4 Bilirubin_total (Total bilirubin) 0.85 Liver function system 5 <![CDATA[FiO2 (Fraction of inspired oxygen)]]> 0.82 Respiratory system 6 Creatinine 0.78 Renal function system 7 Platelets 0.73 Coagulation system 8 Temp (body temperature) 0.71 Inflammation / Metabolic System

[0066] Table 3. Causal Edge Statistics and Time Lag Distribution

[0067] property quantity Total number of causal edges 378 Simultaneous effect (τ=0) Number of causal edges 254 Number of causal edges with a 1-hour lag 64 2-hour lag causal edge quantity 36 3-hour lag causal edge quantity 24 Average strength of causal edge 0.37±0.12

[0068] In this embodiment, the abnormal indicator node is extracted as the root node, and the nodes with edge relationships with this indicator node are found in the causal graph as causal chains. For example, if the abnormal node is indicator A, other nodes with edge relationships with indicator A are found in the causal graph to obtain causal chains, which can be represented as indicator A→indicator B→indicator C→……. An indicator can have multiple causal chains. Causal chains are used to prompt the generation of thought chains.

[0069] Step 3: Generate CoT (Cognitive Chain) data containing a stepwise clinical reasoning process using the teacher's large language model. Based on this CoT data, fine-tune the pre-trained lightweight pedestal large language model using low-rank adaptation (LoRA) technology, while introducing a joint loss function, including classification loss, generation loss, and causal path consistency loss based on a structural causal model. This enables the model to acquire domain-specific clinical reasoning capabilities; specifically:

[0070] Knowledge distillation and thought chain construction: The powerful general-purpose language model DeepSeekV3.1 was selected as the teacher model. The "patient natural language semantic description" generated in step one was used as input, and the structural causal model constructed in step S204 was used as the basis. From its causal diagram Extract the set of strong causal edges that satisfy the causal strength threshold. Using a pre-defined prompt template, the teacher model is constrained to only use causal paths that conform to the defined causal relationship for reasoning. Under this prompt constraint, the teacher model generates a chain of thought (CoT). The prompt template explicitly constrains the model to include: key indicator anomaly identification, physiological mechanism correlation analysis (e.g., "hypotension leads to insufficient tissue perfusion"), and a final sepsis risk conclusion (0 or 1). To ensure data quality, the CoT generated by the teacher model undergoes consistency verification and screening, including:

[0071] (1) Consistency of conclusions: The conclusions of reasoning must be consistent with the Sepsis-3 standard label;

[0072] (2) Factual accuracy: The data cited in the reasoning must come from the patient’s actual records to avoid the generation of hallucinations;

[0073] (3) Logical integrity: The reasoning steps must form a closed loop.

[0074] (4) Causal consistency: Extract the set of causal relationships of variables from the thought chain and connect it with the set of strong causal edges. Match and filter out inconsistent samples.

[0075] After verification and screening, a structured "input text - inference chain - prediction result" instruction fine-tuning dataset was constructed for subsequent lightweight model training.

[0076] Lightweight Model Fine-Tuning (LoRA): Qwen2.5-7B-Instruct was selected as the lightweight base model (Student Model). Low-Rank Adaptation (LoRA) technique was employed for efficient parameter fine-tuning. Compared to full-parameter fine-tuning, LoRA only trains the low-rank matrix, significantly reducing memory requirements. Furthermore, a joint optimization objective function was constructed during the fine-tuning stage, including classification loss, generation loss, and causal consistency constraint loss based on a structural causal model. This function simultaneously constrains the prediction results, the quality of inference chain generation, and the consistency between the inference path and the structural causal relationship. This allows the lightweight model to enhance its ability to follow the real pathological causal chain while ensuring prediction accuracy, thereby obtaining domain-specific clinical reasoning capabilities for sepsis early warning tasks.

[0077] Step 4: For the patient to be predicted, based on their available clinical variables, dynamically extract relevant strong causal paths from the structural causal model, construct a prompt word containing patient text and causal chain guidance, input it into a fine-tuned lightweight large language model, and output the sepsis risk prediction result and an interpretable reasoning process. Specifically:

[0078] Patient-specific variable extraction: For any patient P to be predicted, identify its current time step. The set of all non-missing valid clinical variables .

[0079] Construction of dynamic causal chains: For each node, a subgraph is extracted from the global structural causal model (SCM) constructed in step two. To avoid information overload, a causal strength threshold is set. Only retain edge strength. A strong causal path. For example, if a patient has "elevated body temperature" and "abnormal white blood cell count," and a strong causal path exists in the SCM (Surveillance Pathology). If WBC is involved, then the path will be extracted.

[0080] Prompt assembly and reasoning: The selected causal paths are converted into natural language descriptions (e.g., "According to the causal model: low mean arterial pressure (MAP) may lead to elevated lactate levels, indicating insufficient tissue perfusion") and embedded into the "Validated Causal Paths" section of the inference prompt. The complete prompt, which includes (1) a semantic description of the patient's physiological state, (2) a medical knowledge definition (Sepsis-3), and (3) a patient-specific causal path, is input into the Qwen2.5-7B model after fine-tuning in step three.

[0081] Figure 3This invention provides a prompt word template, firstly defining roles for the large model, then predefining task objectives, then setting the patient's natural language semantics, secondly extracting causal paths, and finally providing specific diagnostic analysis and results. The model output consists of two parts: First, the output reasoning process, which partially combines stepwise analysis of key indicators to explain how the causal chain supports risk judgment (e.g., "Patient's MAP continues to decrease, combined with elevated lactate, consistent with low perfusion characteristics..."). This process generates the patient's natural language semantics based on the input patient information, extracts abnormal indicators from the patient's natural language semantics, such as indicators higher or lower than a predefined medical period or with a rate of change exceeding a predefined medical interval, and uses these abnormal indicators as root nodes to extract causal chains from the causal graph to assist in the generation of the reasoning process; second, the output final prediction, which in this implementation needs to explicitly output 0 (low risk) or 1 (high risk).

[0082] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for early warning of sepsis based on a lightweight large language model with causal chain alignment, characterized in that, Specifically, the following steps are included: S1. Obtain clinical time-series data of sepsis patients in the period before the onset of the disease. This data includes vital signs data, laboratory test data and demographic data. Construct a causal graph based on the characteristics of each patient's data. S2. Based on medical knowledge, weight the two nodes with edge relationships in the causal graph; S3. Convert the clinical data of the patients to be diagnosed into natural language text, and filter out abnormal data. Use the abnormal data as the root node to filter out the causal chain from the causal graph. S4. The patient's natural language text and causal chain are used as input to a lightweight large language model. The lightweight large language model determines whether the patient will experience a sepsis attack within the next N hours based on the input content and provides the inference chain.

2. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment as described in claim 1, characterized in that, The process of training a lightweight large language model includes: A pre-trained large language model is used as the teacher model, and a lightweight large language model is used as the student model. The teacher model takes natural language text and causal chains as input, outputs whether the patient will develop sepsis in the next N hours, and generates inference results; The student model also takes natural language text and causal chains as input, outputs whether the patient will develop sepsis in the next N hours, and generates inference results; at the same time, the student model fine-tunes the parameters of the student network by minimizing classification loss, inference result generation loss and causal consistency loss.

3. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 2, characterized in that, The total loss used when fine-tuning the student network is expressed as: ; in, This is the total loss function; For classifying losses, The weight hyperparameters for the classification loss; To generate loss, The weight hyperparameters for generating the loss; This is due to the loss of causal consistency.

4. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 3, characterized in that, Classification loss Represented as: ; Where N is the total number of training samples; For the first The true label of each sample; For the first The probability of a sample being diagnosed with sepsis.

5. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 3, characterized in that, Generation loss Represented as: ; Where N is the total number of training samples; For the first Total number of tokens in the thought chain text of each sample; To input for a given patient and before Under the condition of the nth token, the nth The conditional probability of each token; For the first The first sample thought chain text One token; For the first The first sample thought chain text The sequence of all tokens preceding each token; For the first Natural language text of each patient.

6. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 3, characterized in that, Loss of causal consistency Represented as: ; in, The set of nodes in the causal graph identified from the inference results of the student model; This is the set of nodes in the causal graph used by the student model to generate diagnostic results. This indicates finding the number of elements in a set. This indicates finding the intersection of sets.

7. A method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to any one of claims 1 to 6, characterized in that, The process of constructing a causal graph based on the characteristics of each patient's data includes:

201. For data from the same patient, set a maximum time delay parameter, and calculate the adjacency matrix of any two parameter variables with time delay parameters of 0, 1, 2, ..., and the maximum time delay parameter based on PCMCI+.

202. Use the partial correlation coefficient between the two parameters to weight the adjacency matrix to obtain the overall causal edge set. If the two features have data from multiple patients, then the weighted average of the partial correlation coefficients of the multiple patient data is used as the weight.

8. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 7, characterized in that, The overall causal edge set is represented as: ; in, For a set of feature nodes; It is a set of adjacency matrices; This represents the adjacency matrix when the time delay parameter is τ. Adjacency matrix The element in the i-th row and j-th column represents whether parameter i from time τ ago is independent of parameter j at the current time. If they are independent, then... ,otherwise .

9. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 7, characterized in that, The causal graph, weighted by partial correlation coefficients, is then enhanced based on medical and topological knowledge, including: All parameters are stratified, with those directly related to the diagnosis of sepsis set as the highest priority, those with a significant impact on the highest priority set as the second highest priority, and other indicators set as the lowest priority. Calculate the in-degree and out-degree of each node in the causal graph after weighting by partial correlation coefficients to obtain topological importance; The priority of medical knowledge and topological importance are weighted and fused to obtain the score of integrative medicine and topological importance; Enhancing causal graphs based on fusion medicine and topological importance scoring.

10. The method for early warning of sepsis based on a lightweight large language model with causal chain alignment according to claim 1, characterized in that, Vital signs data include: heart rate, pulse oxygen saturation, body temperature, systolic blood pressure, mean arterial pressure, diastolic blood pressure, respiratory rate, and end-tidal carbon dioxide partial pressure; laboratory test data include: base excess, bicarbonate, inhaled oxygen concentration, pH, arterial blood carbon dioxide partial pressure, arterial blood oxygen saturation, aspartate aminotransferase, blood urea nitrogen, alkaline phosphatase, blood calcium, chloride, creatinine, direct bilirubin, blood glucose, lactate, magnesium, phosphate, potassium, total bilirubin, troponin, hematocrit, hemoglobin, partial thromboplastin time, white blood cell count, fibrinogen, and platelet count; demographic data include: age, sex, ICU unit identifier, surgical intensive care unit number, time from admission to ICU, and length of stay in the ICU.