CHB patient HBsAg removal prediction model based on time sequence, construction method and application

By constructing time-series-based LSTM and MLP models, the limitations of existing HBsAg clearance prediction models in terms of predictive performance and strict sample collection timing were addressed, achieving highly accurate HBsAg clearance prediction and reducing the cost and risk of clinical applications.

CN121905552APending Publication Date: 2026-04-21PEKING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PEKING UNIV
Filing Date
2025-12-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing HBsAg clearance prediction models have limitations in predictive performance and strict requirements for sample collection timing in CHB treatment, making them difficult to apply widely in clinical practice. Furthermore, long-term use of PegIFNα leads to high costs and adverse reactions.

Method used

We employ time-series-based LSTM and MLP models, combined with Boolean tensors and marker time points, to construct the HepCure-HBV model by preprocessing and training dynamic HBsAg data. This model utilizes the dynamic information in the HBsAg time-series data to predict HBsAg clearing.

Benefits of technology

It significantly improved the accuracy and applicability of HBsAg clearance prediction, with an AUROC of 0.991 in clinical trial data and 0.988 in real-world data, reducing the difficulty of clinical data sampling and decreasing the risk of adverse reactions and economic burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121905552A_ABST
    Figure CN121905552A_ABST
Patent Text Reader

Abstract

The invention provides a CHB patient HBsAg removal prediction model based on a time sequence, a construction method and application, and belongs to the technical field of model construction, the construction method comprises the steps of data processing, model structure construction and model training, HBsAg time sequence data features of a CHB patient are extracted, a training sample is constructed in combination with a condition-mark time point frame, and a CHB patient HBsAg removal prediction model is constructed. And constructing a prediction model by adopting a structure combining an LSTM network and an MLP. The model is named as HepCre-HBV and can be packaged into a webpage tool, HBsAg observation values of a patient and corresponding time data are received, mark time points are automatically matched, and the HBsAg removal prediction probability is output. The method solves the problems of insufficient information, difficult sampling and poor generalization ability of a traditional model input at a fixed time point, has the advantages of high AUROC, good calibration and strong anti-data sparsity ability, can help clinicians to dynamically adjust treatment schemes and reduce the economic burden and adverse reaction risk of patients, and has important clinical application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model building technology, and in particular to a time-series-based HBsAg clearance prediction model for CHB patients, its construction method, and its application. Background Technology

[0002] Chronic hepatitis B (CHB) is a global health problem. The main goal of its clinical treatment is to achieve sustained clearance of hepatitis B surface antigen (HBsAg) after treatment cessation, aiming for seroconversion or even complete clearance. Currently, clinical treatments for CHB include nucleoside analogues (NAs) and interferon (IFNα). While NAs effectively inhibit viral replication, monotherapy with them is insufficient to achieve HBsAg seroconversion. Current research indicates that combining NA-treated CHB patients with pegylated interferon-alpha (PegIFNα) can improve HBsAg seroconversion rates, becoming a crucial strategy for achieving HBsAg clearance in CHB patients.

[0003] To achieve HBsAg clearance, CHB patients often require prolonged drug treatment, and a significant proportion fail to achieve this goal even after long-term treatment. Even among previously treated CHB patients, the optimal combination therapy of non-alcoholic adenosine monophosphate (NAs) and pegylated fibroblasts (PegIFNα) only achieves an HBsAg seroconversion rate of approximately 30%, and patients typically require 2-3 years of continuous treatment. Furthermore, long-term use of PegIFNα is relatively expensive and carries various potential adverse reactions (such as flu-like symptoms, myelosuppression, mental disorders, autoimmune diseases, retinopathy, and kidney damage), increasing the risks associated with long-term use. Therefore, when aiming for clinical cure of CHB, predicting whether CHB patients can ultimately achieve HBsAg seroconversion (clinical cure) based on early treatment response levels is crucial. This can reduce the economic burden on patients and the risk of adverse reactions, and optimize individualized treatment strategies.

[0004] In recent years, research has focused on developing methods to predict HBsAg seroconversion in the early stages of CHB treatment. Previous studies have shown that dynamic changes in HBsAg levels during treatment (including absolute values ​​and changes relative to baseline) are key indicators for predicting seroconversion outcomes in patients.

[0005] Currently, the mainstream technique for predicting HBsAg clearance is based on logistic regression using cross-sectional data. This method typically uses baseline or a specific time point during treatment as input for hepatitis B-related indicators (such as HBsAg), and outputs whether the patient has achieved HBsAg clearance after treatment. A logistic regression model is used to establish a simple mathematical relationship between the input and output.

[0006] With the development of artificial intelligence and machine learning, more and more studies are using machine learning algorithms to learn the complex relationship between input hepatitis B-related indicators and treatment outcomes.

[0007] For example, in a study of the China Chronic Hepatitis B Clinical Cure (Mount Everest) Project (hereinafter referred to as the "Mount Everest Project"), which uses the same dataset as this invention, the hepatitis B surface antibody (HBsAb) at the end of treatment and the duration of PegIFNα treatment were used as inputs. The support vector machine (SVM) method was used to predict HBsAg clearance, and the area under the ROC curve (AUROC) was finally achieved to be 0.736.

[0008] Because CHB treatment is a long process, input at a single time point cannot fully capture the information about CHB disease progression and treatment, thus limiting the predictive performance of such models. Furthermore, predictive models with fixed time-point inputs often have stricter requirements regarding the timing of sample collection, restricting their widespread clinical application.

[0009] The published study predicting HBsAg clearance after treatment based on HBsAg time-series data is the GOLDEN model proposed by Fan Rong et al. This study employed longitudinal discriminant analysis (LoDA) in statistics, assuming that each patient's HBsAg level decreased exponentially over time after treatment. A multivariate linear mixed-effects model was used to fit the data and obtain individual parameters. Discrimination was then based on the differences in the distribution of these individual parameters between the HBsAg-cleared and non-cleared groups.

[0010] Since the data used in this study came from clinical trials of NAs monotherapy, the HBsAg clearance rate was low (only 2.4%), and the relevant model evaluation indicators were not comparable when the event rates in the data differed significantly.

[0011] Therefore, the predictive performance of the LoDA method was re-evaluated using data from the "Mount Everest" project, yielding an AUROC of 0.891 and a prediction accuracy of 0.840, which is acceptable but still has room for improvement. Although the LoDA method uses longitudinal data, the logarithmic linear relationship between HBsAg and time remains a strong assumption, which may not be able to handle phenomena such as delayed response, brief bounce, and accelerated clearance in real-world HBsAg dynamics.

[0012] Therefore, this invention proposes a time-series-based HBsAg clearance prediction model for CHB patients, its construction method, and its application. Summary of the Invention

[0013] This invention provides a time-series-based HBsAg clearance prediction model for CHB patients, its construction method, and its application, in order to solve the aforementioned technical problems.

[0014] This invention provides a method for constructing a time-series-based HBsAg clearance prediction model for CHB patients, comprising: Step 1: Preprocess the target data of CHB patients based on time series; Step 2: Build the model structure, specifically including: Step 2.1: The input structure includes a three-dimensional tensor features with dimensions [B,T,2], where B is the batch size, T is the time length, 2 is HBsAg and its corresponding time features, a Boolean tensor mask with dimensions [B,T], and a tensor Landmark with dimensions [B], which is the normalized value of the marker time point L. Step 2.2: Use a single-layer unidirectional LSTM to extract information from the time series data with a dropout rate of 0.3. Use the hidden state output at the end as the information after compression of the sequence data. Step 2.3: Combine the hidden state information of the LSTM terminal and the Landmark information using a multilayer perceptron to complete the nonlinear transformation; The log-odds value output by the MLP is transformed by Sigmoid to obtain the predicted probability of HBsAg clearance. Step 3: Train the model based on the preprocessed data. BCEWithLogitsLoss is used as the loss function, Adam optimizer is used for parameter optimization, gradient clipping with a maximum norm of 5.0 is set, and training is terminated using an early stopping mechanism with the validation set AUROC as the monitoring metric.

[0015] Preferably, the target data of CHB patients based on time series are preprocessed, including: Step 1.1: Data reading and preprocessing: Read and retain the patient's unique identifier, time point, hepatitis B surface antigen, response label and event occurrence time from the treatment-related data of CHB patients. Each patient corresponds to multiple HBsAg observation data at different time points. Step 1.2: Data standardization: Time information is standardized using the maximum follow-up time, and the HBsAg index is standardized using logarithmic standardization; Step 1.3: Dataset partitioning: While keeping the response rates close, the dataset is partitioned into training, validation, and test sets using random numbers. Step 1.4: Conditional Sample Construction: Iterate through each preset marker time point L. For sample individuals who have not reached the endpoint at time L (RESPONSE=1 and TTE>L), use only the sequence data with time ≤L to construct a sample combination containing a patient's unique identifier, marker time point L, time series up to that point, HBsAg sequence, and a label. The label indicates whether the patient has achieved HBsAg clearance within the time interval (L, maximum follow-up time). Step 1.5: Sequence Alignment and Masking: Use a sequence alignment strategy to pad each batch of input sequences with blanks according to the longest sequence length, and use a mask input marker to fill the blank data.

[0016] Preferably, the maximum follow-up period is 168 weeks, and the marker time point L is preset to at least one of 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132 and 144 weeks.

[0017] Preferably, after training the model based on the preprocessed data, the process further includes: The predicted probability of HBsAg clearance in CHB patients is obtained based on the trained model.

[0018] This invention provides a time-series-based HBsAg clearance prediction model for CHB patients, constructed using any of the aforementioned methods, named the HepCure-HBV model. It includes an LSTM network layer and an MLP layer. The LSTM network layer is used to extract feature information from the HBsAg time-series data, and the MLP layer is used to integrate the feature information extracted by the LSTM with the marker time point information to output the HBsAg clearance prediction probability.

[0019] Preferably, the parameter set of the model is derived from clinical trial data and / or training results from data from the China Chronic Hepatitis B Clinical Cure Project.

[0020] This invention provides an application of a time-series-based HBsAg clearance prediction model for CHB patients, including: The Python-based Streamlit package packages the aforementioned prediction model into a web-based tool with a user interface, and includes a built-in set of model parameters and thresholds. Receive user input of HBsAg observation values ​​and corresponding times since CHB patients started receiving PegIFNα treatment; Automatically match a marker time point L that is not less than and is closest to the patient's last follow-up time point; Based on the matched marker time point L and the input data, the predicted probability of HBsAg clearance in the patient within the time interval (L, 168] is calculated by the model and the prediction result is output.

[0021] Preferably, the threshold set is a probability positive threshold set for each marker time point L based on the Youden index of the validation set. When the predicted probability is greater than the corresponding threshold, it is determined to be a favorable prediction result of HBsAg turning negative.

[0022] Compared with the prior art, the beneficial effects of this application are as follows: Excellent predictive performance: The model of this invention makes full use of the dynamic information in HBsAg time series data, avoiding the information limitations of a single time point input. In clinical trial data, the AUROC reaches 0.991, the AUPRC reaches 0.985, and the prediction accuracy is 0.928. In large-scale real-world data, the AUROC reaches 0.988, which is significantly better than existing prediction models. High applicability: The training samples are constructed using a conditional-marker time point framework, which eliminates the need for fixed sample collection time points, significantly reducing the difficulty of clinical data sampling. At the same time, it has strong resistance to data sparsity, and the impact of randomly deleting 25-75% of the input data points (at least 3 observations are retained for each sequence) on model performance is limited. High clinical applicability: Packaged as a web-based tool, it is easy to operate and can achieve dynamic prediction. As the HBsAg data is updated as the treatment progresses, more accurate prediction results can be obtained, helping clinicians to adjust individualized treatment plans in a timely manner, reducing the economic burden on patients and the risk of adverse reactions. Good scalability: Theoretically, it can be applied to HBsAg clearance prediction in CHB patients with different treatment regimens. The model parameters can be updated simply by supplementing the training data of the corresponding treatment regimen. It can also be extended to other disease areas for prediction of clinical endpoints based on time-series indicators.

[0023] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0024] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This invention provides a method for constructing a time-series-based HBsAg clearance prediction model for CHB patients. Figure 2 This is a design diagram of the HepCure-HBV model structure provided in an embodiment of the present invention; Figure 3 This is an evaluation diagram of the clinical trial data test set model provided in an embodiment of the present invention; Figure 4 This is an evaluation graph of the clinical trial data training set model provided in an embodiment of the present invention; Figure 5 This is an evaluation diagram of the clinical trial data validation set model provided in an embodiment of the present invention; Figure 6 This is an evaluation diagram of the "Mount Everest" project test set model provided in an embodiment of the present invention; Figure 7 Evaluation graph of the training set model for the "Mount Everest" project provided in this embodiment of the invention; Figure 8 Evaluation of the "Mount Everest" project validation set model provided in this embodiment of the invention; Figure 9 A flowchart of the HepCure-HBV model webpage tool provided in this embodiment of the invention; Figure 10 This is a schematic diagram of the HepCure-HBV model webpage tool provided in an embodiment of the present invention. Detailed Implementation

[0026] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0027] This invention provides a method for constructing a time-series-based HBsAg clearance prediction model for CHB patients, such as... Figure 1 As shown, it includes: Step 1: Preprocess the target data of CHB patients based on time series; Step 2: Build the model structure, specifically including: Step 2.1: The input structure includes a three-dimensional tensor features with dimensions [B,T,2], where B is the batch size, T is the time length, 2 is HBsAg and its corresponding time features, a Boolean tensor mask with dimensions [B,T], and a tensor Landmark with dimensions [B], which is the normalized value of the marker time point L. Step 2.2: Use a single-layer unidirectional LSTM to extract information from the time series data with a dropout rate of 0.3. Use the hidden state output at the end as the information after compression of the sequence data. Step 2.3: Combine the hidden state information of the LSTM terminal and the Landmark information using a multilayer perceptron to complete the nonlinear transformation; The log-odds value output by the MLP is transformed by Sigmoid to obtain the predicted probability of HBsAg clearance. Step 3: Train the model based on the preprocessed data. BCEWithLogitsLoss is used as the loss function, Adam optimizer is used for parameter optimization, gradient clipping with a maximum norm of 5.0 is set, and training is terminated using an early stopping mechanism with the validation set AUROC as the monitoring metric.

[0028] Preferably, the target data of CHB patients based on time series are preprocessed, including: Step 1.1: Data reading and preprocessing: Read and retain the patient's unique identifier, time point, hepatitis B surface antigen, response label and event occurrence time from the treatment-related data of CHB patients. Each patient corresponds to multiple HBsAg observation data at different time points. Step 1.2: Data standardization: Time information is standardized using the maximum follow-up time, and the HBsAg index is standardized using logarithmic standardization; Step 1.3: Dataset partitioning: While keeping the response rates close, the dataset is partitioned into training, validation, and test sets using random numbers. Step 1.4: Conditional Sample Construction: Iterate through each preset marker time point L. For sample individuals who have not reached the endpoint at time L (RESPONSE=1 and TTE>L), use only the sequence data with time ≤L to construct a sample combination containing a patient's unique identifier, marker time point L, time series up to that point, HBsAg sequence, and a label. The label indicates whether the patient has achieved HBsAg clearance within the time interval (L, maximum follow-up time). Step 1.5: Sequence Alignment and Masking: Use a sequence alignment strategy to pad each batch of input sequences with blanks according to the longest sequence length, and use a mask input marker to fill the blank data.

[0029] Preferably, the maximum follow-up period is 168 weeks, and the marker time point L is preset to at least one of 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132 and 144 weeks.

[0030] In this embodiment, such as Figure 2 The diagram shows the design structure of the HepCure-HBV model.

[0031] In this embodiment, the loss function is BCEWithLogitsLoss for stable binary classification training, i.e. , where x is the logit of the model output and y is the true label (0 or 1). It is the Sigmoid function. A weighting factor of 2 is added based on the ratio of positive to negative samples.

[0032] In this embodiment, the learning rate of the Adam optimizer is 0.001.

[0033] In this embodiment, to prevent gradient explosion, the maximum norm of gradient clipping is 5.0.

[0034] In this embodiment, the model evaluation is specifically as follows: Real-world deployment prediction mechanism: For each patient, first obtain their last follow-up time point, and then select an L from the predefined L that is not less than and closest to that time point. If the last follow-up time point has exceeded the maximum Landmark, then the maximum L is taken as the prediction benchmark.

[0035] Threshold setting: Considering that the distribution of predicted sample labels is different under different Landmarks, a positive threshold is set for the probability of each Landmark based on the Youden index in the validation set.

[0036] Evaluation methods: ROC curve and area under the curve (AUROC), PR (Precision-Recall) curve and area under the curve (AUPRC), calibration curve and Brier index, accuracy, precision, and recall.

[0037] In clinical trial datasets targeting HBsAg clearance as a treatment goal, the predicted ROC using whole-sequence input reached 0.991, the predicted accuracy reached 0.928, the precision (positive predictive value) reached 1.000, the negative predictive value reached 0.904, and the recall reached 0.773. When the input was truncated to 84 weeks, the ROC reached 0.942, the predicted accuracy reached 0.884, the precision (positive predictive value) reached 0.850, the negative predictive value reached 0.898, and the recall reached 0.773.

[0038] In a large-scale real-world study targeting HBsAg clearance (“Project Everest”), the predicted ROC using whole sequence input reached 0.988, the predicted accuracy reached 0.955, the precision (positive predictive value) reached 0.919, the negative predictive value reached 0.978, and the recall reached 0.963.

[0039] The embodiments of this invention are illustrated using data from the applicant's proprietary long-acting interferon Pegasys combined with normal receptor agonists (NAs) in the treatment of previously treated CHB patients (NCT04846491) and data from the "Mount Everest" project (NCT04035837). This invention can also be used to build corresponding predictive models based on data from other CHB treatment regimens, and can be further updated by incorporating more data. It can even be used for predicting clinical endpoints based on time-series indicators in other disease areas.

[0040] Clinical trial data implementation details: Data collection and preprocessing Data were collected from 228 CHB patients who received combination therapy with pegabin and non-alcoholic aspirin (NAs) and had at least three HBsAg monitoring points in the clinical trial (NCT04846491). The overall HBsAg clearance rate was 32%. In the example clinical trial, patients received treatment in 12-week cycles, with pegabin administered for 8 weeks followed by a 4-week break within each cycle, while NAs were continuously administered for a total of 12 cycles. HBsAg monitoring data were collected at weeks 0, 4, 8, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, and 168. After discontinuing medication at week 144, patients were followed up for another 24 weeks until the endpoint (week 168). Patients were divided into an HBsAg-negative group (HBsAg < 0.05 IU / mL) and a HBsAg-positive group (HBsAg ≥ 0.05 IU / mL) based on their endpoint HBsAg level. HBsAg clearance was defined as a transition to HBsAg seroconversion. The data was converted to a CSV file using R, retaining the following: patient unique identifier (PID), time point (TIME, in weeks), hepatitis B surface antigen (HBsAg, in IU / mL), response label (RESPONSE), and time of event (TTE). The dataset was divided into training, validation, and test sets in a 60:20:20 ratio.

[0041] Model Training and Evaluation: Based on the follow-up length of the clinical trials, the preset landmarks were 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, and 144 weeks. The HepCure model was trained using the training set data. The timing for stopping training was determined based on the validation set data, and the model was evaluated using the validation set data. The final trained HepCure model showed an AUROC of 0.991 for the ROC curve, an AUPRC of 0.984 for the PR curve, and a Brier index of 0.042 for the calibration curve on the validation set, indicating good overall calibration of the probability predictions. Figure 3 As shown.

[0042] On the test set, the overall prediction accuracy reached 0.928; for individuals predicted to be eliminated, the actual elimination rate (PPV) was 1.000; for individuals that were actually eliminated, the model's recall rate was 0.773; the F1-score, considering both precision and recall, was 0.872, demonstrating a good balance between fitting ability and generalization ability (Table 1). The results on the test set are similar to those on the training and validation sets, reflecting the generalization ability of the HepCure model. Figure 4 and 5 As shown in the figure. In summary, the HepCure model demonstrates excellent predictive performance in the practical application of clinical trial data.

[0043] Table 1 Evaluation Indicators for Clinical Trial Data Models In this embodiment, the specific implementation method of the "Mount Everest" project includes: data collection and preprocessing. Data were collected from 19,764 CHB patients who received combination therapy with pegabin and NAs or pegabin monotherapy and had at least three HBsAg monitoring points in the "Everest" project (NCT04035837). The overall HBsAg clearance rate was 36.7%. In the "Everest" project, patients received pegabin once a week for 48 weeks. HBsAg testing data were collected at weeks 0, 12, 24, 36, 48, 60, and 72. After discontinuing medication at week 48, patients were followed up for another 24 weeks until the endpoint (week 72). Patients were divided into an HBsAg-negative group (HBsAg < 0.05 IU / mL) and a HBsAg-positive group (HBsAg ≥ 0.05 IU / mL) based on their endpoint HBsAg level; HBsAg clearance was defined as a change to HBsAg negative. The data was converted into a CSV file using R, retaining the following information: Patient Unique Identifier (PID), Time Point (TIME, in weeks), Hepatitis B Surface Antigen (HBsAg, in IU / mL), Response Label (RESPONSE), and Time of Event (TTE). The dataset was then divided into training, validation, and test sets in an 80:10:10 ratio.

[0044] Model Training and Evaluation: Based on the follow-up length of the "Mount Everest" project, the preset landmarks were 12, 24, 36, 48, and 60 weeks. The HepCure model was trained using the training set data. The timing for stopping training was determined based on the validation set data, and the model was evaluated using the validation set data. The final trained HepCure model achieved an AUROC of 0.990 for the ROC curve, an AUPRC of 0.978 for the PR curve, and a Brier index of 0.053 for the calibration curve on the validation set. Figure 6 As shown.

[0045] In this embodiment, the overall prediction accuracy reached 0.955 on the validation set; the actual clearance rate (PPV) for individuals predicted as cleared by the model was 0.919; the recall rate for individuals actually cleared was 0.963; and the F1-score, considering both precision and recall, was 0.940, demonstrating a good balance between fitting ability and generalization ability (Table 2). The results on the test set were similar to those on the training and validation sets, reflecting the generalization ability of the HepCure model. Figure 7 and 8As shown in the figure. In summary, the HepCure model demonstrates excellent predictive performance in the practical application of clinical trial data.

[0046] Table 2 Evaluation Indicators of the "Mount Everest" Project Data Model In this embodiment, an integrated model is used to build a mini-program for dynamically predicting treatment efficacy. The Python-based Streamlit package packages the HepCure-HBV model into a web-based tool with a user interface. The complete model is constructed using a built-in parameter set and threshold set. Patients or clinicians input their HBsAg observations since PegIFNα treatment and the corresponding time. The HepCure-HBV model automatically matches a value L that is not less than and closest to the last time point to predict the probability of HBsAg clearance for the patient within the time interval (L, 168]. The specific process is as follows... Figure 9 As shown.

[0047] Taking a certain patient as an example Figure 10 As shown, when the patient received Pegasys combined with NAAs treatment for 12 weeks, the observed HBsAg values ​​since treatment were entered: 476.46 IU / mL at week 0, 547.37 IU / mL at week 4, and 4.89 IU / mL at week 12. Clicking the prediction button yielded a predicted probability of 0.543, corresponding to a threshold of 0.40 under the 12-week Landmark, reaching the threshold for HBsAg seroconversion. Therefore, the HepCure-HBV model predicted that the patient could achieve clinical cure, and indeed, the patient achieved HBsAg clearance at the next follow-up at week 32. The HepCure-HBV model allows patients and doctors to understand the possibility of cure in advance, which will help clinicians adjust treatment plans for previously treated CHB patients, improve patient treatment benefits, and has significant clinical practical value.

[0048] The beneficial effects of the above technical solution are: The technical effects of this invention are demonstrated using data from the applicant's proprietary long-acting interferon Pegasys combined with natural antineoplastic agents (NAs) in the treatment of previously treated chronic hepatitis B (CHB) patients (NCT04846491) and data from the "Mount Everest" project (NCT04035837). In the clinical data, the AUROC of the HepCure model's ROC curve was 0.991; the AUPRC of the PR curve was 0.984; and the Brier index of the calibration curve was 0.042, indicating good overall calibration of the probability prediction; the overall prediction accuracy reached 0.928; and for individuals predicted by the model to be cleared, the actual clearance rate (Precision) was 1.000. For individuals who actually underwent clearance, the model identified a recall rate of 0.773; the F1-score, considering both precision and recall, was 0.872, demonstrating a good balance between fitting and generalization ability. When predicting based solely on early sequences, the model performance decreased slightly as the sequence length decreased, but it maintained an AUROC of 0.942 and an accuracy of 0.850 at 84 weeks, indicating its ability to support actual clinical decision-making based on early observations. Randomly deleting 25–75% of input points (retaining at least 3 observations per sequence) had a limited impact on model performance, indicating that the model has strong resistance to data sparsity.

[0049] In the large-scale real-world data of the "Mount Everest" project, the HepCure model achieved an AUROC of 0.988 for its ROC curve, an AUPRC of 0.974 for its PR curve, and a Brier index of 0.056 for its calibration curve, indicating good overall calibration of the probability predictions. The overall prediction accuracy reached 0.955. For individuals predicted to be cleared by the model, the actual clearing rate (Precision) was 0.919; for individuals actually cleared, the model's recall rate (Recall) was 0.963. The F1-score, considering both precision and recall, was 0.940, demonstrating a good balance between fitting ability and generalization ability. Existing longitudinal data prediction models applied to the "Mount Everest" project data showed an AUROC of 0.891 and a prediction accuracy of 0.840. For individuals predicted to be cleared by the model, the actual clearing rate (Precision) was 0.771; for individuals actually cleared, the model's recall rate (Recall) was 0.826. The HepCure model demonstrated significant advantages in all these aspects.

[0050] This invention provides a method for constructing a time-series-based HBsAg clearance prediction model for CHB patients. After training the constructed model based on preprocessed data, the method further includes: The predicted probability of HBsAg clearance in CHB patients is obtained based on the trained model. Multi-dimensional dynamic data is acquired and interpolated. Based on the correlation between the completed data response and the predicted probability of HBsAg removal, personalized scheme selection is assisted.

[0051] Preferably, acquiring multi-dimensional dynamic data and performing interpolation processing includes: Collect multi-dimensional dynamic data of CHB patients throughout the entire treatment cycle, including treatment adherence data, lifestyle data, novel omics data, treatment-derived data, and individual baseline characteristics data. The missing features in the multi-dimensional dynamic data are filled by radial basis function interpolation, and the interpolation basis function of each interpolation point, as well as the nearest neighbor data pair and the nearest normal data pair of each interpolation point, are determined to obtain the interpolation weight W0.

[0052] Preferably, based on the correlation between the completed data response and the predicted HBsAg clearance probability, a personalized scheme selection is assisted, including: Based on the completed data, a multi-level patient-feature association matrix M is constructed. According to the influence path of the completed data on the predicted probability of HBsAg clearance and the patient's treatment response level, the multi-level association matrix M is divided into four sub-matrices. At the same time, a multi-branch association inference model is constructed, where each branch corresponds to a personalized HBV treatment strategy, and the matching variables of each branch cover the recovery trend term b1, residual term b2, periodic component b3, individual heterogeneity component b4, treatment intervention response component b5, and time dimension feature b6 obtained from data deconstruction. For each completed data response, a response representation vector of the target response sequence is generated based on the matching variables of each branch. The fusion correlation strength IS between the corresponding completed data response and the HBsAg clearance prediction probability is calculated based on the following formula: ; in, This is a vector matching function used to quantify the fit between the filtered data response and the matching variables; This is a prediction probability mapping function used to associate the representation vector with the HBsAg clear prediction probability; Treatment time dimension; This is a function for calculating the feature contribution based on the graph attention mechanism. This is for radial basis function interpolation operations; It is an aggregate matrix of four submatrices; Submatrix The weighting coefficients, and ; This is the time decay coefficient; use The fitting test method confirms whether the fusion correlation strength IS meets the preset probability distribution. If it does not, a new inference branch is dynamically added. The strongly correlated branches lead to personalized treatment plans that include drug combinations, dosage adjustments, timing of interventions, and non-drug interventions. This is a preset intensity threshold.

[0053] In this embodiment, treatment adherence data include patient medication frequency (e.g., patients inject PegIFNα weekly as scheduled without missing doses) and follow-up completion rate (e.g., patients attend every 12-week follow-up appointment as scheduled).

[0054] Lifestyle data such as exercise duration (e.g., patients exercise regularly for 40 minutes a day) and dietary structure (e.g., patients maintain a high-protein, low-fat diet for a long time).

[0055] Novel omics data include gut microbiota abundance (e.g., 15% of the patient's gut contains Bifidobacteria) and metabolite levels (e.g., the patient's serum short-chain fatty acid concentration is at the high end of the normal range).

[0056] Treatment-derived data include adverse reaction grades (e.g., mild flu-like symptoms that subsided after 2 days of use after PegIFNα) and psychological state quantification (e.g., patients were assessed as having mild anxiety using an anxiety scale).

[0057] Individual baseline characteristics such as age (30 years), HBV genotype (genotype B), and previous treatment history (treated with NAs for 1 year).

[0058] Radial basis function interpolation completion is a method that uses radial basis functions to fill in missing features when data is missing. For example, if a patient's HBV DNA data for week 8 is missing, the interpolation basis function for that interpolation point (week 8) is first determined. Then, its nearest neighbor data pair (HBV DNA data from weeks 7 and 9) and nearest normal data pair (normal HBV DNA data from weeks 6 and 10) are found. The interpolation weight W0 is calculated, and finally, the HBV DNA data for week 8 is completed. Specifically: Step a1: Select radial basis functions and determine parameters: Radial basis functions are the core primitives of interpolation; it is necessary to first select an appropriate function form and determine its parameters.

[0059] Function selection: Commonly used Gaussian function ,in, For shape parameters, control the smoothness of the function and multiple quadratic functions. Where c is a constant that affects interpolation accuracy, etc. Taking the Gaussian function as an example, if a patient's HBV DNA data is missing at week 8, the appropriate function is to select... ,in, =0.5 is an empirical value.

[0060] Distance calculation: The distance r mentioned above can be defined according to the data type. If it is a time dimension, r is the time difference; if it is a numerical feature (such as HBsAg concentration), r is the absolute value of the numerical difference.

[0061] Step a2: Construct interpolation matrix A: For each missing interpolation point, collect its nearest neighbor data pairs (such as valid data points before and after the missing point) and nearest normal data pairs (normal data points of the same patient / similar patients in history), calculate the distance r between these points and the interpolation point, substitute them into the radial basis function to obtain the basis function values, and form the interpolation matrix A.

[0062] For example: The patient's HBV DNA was absent at week 8, and the nearest neighbor pair was at week 7 ( Week 9 The most recent normal data pair is week 6 ( Week 10 Calculate the time difference r between each point and week 8 (r=1 in week 7, r=1 in week 9, r=2 in week 6, r=2 in week 10), and substitute it into the Gaussian function. Therefore, the interpolation matrix A=[0.7788, 0.7788, 0.3679, 0.3679] is a row vector corresponding to the 4 known points.

[0063] Step a3: Solve the system of linear equations to obtain W0: Let the known function values ​​(e.g., HBV DNA concentration) be vector f, and the interpolation weight be W0. W0 is obtained by solving the linear equation system A·W0=f. For example, given that f1=104 in week 7, f2=103 in week 9, f3=105 in week 6, and f4=102 in week 10, i.e. .

[0064] Solve the system of equations [0.7788, 0.7788, 0.3679, 0.3679]. =[104,103,105,102], its actual value needs to be considered in conjunction with the matrix dimensions. Here, we simplify the example logic, which can be obtained through least squares method or direct solution. That is, the interpolation weight of the missing point.

[0065] In short, W0 is calculated by three steps: selecting radial basis functions, constructing an interpolation matrix, and solving a system of linear equations, combined with neighborhood data of missing points. Its core is to use a weighted combination of known data to fit reasonable values ​​of missing points, ensuring data integrity to support subsequent analysis.

[0066] In this embodiment, the patient-feature multi-level association matrix M is a matrix constructed by linking patients with multi-dimensional features, where the matrix elements reflect the degree of association between patients and features. Specifically, based on the completed data, features such as each patient's compliance and lifestyle are quantified and a matrix is ​​constructed. Then, according to the data's influence path on the predicted probability of HBsAg clearance (e.g., features with large weekly HBsAg reductions have higher influence weights) and the patient's treatment response level, the matrix is ​​divided into four sub-matrices. For example, sub-matrix 1 contains the association between patients with excellent treatment response and features with strong predictive influence, and sub-matrix 2 contains the association between patients with good treatment response and features with good predictive influence, etc. Criteria for determining the hierarchy of feature importance and the classification of patient treatment response levels: Feature Importance Hierarchy: Using feature contribution algorithms (such as feature importance in random forests or weights in graph attention mechanisms), all features are divided into four levels: high, medium, poor, and pending decision. For example: weekly HBsAg reduction and absolute HBsAg value at 24 weeks of treatment are high-importance features (contribution ≥ 0.3 to prediction); ALT dynamic change rate is a medium-importance feature (contribution 0.2-0.3); lifestyle data (such as exercise duration) are medium-low importance features (contribution 0.1-0.2); and patient gender is a low-importance feature (contribution < 0.1).

[0067] Patient treatment response level: Based on the progress of HBsAg clearance, patients are classified into four categories: excellent, moderate, poor, and pending decision.

[0068] Advantages: HBsAg continues to decrease and is cleared or nearly cleared within 52 weeks of treatment (e.g., HBsAg < 0.1 IU / mL). In the middle: HBsAg decreased but did not reach the "excellent" level (e.g., at 52 weeks, HBsAg decreased by 2 log IU / mL but was still >0.1 IU / mL); Poor: HBsAg decrease is not significant or even rebounds (e.g., HBsAg decrease <1logIU / mL at 52 weeks); Pending decision: Patients whose treatment duration is less than 24 weeks and whose response level cannot yet be clearly determined.

[0069] Cross-partitioning submatrix: The rows of the correlation matrix M represent patients, and the columns represent features. Based on this two-dimensional division, M is split into four sub-matrices: Submatrix M1: Rows = patients with excellent treatment response, Columns = high-importance features. For example, it includes the association between patients who cleared HBsAg at 52 weeks of treatment and core features such as weekly HBsAg reduction and absolute HBsAg value at 24 weeks, focusing on the strong association pattern of high-response patients + core features.

[0070] Submatrix M2: Rows = patients in the treatment response, columns = moderately important features. For example, it includes the association between patients who experienced a 2 log decrease in HBsAg after 52 weeks of treatment and features such as ALT dynamic change rate and HBV DNA inhibition rate, capturing the association patterns of moderately responsive patients with moderate features.

[0071] Submatrix M3: Rows = patients with poor treatment response, Columns = features of low to medium importance. For example, it includes the association between patients with a HBsAg decrease of <1 log after 52 weeks of treatment and features such as exercise duration and dietary structure labels, analyzing the potential impact of poor response patients plus low to medium importance features.

[0072] Submatrix M4: Rows = patients to be decided, Columns = features of low importance. For example, it includes associations between patients treated for <24 weeks and features such as gender and HBV genotype, providing a basic association for predicting subsequent responses in early-stage patients.

[0073] The multi-branch association inference model contains multiple inference branches, each corresponding to a model of a personalized HBV treatment strategy. Specifically, it constructs branches such as "PegIFNα combined with ETV", "PegIFNα combined with TDF", and "high-dose PegIFNα monotherapy". The matching variables of each branch include the recovery trend term b1 (e.g., the trend of patients' HBsAg decreasing by 0.6 logIU / mL per week) obtained from data deconstruction, the residual term b2 (the difference between the actual value of HBsAg in a certain week and the trend value being 0.3 logIU / mL higher), the periodic component b3 (the small fluctuation of patients' HBsAg during seasonal changes), the individual heterogeneity component b4 (the IFN-γ gene polymorphism carried by patients), the treatment intervention response component b5 (the response of HBsAg decreasing by 1.2 logIU / mL in two weeks after adding an immunomodulator), and the time dimension feature b6 (key time points such as week 24 and week 48 of treatment).

[0074] Calculation of the correlation strength IS: VectorMatch() quantifies the fit between the screening data response and the matching variable. For example, if a branch matching variable requires a weekly HBsAg reduction of ≥0.4 logIU / mL and the patient's actual weekly reduction is 0.5 logIU / mL, this function calculates a high fit value, ranging from 0 to 1.

[0075] ProbMap() associates a patient's multi-feature representation vector with an HBsAg clearance prediction probability of 0.8. For example, it maps a patient's multi-feature representation vector to an HBsAg clearance prediction probability of 0.8, with values ​​ranging from 0 to 1.

[0076] GarphAttention() calculates feature contribution based on graph attention mechanisms. For example, it emphasizes the high contribution of HBsAg data from week 24 to the prediction results, with a value ranging from 0 to 1.

[0077] RBF() is a radial basis function interpolation with interpolation weights W0, which processes time-dimensional information. For example, when interpolating and integrating HBsAg data at different time points of a patient, the radial basis function can theoretically output real numbers. However, it is constrained by the actual range of medical data (such as HBsAg concentration and treatment time), and the value needs to match the scale of the scenario data. For example, after logarithmic interpolation of HBsAg, it can be in the range of [0,8]logIU / mL, and the time dimension is in the range of [0,168] ​​weeks.

[0078] Mall is an aggregate matrix of four submatrices, integrating multi-dimensional related information.

[0079] wi is the weight coefficient of the submatrix, which sums to 1. For example, the weight of submatrix 1 is 0.4, the weight of submatrix 2 is 0.3, the weight of submatrix 3 is 0.2, and the weight of submatrix 4 is 0.1. It is set in advance by experts.

[0080] In this embodiment, the value of IS ranges from 0 to 1. The correlation strength is a probability index, where 0 indicates no correlation and 1 indicates complete correlation.

[0081] In this embodiment, This is the time decay coefficient, ranging from 0 to 1. The longer the treatment time, the more the influence of early data gradually decreases. Therefore, the coefficient is dynamically adjusted between 0 and 1, with the early stage approaching 1 and the later stage approaching 0.

[0082] In this embodiment, the value of Time ranges from 0 to 168, because the maximum follow-up time set in the study is 168 weeks, so the treatment time is between 0 and 168 weeks.

[0083] In this embodiment, the following is adopted: The fit test confirms whether the fusion correlation strength IS meets the preset probability distribution (such as a normal distribution). If it does not, a new inference branch is dynamically added (such as adding a branch for traditional Chinese medicine and herbal auxiliary treatment). When y0=0.8, a personalized treatment plan is derived, such as a drug combination of PegIFNα and TAF, with a dosage of 180μg of PegIFNα per week. The timing of intervention is assessed at week 36 to determine whether to adjust. Non-drug intervention is regular sleep schedule combined with nutritional supplementation.

[0084] The beneficial effects of the above technical solution are: by integrating multi-dimensional data collection, interpolation completion, multi-level matrix construction and multi-branch reasoning models, it can achieve accurate prediction of HBsAg clearance in CHB patients and customized personalized treatment plans. This not only improves the accuracy of prediction, but also allows for real-time adjustment of treatment strategies based on dynamic patient data, assisting clinicians in making scientific decisions, improving the HBsAg clearance rate, and reducing the economic burden and adverse reaction risks caused by ineffective treatment.

[0085] This invention provides a time-series-based HBsAg clearance prediction model for CHB patients, constructed using any of the aforementioned methods, named the HepCure-HBV model. It includes an LSTM network layer and an MLP layer. The LSTM network layer is used to extract feature information from the HBsAg time-series data, and the MLP layer is used to integrate the feature information extracted by the LSTM with the marker time point information to output the HBsAg clearance prediction probability.

[0086] Preferably, the parameter set of the model is derived from clinical trial data and / or training results from data from the China Chronic Hepatitis B Clinical Cure Project.

[0087] In this embodiment, to further improve the accuracy of HBsAg clearance prediction during CHB treatment, this invention employs a machine learning method based on long short-term memory (LSTM) networks to establish a model for predicting HBsAg clearance after CHB treatment, named the HepCure model. Compared to existing models, the HepCure model does not require fixed sample collection time points, fully utilizes HBsAg time-series data, and makes assumptions about the relationship between HBsAg indicators and clinical outcomes.

[0088] This invention provides an application of a time-series-based HBsAg clearance prediction model for CHB patients, including: The Python-based Streamlit package packages the aforementioned prediction model into a web-based tool with a user interface, and includes a built-in set of model parameters and thresholds. Receive user input of HBsAg observation values ​​and corresponding times since CHB patients started receiving PegIFNα treatment; Automatically match a marker time point L that is not less than and is closest to the patient's last follow-up time point; Based on the matched marker time point L and the input data, the predicted probability of HBsAg clearance in the patient within the time interval (L, 168] is calculated by the model and the prediction result is output.

[0089] Preferably, the threshold set is a probability positive threshold set for each marker time point L based on the Youden index of the validation set. When the predicted probability is greater than the corresponding threshold, it is determined to be a favorable prediction result of HBsAg turning negative.

[0090] This invention develops the HepCure model, which predicts HBsAg clearance after treatment based on HBsAg time series, into a web application. It can perform dynamic predictions as treatment progresses, and the accuracy of the predictions gradually improves, helping clinicians adjust treatment plans for CHB patients and improve their treatment benefits.

[0091] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for constructing a time-series-based HBsAg clearance prediction model for CHB patients, characterized in that, include: Step 1: Preprocess the target data of CHB patients based on time series data; Step 2: Build the model structure, specifically including: Step 2.1: The input structure includes a three-dimensional tensor features with dimensions [B,T,2], where B is the batch size, T is the time length, 2 is HBsAg and its corresponding time features, a Boolean tensor mask with dimensions [B,T], and a tensor Landmark with dimensions [B], which is the normalized value of the marker time point L. Step 2.2: Use a single-layer unidirectional LSTM to extract information from the time series data with a dropout rate of 0.

3. Use the hidden state output at the end as the information after the sequence data is compressed. Step 2.3: Combine the hidden state information of the LSTM terminal and the Landmark information using a multilayer perceptron to complete the nonlinear transformation; The log-odds value output by the MLP is transformed by Sigmoid to obtain the predicted probability of HBsAg clearance. Step 3: Train the model based on the preprocessed data. The loss function is BCEWithLogitsLoss, the parameters are optimized using the Adam optimizer, the gradient clipping is set to a maximum norm of 5.0, and the training is terminated using an early stopping mechanism with the validation set AUROC as the monitoring metric.

2. The construction method according to claim 1, characterized in that, Preprocessing of target data from time-series CHB patients includes: Step 1.1: Data reading and preprocessing: Read and retain the patient's unique identifier, time point, hepatitis B surface antigen, response label and event occurrence time from the treatment-related data of CHB patients. Among them, each patient corresponds to multiple HBsAg observation data at different time points. Step 1.2: Data standardization: Time information is standardized using the maximum follow-up time, and the HBsAg index is standardized using logarithmic standardization; Step 1.3: Dataset partitioning: While keeping the response rates close, the dataset is partitioned into training, validation, and test sets using random numbers; Step 1.4: Conditional Sample Construction: Iterate through each preset marker time point L. For sample individuals who have not reached the endpoint at time L (RESPONSE=1 and TTE>L), use only the sequence data with time ≤L to construct a sample combination containing a patient's unique identifier, marker time point L, time series up to that point, HBsAg sequence, and a label. The label indicates whether the patient has achieved HBsAg clearance within the time interval (L, maximum follow-up time). Step 1.5: Sequence Alignment and Masking: Use a sequence alignment strategy to pad each batch of input sequences with the longest sequence length, and use a mask input marker to fill in the blank data.

3. The construction method according to claim 2, characterized in that, The maximum follow-up period is 168 weeks, and the marker time point L is preset to be at least one of 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132 and 144 weeks.

4. The construction method according to claim 1, characterized in that, After training the model based on the preprocessed data, the process also includes: The predicted probability of HBsAg clearance in CHB patients is obtained based on the trained model.

5. A time-series-based HBsAg clearance prediction model for CHB patients, characterized in that, The model is constructed using any one of the construction methods described in claims 1-4 and named HepCure-HBV. It includes an LSTM network layer and an MLP layer. The LSTM network layer is used to extract feature information from the HBsAg time series data, and the MLP layer is used to integrate the feature information extracted by the LSTM with the flag time point information to output the HBsAg clearing prediction probability.

6. The prediction model according to claim 5, characterized in that, The parameter set of the model is derived from training results of clinical trial data and / or data from the China Chronic Hepatitis B Clinical Cure Project.

7. An application of a time-series-based HBsAg clearance prediction model for CHB patients, characterized in that, include: The Python-based Streamlit package packages the prediction model of claim 5 or above into a web-based tool with a user interface, a built-in set of model parameters, and a set of thresholds. Receive user input of HBsAg observation values ​​and corresponding times since CHB patients started receiving PegIFNα treatment; Automatically match a marker time point L that is not less than and is closest to the patient's last follow-up time point; Based on the matched marker time point L and the input data, the predicted probability of HBsAg clearance in the patient within the time interval (L, 168] is calculated by the model and the prediction result is output.

8. The application according to claim 7, characterized in that, The threshold set is a probability positive threshold set for each marker time point L based on the Youden index of the validation set. When the predicted probability is greater than the corresponding threshold, it is determined as a favorable prediction result of HBsAg turning negative.