Explainable model ensemble method, apparatus, device, and medium

By employing an interpretability-based model ensemble method and utilizing heatmaps and cross-union ratios to calculate model weights, the problem of insufficient reliability in model ensemble results is addressed, thereby achieving interpretability and reliability of model prediction results and improving diagnostic and treatment outcomes in the medical field.

CN116662888BActive Publication Date: 2025-10-24PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310715942.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2025-10-24
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

In existing technologies, the reliability of model ensemble results is insufficient, especially in the medical field where it is difficult to interpret the model's predictions, making it difficult for doctors to trust and apply the model's predictions.

Method used

An interpretability-based model ensemble approach is adopted. By inputting the data to be classified into multiple models, a heatmap is generated using a pre-defined interpretability algorithm. The mean of the crossover ratio is calculated to determine the model weights, and a weighted calculation is performed based on the weights to finally obtain the target classification result.

Benefits of technology

This improves the reliability of model ensemble results, enabling doctors to better understand and trust the model's predictions, thereby increasing diagnostic accuracy and treatment efficiency, and reducing medical risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662888B_ABST
    Figure CN116662888B_ABST
Patent Text Reader

Abstract

The application provides a model ensemble method based on interpretability, applied to the medical field, which comprises: inputting to-be-classified data into each model in a model set, using a preset interpretability algorithm to analyze the values generated by processing the to-be-classified data in a preset feature layer of each model, and generating a group of heat maps corresponding to each model; respectively calculating the intersection over union of the image region with a heat map value greater than a preset threshold in the corresponding heat map in each group of heat maps; calculating the mean of the intersection over union of all heat maps included in each group of heat maps to obtain the weight of each model in the model set; using each model in the model set to process the to-be-classified data respectively to obtain initial classification results output by the models; and performing weighted calculation on the initial classification results based on the weights of the models to obtain a target classification result of the to-be-classified data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence and digital medicine, and relates to a model integration method and device based on explainability, equipment and medium. BACKGROUND

[0002] In a traditional model, in order to improve the model effect, the most commonly used method is model integration. For example, in a classification problem, the final answer is determined by voting the results calculated by multiple models in model integration, or in a linear problem, the mean value of multiple results calculated by multiple models in model integration is taken as the predicted value.

[0003] In the prior art, many model integrations can make very good predictions, but they cannot explain how they make predictions. Many data professionals are difficult to know why the algorithm gets such a prediction result. If we cannot know how an algorithm makes a prediction, it is difficult to know the business development based on the model. For example, in the medical field, we can use deep learning algorithms to analyze or classify medical image data (such as CT images, DR images, etc.) to help doctors better understand the health status of patients and develop better treatment plans. However, these deep learning algorithms are usually black box models, and we are difficult to understand how they make predictions and know how their prediction results are obtained, which makes it difficult for doctors to trust the prediction results of these algorithms, and doctors are difficult to develop better treatment plans based on these results. Since the reliability of the integrated results calculated by the commonly used model integration is insufficient, it is not suitable for some fields, especially the medical field, and the integrated results of model integration are particularly important.

[0004] In order to solve the technical problem of insufficient reliability of integrated results calculated by model integration in the technology of using model integration, on this basis, a model integration method based on explainability is proposed. The method of integrating based on model explainability can also support disease auxiliary diagnosis, health management, remote consultation and other functions. SUMMARY

[0005] The present application provides a model integration method, device, equipment and medium based on explainability, which mainly aims to solve the technical problem of insufficient reliability of integrated results of model integration of deep model in the prior art.

[0006] To achieve the above purpose, the present application provides a model integration method based on explainability, which comprises:

[0007] inputting the to-be-classified data into each model in the model set, analyzing values generated by processing the to-be-classified data by using preset explainable algorithms of preset feature layers of each model, and generating a set of heat maps corresponding to each model;

[0008] respectively calculating an intersection over union of an image region with a value greater than a preset threshold in each heat map in each set of heat maps in the corresponding heat map;

[0009] calculating a mean value of intersection over unions of all heat maps included in each set of heat maps, and obtaining weights of each model in the model set;

[0010] respectively processing the to-be-classified data by using each model in the model set to obtain initial classification results output by the each model, and performing weighted calculation on the initial classification results based on the weights of the each model to obtain a target classification result of the to-be-classified data.

[0011] Optionally, the model set includes a first model, a second model and a third model, the first model is a vgg16 model, the second model is a resnet18 model, and the third model is an alexNet model.

[0012] The preset explainable algorithms include a first explainable algorithm, a second explainable algorithm and a third explainable algorithm, the first explainable algorithm is Grad-cam, the second explainable algorithm is Score-cam, and the third explainable algorithm is Ablation-cam.

[0013] Optionally, before the to-be-classified data is respectively processed by using each model included in the model set, the method further includes:

[0014] judging a category of the to-be-classified data;

[0015] if the to-be-classified data is image data, performing normalization and down-sampling processing on the to-be-classified data;

[0016] if the to-be-classified data is not image data, converting the to-be-classified data into image data by using a preset method, and then performing normalization and down-sampling processing on the image data.

[0017] Optionally, the analyzing values generated by processing the to-be-classified data by using preset explainable algorithms of preset feature layers of each model, and generating a set of heat maps corresponding to each model includes:

[0018] The values generated when the first model, the second model and the third model are respectively extracted by the preset feature layer based on the Euclidean distance are obtained as a first value, a second value and a third value;

[0019] The first value is analyzed by the first explainability algorithm, the second explainability algorithm and the third explainability algorithm respectively, and a group of heat maps corresponding to the first model is obtained.

[0020] The second value is analyzed by the first explainability algorithm, the second explainability algorithm and the third explainability algorithm respectively, and a group of heat maps corresponding to the second model is obtained.

[0021] The third value is analyzed by the first explainability algorithm, the second explainability algorithm and the third explainability algorithm respectively, and a group of heat maps corresponding to the third model is obtained.

[0022] Optionally, the intersection over union of the image region in each group of heat maps whose heat map value is greater than a preset threshold in the corresponding heat map is calculated, including:

[0023] The heat map is standardized to obtain a visual grayscale image.

[0024] The grayscale value of each image region of the visual grayscale image is calculated, and an image region greater than a preset threshold is selected as a key region.

[0025] The proportion of the key region in all image regions of the visual grayscale image is calculated to obtain the intersection over union of the heat map.

[0026] Optionally, the initial classification result is weighted and calculated based on the weight of each model to obtain a target classification result of the data to be classified, including:

[0027] The initial classification results obtained by each model are weighted and summed based on the weight corresponding to each model to obtain the target classification result of the data to be classified.

[0028] Optionally, the training method of each model in the model integration includes:

[0029] A first number of training data is obtained from a preset database, a second number of data is selected from the first number of training data for labeling, and the data with labeled labels are recorded as positive sample data, and the data without labeled labels are recorded as negative sample data.

[0030] Each model in the model integration is trained by using the positive sample data and the negative sample data respectively, and the training is completed.

[0031] To solve the above problems, the present application provides a model integration device, the device comprising:

[0032] A numerical analysis module is configured to input the data to be classified into each model in the model set respectively, analyze the values generated by processing the data to be classified using the preset feature layer of each model using a plurality of preset explainable algorithms, and generate a set of heat maps corresponding to each model;

[0033] A numerical calculation module is configured to calculate the intersection-over-union of the image region in each heat map in each set of heat maps, where the value of the heat map is greater than a preset threshold value;

[0034] A weight calculation module is configured to calculate the mean of the intersection-over-union of all heat maps included in each set of heat maps, and obtain the weight of each model in the model set;

[0035] A weighted summation module is configured to process the data to be classified using each model in the model set respectively, obtain the initial classification results output by each model, and perform weighted calculation on the initial classification results based on the weight of each model to obtain the target classification results of the data to be classified.

[0036] To solve the above problems, the present application further provides an electronic device, the electronic device comprising:

[0037] At least one processor; and,

[0038] A memory in communication connection with the at least one processor; wherein,

[0039] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the explainable-based model integration method according to any one of claims 1 to 7.

[0040] To solve the above problems, the present application further provides a computer readable storage medium, and the computer program is executed by the processor to implement the explainable-based model integration method.

[0041] The embodiment of the present application inputs the data to be classified into each model in the model set, analyzes the values generated by processing the data to be classified by the preset feature layer of each model using the preset plurality of explainable algorithms, generates a set of heat maps corresponding to each model, has less resource dependency on data resources and computing resources, can achieve or even exceed the effect of a single model, is easier to deploy and land, and has more application scenarios; the intersection-over-union of the image region in the corresponding heat map where the heat map value is greater than the preset threshold in each set of heat maps is calculated; the mean of the intersection-over-union of all heat maps included in each set of heat maps is calculated to obtain the weight of each model in the model set; the data to be classified is processed by each model in the model set to obtain the initial classification result output by each model, and the initial classification result is weighted and calculated based on the weight of each model to obtain the target classification result of the data to be classified, and the reliability of the result is considered in the integration process by using the explainable characteristics of the model, so that the result is more reliable. In the medical field, the model integration method based on explainability can enable doctors to better understand and trust the prediction results of the model, rather than passively accepting the results. In addition, this method can also enable doctors to better cooperate with machine learning algorithms to jointly specify better treatment plans, thereby achieving high treatment effect, reducing the occurrence of medical accidents, improving the efficiency and accuracy of doctor diagnosis and treatment, reducing medical risks, and providing better medical services for patients. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 The flowchart of the model integration method based on explainability provided by the present application;

[0043] Figure 2 The module schematic diagram provided by the present application;

[0044] Figure 3 The schematic diagram of the electronic device provided by the present application;

[0045] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0047] The embodiment of the present application can acquire and process related data based on artificial intelligence technology and the field of digital medicine. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0048] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biological retrieval technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0049] The embodiment of the application provides a model integration method based on explainability, and the execution subject of the model integration method based on explainability includes at least one of electronic devices capable of being configured to execute the method provided by the embodiment of the application, such as a client, a mobile terminal, etc. The APP can be a blockchain platform. The mobile terminal includes but is not limited to a single server, a server cluster, a cloud server, or a cloud server cluster, etc.

[0050] In the embodiment of the application, the model integration method based on explainability analyzes the to-be-classified data through a module preset by a server, extracts the values corresponding to the preset feature layers in the to-be-classified data analysis process, calculates the values corresponding to the preset feature layers by using a preset number of explainability algorithms, obtains the weight values of each model in the model set, and obtains the target classification result by weighted summation. The core of the embodiment of the application is that the to-be-classified data is respectively input into each model in the model set, the values generated by processing the to-be-classified data by using the preset feature layers of each model are analyzed by using a preset explainability algorithm, and a group of heat maps corresponding to each model is generated; the intersection-over-union of the image region with a heat map value greater than a preset threshold in the corresponding heat map is calculated in each group of heat maps; the mean value of the intersection-over-union of all heat maps included in each group of heat maps is calculated to obtain the weight of each model in the model set; the to-be-classified data is processed by using each model in the model set respectively to obtain the initial classification result output by each model, and the initial classification result is weighted and calculated based on the weight of each model to obtain the target classification result of the to-be-classified data.

[0051] The following will be described in combination with Figure 1 The implementation principle of the application is further described.

[0052] Referring to the flowchart shown in Figure 1 The model integration method based on explainability provided by the application is described, which includes:

[0053] S10, the to-be-classified data is respectively input into each model in the model set, the values generated by processing the to-be-classified data by using the preset feature layers of each model are analyzed by using a preset explainability algorithm, and a group of heat maps corresponding to each model is generated.

[0054] In the embodiment, the to-be-classified data is respectively input into each model in the model set, each model respectively analyzes or processes the to-be-classified data, each layer (for example, an input layer, a convolutional layer, an output layer, etc.) of the model generates corresponding numerical values in the process of processing, a preset feature layer of the model generates numerical values, a preset interpretability method is used to analyze the numerical values generated in the preset feature layer, and a group of heat maps corresponding to each model is generated.

[0055] For example, in the medical field, the to-be-analyzed data is a breast cancer X-ray image, the breast cancer X-ray image is respectively input into each model in the model set, which can include a convolutional neural network and a fully connected neural network, each model analyzes or processes the breast cancer X-ray image, and corresponding numerical values are generated in the process of processing, a preset interpretability algorithm is used to analyze the extracted numerical values, and a heat map corresponding to each model processing the breast cancer X-ray image is generated to help doctors judge the key features (for example, whether there is a lump) in the breast cancer X-ray image and improve the diagnostic accuracy and efficiency.

[0056] There are few related researches on model integration in deep learning, and most of them are achieved by designing more complex, deeper or wider deep learning models.

[0057] In deep learning, the model integration can be used to improve the model effect. Through model integration, multiple small models can achieve the expected effect of a large model, or even exceed the expected effect of a large model, thereby reducing the dependence on calculation and making the model easier to deploy and land.

[0058] In the embodiment, the model integration is composed of two or more deep models. Deep models are a kind of machine learning, and machine learning is a necessary path to realize artificial intelligence. The concept of deep learning originates from the research of artificial neural networks. A multilayer perceptron with multiple hidden layers is a kind of deep learning structure. Deep learning forms more abstract high-level identification attributes or features by combining low-level features to discover distributed feature representations of data. The motivation of studying deep learning is to establish a neural network that simulates the analysis and learning of the human brain. It models the mechanism of the human brain to explain data such as images, sounds and texts.

[0059] In a broad sense, the interpretability means that when we need to understand or solve something, we can obtain the process information we need. On the model, the interpretability can explain how the model makes a prediction to obtain a prediction result.

[0060] In the embodiment, the model integration is composed of three deep learning models, the model set includes a first model, a second model and a third model, the first model is a vgg16 model, the second model is a resnet18 model, and the third model is an alexNet model.

[0061] The preset explainability algorithm includes a first explainability algorithm, a second explainability algorithm and a third explainability algorithm, the first explainability algorithm is Grad-cam, the second explainability algorithm is Score-cam, and the third explainability algorithm is Ablation-cam.

[0062] The Vgg16 model includes a convolution layer, a full connection layer and an output layer, and max-pooling is used between layers, and the activation function of all hidden layers adopts ReLU function.

[0063] The basic architecture of the Resnet18 model is ResNet network, the depth of the network is 18 layers, including linear layer, sampling layer, activation layer, convolution layer and pooling layer.

[0064] The AlexNet model includes a convolution layer and a full connection layer, the model structure corresponds to two GPUs, the two GPUs interact in a specific network layer, and the operation efficiency is improved by using the two GPUs.

[0065] In the embodiment, the preset explainability algorithm is a first explainability algorithm Grad-cam explainability algorithm, a second explainability algorithm Score-cam explainability algorithm and a third explainability algorithm Ablation-cam explainability algorithm.

[0066] The Grad-cam explainability algorithm analyzes the attention area of the model to a certain class, analyzes whether the network learns correct features or information through the attention area, and has the advantage of not needing to modify the network structure and retrain compared with the CAM explainability method.

[0067] The Score-cam explainability algorithm obtains the weight of each activation mapping by the forward transmission score of each activation mapping on the target class, and gets rid of the dependence on gradient.

[0068] The Ablation-cam explainability algorithm determines the importance of each unit on the feature map through ablation analysis.

[0069] Generally speaking, if the data to be classified is an image, there may be differences between the resolutions or sizes of images obtained under different imaging conditions, and the image needs to be preprocessed.

[0070] In an embodiment, the data to be classified is obtained from a preset database, the data to be classified is a type of data that needs to be analyzed, and the data to be classified is preprocessed to obtain preprocessed data.

[0071] For example, the data to be classified is an image to be retrieved. In a medical application scenario, a sample image of the image to be retrieved is a medical image, and a type of an object contained in the sample image is a lesion, that is, a part of the body where a pathological change occurs. The medical image refers to an internal tissue obtained in a non-invasive manner for medical treatment or medical research, for example, an image of a stomach, an abdomen, a heart, a knee, a brain, such as a CT (Computed Tomography), an MRI (Magnetic Resonance Imaging), an US (ultrasonic), an X-ray image, an electroencephalogram, and an optical photographic lamp image generated by a medical instrument.

[0072] Since the models in the model set require input data to be images, it is necessary to convert non-image data to be classified into an image form. For example, if the data to be classified is in a text form, the text form is converted into an image form to facilitate subsequent processing of the model set. If the data to be classified is an image, the image is preprocessed.

[0073] In an embodiment, before the data to be classified is processed by each model included in the model set, the method further comprises:

[0074] determining the category of the data to be classified;

[0075] if the data to be classified is image data, performing normalization and down-sampling processing on the data to be classified;

[0076] if the data to be classified is not image data, converting the data to be classified into image data by using a preset method, and then performing normalization and down-sampling processing on the image data.

[0077] In this embodiment, according to the principle that each variable in the text data corresponds to a pixel point in the image, the feature information corresponding to each variable is reorganized and aggregated into a feature matrix, and the insufficient pixel region is replaced with zero. The feature matrix is converted into a feature imaging graph.

[0078] In the embodiment, all images are normalized and down-sampled, so that the resolution and size of the images input into the model ensemble are the same; the normalization method can be a mean-variance normalization method or a min-max normalization method, etc. The normalization method can unify the pixel values of all images to the same range, reducing the difficulty of model ensemble recognition processing; the down-sampling processing can reduce the size of the image, for example, by reducing the size of the image by two times, reducing the processing difficulty of the model ensemble.

[0079] In the embodiment, the obtained data to be classified is distinguished, the data to be classified is converted into an image form and preprocessed, the images are unified into a format, facilitating subsequent model processing, reducing model processing steps and improving model processing speed.

[0080] In one embodiment, the values generated by processing the data to be classified using the preset feature layers of each model are analyzed using a preset explainability algorithm, and a set of heat maps corresponding to each model is generated, including:

[0081] The values generated by processing the data to be classified using the preset feature layers of the first model, the second model and the third model are extracted based on Euclidean distance, respectively, to obtain first values, second values and third values;

[0082] The first values are analyzed using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm, respectively, to obtain a set of heat maps corresponding to the first model;

[0083] The second values are analyzed using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm, respectively, to obtain a set of heat maps corresponding to the second model;

[0084] The third values are analyzed using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm, respectively, to obtain a set of heat maps corresponding to the third model.

[0085] Specifically, assuming that the data to be classified is an image with a size of 224*224*3, the first model Vgg16 model is input, which is processed by 64 convolution kernels with a channel of 3 and a size of 3*3, a step of 1 and padding=same padding, twice convolution, and activated by a ReLU function, and the output size is 224*224*64.

[0086] The image with a size of 224*224*64 is subjected to max pooling (maximum pooling) with a filter of 2*2 and a step of 2 to obtain an image with a size of 112*112*64;

[0087] After the image with a size of 112*112*64 is subjected to multiple convolution kernel pooling processes, a tensor flattening operation is performed to flatten the data into a vector, two fully connected layers are adopted, and a ReLU activation function is used to obtain a prediction result.

[0088] Based on the Euclidean distance, data corresponding to the convolution layer is extracted to obtain the values generated by the convolution layer.

[0089] Similarly, the to-be-classified data is input into a second model, Resnet18 model, and a third model, AlexNet model, the to-be-classified data is analyzed by the second model and the third model to obtain corresponding analysis results, and the values generated by the preset feature layers in the second model and the third model are extracted by using the above method.

[0090] In this embodiment, the advantages of the stability of the vgg16 model, the rapidity of the AlexNet, and the accuracy of the ResNet18 are combined to analyze the to-be-classified data, so that the analysis is more sufficient, the accuracy of the model analysis result is higher, and the efficiency is faster; in some specific fields, due to the difficulty in obtaining the training data set, the model integration composed of a preset number of small models can be trained by using a small data set, and by using the model integration, each model can be trained by using a small data set to achieve the effect of a large model, or even exceed the effect of a large model, thereby improving the ease of implementation of the model and the practicality of the model, and the application scenarios of the model integration are more abundant.

[0091] In this embodiment, three explainability algorithms are used to analyze the values generated by the preset feature layers of each model to generate a group of heat maps corresponding to each model. It is worth mentioning that one explainability algorithm analyzes the preset feature layer of one model to generate one heat map. In this embodiment, three explainability algorithms are used to analyze the values generated by the preset feature layers of each model to generate three heat maps corresponding to each model.

[0092] In this embodiment, three different explainability methods are used to analyze the values generated by the preset feature layers of each model when analyzing the to-be-classified data. The three explainability algorithms analyze the data from different angles, use the advantages of the explainability algorithms themselves, and analyze the values from all angles to generate three heat maps with different focuses.

[0093] S20, respectively calculate the intersection over union of the image region in each group of heat maps whose heat map value is greater than a preset threshold in the corresponding heat map.

[0094] In one embodiment, the respective intersection over union of the image region with a value greater than the preset threshold in each group of heat maps is calculated, comprising:

[0095] The heat maps are standardized to obtain a visual grayscale image;

[0096] The grayscale values of each image region of the visual grayscale image are calculated, and the image region with a value greater than a preset threshold is selected as a key region;

[0097] The proportion of the key region to all image regions of the visual grayscale image is calculated to obtain the intersection over union of the heat map.

[0098] Specifically, each group of heat maps includes a plurality of heat maps, each heat map is standardized to convert into a visual grayscale image with 0-255 grayscale values, the grayscale values of each image region of the visual grayscale image are calculated, a grayscale value threshold is set, the image region with a value greater than the grayscale value threshold is selected as a key region, and the proportion of the key region to all image regions of the visual grayscale image is calculated to obtain the intersection over union of each heat map.

[0099] In this embodiment, the first heat map corresponding to the first model is standardized to convert into a visual grayscale image with 0-255 grayscale values, the grayscale values of each image region of the visual grayscale image are calculated, the image region with a value greater than a preset threshold is selected as a key region, the proportion of the key region to all image regions of the visual grayscale image is calculated to obtain the first intersection over union corresponding to the first model, denoted as IOU1.

[0100] The second heat map corresponding to the first model is standardized to convert into a visual grayscale image with 0-255 grayscale values, the grayscale values of each image region of the visual grayscale image are calculated, the image region with a value greater than a preset threshold is selected as a key region, the proportion of the key region to all image regions of the visual grayscale image is calculated to obtain the second intersection over union corresponding to the first model, denoted as IOU2.

[0101] The third heat map corresponding to the first model is standardized to convert into a visual grayscale image with 0-255 grayscale values, the grayscale values of each image region of the visual grayscale image are calculated, the image region with a value greater than a preset threshold is selected as a key region, the proportion of the key region to all image regions of the visual grayscale image is calculated to obtain the third intersection over union corresponding to the first model, denoted as IOU3.

[0102] Similarly, in this embodiment, the intersection over union corresponding to the second model and the intersection over union corresponding to the third model are calculated by using the above method of calculating the intersection over union corresponding to the first model.

[0103] For example, the breast X-ray image is classified and diagnosed by using model integration, and a corresponding heat map is generated, which shows the contribution of different regions in the image to the diagnosis result, which can help doctors better understand and explain the prediction result of the algorithm. Convert the heat map to a grayscale image, select the region greater than the preset threshold as the key region, and calculate the proportion of the key region in the entire grayscale image to obtain the intersection over union of the breast X-ray image. The performance of the model is evaluated by using the intersection over union. Doctors can use the intersection over union to evaluate the accuracy of the model in identifying lumps, and make a final diagnosis and treatment plan based on the heat map result.

[0104] In this embodiment, the intersection over union of the values generated by the preset feature layer of each model is calculated, and the different real regions of the same target image are marked. The accuracy of the model is evaluated by using the intersection over union. By synthesizing the three intersection over unions corresponding to the model, the accuracy of the model can be measured more accurately.

[0105] S30, calculate the mean of the intersection over union of all heat maps contained in each group of heat maps, and obtain the weight of each model in the model set.

[0106] In this embodiment, the intersection over union of all heat maps corresponding to each model is added, and the mean of the intersection over union of all heat maps is taken to obtain the weight of each model in the model set.

[0107] In the medical field, the multi-model fusion can be performed by using this embodiment to improve the diagnostic accuracy of medical images, etc. For example, when diagnosing a breast X-ray image, each model in the model set can be used to analyze or process the breast X-ray image to generate corresponding heat maps. By adding the intersection over union of all heat maps corresponding to each model, the mean of the intersection over union of all heat maps can be obtained. The weight of each model in the model set can be obtained. These weights can reflect the contribution of each model to the diagnosis result. The results of multiple models are fused to improve the accuracy and robustness of the diagnosis.

[0108] Specifically, the first intersection over union IOU1, the second intersection over union IOU2, and the third intersection over union IOU3 corresponding to the first model are added, and the mean of the three intersection over unions is taken to obtain the weight corresponding to the first model.

[0109] The first intersection over union IOU1, the second intersection over union IOU2, and the third intersection over union IOU3 corresponding to the second model are added, and the mean of the three intersection over unions is taken to obtain the weight corresponding to the second model.

[0110] The first intersection over union IOU1, the second intersection over union IOU2, and the third intersection over union IOU3 corresponding to the third model are added, and the mean of the three intersection over unions is taken to obtain the weight corresponding to the third model.

[0111] In the embodiment, the weight corresponding to each model is obtained by synthesizing the average values of the three intersection-over-union ratios, the comprehensiveness of the model is achieved by calculating from multiple directions, and the accuracy of the model is improved.

[0112] S40, each model in the model set is used to process the to-be-classified data respectively to obtain an initial classification result output by each model, and the initial classification result is weighted and calculated based on the weight of each model to obtain a target classification result of the to-be-classified data.

[0113] In the embodiment, each model in the model set is used to process the to-be-classified data respectively to obtain an initial classification result output by each model, and the initial classification result is weighted and calculated based on the weight corresponding to each model and the initial classification result to obtain a target classification result of the to-be-classified data.

[0114] For example, a breast X-ray image is input into each model to obtain an output result of each model, a weight coefficient is assigned to each model, assuming that there are three models, and the weight coefficients corresponding to the three models are 0.4, 0.3 and 0.3 respectively, the output result of each model is weighted and summed to obtain a target classification result of the breast X-ray image, and whether the breast X-ray image has a lump is determined according to the target classification result. Through the model integration technology, the diagnostic accuracy and robustness of the pathological image can be effectively improved.

[0115] In one embodiment, the weighted calculation of the initial classification result based on the weight of each model to obtain the target classification result of the to-be-classified data comprises:

[0116] The initial classification results obtained by each model are weighted and summed based on the weight corresponding to each model to obtain the target classification result of the to-be-classified data.

[0117] In one embodiment, before each model in the model integration is used to analyze the to-be-classified data respectively, the method further comprises:

[0118] A first number of training data is obtained from a preset database, a second number of data is selected from the first number of training data for labeling, the data with a label is recorded as positive sample data, and the data without a label is recorded as negative sample data.

[0119] Each model in the model integration is trained using the training data to complete the training.

[0120] In the embodiment, the cifar10 dataset is used to train each model in the model ensemble, each model is iteratively trained data, when the classification accuracy of the model reaches the preset threshold, the training is ended, the cifar10 dataset is a small dataset for identifying general objects, which contains 10 categories of RGB color images, the size of the picture is 32*32, the dataset contains 50000 training images and 10000 test images.

[0121] Because the acquired training data often has negative sample data similar to the positive sample data, the negative sample data without annotation labels in the training data is mixed with some positive sample data; therefore, in order to further improve the accuracy of the positive sample data and the negative sample data marked in the above training sample data, the negative sample data is filtered.

[0122] In another embodiment, the negative sample data with a similarity value greater than a preset threshold is selected and deleted from the negative sample data.

[0123] Specifically, when the negative sample data with a similarity value greater than a preset threshold is selected from the negative sample data of the training data, the selected negative sample data is filtered as a suspected positive sample to improve the accuracy of the positive sample data and the negative sample data in the training data.

[0124] The value of the above-mentioned preset threshold is not particularly limited in the specification, and a person skilled in the art can flexibly configure it based on actual needs.

[0125] In another embodiment, the negative sample data with a similarity value greater than a preset threshold is selected and deleted from the negative sample data, and the method further comprises:

[0126] The negative sample data with a similarity value greater than a preset threshold can also be re-labeled as positive sample data without using the direct deletion method.

[0127] In the embodiment, the trained models in the model set are used to process the data to be classified to obtain an initial classification result, and the initial classification result is weighted and summed based on the weight of each model, so that the classification result obtained under the participation of the model weight is more accurate and has higher reliability.

[0128] Referring to Figure 2 FIG. 1 is a functional module schematic diagram of a model ensemble device 100 of the present application.

[0129] The numerical analysis module 110 is configured to input the to-be-classified data into each model in the model set respectively, analyze the numerical values generated by processing the to-be-classified data by the preset feature layers of each model by using the preset explainability algorithm, and generate a set of heat maps corresponding to each model.

[0130] In one embodiment, the model set includes a first model, a second model, and a third model, the first model is a resnet18 model, the second model is a vgg16 model, and the third model is an alexNet model.

[0131] The preset explainability algorithm includes a first explainability algorithm, a second explainability algorithm, and a third explainability algorithm, the first explainability algorithm is Grad-cam, the second explainability algorithm is Score-cam, and the third explainability algorithm is Ablation-cam.

[0132] In one embodiment, before processing the to-be-classified data by each model included in the model set respectively, the method further includes:

[0133] judging the category of the to-be-classified data;

[0134] if the to-be-classified data is image data, performing normalization and down-sampling processing on the to-be-classified data;

[0135] if the to-be-classified data is not image data, converting the to-be-classified data into image data by using a preset method, and then performing normalization and down-sampling processing on the image data.

[0136] In one embodiment, the analyzing the numerical values generated by processing the to-be-classified data by the preset feature layers of each model by using the preset explainability algorithm, and generating a set of heat maps corresponding to each model, includes:

[0137] extracting the numerical values generated by processing the to-be-classified data by the preset feature layers of the first model, the second model, and the third model based on Euclidean distance respectively to obtain a first numerical value, a second numerical value, and a third numerical value;

[0138] analyzing the first numerical value by using the first explainability algorithm, the second explainability algorithm, and the third explainability algorithm respectively to obtain a set of heat maps corresponding to the first model;

[0139] analyzing the second numerical value by using the first explainability algorithm, the second explainability algorithm, and the third explainability algorithm respectively to obtain a set of heat maps corresponding to the second model;

[0140] The first explainability algorithm, the second explainability algorithm, and the third explainability algorithm are used to analyze the third numerical value respectively, and a set of heat maps corresponding to the third model is obtained.

[0141] The numerical calculation module 120 is configured to calculate an intersection over union of an image region with a heat map value greater than a preset threshold in each heat map in the set of heat maps.

[0142] In an embodiment, the calculation of the intersection over union of the image region with the heat map value greater than the preset threshold in each heat map in the set of heat maps includes:

[0143] The heat map is standardized to obtain a visual grayscale image.

[0144] The grayscale values of each image region of the visual grayscale image are calculated, and an image region with a grayscale value greater than a preset threshold is selected as a key region.

[0145] The proportion of the key region in all image regions of the visual grayscale image is calculated to obtain the intersection over union of the heat map.

[0146] The weight calculation module 130 is configured to calculate a mean value of the intersection over union of all heat maps included in each set of heat maps to obtain a weight of each model in the model set.

[0147] The weighted summation module 140 is configured to process the data to be classified using each model in the model set respectively to obtain an initial classification result output by each model, and perform weighted calculation on the initial classification result based on the weight of each model to obtain a target classification result of the data to be classified.

[0148] In an embodiment, the weighted calculation on the initial classification result based on the weight of each model to obtain the target classification result of the data to be classified includes:

[0149] The weights corresponding to the initial classification result are weighted and summed to obtain the target classification result of the data to be classified.

[0150] In an embodiment, the training method of each model in the model integration includes:

[0151] A first number of training data is obtained from a preset database, a second number of data is selected from the first number of training data for labeling, and the data with the labeled label is recorded as positive sample data, and the data without the labeled label is recorded as negative sample data.

[0152] Each model in the model integration is trained using the positive sample data and the negative sample data respectively, and the training is completed.

[0153] Referring to Figure 3 Fig. 1 shows a schematic diagram of a preferred embodiment of the electronic device 1 of the present application.

[0154] The electronic device 1 comprises, but is not limited to, a memory 11, a processor 12, a display 13, and a network interface 14. The electronic device 1 is connected to a network through the network interface 14 to obtain raw data. The network can be an intranet, the Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, a telephony network, or other wireless or wired networks.

[0155] The memory 11 comprises at least one type of readable medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, or the like. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, or the like. Of course, the memory 11 can also comprise both an internal storage unit and an external storage device of the electronic device 1. In the present embodiment, the memory 11 is generally used to store an operating system and various application software installed in the electronic device 1, such as program codes of the model integration 10, etc. In addition, the memory 11 can also be used to temporarily store various data that have been output or will be output.

[0156] The processor 12 can be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication, etc. In the present embodiment, the processor 12 is used to run program codes or process data stored in the memory 11, such as running program codes of the model integration 10, etc.

[0157] The display 13 can be referred to as a display screen or a display unit. In some embodiments, the display 13 can be an LED display, a liquid crystal display, a touch liquid crystal display, an Organic Light-Emitting Diode (OLED) touch, or the like. The display 13 is used to display information processed in the electronic device 1 and to display a visualized work interface, for example, to display results of data statistics.

[0158] The network interface 14 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0159] Figure 3 Only the electronic device 1 with components 11-14 and the model integration 10 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.

[0160] Optionally, the electronic device 1 can also include a user interface, which can include a display, an input unit such as a keyboard, and optionally a standard wired interface, a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, an Organic Light-Emitting Diode (OLED) touch, or the like. The display can also be appropriately referred to as a display screen or a display unit, and is used to display information processed in the electronic device 1 and to display a visualized user interface.

[0161] The electronic device 1 can also include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described here.

[0162] In the above embodiments, when the processor 12 executes the model integration 10 stored in the memory 11, the following steps can be implemented:

[0163] The to-be-classified data is respectively input into each model in the model integration, and a preset explainability algorithm is used to analyze the values generated by processing the to-be-classified data in the preset feature layer of each model, to generate a set of heat maps corresponding to each model;

[0164] The intersection-over-union of the image region with a value greater than a preset threshold in each heat map in each set of heat maps is calculated respectively;

[0165] Calculate the average of the intersection over union of all heat maps contained in each group of heat maps to obtain the weight of each model in the model set;

[0166] Process the to-be-classified data using each model in the model set respectively to obtain initial classification results output by the each model, and perform weighted calculation on the initial classification results based on the weight of each model to obtain a target classification result of the to-be-classified data.

[0167] For detailed introduction of the above steps, please refer to Figure 1 The flowchart of the model set integration method based on interpretability.

[0168] In addition, the embodiment of the present application also proposes a computer readable medium, which can be non-volatile or volatile. The computer readable medium can be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, etc. The computer readable medium includes a storage data area and a storage program area, the storage data area stores data created according to the use of the blockchain node, and the storage program area stores the model integration 10, which realizes the following operations when executed by the processor:

[0169] Input the to-be-classified data into each model in the model set, analyze the values generated by processing the to-be-classified data in the preset feature layer of each model using the preset interpretability algorithm, and generate a group of heat maps corresponding to each model;

[0170] Calculate the intersection over union of the image region with a value greater than a preset threshold in the corresponding heat map in each group of heat maps respectively;

[0171] Calculate the average of the intersection over union of all heat maps contained in each group of heat maps to obtain the weight of each model in the model set;

[0172] Process the to-be-classified data using each model in the model set respectively to obtain initial classification results output by the each model, and perform weighted calculation on the initial classification results based on the weight of each model to obtain a target classification result of the to-be-classified data.

[0173] The specific implementation of the computer readable medium of the present application is substantially the same as that of the above-mentioned model set integration method based on interpretability, and will not be repeated here.

[0174] In another embodiment, the model ensemble method based on explainability provided by the present application is further configured to ensure the privacy and security of all the data mentioned above. For example, the feature dimension and the feature embedding can be stored in the blockchain node.

[0175] It should be noted that the blockchain referred to in the present application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain, in essence, is a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block containing information of a batch of network transactions, used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0176] It should be noted that the above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. Moreover, the terms "include", "contain" or any other variant thereof in this paper are intended to cover non-exclusive inclusion, so that the process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, device, article or method. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, device, article or method including the element.

[0177] From the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be realized by means of software and necessary general hardware platforms, of course, also can be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, electronic device, or network device, etc.) execute the method described in each embodiment of the present application.

[0178] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, is also included in the patent protection of the present application.

Claims

1. An interpretable-based model ensemble method, characterized in that, The method comprises: inputting the data to be classified into each model in the model set, analyzing the values generated by processing the data to be classified by the preset feature layer of each model using a plurality of preset explainability algorithms, and generating a set of heat maps corresponding to each model; calculating the intersection-over-union of the image region in the corresponding heat map where the heat map value is greater than the preset threshold value in each set of heat maps; calculating the mean of the intersection-over-union of all heat maps included in each set of heat maps to obtain the weight of each model in the model set; processing the data to be classified using each model in the model set to obtain the initial classification result output by each model, and performing weighted calculation on the initial classification result based on the weight of each model to obtain the target classification result of the data to be classified. 2.The interpretable-based model ensemble method of claim 1, wherein, The model set comprises a first model, a second model and a third model, the first model is a vgg16 model, the second model is a resnet18 model, and the third model is an alexNet model; The preset explainability algorithm comprises a first explainability algorithm, a second explainability algorithm and a third explainability algorithm, the first explainability algorithm is Grad-cam, the second explainability algorithm is Score-cam, and the third explainability algorithm is Ablation-cam. 3.The interpretable-based model ensemble method of claim 1, wherein, Before processing the data to be classified using each model included in the model set, the method further comprises: judging the category of the data to be classified; if the data to be classified is image data, performing normalization and down-sampling processing on the data to be classified; if the data to be classified is not image data, converting the data to be classified into image data using a preset method, and then performing normalization and down-sampling processing on the image data. 4.The interpretable-based model ensemble method of claim 2, wherein, The method comprises: extracting the values generated when processing the data to be classified by the preset feature layer of the first model, the second model and the third model based on Euclidean distance to obtain first values, second values and third values; analyzing the first values using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm to obtain a set of heat maps corresponding to the first model; analyzing the second values using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm to obtain a set of heat maps corresponding to the second model; analyzing the third values using the first explainability algorithm, the second explainability algorithm and the third explainability algorithm to obtain a set of heat maps corresponding to the third model. 5.The interpretable-based model ensemble method of claim 1, wherein, The method comprises: standardizing the heat maps to obtain visual grayscale images; The gray value of each image region of the visualized gray image is calculated, and an image region greater than a preset threshold is selected as a key region; The proportion of the key region in all image regions of the visualized gray image is calculated to obtain the intersection over union of the heat map. 6.The interpretable-based model ensemble method of claim 1, wherein, The initial classification result is weighted and calculated based on the weight of each model to obtain the target classification result of the data to be classified, including: The initial classification results obtained by each model are weighted and summed based on the weight corresponding to each model to obtain the target classification result of the data to be classified. 7.The interpretable-based model ensemble method of claim 1, wherein, The training method of each model in the model integration includes: A first number of training data is obtained from a preset database, a second number of data is selected from the first number of training data for labeling, and the data with labeled labels are recorded as positive sample data, and the data without labeled labels are recorded as negative sample data; Each model in the model integration is trained using the positive sample data and the negative sample data, respectively, to complete the training.

8. A model integration apparatus characterized by comprising: The device includes: The numerical analysis module is configured to input the data to be classified into each model in the model integration, analyze the values generated by processing the data to be classified by the preset feature layer of each model using a plurality of explainability algorithms, and generate a set of heat maps corresponding to each model; The numerical calculation module is configured to calculate the intersection over union of the image region with a value greater than a preset threshold in each heat map in each set of heat maps; The weight calculation module is configured to calculate the mean of the intersection over union of all heat maps included in each set of heat maps to obtain the weight of each model in the model integration; The weighted summation module is configured to process the data to be classified using each model in the model integration to obtain the initial classification result output by each model, and to weight and calculate the initial classification result based on the weight of each model to obtain the target classification result of the data to be classified.

9. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the explainability-based model integration method of any one of claims 1 to 7.

10. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the explainability-based model integration method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Deep learning-based intelligent X-ray film diagnosis method

    CN108899087A

  • Medical image processing method and medical image recognition method and device

    CN110504029A