Intelligent construction method and system for chronic hepatitis B pathological image analysis model

By combining UNI feature extraction and CLAM multi-instance learning model with self-attention mechanism and cross-entropy loss function optimization, the subjectivity and time-consuming problems in the pathological image analysis of chronic hepatitis B are solved, achieving efficient and accurate inflammation grading and fibrosis staging, and improving the model's generalization ability and stability.

CN121544944APending Publication Date: 2026-02-17BEIJING FRIENDSHIP HOSPITAL CAPITAL MEDICAL UNIV +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511734027.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies for pathological image analysis of chronic hepatitis B suffer from problems such as high subjectivity, long processing time, and unstable accuracy. In particular, traditional methods rely on training with specific datasets, resulting in poor generalization ability and high requirements for data annotation.

Method used

By combining the UNI feature extraction model with the CLAM multi-instance learning model, and through self-attention mechanism and weakly supervised learning, we can achieve accurate inflammation grading and liver fibrosis staging of pathological images of chronic hepatitis B. We also use the cross-entropy loss function to optimize the model parameters.

Benefits of technology

It improves the efficiency and accuracy of pathological image analysis, reduces the need for labeled data, enhances the generalization ability and stability of the model, reduces labeling costs, and improves consistency among different observers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544944A_ABST
    Figure CN121544944A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent construction method and system for a chronic hepatitis B pathological image analysis model. The method comprises the following steps: inputting a WSI image into a system, preprocessing, and cutting into an image block set with a fixed size; inputting the image block set into a UNI feature extraction model, and extracting a multi-scale embedded vector through a self-attention mechanism; the embedded vector is transmitted into an attention module of a CLAM multi-instance learning model, and an attention score is calculated; clustering the image blocks according to the attention score, endowing a pseudo label, and calculating a loss function to perform network parameter training; performing click operation on the attention score and the embedded vector to obtain a feature vector subjected to attention calibration, and performing full connection processing to obtain prediction probability distribution; generating an attention heat map to visualize the model decision process; network parameters are optimized through a cross entropy loss function and a back propagation algorithm, and finally a grading and staging result is output and verified through a standard scoring system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical pathological tissue image processing technology, and in particular to an intelligent construction method and system for pathological image analysis models of chronic hepatitis B. Background Technology

[0002] Chronic hepatitis B (CHB) is a common viral hepatitis. The grading of hepatitis activity and the staging of liver fibrosis during its course are crucial for assessing disease progression and guiding treatment decisions. Currently, inflammation grading is primarily assessed based on the degree of inflammation and necrosis in liver tissue, while liver fibrosis staging measures the progression of liver fibrosis. These assessments help determine whether a patient needs antiviral therapy and monitor their risk of developing cirrhosis. According to clinical guidelines, liver biopsy remains the "gold standard" for assessing inflammation and liver fibrosis, enabling more precise diagnosis through morphological analysis of liver tissue via pathological examination.

[0003] In existing technologies, traditional liver biopsy methods rely on pathologists to manually observe and score liver biopsy sections under a microscope. While this method is accurate, it has significant drawbacks: First, it is highly subjective, influenced by the pathologist's experience and fatigue, resulting in low scoring consistency and poor repeatability between different observers or multiple assessments by the same observer; second, the assessment process is time-consuming, especially when processing whole-slide images (WSI), which require manually browsing large areas of tissue; third, for patients with chronic hepatitis B, early fibrosis may not be significant, and manual scoring can easily miss microscopic changes, leading to inaccurate staging.

[0004] With the continuous advancement of digital pathology, image processing and deep learning technologies have been widely applied to the automated analysis of whole-slice images (WSI). For example, the Multiple Instance Learning (MIL) framework is used to handle the large size of WSIs, treating slices as "bags" and image patches as "instances," achieving slice-level classification through weakly supervised learning. Furthermore, some methods, such as qFibrosis, improve the objectivity of pathological analysis by quantifying fibrosis features, and digital image analysis techniques by quantifying collagen deposition. However, existing deep learning methods still have some limitations. On the one hand, feature extraction relies on models trained on specific datasets, resulting in poor generalization ability and an inability to effectively capture complex histological patterns, such as the uneven distribution of inflammation in chronic hepatitis B. On the other hand, the attention mechanism of traditional MIL models is relatively simple, making them susceptible to interference from noisy image patches, leading to a decrease in classification accuracy in multi-class classification tasks. Moreover, these methods have high data requirements, necessitating a large number of labeled WSIs, while the labeling cost of chronic hepatitis B pathological data is very expensive.

[0005] The limitations of these existing technologies have led to low efficiency and unstable accuracy in the clinical application of hepatitis grading and fibrosis staging for chronic hepatitis B. There is an urgent need for a new method to improve interpretation efficiency, reduce subjective bias and improve generalization ability. Summary of the Invention

[0006] Based on this, embodiments of this application provide an intelligent construction method and system for pathological image analysis of chronic hepatitis B, which is a deep learning-based solution. This solution integrates the advanced feature extraction model UNI to achieve efficient extraction of histological features; simultaneously, it combines the multi-instance learning model CLAM with attention-guided weakly supervised classification to achieve accurate inflammation grading and liver fibrosis staging of pathological images of chronic hepatitis B.

[0007] Firstly, a method for intelligently constructing a pathological image analysis model for chronic hepatitis B is provided, the method comprising:

[0008] The whole field digital slice image of liver biopsy of patients with chronic hepatitis B is input into the system. After the tissue region coordinate segmentation, a preprocessed image is obtained. Then the preprocessed image is cut into a set of image blocks of fixed size.

[0009] The image patch set is sequentially input into the UNI feature extraction model, and each image patch is processed through a self-attention mechanism to obtain multi-scale embedding vectors.

[0010] The embedding vector is passed into the attention module of the CLAM multi-instance learning model to calculate the attention score;

[0011] The image patches are clustered based on the attention scores, and the k image patches with the highest and lowest scores are assigned pseudo-labels 0 and 1, respectively. The loss function is then calculated to train the network parameters.

[0012] The attention score and the embedding vector are clicked to obtain the attention-calibrated feature vector, which is then processed by a fully connected layer to obtain the probability distribution of the hepatitis grade and fibrosis stage predicted by the model.

[0013] An attention heatmap is generated from the attention score of each image patch to visualize the model's decision-making process;

[0014] The cross-entropy loss function between the model output probability and the true label is calculated. The parameters of the ensemble network are then optimized and updated multiple times using the loss function value and the backpropagation algorithm. When the parameter updates converge, the final hierarchical and staging results are output.

[0015] Optionally, the step of cutting the preprocessed image into a set of image patches of a fixed size includes:

[0016] Determine a fixed size for the image patch;

[0017] According to a predetermined fixed size, multiple image blocks are sequentially cut out from the preprocessed image to form an image block set.

[0018] Optionally, the steps of processing each image patch using a self-attention mechanism include:

[0019] A self-attention mechanism is applied to each image patch to calculate the attention weights between each image patch and other image patches;

[0020] Based on the attention weights, a weighted sum is calculated for each image patch to obtain a multi-scale embedding vector.

[0021] Optionally, the step of clustering image patches based on attention scores includes:

[0022] Sort the attention scores of all image patches;

[0023] The k image patches with the highest attention scores are assigned pseudo-label 1, and the k image patches with the lowest attention scores are assigned pseudo-label 0.

[0024] Optionally, the step of performing a click operation on the attention score and the embedding vector includes:

[0025] The attention score for each image patch is multiplied element-wise with the corresponding embedding vector;

[0026] The results of multiplication are summarized to obtain the attention-calibrated feature vector.

[0027] Optionally, the step of generating an attention heatmap from the attention score of each image patch includes:

[0028] Map the attention score of each image patch to the color value of the heatmap;

[0029] An attention heatmap of the entire image is generated based on color values ​​to visually display the areas that the model focuses on.

[0030] Optionally, the steps for calculating the value of the cross-entropy loss function between the model output probability and the true label include:

[0031] Calculate the probability distribution for each category in the model output;

[0032] Calculate the value of the cross-entropy loss function based on the probability distribution of the true labels and the model output.

[0033] Optionally, the step of optimizing and updating the parameters of the ensemble network multiple times using the loss function value and the backpropagation algorithm includes:

[0034] Using the backpropagation algorithm, the gradients of the network parameters are calculated based on the value of the cross-entropy loss function;

[0035] The network parameters are updated based on the gradient, and this process is repeated until the parameter updates converge; the cross-entropy loss function is as follows:

[0036]

[0037]

[0038] In the formula, Represents the cross-entropy loss value. Represents the number of categories. Represents the category index. The first one-hot vector representing the true label One portion, The representative model predicts that it belongs to a category. The probability of;

[0039] Represents the SVM loss value. The true label representing the sample, This represents the model's prediction score.

[0040] Optionally, the method further includes:

[0041] Compare the grading and staging results output by the model with the standard scoring system;

[0042] The accuracy and reliability of the model are verified based on the comparison results.

[0043] Secondly, an intelligent construction system for pathological image analysis models of chronic hepatitis B is provided, the system comprising:

[0044] The processing module is used to input the full-view digital slice image of liver biopsy of patients with chronic hepatitis B into the system. After segmentation by tissue region coordinates, a preprocessed image is obtained. Then, the preprocessed image is cut into a set of image blocks of fixed size. The set of image blocks is sequentially input into the UNI feature extraction model. Each image block is processed through a self-attention mechanism to obtain a multi-scale embedding vector. The embedding vector is then passed into the attention module of the CLAM multi-instance learning model to calculate the attention score.

[0045] The training module is used to cluster image patches based on attention scores, assign pseudo-labels 0 and 1 to the k image patches with the highest and lowest scores respectively, and calculate the loss function to train network parameters; the attention scores and embedding vectors are clicked to obtain attention-calibrated feature vectors, which are then processed by a fully connected layer to obtain the probability distribution of hepatitis grade and fibrosis stage predicted by the model.

[0046] The output module generates an attention heatmap from the attention score of each image patch to visualize the model's decision-making process; it also calculates the cross-entropy loss function between the model's output probability and the true label, and uses the loss function value and backpropagation algorithm to optimize and update the parameters of the ensemble network multiple times. When the parameter updates converge, the final grading and staging results are output.

[0047] The beneficial effects of the technical solutions provided in this application include at least the following:

[0048] (1) The UNI feature extraction model was used to process the histological features of different liver biopsy full-view digital slices, and a relatively ideal effect was achieved in the classification process. This method uses the Vision Transformer architecture of the UNI model to perform multi-scale feature extraction, and finally achieves a classification result that can clearly distinguish the degree of inflammation and fibrosis. This shows that the method can achieve a relatively ideal multi-class grading and staging effect, which is different from the problem of poor generalization caused by the reliance on specific datasets by the traditional CNN extractors in the existing technology;

[0049] (2) In view of the complexity of pathological images, this method uses the CLAM multi-instance learning model as the classification framework. CLAM introduces a clustering-constrained attention mechanism to ensure that there is targeted weight allocation even in the presence of noise patches, thereby alleviating attention distraction and improving the model training effect. This is different from the simple attention of the existing MIL model, which is easily disturbed and leads to a decrease in accuracy.

[0050] (3) It solves the practical application limitations of traditional deep learning processes that require a large number of manually labeled WSI tags. Our proposed method does not require instance-level labeling and adopts a weakly supervised learning method. It embeds the embedding vectors extracted by UNI into the bag-level aggregation of CLAM to guide the training of the model, thereby accurately simulating and predicting hepatitis and fibrosis features. This will greatly save labeling costs and time, unlike the high labeling requirements of existing methods;

[0051] (4) The cross-entropy loss function between the model output probability and the true label is calculated, and the cross-entropy value is backpropagated to optimize the ensemble network. The gradient of the cross-entropy loss function is dynamically adjusted and is sensitive to multi-class distribution. It will not change drastically due to noisy instances or boundary classes, which helps to enhance the stability of the network model. Attached Figure Description

[0052] To more clearly illustrate the embodiments of this application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0053] Figure 1 A flowchart illustrating the steps of an intelligent construction method for a pathological image analysis model of chronic hepatitis B provided in this application embodiment;

[0054] Figure 2 A standardized flowchart for inflammation grading and fibrosis staging based on HE staining whole slide images provided for embodiments of this application;

[0055] Figure 3 The confusion matrix representation of the BJ-HepaGS model provided in the embodiments of this application for inflammation grading and fibrosis staging. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0057] In the description of this application, the terms "comprising," "having," and any variations thereof are intended to cover non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those steps or units that are expressly listed, but may also include other steps or units that are not expressly listed but are inherent to these processes, methods, products, or apparatuses, or steps or units added based on further optimizations conceived in this application.

[0058] To address the issues of subjectivity and time-consuming nature in the classification of hepatitis grading and fibrosis staging in chronic hepatitis B pathology images—namely, the problems of automation, objectivity, and generalization—a novel BJ-HepaGS model is proposed. This model is based on deep learning methods, guided by the UNI feature extraction model and the CLAM multi-instance learning model, making it applicable to different full-view digital slice images from liver biopsies. The classification and staging results are validated using a standard scoring system to present the most intuitive classification and recognition images.

[0059] Inflammation grading and liver fibrosis staging methods originate from histological feature assessment in pathology. Traditional assessment methods generally rely on pathologists manually observing liver biopsies and quantifying the degree of inflammation and fibrosis based on systems such as Metavir or Ishak. This involves calculating grading and staging information from histological morphological changes to guide clinical decisions in chronic hepatitis B. However, when applied to actual pathological images, these methods require extensive professional experience, are subjective and time-consuming, heavily depend on the observer's experience and knowledge, and exhibit significant differences and poor consistency among observers. Therefore, the assessment efficiency is low, and the grading and staging results are unsatisfactory.

[0060] In view of this, a method based on deep learning, the BJ-HepaGS model, is proposed for inflammation grading and liver fibrosis staging of pathological images of chronic hepatitis B.

[0061] (1) This invention utilizes the UNI feature extraction model, which is a pre-trained model of the Vision Transformer architecture that embeds large-scale medical image knowledge as experience, to extract features from WSI, thereby improving the generalization ability of the method to better adapt to actual application scenarios and achieve good feature capture effect under different liver biopsy full-view digital slices.

[0062] (2) This invention uses the CLAM multi-instance learning model as a classification framework and introduces a clustering-constrained attention mechanism, which enables the network to learn and simulate more complex bag-level mapping relationships, so as to better apply the application scenario of chronic hepatitis B WSI classification and improve the training effect and generalization ability of the network model.

[0063] (3) The present invention selects the cross-entropy loss function as the optimization objective. Cross-entropy has good robustness to multi-class classification, calculates the probability distribution error, and its gradient is dynamically adjusted. It will not cause a sudden increase in the loss value due to noisy instances, thereby improving the stability of the model.

[0064] (4) The present invention uses data augmentation technology to make the feature distribution more stable, which also plays a role in preventing overfitting and reducing noise interference to a certain extent.

[0065] Please refer to Figure 1 The document illustrates a flowchart of an intelligent construction method for a pathological image analysis model of chronic hepatitis B provided in an embodiment of this application. This method may include the following steps:

[0066] S1. Input the full-field digital slice image of liver biopsy of patients with chronic hepatitis B into the system. After tissue region coordinate segmentation, a preprocessed image is obtained. Then, the preprocessed image is cut into a set of image patches of fixed size.

[0067] S2, the set of image patches is input into the UNI feature extraction model in sequence, and each image patch is processed by the self-attention mechanism to obtain multi-scale embedding vectors.

[0068] S3: Pass the embedding vector into the attention module of the CLAM multi-instance learning model and calculate the attention score.

[0069] S4. Cluster the image patches according to the attention scores, and assign pseudo-labels 0 and 1 to the k image patches with the highest and lowest scores respectively, and calculate the loss function to train the network parameters.

[0070] S5. The attention score and the embedding vector are clicked to obtain the attention-calibrated feature vector. Then, a fully connected processing is performed to obtain the probability distribution of the hepatitis grade and fibrosis stage predicted by the model.

[0071] S6 generates an attention heatmap from the attention scores of each image patch to visualize the model’s decision-making process.

[0072] S7 calculates the cross-entropy loss function between the model output probability and the true label. The parameters of the ensemble network are then optimized and updated multiple times using the loss function value and the backpropagation algorithm. When the parameter updates converge, the final hierarchical and staging results are output.

[0073] In this embodiment of the application, the step of cutting the preprocessed image into a set of image blocks of a fixed size includes determining the fixed size of the image blocks; and cutting out multiple image blocks sequentially from the preprocessed image according to the determined fixed size to form a set of image blocks.

[0074] The steps of processing each image patch using a self-attention mechanism include applying the self-attention mechanism to each image patch, calculating the attention weights between each image patch and other image patches, and performing a weighted summation of each image patch based on the attention weights to obtain a multi-scale embedding vector.

[0075] The steps for clustering image patches based on attention scores include sorting the attention scores of all image patches; selecting the k image patches with the highest attention scores and assigning them pseudo-label 1; and selecting the k image patches with the lowest attention scores and assigning them pseudo-label 0.

[0076] The steps of performing click operations on the attention score and the embedding vector include multiplying the attention score of each image patch element-wise with the corresponding embedding vector; summing the results of the multiplications to obtain the attention-calibrated feature vector.

[0077] The steps of generating an attention heatmap from the attention score of each image patch include mapping the attention score of each image patch to the color value of the heatmap; and generating an attention heatmap of the entire image based on the color value to visually display the area of ​​interest of the model.

[0078] The steps for calculating the value of the cross-entropy loss function between the model output probability and the true label include calculating the probability distribution of each category in the model output; and calculating the value of the cross-entropy loss function based on the probability distribution of the true label and the model output.

[0079] The steps of repeatedly optimizing and updating the parameters of the ensemble network using the loss function value and backpropagation algorithm include: using the backpropagation algorithm to calculate the gradient of the network parameters based on the value of the cross-entropy loss function; updating the network parameters based on the gradient; and repeating this process until the parameter update converges. Specifically, the cross-entropy loss function is:

[0080]

[0081]

[0082] In the formula, Represents the cross-entropy loss value. Represents the number of categories. Represents the category index. The first one-hot vector representing the true label One portion, The representative model predicts that it belongs to a category. The probability of;

[0083] Represents the SVM loss value. The true label representing the sample, This represents the model's prediction score.

[0084] The ReLU calculation formula is as follows:

[0085] (3)

[0086] In the formula, Represents the input value. This represents the output value after activation.

[0087] In this embodiment of the application, the method further includes:

[0088] Compare the grading and staging results output by the model with the standard scoring system;

[0089] The accuracy and reliability of the model are verified based on the comparison results.

[0090] This application also provides an intelligent construction system for pathological image analysis models of chronic hepatitis B, which may include:

[0091] The processing module is used to input the full-view digital slice image of liver biopsy of patients with chronic hepatitis B into the system. After segmentation by tissue region coordinates, a preprocessed image is obtained. Then, the preprocessed image is cut into a set of image blocks of fixed size. The set of image blocks is sequentially input into the UNI feature extraction model. Each image block is processed through a self-attention mechanism to obtain a multi-scale embedding vector. The embedding vector is then passed into the attention module of the CLAM multi-instance learning model to calculate the attention score.

[0092] The training module is used to cluster image patches based on attention scores, assign pseudo-labels 0 and 1 to the k image patches with the highest and lowest scores respectively, and calculate the loss function to train network parameters; the attention scores and embedding vectors are clicked to obtain attention-calibrated feature vectors, which are then processed by a fully connected layer to obtain the probability distribution of hepatitis grade and fibrosis stage predicted by the model.

[0093] The output module generates an attention heatmap from the attention score of each image patch to visualize the model's decision-making process; it also calculates the cross-entropy loss function between the model's output probability and the true label, and uses the loss function value and backpropagation algorithm to optimize and update the parameters of the ensemble network multiple times. When the parameter updates converge, the final grading and staging results are output.

[0094] like Figure 2 A workflow diagram for HE staining of chronic hepatitis B patients based on a visual converter and staging of liver fibrosis is presented, based on the aforementioned system.

[0095] Step 1 in the attached diagram illustrates the interpretation and grouping process of a full-view digital slice (WSI) image. The original WSI image is first segmented into multiple smaller image patches, which represent different regions of the tissue slice. The purpose of this step is to decompose the large WSI image into smaller image patches that are easier to process and analyze, preparing for subsequent feature extraction and model training.

[0096] Step two in the attached diagram illustrates the image segmentation and model building process. These image patches are input into the model and processed through a self-attention mechanism to extract multi-scale embedding vectors. Subsequently, these embedding vectors are fed into the CLAM multi-instance learning model, where an attention score is calculated for each image patch via an attention module. These scores are used to simulate complex bag-level mapping relationships to improve the model's classification ability for pathological images of chronic hepatitis B.

[0097] Step 3 in the attached diagram illustrates the model validation and evaluation process. The attention-calibrated feature vectors are processed through a fully connected layer to obtain the probability distributions of the model's predicted hepatitis grades and fibrosis stages. Simultaneously, the attention score for each image patch is used to generate attention heatmaps, which visually show the key areas the model focuses on when making predictions. These heatmaps help pathologists understand the model's decision-making process, enhancing its interpretability. Finally, the model's output is validated by comparison with a standard scoring system to ensure its accuracy and reliability.

[0098] Experimental results:

[0099] Performance of the BJ HepaGS model in tiered and phased tests on independent validation sets:

[0100] Inflammation grading: The model performed well in grading. It accurately identified grades ≥G1 (AUROC=0.91; 95% CI: 0.87–0.95), ≥G2 (AUROC=0.95; 95% CI: 0.92–0.97), and ≥G3 (AUROC=0.98; 95% CI: 0.97–0.99) in pathological images. The model also achieved high accuracy in assessing all grades: ≥G1 (89.0%), ≥G2 (87.6%), and ≥G3 (94.6%) (Table 1). The confusion matrix also indicates that the model correctly classified grades ≥G3 (…). Figure 3 ).

[0101] Liver fibrosis staging: The model performed excellently in identifying cirrhosis, accurately identifying stages ≥F2 (AUROC=0.89; 95% CI: 0.84–0.93), ≥F3 (AUROC=0.87; 95% CI: 8.83–0.91), and F4 (AUROC=0.82; 95% CI: 0.76–0.88) in pathological images. The model also showed good accuracy in assessing various stages of liver fibrosis: ≥F2 (85.0%), ≥F3 (81.0%), and F4 (84.7%). (Table 1) The confusion matrix also indicates that the model correctly classified the ≥F2 stage (…). Figure 3 Table 1 shows the performance of the BJ HepaGS model at different grades and stages of pathological histology on independent and paired validation sets.

[0102] Table 1

[0103]

[0104] Consistency between the BJ HepaGS model and expert consensus in grading and staging:

[0105] Inflammation grading: The model showed high consistency with expert consensus on inflammation grading, with an intraclass correlation coefficient (ICC) of 0.824 (95% CI: 0.784–0.857). The model's performance remained consistent across different grades: G≥1 (ICC=0.721; 95% CI: 0.662–0.771), G≥2 (ICC=0.721; 95% CI: 0.661–0.771). In paired-set analysis, the model's ICC was 0.865 (95% CI: 0.805–0.907). The AI ​​model assessment of inflammation was highly consistent with the consensus of hepatologists.

[0106] Liver fibrosis staging: The intra-group correlation coefficient (ICC) of this model reached 0.681 (95% CI: 0.615–0.737). This demonstrates consistency in liver fibrosis staging: F≥2 (ICC=0.644; 95% CI: 0.573–0.706), F≥3 (ICC=0.613; 95% CI: 5.537–0.679). In paired-set analysis, the model showed moderate consistency with fibrosis staging by liver pathologists, with an ICC of 0.682 (95% CI: 0.562–0.775). Table 2 presents the consistency between the BJ-HepaGS model and the consensus of pathologists and the judgments of experts at different levels.

[0107] Table 2

[0108]

[0109] Assessment of inflammation improvement and fibrosis reversal in paired samples before and after treatment using the BJ-HepaGS model:

[0110] Improvement in inflammation was defined as a decrease in inflammation grade by 1 level or more; stable inflammation was defined as no change; and worsening inflammation was defined as an increase in inflammation grade by 1 level or more. According to the BJ-HepaGS model, 33 cases (66%) showed improvement, 13 cases (26%) remained stable, and 4 cases (8%) showed worsening. According to expert consensus, 34 cases (68%) showed improvement, 11 cases (22%) remained stable, and 5 cases (10%) worsened. The distribution of changes in inflammation before and after treatment was highly consistent between the AI ​​model and the expert consensus, with no statistically significant difference (p=0.885). Figure 3 ).

[0111] Reversal of liver fibrosis was defined as a decrease of 1 or more in the Ishak score after treatment compared to before treatment; stability was defined as no change; and progression of liver fibrosis was defined as an increase of 1 or more in the Ishak score. The BJ-HepaGS model assessed 22 cases (44%) of reversal of liver fibrosis, 25 cases (50%) of stable condition, and 3 cases (6%) of progression. Expert consensus assessed 23 cases (46%) of reversal of liver fibrosis, 23 cases of stable condition (46%), and 4 cases of progression (8%). Regarding changes in liver fibrosis before and after treatment, the AI ​​model and expert consensus showed a high degree of consistency, with no statistically significant difference (p=0.388). Figure 3 It can be seen that the BJ HepaGS model significantly improves the consistency among expert ratings:

[0112] Inflammation grading: After referencing the BJ HepaGS model scores, 44% (26 / 59) of the senior expert scores and 46% (32 / 70) of the junior expert scores were revised. The majority of the senior expert scores (88%, 23 / 26) and the junior expert scores (88%, 28 / 32) were revised to results consistent with the model; only a small number had their scores adjusted to other outcomes.

[0113] Liver fibrosis staging: After referencing the BJ HepaGS model scores, 29% (34 / 117) of the senior expert scores and 31% (40 / 128) of the junior expert scores were revised. The majority of senior expert scores (76%, 26 / 34) and a higher proportion of junior expert scores (80%, 32 / 40) were revised to be consistent with the results of the artificial intelligence model; only a small number of people adjusted their scores to other scores.

[0114] Artificial intelligence (AI) improved the consistency of histological scores for inflammation and liver fibrosis in the same patient between senior and junior experts, establishing a model that closely matches expert scores. With the BJ HepaGS model assisting in the revision of expert outcomes, for inflammation, the intraclass correlation coefficient (ICC) between the two expert groups increased from 0.730 (95% CI: 0.673–0.779) to 0.857 (95% CI: 8.24–0.884). For liver fibrosis, the ICC between the two expert groups increased from 0.852 (95% CI: 0.817–0.880) to 0.906 (95% CI: 8.883–0.924). The consistency remained high in patients with cirrhosis (ICC 0.822, 95% CI: 0.782–0.856; Table 2). These findings indicate that the BJ HepaGS model significantly improves the accuracy and reliability of expert interpretation, leading to more accurate liver biopsy assessments (Table 3). Table 3 shows how the BJ-HepaGS model improved the consistency of judgments between senior and junior experts.

[0115] Table 3

[0116]

[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for intelligently constructing a pathological image analysis model for chronic hepatitis B, characterized in that, The method includes: The whole field digital slice image of liver biopsy of patients with chronic hepatitis B is input into the system. After the tissue region coordinate segmentation, a preprocessed image is obtained. Then the preprocessed image is cut into a set of image blocks of fixed size. The image patch set is sequentially input into the UNI feature extraction model, and each image patch is processed through a self-attention mechanism to obtain multi-scale embedding vectors. The embedding vector is passed into the attention module of the CLAM multi-instance learning model to calculate the attention score; The image patches are clustered based on the attention scores, and the k image patches with the highest and lowest scores are assigned pseudo-labels 0 and 1, respectively. The loss function is then calculated to train the network parameters. The attention score and the embedding vector are clicked to obtain the attention-calibrated feature vector, which is then processed by a fully connected layer to obtain the probability distribution of the hepatitis grade and fibrosis stage predicted by the model. An attention heatmap is generated from the attention score of each image patch to visualize the model's decision-making process; The cross-entropy loss function between the model output probability and the true label is calculated. The parameters of the ensemble network are then optimized and updated multiple times using the loss function value and the backpropagation algorithm. When the parameter updates converge, the final hierarchical and staging results are output.

2. The method according to claim 1, characterized in that, The steps of cutting a preprocessed image into a set of image patches of a fixed size include: Determine a fixed size for the image patch; According to a predetermined fixed size, multiple image blocks are sequentially cut out from the preprocessed image to form an image block set.

3. The method according to claim 1, characterized in that, The steps for processing each image patch using a self-attention mechanism include: A self-attention mechanism is applied to each image patch to calculate the attention weights between each image patch and other image patches; Based on the attention weights, a weighted sum is calculated for each image patch to obtain a multi-scale embedding vector.

4. The method according to claim 1, characterized in that, The steps for clustering image patches based on attention scores include: Sort the attention scores of all image patches; The k image patches with the highest attention scores are assigned pseudo-label 1, and the k image patches with the lowest attention scores are assigned pseudo-label 0.

5. The method according to claim 1, characterized in that, The steps for performing click operations on the attention score and the embedding vector include: The attention score for each image patch is multiplied element-wise with the corresponding embedding vector; The results of multiplication are summarized to obtain the attention-calibrated feature vector.

6. The method according to claim 1, characterized in that, The steps to generate an attention heatmap from the attention score of each image patch include: Map the attention score of each image patch to the color value of the heatmap; An attention heatmap of the entire image is generated based on color values ​​to visually display the areas that the model focuses on.

7. The method according to claim 1, characterized in that, The steps for calculating the value of the cross-entropy loss function between the model output probability and the true label include: Calculate the probability distribution for each category in the model output; Calculate the value of the cross-entropy loss function based on the probability distribution of the true labels and the model output.

8. The method according to claim 1, characterized in that, The steps of optimizing and updating the parameters of the ensemble network multiple times using the loss function value and the backpropagation algorithm include: Using the backpropagation algorithm, the gradients of the network parameters are calculated based on the value of the cross-entropy loss function; The network parameters are updated based on the gradient, and this process is repeated until the parameter updates converge; the cross-entropy loss function is as follows: ; ; In the formula, Represents the cross-entropy loss value. Represents the number of categories. Represents the category index. The first one-hot vector representing the true label One portion, The representative model predicts that it belongs to a category. The probability of; Represents the SVM loss value. The true label representing the sample, This represents the model's prediction score.

9. The method according to claim 1, characterized in that, The method further includes: Compare the grading and staging results output by the model with the standard scoring system; The accuracy and reliability of the model are verified based on the comparison results.

10. An intelligent construction system for pathological image analysis models of chronic hepatitis B, characterized in that, The system includes: The processing module is used to input the full-view digital slice image of liver biopsy of patients with chronic hepatitis B into the system. After segmentation by tissue region coordinates, a preprocessed image is obtained. Then, the preprocessed image is cut into a set of image blocks of fixed size. The set of image blocks is sequentially input into the UNI feature extraction model. Each image block is processed through a self-attention mechanism to obtain a multi-scale embedding vector. The embedding vector is then passed into the attention module of the CLAM multi-instance learning model to calculate the attention score. The training module is used to cluster image patches based on attention scores, assign pseudo-labels 0 and 1 to the k image patches with the highest and lowest scores respectively, and calculate the loss function to train network parameters; the attention scores and embedding vectors are clicked to obtain attention-calibrated feature vectors, which are then processed by a fully connected layer to obtain the probability distribution of hepatitis grade and fibrosis stage predicted by the model. The output module generates an attention heatmap from the attention score of each image patch to visualize the model's decision-making process; it also calculates the cross-entropy loss function between the model's output probability and the true label, and uses the loss function value and backpropagation algorithm to optimize and update the parameters of the ensemble network multiple times. When the parameter updates converge, the final grading and staging results are output.

Citation Information

Patent Citations

  • Histopathological image analysis method without manual annotation

    CN119478503A

  • Prostate cancer biochemical recurrence prediction system based on pathological section and construction method

    CN120260974A

  • Self-generating device

    KR102768673B1