A multi-terminal fusion training method for neural networks based on blockchain

Through the multi-terminal fusion training method of neural network based on blockchain, the problem that medical image data from different hospitals cannot be shared is solved. Through accuracy and feature difference analysis, the fusion strategy is determined to improve the accuracy and stability of the neural network and solve the problem. This solves the problem of inconsistent data and inconsistent annotation standards.

CN113792864BInactive Publication Date: 2024-08-23MANLANG (SHANGHAI) MEDICAL MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111138488.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Medical image data from different hospitals cannot be shared due to privacy issues, resulting in inconsistent data sizes, which affects the accuracy of the parameter fusion results of the neural network, and inconsistent data annotation standards and capabilities, which affects the consistency of feature distribution.

Method used

The multi-terminal fusion training method of neural network based on blockchain is used to obtain the DNN network of each hospital, calculate the accuracy, generate new blocks, store them on the blockchain, retrain the network, calculate the accuracy change sequence, mean filtering, and calculate Represent capabilities and feature differences, determine the fusion strategy, change the strategy until the network converges, and obtain an accurate feature extraction network.

Benefits of technology

It achieves effective fusion of network parameters of each hospital, improves the accuracy of the neural network on the training sets of each hospital, reduces feature differences, and improves the accuracy and stability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113792864B
    Figure CN113792864B
Patent Text Reader

Abstract

The present invention relates to the fields of artificial intelligence and blockchain, and specifically to a multi-terminal fusion training method for a neural network based on blockchain. It includes sharing the network and accuracy of each hospital, so that the hospital corresponding to the highest accuracy generates a new block and connects it to the blockchain, and rewards the hospital; each hospital retrains the network in the blockchain, iterates the above operations to obtain multiple groups of fusion blocks; obtains the accuracy change sequence of each group of fusion blocks and classifies each hospital to obtain the fusion strategy of the network; calculates new network parameters, repeats the steps of rewarding the hospital; keeps the network fusion strategy unchanged to generate fusion blocks, and iterates the above steps until the network converges. The present invention fuses the network parameters of each hospital and retrains them, and obtains the network fusion strategy according to the representation capabilities of each hospital in the fused network and the feature differences between different hospitals. By constantly changing the fusion strategy, a network that can accurately extract the data features of all hospitals is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence and blockchain, and in particular to a blockchain-based neural network multi-terminal fusion training method. Background Art

[0002] With the development of medical technology and artificial intelligence technology, hospitals have used advanced medical equipment to diagnose diseases and visualize patients' conditions in the form of image data, helping doctors to diagnose conditions and determine treatment plans more quickly and accurately. The most commonly used technology is to use DNN networks to segment medical image data, obtain the lesion area of ​​organs on the image, or use DNN networks to classify medical images. Because medical image data from different hospitals involve patient privacy issues and cannot be shared, and medical image data is difficult to label and requires professional personnel to label, the size of the data set that each hospital can use for neural network training is not too large, so that the networks trained by each hospital cannot all have a high accuracy rate.

[0003] In order to make full use of the data sets of each hospital and obtain an accurate network, the parameters of the networks trained by each hospital need to be integrated, just like the idea of ​​federated learning. However, since the data of each hospital cannot be shared, it is impossible to screen and clean the training set before training the network, resulting in inconsistent feature distribution of medical image data from different hospitals. The medical data of one hospital may describe more features, while the medical image data of another hospital may describe more other features. In addition, the data annotation standards and capabilities of different hospitals, as well as the inconsistent data scale, will affect the accuracy of the fusion results of the neural network parameters. Summary of the invention

[0004] The present invention provides a blockchain-based neural network multi-terminal fusion training method to solve the problem that existing medical information cannot be shared and the data scale is inconsistent among hospitals.

[0005] The blockchain-based neural network multi-terminal fusion training method of the present invention adopts the following technical solutions:

[0006] Step 1: Obtain labeled medical image data from each hospital for training to obtain the DNN network of each hospital, calculate the accuracy of the DNN network of each hospital on the test set, obtain the hospital corresponding to the DNN network with the highest accuracy, generate a new block, store the DNN network of the hospital in the new block and link the new block to the blockchain;

[0007] Step 2: Each hospital uses the DNN network stored in the latest block to calculate the accuracy of each hospital's test set on the DNN network , get the accuracy set S1 of all hospitals;

[0008] Each hospital retrains the network based on the parameters of the DNN network stored in the latest block, and uses the retrained DNN network to calculate the new accuracy of each hospital on the test set. , get the accuracy set S2 of all hospitals;

[0009] The parameters of the DNN networks retrained in all hospitals are averaged, and a new DNN network is obtained by taking the average as the new parameter. The hospital corresponding to the DNN network with the highest accuracy in S2 is extracted to generate a block. The new DNN network and the accuracy in S1 are stored in the block generated by the hospital. The block is used as the latest block for iteration, and the block is a fusion block.

[0010] Step 3: Arrange the generated fusion blocks in the order of generation, obtain the accuracy change sequence of each hospital on the fusion block, perform mean filtering on the accuracy change sequence of each hospital, calculate the representation ability of each hospital and the feature difference between hospitals based on the filtering results, classify the hospitals using the representation ability of each hospital and the feature difference between hospitals, and determine the fusion strategy of the DNN network;

[0011] Step 4: Keep the fusion strategy of the DNN network unchanged, use the DNN network trained by the selected hospital to generate a new set of fusion blocks, and determine whether the DNN network converges;

[0012] If the DNN network converges, the fusion strategy is determined as the final fusion method. If the DNN network does not converge, the fusion strategy of the DNN network is changed until the network converges.

[0013] The method to obtain the accuracy is to use all the labeled medical image data of the hospital as the data set, 80% of which is used as the training set and 20% as the test set. The training set is used to train the parameters of the DNN network, and the accuracy of each hospital's DNN network on its test set is calculated.

[0014] The calculation method of the representation ability of each hospital is as follows:

[0015]

[0016] Where: To characterize the hospital's capabilities; is the length of the accuracy change sequence, that is, the number of fusion blocks; Corresponds to a block on the blockchain; is the mean filtering result of the accuracy change sequence.

[0017] The difference in characteristics between hospitals was calculated as follows:

[0018]

[0019] Where: is the difference in characteristics between hospital 1 and hospital 2; represents the fluctuation sequence of the accuracy change sequence of hospital 2; represents the fluctuation sequence of the accuracy change sequence of hospital 1; Indicates the length of the wave sequence;

[0020] The calculation formula of the volatility sequence is as follows:

[0021]

[0022] Where: represents the fluctuation series of each hospital; is the accuracy change sequence of each hospital.

[0023] The edge weights between hospitals are calculated as follows:

[0024]

[0025] Where: The characterization capability of hospital 1; Characterization capabilities for hospital 2; is the edge weight between hospital 1 and hospital 2.

[0026] The process of determining the fusion strategy of the DNN network is as follows:

[0027] Taking each hospital as a node, the edge weights between hospitals are calculated to obtain a graph structure data. The nodes on the graph structure data are classified, and for all hospitals in each category, the probability of each hospital being selected is calculated to extract hospitals that meet the conditions.

[0028] The method to calculate the probability of each hospital being selected is as follows:

[0029] For the category s that contains the largest number of hospitals after classification, the probability of all hospitals in this category being selected is 1.0;

[0030] The probability of each hospital being selected in the categories other than the one containing the largest number of hospitals is:

[0031]

[0032] Where: is the probability of the hospital being selected; represents the maximum edge weight among all edge weights between hospitals in category s; is the minimum edge weight between hospital n and all hospitals in category s.

[0033] The fusion strategy remains unchanged, which means that the probability of each hospital being selected remains unchanged.

[0034] The beneficial effects of the present invention are as follows: the purpose of the present invention is to fuse the parameters of the networks trained in various hospitals before training, and obtain the network fusion strategy based on the representation ability of the fused network on the training sets of various hospitals and the differences in the features extracted on the training sets of different hospitals. Then, by continuously changing the fusion strategy, a network that can accurately extract the features of all hospital data is finally obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0036] Figure 1 A schematic diagram of a process structure provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] An embodiment of a multi-terminal fusion training method of a neural network based on blockchain of the present invention is as follows: Figure 1 shown.

[0039] The following is a detailed description:

[0040] Step 1: Each hospital trains its own neural network and stores it on the blockchain.

[0041] 1. Build a semantic segmentation network for each hospital. In this embodiment, all hospitals use the existing U-net network. All labeled medical image data of the hospital are used as a data set, 80% of which are used as a training set and 20% as a test set; use the training set to train the parameters of the semantic segmentation network, and calculate the accuracy of the semantic segmentation network trained by each hospital on the test set of each hospital. In this embodiment, DNN network (Deep Neural Networks, referred to as neural network) is used to refer to this semantic segmentation network.

[0042] 2. Share the parameters of the DNN networks trained by each hospital and the calculated accuracy of each DNN network on the test set, then obtain the hospital corresponding to the DNN network with the highest accuracy, make the hospital generate a new block, and store the DNN network trained by the hospital in this new block, connect the block to the blockchain, and give the hospital a reward.

[0043] 3. The process of deciding which hospital’s blocks can be connected to the blockchain based on the accuracy of the DNN network is regarded as a consensus mechanism, and rewards are given to incentivize hospitals to train DNN networks with higher accuracy. Hospitals can improve the accuracy of trained DNN networks by annotating more and more comprehensive data sets, or by screening and cleaning the data to ensure a reasonable data distribution.

[0044] Step 2: Each hospital retrains the DNN network stored on the blockchain, and fuses the DNN network parameters trained by each hospital and stores them on the blockchain. This step is iterated to obtain multiple sets of fusion blocks.

[0045] 1. Read a DNN network stored in the latest block on the blockchain, and each hospital uses its own test set to calculate the accuracy of this DNN network , the multiple accuracy rates obtained by all hospitals Recorded as set S1. Then each hospital uses its own training set to retrain the DNN network based on the original parameters of this DNN network, so that the DNN network converges again. Each hospital calculates the accuracy of the retrained DNN network on the test set of hospital a. , obtain the accuracy a2 of all hospitals, recorded as set S2.

[0046] 2. Each hospital will retrain the accuracy of the previous DNN network on the test set And the accuracy of the retrained DNN network on the test set , and the parameters of the DNN network retrained by each hospital are shared with other hospitals.

[0047] 3. Obtain a new block for the hospital a that corresponds to the DNN network with the maximum accuracy in S2, calculate the average of the parameters of the DNN networks shared by all hospitals, and then use the average as a new parameter of a DNN network. This DNN network is the DNN network after the DNN networks of all hospitals are fused. Then store this DNN network and the accuracy in S1 in the new block generated by hospital a, and connect this new block to the blockchain. This new block is called a fusion block.

[0048] 4. Continuously iterate step 2 to generate new fusion blocks. The DNN network stored in the block continuously integrates the data features of all hospitals. The newly generated K (K=30 in this embodiment) fusion blocks are regarded as a group of fusion blocks. After generating K fusion blocks, the next group of fusion blocks is generated according to step 2.

[0049] Step 3: Based on the DNN network stored on the blockchain, obtain the representation ability of the DNN network on the training sets of each hospital and the differences in the features extracted from the training sets of different hospitals, and obtain the DNN network fusion strategy.

[0050] 1. Assuming that after K new fusion blocks are generated, the next fusion block should be generated by hospital a (for specific judgment of which hospital generates it, see the consensus mechanism in step 1.3), then hospital a obtains the accuracy of each hospital stored in the first K fusion blocks on the blockchain, that is, in these first K fusion blocks, each fusion block stores an S1 described in step 2 (the S1 obtained here represents the set of accuracy rates on all hospital test sets after the DNN network is fused and before it is retrained). According to the order in which this group of fusion blocks is generated, these accuracy rates stored by each hospital in this group of fusion blocks constitute an accuracy change sequence. Assume that the accuracy change sequence of any hospital b is , K represents the length of the sequence, Indicates the first element values, where Corresponding to a block on the blockchain. Each element in the sequence represents the accuracy of the DNN network after each fusion on the test set of hospital b, which is used to characterize whether the fused DNN network has learned the training set data characteristics of hospital b.

[0051] 2. For one of the hospital b’s accuracy change sequence , the sequence is mean filtered, and the filtering result is , and Equal length, order It represents the representation ability of the fused DNN network for hospital b. The larger it is, the stronger the DNN network's ability to represent the training set of hospital b will be after continuous integration.

[0052] 3. Assume that the accuracy change sequence of hospital c is ,make The difference in the accuracy of the features extracted by the DNN network after fusion on the training sets of hospital b and hospital c is referred to as the feature difference between hospital b and hospital c. The specific calculation method is:

[0053] First of all Perform mean filtering respectively to obtain sequences of equal length ; Then get the volatility sequence , and the wave series . ( It means subtracting two sequences. The result is the subtraction of corresponding elements in the sequences. The result of subtracting two sequences is still a sequence of equal length).

[0054] and The accuracy change sequence is and The fluctuation sequence of each element in the comparison with the mean value. Then the characteristic difference between hospital b and hospital c

[0055] express The elements, indicating On The difference between an element and the mean. express On The difference between the elements and the mean is On The absolute value of the difference between the elements and the mean. The larger the value, the more sequence and The change trend of the elements in is just the opposite, for example When the elements of become larger, The elements of become smaller; or The elements of become smaller, The elements become larger.

[0056] Next, based on the representation ability of the fused DNN on the training sets of each hospital and the characteristic differences between hospitals, the hospitals are classified and the fusion strategy of the DNN network is obtained.

[0057] 1. Taking each hospital as a node, the edge weight between any two hospitals b and c is That is, if the DNN network has a large difference in the representation ability of the two hospitals and the characteristics of the two hospitals are very different, then the edge weights of the two hospitals are large. So far, a graph structure data is obtained, and the nodes on this graph structure data are classified using the spectral clustering algorithm to obtain multiple categories. Hospitals in the same category represent that the fused DNN network cannot extract the characteristics of the training sets of these hospitals at the same time, so it is necessary to change the fusion method of the DNN network.

[0058] 2. The fusion method of changing the DNN network is as follows:

[0059] After K new fusion blocks are generated, when hospital A (i.e., the hospital corresponding to the network with the highest accuracy in the set) needs to generate another new block, hospital A first obtains the DNN network shared by all hospitals, and then obtains multiple categories, each of which is a set of hospitals. Previously, hospital A fused the DNN network by taking the average of the DNN network parameters of all hospitals for fusion, but this fusion method will make it impossible for the fused DNN network to extract the features of the training sets of hospitals in these categories at the same time. Therefore, hospital A can no longer take the average of the DNN networks of all hospitals, but must select some suitable hospitals with a certain probability, and then take the average of the DNN networks of these hospitals.

[0060] 3. The probability of each hospital being selected is calculated as follows:

[0061] For category s, which contains the largest number of hospitals among these categories, the probability of each hospital in s being selected is 1.0. The reason is that the DNN network cannot simultaneously extract the features of the training sets of these hospitals in category s, which has a large number of hospitals. Therefore, the DNN networks of these hospitals need to be fused so that the fused DNN network contains more feature information of the DNN networks of the hospitals in s, so that the fused DNN network can simultaneously extract the features of the training sets of these hospitals after being retrained.

[0062] 4. The probability of any hospital n being selected among hospitals other than s is , It represents the maximum edge weight among all the edge weights between hospitals in s. The smaller the value, the more it means that it is necessary to integrate the DNN network of other hospitals. represents the smallest edge weight among the edge weights of hospital n and all hospitals in category s. The larger the value, the more likely it is that the DNN network cannot simultaneously extract the features of the training set of hospitals in s, and it is also unlikely to simultaneously extract the features of the training set of hospital n. Therefore The larger it is, the greater the probability of selecting hospital n and integrating the DNN network trained in hospital n into it.

[0063] 4. At this point, after obtaining the category s, hospital A also obtains the probability of selection of each hospital, and then selects each hospital with this probability. Some hospitals will be selected, and some will not be selected. The DNN networks of these selected hospitals are obtained, and the mean of these DNN network parameters is calculated, and then hospital A uses the mean as a parameter of a DNN network. At this point, hospital A fuses a DNN network according to a category s and generates a new block. Finally, hospital A stores the fused DNN network in the new block. In addition, it is necessary to store the accuracy set S1 in the block as in step 1, and connect the block to the blockchain to give the hospital a reward. The process of selecting hospitals according to the probability of selection of each hospital and obtaining a fused DNN network is the fusion strategy of the DNN network. If the probability of selection of each hospital remains unchanged, then the fusion strategy of the DNN network is considered unchanged. If the probability of selection of each hospital changes, then the fusion strategy of the DNN network is considered to have changed.

[0064] Step 4: Keep the fusion strategy of the DNN network unchanged, and use the hospitals selected in the fusion strategy and the method of generating fusion blocks in step 2 to generate a new set of fusion blocks until the network converges.

[0065] 1. Keep the fusion strategy of the DNN network unchanged, generate K new fusion blocks, and after generating K fusion blocks, iterate the process of step 3 of this embodiment until the DNN network converges. In this process, the fusion strategy of the DNN network is constantly changed according to whether the DNN network can extract features between multiple hospitals at the same time, so that the DNN network can learn the correct features and avoid the distribution differences and imbalances of data from various hospitals and the low accuracy of the DNN network caused by data anomalies.

[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-terminal fusion training method for a neural network based on blockchain, characterized in that: The following steps are involved: Step 1: Obtain labeled medical image data from each hospital for training to obtain the DNN network of each hospital, calculate the accuracy of the DNN network of each hospital on the test set, obtain the hospital corresponding to the DNN network with the highest accuracy, generate a new block, store the DNN network of the hospital in the new block and link the new block to the blockchain; Step 2: Each hospital uses the DNN network stored in the latest block to calculate the accuracy a1 of each hospital's test set on the DNN network, and obtains the accuracy set S1 of all hospitals; Each hospital retrains the network according to the parameters of the DNN network stored in the latest block, and uses the retrained DNN network to calculate the new accuracy a2 of each hospital on the test set, and obtains the accuracy set S2 of all hospitals; The parameters of the DNN networks retrained in all hospitals are averaged, and a new DNN network is obtained by taking the average as the new parameter. The hospital corresponding to the DNN network with the highest accuracy in S2 is extracted to generate a block. The new DNN network and the accuracy in S1 are stored in the block generated by the hospital. The block is used as the latest block for iteration, and the block is a fusion block. Step 3: Arrange the generated fusion blocks in the order of generation. The accuracy stored in the fusion blocks of each hospital constitutes an accuracy change sequence. The accuracy change sequence of each hospital on the fusion block is obtained. The accuracy change sequence of each hospital is mean filtered. The representation ability of each hospital and the feature differences between hospitals are calculated based on the filtering results. The hospitals are classified using the representation ability of each hospital and the feature differences between hospitals, and the fusion strategy of the DNN network is determined. Step 4: Keep the fusion strategy of the DNN network unchanged, use the hospitals selected in the fusion strategy and the method of generating fusion blocks in step 2 to generate a new set of fusion blocks, and determine whether the DNN network converges; If the DNN network converges, the fusion strategy is determined as the final fusion method. If the DNN network does not converge, the fusion strategy of the DNN network is changed until the network converges. The process of determining the fusion strategy of the DNN network is as follows: Taking each hospital as a node, calculate the edge weights between hospitals to obtain a graph structure data, classify the nodes on the graph structure data, calculate the probability of each hospital being selected for all hospitals in each category, and extract hospitals that meet the conditions; The method for calculating the probability of each hospital being selected is as follows: For the category s that contains the largest number of hospitals after classification, the probability of all hospitals in this category being selected is 1.0; The probability of each hospital being selected in the categories other than the one containing the largest number of hospitals is: Where: P is the probability of the hospital being selected; a s represents the maximum edge weight among all edge weights between hospitals in category s; b ns is the minimum edge weight among the edge weights between hospital n and all hospitals in category s; The fusion strategy remains unchanged, which means that the probability of each hospital being selected remains unchanged.

2. According to the blockchain-based neural network multi-terminal fusion training method of claim 1, it is characterized by: The method to obtain the accuracy is to use all the labeled medical image data of the hospital as the data set, 80% of which is used as the training set and 20% as the test set. The training set is used to train the parameters of the DNN network, and the accuracy of each hospital's DNN network on its test set is calculated.

3. According to the blockchain-based neural network multi-terminal fusion training method of claim 1, it is characterized by: The calculation method of the representation ability of each hospital is as follows: Where: Q is the representation capability of the hospital; K is the length of the accuracy change sequence, that is, the number of fusion blocks; x corresponds to a block on the blockchain; is the mean filtering result of the accuracy change sequence.

4. According to a blockchain-based neural network multi-terminal fusion training method according to claim 1, it is characterized by: The calculation method for the difference in characteristics between the hospitals is as follows: Where: R 12 is the characteristic difference between hospital 1 and hospital 2; ΔL2 represents the fluctuation sequence of the accuracy change sequence of hospital 2; ΔL1 represents the fluctuation sequence of the accuracy change sequence of hospital 1; x represents the length of the fluctuation sequence, and K represents the length of the accuracy change sequence; The calculation formula of the volatility sequence is as follows: Where: ΔL represents the fluctuation sequence of each hospital; L is the accuracy change sequence of each hospital, is the mean filtering result of the accuracy change sequence.

5. According to a blockchain-based neural network multi-terminal fusion training method according to claim 1, it is characterized by: The calculation method of the edge weight between the hospitals is as follows: Where: Q1 is the characterization capability of hospital 1; Q2 is the characterization capability of hospital 2; R 12 is the edge weight between hospital 1 and hospital 2.