A data classification method and device based on federated learning
By using centralized pre-training and end-side training methods in federated learning, combining contribution calculation and federated aggregation, the problem of accuracy and underreporting rate in disease classification models is solved, and efficient data classification and cross-institutional data collaboration are achieved.
Patent Information
- Application Number
- CN202210779520.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-07-04
AI Technical Summary
Due to the distributed nature of federated learning, there is a loss of accuracy compared with centralized machine learning. Especially in disease classification models, the missed reporting rate is high, and the data silos between medical institutions are serious, making it difficult to effectively collaborate.
A data classification method based on federated learning is proposed. By obtaining centrally managed patient data sets and establishing a convolutional neural network model, pre-training, the model is sent to various medical institutions for end-side training, the contribution of each client model is calculated and federal aggregation is performed until the global model is converged.
It effectively reduces the misreport rate of data classification, and at the same time solves the data silos between medical institutions, improves the accuracy and efficiency of federated learning, and reduces communication costs and data management costs.
Smart Images

Figure CN114943308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated machine learning, and in particular to a data classification method and device based on federated learning. Background Art
[0002] Artificial intelligence and machine learning systems play an increasingly important role in healthcare. They can help medical staff make decisions under uncertain circumstances. However, due to data privacy issues, medical institutions cannot conduct collaborative machine learning well. Currently, collaborative medical machine learning can be roughly divided into: centralized patient data sets, distributed healthcare, crowdsourcing healthcare, blockchain healthcare, and IoT healthcare.
[0003] Among these methods, some require the establishment of a centralized patient data set, some require the maintenance of a blockchain, and some require additional hardware support, which greatly increases the cost of collaborative machine learning between medical institutions. In recent years, with the emergence of federated learning, the use of federated learning technology in solving data silos and in the medical field has gradually increased. At present, federated learning in the medical field can be divided into the following research directions: improving federated learning for specific data sets, further protecting the privacy of federated learning, reducing the communication overhead of federated learning, and the application of federated learning in the medical Internet of Things.
[0004] However, due to the distributed nature of federated learning, there is inevitably a loss in accuracy compared to centralized machine learning. As a disease classification model, the underreporting rate is very important. The cost of misclassifying a sick patient as a healthy patient is much higher than the cost of misclassifying a healthy patient as a sick patient. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a data classification method and device based on federated learning.
[0006] In a first aspect, the present invention provides a data classification method based on federated learning, the method comprising:
[0007] Acquire a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model based on the data set;
[0008] Send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain the local model corresponding to each client;
[0009] Receive the local models corresponding to each client uploaded, calculate the accuracy of each local model based on the centralized data set, and calculate the contribution of the local model corresponding to each client according to the accuracy;
[0010] According to the contribution of the local models corresponding to each client, the aggregation weight during federal aggregation is calculated, and the local models are subjected to federal aggregation that can accelerate convergence according to the aggregation weight until the local models converge to obtain a global model; wherein the global model is used to classify the patient's data.
[0011] Furthermore, it also includes:
[0012] The weights of the convolutional neural network model are set, and the convolutional neural network model including the weights is transformed to obtain a transformed convolutional neural network model.
[0013] The contribution of the local model corresponding to each client is calculated according to the accuracy, including:
[0014] Determine a target local model from the received local models;
[0015] Aggregating all local models except the target local model among the received local models, and calculating the accuracy of the aggregated local models;
[0016] A contribution degree corresponding to the target local model is determined based on the accuracy of the target local model.
[0017] The calculation of the aggregation weight during federation aggregation includes:
[0018] Normalizing the contribution degree corresponding to each of the local models to obtain a normalized value corresponding to each of the local models;
[0019] The aggregation weight during federation aggregation is obtained by performing calculations based on the contribution corresponding to each of the local models and the normalized value corresponding to each of the local models.
[0020] The convolutional neural network model has a one-dimensional convolution kernel architecture, including two convolution layers;
[0021] Among them, the convolution kernel size of one convolution layer is 11, with a total of 6 convolution kernels; the convolution kernel size of the other convolution layer is 10, with a total of 8 convolution kernels.
[0022] The convolution step sizes of the two convolutional layers are both 1.
[0023] In a second aspect, the present invention provides a data classification device based on federated learning, the device comprising:
[0024] A pre-training unit, used to obtain a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model according to the data set;
[0025] A local model unit is used to send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data set to obtain a local model corresponding to each client;
[0026] A processing unit, configured to receive the local models corresponding to each client uploaded, calculate the accuracy of each local model based on the centralized data set, and calculate the contribution of the local model corresponding to each client according to the accuracy;
[0027] A federal aggregation unit is used to calculate the aggregation weight during federal aggregation according to the contribution of the local models corresponding to each client, and to perform federal aggregation that can accelerate convergence on each local model according to the aggregation weight until each local model converges to obtain a global model; wherein the global model is used to classify patient data.
[0028] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, a communication interface and a communication bus; wherein:
[0029] The processor, the communication interface and the memory communicate with each other via a communication bus;
[0030] The processor is used to call computer instructions in the memory to execute the steps of the above-mentioned data classification method based on federated learning.
[0031] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed, the computer performs the steps of the above-mentioned data classification method based on federated learning.
[0032] The data classification method and device based on federated learning proposed by the present invention obtains the patient's data set and establishes a convolutional neural network model, pre-trains the convolutional neural network model according to the data set; sends the trained convolutional neural network model to the client, so that the client receiving the convolutional neural network model obtains the local model corresponding to each client; receives the local models corresponding to each client uploaded by each client, calculates the accuracy of each local model based on the centralized data set, and calculates the contribution of the local model corresponding to each client according to the accuracy; calculates the aggregation weight during federation aggregation according to the contribution of the local model corresponding to each client, and performs federation aggregation on each local model that can accelerate convergence according to the aggregation weight, until each local model converges to obtain a global model. It can improve the accuracy of data classification and reduce the false negative rate at the same time.
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] 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 prior art will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A flowchart of a data classification method based on federated learning provided by the present invention.
[0036] Figure 2 A schematic diagram of a convolutional neural network model in a data classification method based on federated learning provided by the present invention.
[0037] Figure 3 A structural schematic diagram of a data classification device based on federated learning provided by the present invention.
[0038] Figure 4 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0040] The present invention provides a data classification method based on federated learning. Figure 1 As shown, it specifically includes the following contents:
[0041] S101: Acquire a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model according to the data set;
[0042] In this step, the server receives a centrally managed patient data set, which is composed of data sent by the client with which the server communicates with each other. It can be understood that the data set is divided into a training set and a test set, which are used for training and testing after training, respectively.
[0043] In this step, a convolutional neural network model based on multi-label classification is established. The convolutional neural network model is shown in the figure Figure 2 As shown in Figure 2, the first part is the autoencoder part, and the second part is the convolution kernel.
[0044] Furthermore, in order to improve the classification accuracy of the convolutional neural network model and reduce the underreporting rate of the convolutional neural network model, a method for reducing the underreporting rate of the convolutional neural network model is provided.
[0045] Specifically include:
[0046] The weights of the convolutional neural network model are set, and the convolutional neural network model including the weights is transformed to obtain a transformed convolutional neural network model.
[0047] In the specific implementation, the weight x[class(i)] is introduced on the basis of the cross entropy formula of the convolutional neural network model. In the weight x[class(i)], class(i) is the class whose classification ratio needs to be improved, class is the number of classifications, and x is the batch size. The loss function formula after the weight is introduced is as follows.
[0048]
[0049] By transforming and solving the above formula, we can get the loss value loss, as shown in the following formula.
[0050]
[0051] After adjusting the above formula, the underreporting rate of the convolutional neural network model can be reduced.
[0052] S102: Send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain a local model corresponding to each client;
[0053] In this step, the server sends the trained convolutional neural network model to the client of each medical institution that has a local data set. In other words, the server sends the trained convolutional neural network model to each medical institution participating in the training.
[0054] In this implementation, after the client of each medical institution pre-processes the data in the local patient data set, each medical institution client performs end-side training on the convolutional neural network model received by each medical institution based on its own patient data set to obtain a local model, and sends it to the server, so that the server can aggregate the local models sent by each medical institution client to obtain a global model; after each medical institution client receives the global model sent by the server, each medical institution client performs end-side training on the global model received by each medical institution based on its own patient data set to obtain an updated local model, and sends it to the server, so that the server can aggregate the updated local models sent by each medical institution client to obtain an updated global model; repeat the iterative process until the global model converges;
[0055] It should be understood that the above-mentioned federated training process means that each medical institution client trains the received local model, global model, and global model after the previous round of aggregation relatively independently, and all clients execute the training process simultaneously.
[0056] It should be noted that the number of iterations described above can be appropriately set.
[0057] S103: receiving the local models corresponding to the respective clients uploaded, calculating the accuracy of the local models based on the centralized data set, and calculating the contribution of the local models corresponding to the respective clients according to the accuracy;
[0058] In this step, the contribution of the local model corresponding to each client is calculated according to the accuracy, including:
[0059] Determine a target local model from the received local models;
[0060] Aggregating all local models except the target local model among the received local models, and calculating the accuracy of the aggregated local models;
[0061] A contribution degree corresponding to the target local model is determined based on the accuracy of the target local model.
[0062] Specifically include:
[0063] The server obtains the accuracy q of each local model sum .
[0064] The server then aggregates all local models received except the target local model and calculates the accuracy q of the target local model. i ;
[0065] The server follows the formula:
[0066]
[0067] Calculate the contribution Y of the local model of the aggregation target i .
[0068] Among them, the parameters It is an artificially defined operator used to control the magnitude of contribution affecting the local model;
[0069] S104: Calculate the aggregation weight during federation aggregation according to the contribution of the local models corresponding to each client, and perform federation aggregation that can accelerate convergence on each local model according to the aggregation weight until each local model converges to obtain a global model; wherein the global model is used to classify the patient data.
[0070] In this step, the aggregation weight of the federation aggregation is calculated according to the contribution of each local model corresponding to each client, including: normalizing the contribution corresponding to each local model to obtain the normalized value corresponding to each local model;
[0071] The aggregation weight during federation aggregation is obtained by performing calculations based on the contribution corresponding to each of the local models and the normalized value corresponding to each of the local models.
[0072] Specifically include: the server according to the following formula:
[0073]
[0074] The contribution of each local model calculated is normalized, where n is the number of medical institutions participating in this aggregation;
[0075] The server follows the formula:
[0076] m Di =Q DW Y i ;
[0077] Calculate the aggregation weight m when obtaining global aggregation Di ;
[0078] The server follows the formula:
[0079]
[0080] Perform global aggregation, where the aggregation weight m of each medical institution model is Di and the respective parameters in the model are θ, The ratio of the training data of this medical institution to the total training data.
[0081] In this embodiment, the convolutional neural network model has a one-dimensional convolution kernel architecture, including two convolution layers; wherein the convolution kernel size of one convolution layer is 11, with a total of 6 convolution kernels; the convolution kernel size of the other convolution layer is 10, with a total of 8 convolution kernels. The convolution step size of the two convolution layers is 1.
[0082] From the above description, it can be seen that the data classification method based on federated learning provided by the embodiment of the present invention uses a global model that can reduce the false negative rate through centralized pre-training, and calculates the contribution of each client model to obtain the weights required for each client model when performing federated aggregation that can accelerate aggregation, so that the global model of federated learning can converge quickly, reduce the training time of federated learning and save communication costs. Then, the use of the global model can effectively reduce data management and storage costs, and at the same time reduce the communication overhead of federated learning training. It also reduces the false negative rate while ensuring accuracy, and can ensure the privacy and security of patients between various medical institutions. This method adopts the method of first performing feature dimensionality reduction through an autoencoder and then performing multi-label classification through a one-dimensional convolutional neural network, and improves the loss function. While using federated learning, it effectively guarantees accuracy and false negative rate.
[0083] To further illustrate the present solution, the present invention provides an application example of a data classification method based on federated learning, which specifically includes the following contents:
[0084] The Wisconsin Breast Cancer Dataset (WBCD) in the UCI Machine Learning Repository was selected to simulate the centralized pre-training and federated training of the disease classification model. The training dataset is divided into two parts: a small part of the data is used for centralized pre-training of the server; the other large part of the data is used for federated training of the client, and this part of the data is evenly divided into 3 parts and distributed to 3 clients, with 150 patient data for each client. The client data distribution simulates independent and identically distributed and non-independent and identically distributed conditions respectively: the independent and identically distributed distribution method is to randomly distribute diseased and healthy samples, and the ratio of the two samples is 2:3; the non-independent and identically distributed distribution method is to manually divide the data into 3 parts, and the ratio of diseased and healthy samples in each part is 9:1, 1:9, and 2:3 respectively.
[0085] The autoencoder part of the FedDPS-FDW (Federated Disease Prediction System Faster based on Dynamic Weights) model compresses and extracts 30 features of each data into 20, and then inputs them into the convolution part. The convolution kernel of the convolution part uses a one-dimensional convolution, which is divided into two one-dimensional convolution processes. The kernel size of the first one-dimensional convolution is 11, with a total of 6 convolution kernels; the kernel size of the second one-dimensional convolution is 10, with a total of 8 convolution kernels. The step size of each convolution operation is 1.
[0086] The loss function used when training the FedDPS-FDW model is Cross Entropy Loss.
[0087] In order to verify the effect of the proposed method, the proposed classification method based on federated learning is compared with the existing disease classification method based on centralized deep learning and the unmodified disease classification method of federated learning. The disease classification method of centralized deep learning is recorded as ConDPS-DNN (Centralized Disease Prediction Systembased on DNN). The federated learning disease classification method without accelerated convergence and without reducing the false negative rate is recorded as FedDPS-AC (Federated Disease Prediction System based on Autoencoder CNN). The federated learning disease classification method without accelerated convergence is recorded as FedDPS-LAC (Federated Disease Prediction System basedon Loss Function Weighted Autoencoder CNN). Referring to Tables 1 and 2, when the client holds independent and identically distributed data and non-independent and identically distributed data, it can be seen from the comparison that the disease classification accuracy of the distributed federated learning method proposed in the present invention is very close to the disease classification accuracy of the existing centralized deep learning method, and while ensuring the classification accuracy of the model, the false negative rate of the model is reduced, and the convergence speed is also faster than traditional federated learning. Considering that this method can solve the problem of patient data silos between medical institutions and protect patient privacy, in addition to reducing the communication costs caused by federated training, this method is more superior.
[0088] Table 1 Disease classification accuracy, underreporting rate and number of convergence rounds when client data are independent and identically distributed
[0089] method Accuracy False negative rate Convergence rounds CenDPS-DNN 0.958 0.035 - FedDPS-AC 0.956 0.035 395 FedDPS-LAC 0.951 0.011 395 FedDPS-FDW 0.953 0.011 271
[0090] Table 2 Disease classification accuracy, underreporting rate and number of convergence rounds when client data are not independent and identically distributed
[0091] method Accuracy False negative rate Convergence rounds CenDPS-DNN 0.944 0.042 - FedDPS-AC 0.943 0.045 455 FedDPS-LAC 0.943 0.024 455 FedDPS-FDW 0.942 0.024 339
[0092] Table 1 shows the effect of the disease classification model after model training when each client holds independent and identically distributed data. A total of 3 clients participated in the overall training. Table 2 shows the effect of the disease classification model after model training when each client holds non-independent and identically distributed data.
[0093] As can be seen from Tables 1 and 2 above, the disease classification method based on federated learning has a test accuracy rate that is very close to that of the centralized method, while solving the problem of patient data islands between medical institutions and protecting patient privacy. The FedDPS-LAC method with reduced false negative rate in this paper has a false negative rate that is significantly lower than the FedDPS-AC method without improvement, and the model convergence speed of the FedDPS-FDW using the accelerated convergence method in this paper is significantly faster than that of the unused FedDPS-LAC method. This reflects the superiority of the method proposed in this invention.
[0094] From the above description, it can be seen that a disease classification model is constructed by using distributed deep learning technology in which an edge server and multiple medical institution clients participate. During the training process of the disease classification model, the server first initializes the model and improves the model to reduce the false negative rate, and uses the relevant patient data set for centralized pre-training. After the centralized pre-training is completed, the server distributes the obtained disease classification model to each medical institution client. Based on the received pre-trained disease classification model, each client uses its local patient data for further model training, and then transmits the trained local model to the server. At the end of this round of training, the server accelerates the aggregation of local models collected from each medical institution client. The server calculates the contribution of each medical institution client model to the global model in this round, and uses the contribution to dynamically adjust the global model aggregation to obtain a global model. In order to ensure the quality of training, the server sends the obtained model to each client again for the next round of model training, and updates the local model until a certain number of training rounds is reached. This paper adopts the federated learning training method combined with the classification method based on convolutional neural network, and improves the model according to the false negative rate of the model, so that the accuracy of the model is improved while reducing the false negative rate; the model training task is assigned to each medical institution client, which solves the problem of patient data islands between medical institutions and protects patient privacy; at the same time, this paper also improves the aggregation method of federated learning, so that federated learning can accelerate aggregation, reduce federated learning training, and reduce the communication cost brought by federated training. At the same time, the data acquisition, management, and model training tasks are assigned to each medical institution, which can reduce the cost of data acquisition and management, reduce the training cost of the model, and protect the privacy of patients in each medical institution.
[0095] The embodiment of the present invention provides a specific implementation of a data classification device based on federated learning that can implement all the contents of the data classification method based on federated learning, see Figure 3 , the data classification device based on federated learning specifically includes the following contents:
[0096] A pre-training unit 10, used to obtain a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model according to the data set;
[0097] The local model unit 20 is used to send the trained convolutional neural network model to each client of the medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain the local model corresponding to each client;
[0098] The processing unit 30 is used to receive the local models corresponding to each client uploaded, calculate the accuracy of each local model based on the centralized data set, and calculate the contribution of the local model corresponding to each client according to the accuracy;
[0099] The federal aggregation unit 40 is used to calculate the aggregation weight during federal aggregation according to the contribution of the local models corresponding to each client, and perform federal aggregation that can accelerate convergence on each local model according to the aggregation weight until each local model converges to obtain a global model; wherein the global model is used to classify the patient data.
[0100] Also includes:
[0101] An updating unit is used to set the weights of the convolutional neural network model and transform the convolutional neural network model including the weights to obtain a transformed convolutional neural network model.
[0102] The processing unit 30 includes:
[0103] A receiving module, used for determining a target local model from each received local model;
[0104] A calculation module, used for aggregating all local models except the target local model among the received local models, and calculating the accuracy of the aggregated local models;
[0105] A generation module is used to determine the contribution corresponding to the target local model based on the accuracy of the target local model.
[0106] The federation aggregation unit 40 includes:
[0107] A normalization module, used for normalizing the contribution degree corresponding to each of the local models to obtain a normalized value corresponding to each of the local models;
[0108] The weight module is used to calculate according to the contribution degree corresponding to each of the local models and the normalized value corresponding to each of the local models to obtain the aggregation weight during federation aggregation.
[0109] The convolutional neural network model has a one-dimensional convolution kernel architecture, including two convolution layers; the convolution kernel size of one convolution layer is 11, with a total of 6 convolution kernels; the convolution kernel size of the other convolution layer is 10, with a total of 8 convolution kernels. The convolution step size of the two convolution layers is 1.
[0110] The embodiment of the data classification device based on federated learning provided by the present invention can be specifically used to execute the processing flow of the embodiment of the data classification method based on federated learning in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the above-mentioned method embodiment.
[0111] From the above description, it can be seen that the data classification device based on federated learning provided by the embodiment of the present invention obtains the patient's data set and establishes a convolutional neural network model, and pre-trains the convolutional neural network model according to the data set; sends the trained convolutional neural network model to the client, so that the client receiving the convolutional neural network model obtains the local model corresponding to each client; receives the local models corresponding to each client uploaded by each client, calculates the accuracy of each local model based on the centralized data set, and calculates the contribution of the local model corresponding to each client according to the accuracy; calculates the aggregation weight during federation aggregation according to the contribution of the local model corresponding to each client, and performs federation aggregation on each local model that can accelerate convergence according to the aggregation weight, until each local model converges to obtain a global model. It can improve the accuracy of data classification and reduce the false negative rate at the same time.
[0112] The embodiment of the present invention provides an embodiment of an electronic device for implementing all or part of the content of the data classification method embodiment based on federated learning, see Figure 4 , the electronic device specifically includes the following contents:
[0113] Processor 810, communication interface 820, memory 830 and communication bus 840, wherein the processor 810, communication interface 820 and memory 830 communicate with each other through the communication bus 840. The processor 810 can call the computer instructions in the memory 830 to execute the following method:
[0114] Acquire a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model based on the data set;
[0115] Send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain the local model corresponding to each client;
[0116] Receiving the local models corresponding to each client uploaded by each client, calculating the accuracy of each local model based on the centralized data set, and calculating the contribution of the local model corresponding to each client according to the accuracy;
[0117] According to the contribution of the local models corresponding to each client, the aggregation weight during federal aggregation is calculated, and the local models are subjected to federal aggregation that can accelerate convergence according to the aggregation weight until the local models converge to obtain a global model; wherein the global model is used to classify the patient's data.
[0118] An embodiment of the present invention provides a computer-readable storage medium for implementing all or part of the contents of the embodiment of the data classification method based on federated learning. The computer-readable storage medium stores computer instructions. When the computer instructions are executed, the computer executes all the steps of the data classification method based on federated learning in the above embodiment. For example, when the processor executes the computer instructions, the following steps are implemented:
[0119] Acquire a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model based on the data set;
[0120] Send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain the local model corresponding to each client;
[0121] Receiving the local models corresponding to each client uploaded by each client, calculating the accuracy of each local model based on the centralized data set, and calculating the contribution of the local model corresponding to each client according to the accuracy;
[0122] According to the contribution of the local models corresponding to each client, the aggregation weight during federal aggregation is calculated, and the local models are subjected to federal aggregation that can accelerate convergence according to the aggregation weight until the local models converge to obtain a global model; wherein the global model is used to classify the patient's data.
[0123] Although the present invention provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).
[0124] In the embodiments provided by the present invention, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in the embodiment provided by the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0127] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0128] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device (system) embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0129] In this document, the terms "include", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0130] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or replacement of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of the present invention may be used alone or in combination with one or more other aspects and / or embodiments thereof.
[0131] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or perform equivalent replacements on some of the technical features thereof; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data classification method based on federated learning, characterized in that: include: Acquire a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model according to the data set; including setting weights of the convolutional neural network model, and transforming the convolutional neural network model including the weights to obtain a transformed convolutional neural network model; The setting of the weights of the convolutional neural network model includes: Pass-through Calculate the loss value of the weight of the convolutional neural network model; where x[class(i)] is the weight of the convolutional neural network model, class(i) is the class whose classification ratio needs to be improved, class is the number of classifications, and x is the batch size; Send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data sets to obtain the local model corresponding to each client; Receiving the local models corresponding to each client uploaded by each client, calculating the accuracy of each local model based on the centralized data set, and calculating the contribution of the local model corresponding to each client according to the accuracy; specifically including: Determine a target local model from the received local models; Aggregate all local models except the target local model among the received local models, and calculate the accuracy of the aggregated local models ; Based on the accuracy of the target local model and according to the formula Determine the contribution corresponding to the target local model ; In the formula, It is an artificially defined operator used to control the magnitude of contribution affecting the local model; According to the contribution of the local models corresponding to each client, the aggregation weight during federation aggregation is calculated, and the local models are federated for accelerated convergence according to the aggregation weight until the local models converge to obtain a global model; wherein the global model is used to classify the patient's data; specifically, it includes: Pass-through The contribution degree corresponding to each of the local models is normalized to obtain the normalized value corresponding to each of the local models; where n is the number of medical institutions participating in this aggregation; According to the contribution degree corresponding to each of the local models and the normalized value corresponding to each of the local models and by the formula Calculate and obtain the aggregation weight during federation aggregation ; Pass-through Perform global aggregation; the aggregation weight of each medical institution model in the formula is And the parameters in the model are , The ratio of the training data of this medical institution to the total training data.
2. The data classification method based on federated learning according to claim 1, characterized in that: The convolutional neural network model has a one-dimensional convolution kernel architecture, including two convolution layers; Among them, the convolution kernel size of one convolution layer is 11, with a total of 6 convolution kernels; the convolution kernel size of the other convolution layer is 10, with a total of 8 convolution kernels.
3. The data classification method based on federated learning according to claim 2 is characterized in that: The convolution step sizes of the two convolutional layers are both 1.
4. A data classification device based on federated learning, characterized in that: The method for performing the data classification method based on federated learning as claimed in any one of claims 1 to 3 comprises: A pre-training unit, used to obtain a centrally managed patient data set and establish a convolutional neural network model, and pre-train the convolutional neural network model according to the data set; A local model unit is used to send the trained convolutional neural network model to each client of a medical institution that has a local data set, so that the client receiving the convolutional neural network model performs terminal-side training on the received convolutional neural network model according to the respective patient data set to obtain a local model corresponding to each client; A processing unit, configured to receive the local models corresponding to each client uploaded, calculate the accuracy of each local model based on the centralized data set, and calculate the contribution of the local model corresponding to each client according to the accuracy; The federation aggregation unit is used to calculate the aggregation weight during federation aggregation according to the contribution of the local models corresponding to each client, and to perform federation aggregation to accelerate the convergence of each local model according to the aggregation weight until each local model converges to obtain a global model; wherein the global model is used to classify the patient's data.
5. An electronic device, characterized in that: include: processor, memory, communication interface and communication bus; wherein, The processor, the communication interface and the memory communicate with each other via a communication bus; The processor is used to call computer instructions in the memory to execute the steps of the data classification method based on federated learning as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed, cause the computer to perform the steps of the data classification method based on federated learning as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Brain image classification method based on semi-supervised federated learning and terminal equipment
CN113688862A
Federal learning method and system based on client weight evaluation
CN114564746A
Systems, methods, and apparatuses for implementing advancements towards annotation efficient deep learning in computer-aided diagnosis
US20220328189A1