A privacy-preserving method for medical data sharing based on blockchain using federated learning

By using blockchain and differential privacy technology in federated learning, combined with the interstellar file system, the problems of privacy protection and centralized aggregator single point failure in medical data sharing are solved, achieving efficient privacy protection and reliable global model construction. , breaking the data isolation between hospitals and improving diagnostic performance.

CN113536382BInactive Publication Date: 2024-09-27BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the process of medical data sharing, it is difficult for existing technologies to effectively protect user privacy. Especially in federated learning, centralized aggregators are prone to single points of failure, and third parties can deduce original information through model update information analysis, exposing privacy. risk.

Method used

A blockchain-based privacy protection method for medical data sharing is adopted. By using blockchain to store the initial model in federated learning, participants train the model locally and add Laplacian noise, and use the interstellar file system to calculate hash values ​​for upload. To the blockchain, differential privacy technology and federated learning are combined to ensure that data is queried to maximize accuracy and minimize the chance of identifying other records, preventing attacks.

Benefits of technology

It achieves the construction of a global machine learning model without sharing original data in federated learning, protects user privacy, avoids single points of failure of centralized aggregators, improves the privacy and reliability of the system, and reduces the cost of blockchain Storage pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113536382B
    Figure CN113536382B
Patent Text Reader

Abstract

The present invention relates to a medical data sharing privacy protection method based on blockchain using federated learning, and belongs to the field of blockchain privacy protection technology. The method uses federated learning technology to jointly model the data while ensuring that the original data does not leave the local area. In addition, differential privacy noise is added during the local model training process to prevent attackers from using the learned model to infer the user's sensitive information. The present invention uses blockchain to store and share global models, thereby avoiding problems such as single point failures in centralized aggregators. In order to reduce the storage pressure on the blockchain, the present invention uploads the trained local model to the Interstellar File System, and then calculates the file hash and uploads it to the blockchain as a transaction. The aggregated global training model is stored in the blockchain account book after consensus verification. Compared with the prior art, the present method has good privacy, reliability and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a medical data sharing privacy protection method, and belongs to the technical field of blockchain privacy protection. Background Art

[0002] With the rapid development of technologies such as the Internet of Things, cloud computing, and machine learning, the era of big data has arrived. Smart devices and digital medical instruments are rapidly becoming popular, and a large amount of personal health data is constantly being generated. These medical data have high mining and utilization value, but they involve user privacy issues. In the process of data collection, storage, sharing, and analysis, personal privacy information is likely to be leaked. Therefore, it is of great practical significance to achieve medical data privacy protection in the big data environment.

[0003] In the blockchain system, all nodes participate equally in data recording, and the on-chain data is open and transparent to all nodes, and has the characteristics of traceability. In addition, the distributed storage mechanism backs up the data multiple times, which can avoid data loss caused by single point failure, thereby ensuring data security.

[0004] Directly or indirectly using differential privacy technology to protect the privacy information of blockchain is a current research hotspot. The core idea of ​​differential privacy is that when an adversary tries to query personal information from a database, the information is obfuscated to a certain extent so that the adversary cannot discern sensitive information at the personal level from the query results. There are two main ways to add noise to data. One is to select noise based on the exponential distribution of discrete values, namely the exponential mechanism. The other is to add noise based on the sensitivity of the function, namely the Laplace mechanism. For the Laplace mechanism, some researchers use the Laplace operator to add noise to the access frequency of selected data, thereby protecting data privacy. Some researchers have also proposed adding noise to the energy cost set and implementing differential privacy technology in the blockchain to prevent data mining from attacking block information.

[0005] Interplanetary File System IPFS uses hash encryption to generate immutable permanent IPFS addresses for massive data, and then stores the address information on the blockchain. This is equivalent to simplifying the original data into an IPFS address before uploading it to the chain, which not only ensures the security of the data, but also takes into account the scalability of the blockchain. The two technologies of blockchain and IPFS complement each other, providing a clear path to use blockchain as a service to track all activities related to a given file, thereby improving the reliability of the data. IPFS has the following advantages:

[0006] (1) Content addressable. The content is hashed to facilitate search and tracking.

[0007] (2) No duplicate content. The hash value in the system is unique. The same content will generate the same hash value, so it will be judged as duplicate and deleted.

[0008] (3) Content cannot be tampered with: The system content needs to be verified by hash. If the content is tampered with, the hash value will also change.

[0009] Federated machine learning (Federated Learning), referred to as federated learning, is a machine learning framework that aims to establish a federated learning model based on distributed data sets. It can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security and government regulations.

[0010] In the traditional federated learning model, the central server sends the initial model to each participant, the participant trains the model with their own data set, and sends the weight update in the model to the central server. The central server aggregates the models received from the participants for update, and sends the aggregated model update to the participants again. The whole process will be repeated until the model converges and reaches the preset maximum number of iterations or the maximum training time.

[0011] Federated learning is mainly used to build machine learning models with the following characteristics:

[0012] (1) Each participant has a large amount of training data to participate in model training.

[0013] (2) During the training of the federated learning model, the original data does not leave the local machine.

[0014] (3) It is necessary to ensure that no party involved can infer the original data of other participants.

[0015] (4) The machine learning models trained on all data sets should be able to completely approximate the ideal model.

[0016] In this architecture, participants keep their own original data, which not only protects users' privacy and data security, but also reduces the communication overhead caused by sending original data.

[0017] Due to network security isolation and industry privacy, data barriers exist between different industries and departments, forming data silos that make it impossible to share data securely. Machine learning models trained based on independent data from each department are often not ideal. Federated learning technology allows participants to jointly build a global machine learning model without sharing original data.

[0018] However, there are still some challenges in the secure sharing of medical data based on federated learning. Federated learning usually uses a centralized aggregator. During the training process, the update information of the model is continuously reported to a third party or a centralized server, which is prone to single point failure. In addition, although only the gradient is passed during the training process without passing the original data, the third party can continuously collect the data of all participants in different rounds and have the opportunity to analyze and deduce the original information, but there is still a risk of privacy exposure. Summary of the invention

[0019] The purpose of this invention is to solve the problem of privacy information protection in the process of medical data sharing and propose a medical data sharing privacy protection method based on blockchain.

[0020] In order to achieve the above object, the present invention adopts the following technical scheme.

[0021] First, explain the relevant concepts:

[0022] Definition 1: Medical Data Protection

[0023] It refers to the use of certain technical means to prevent the leakage of medical data information. The data information that may be involved includes the patient's medical history information, key technical data, scientific research data, etc.

[0024] Definition 2: Data Privacy

[0025] Refers to the information directly or indirectly contained in the data that the data owner does not want to be disclosed, which needs to be protected during the process of data collection, storage, query, analysis and release.

[0026] Definition 3: Federated Learning

[0027] It is a technology that uses distributed machine learning or deep learning technology on local data to build a public virtual model. During the entire training and interaction process, the original data of all parties is always saved locally, and only the model gradients are exchanged and updated.

[0028] Definition 4: Blockchain Ledger

[0029] A distributed database for storing trained machine learning models.

[0030] Definition 5: Differential Privacy

[0031] Refers to the use of some cryptographic techniques to protect privacy leaks caused by a small change in the data source. When querying from a statistical database, it maximizes the accuracy of data query while minimizing the chance of identifying other irrelevant records.

[0032] Definition 6: Laplace Noise

[0033] Refers to the interference signal introduced by the Laplace operator.

[0034] Definition 7: Interplanetary File System

[0035] A peer-to-peer distributed file system, whose connected computing devices all have the same file management mode. It is a network transmission protocol designed to create persistent and distributed storage of shared files, and is a content-addressable peer-to-peer hypermedia distribution protocol.

[0036] A medical data sharing privacy protection method based on blockchain, comprising the following steps:

[0037] Step 1: Use blockchain to store the initial model with randomly selected parameters.

[0038] Each participant in federated learning can send a request to the blockchain to obtain the initial model. The blockchain provides a trusted model storage mechanism for all participants.

[0039] Step 2: Federated learning participants perform model training locally.

[0040] After each participant obtains the latest available model from the blockchain, they train it based on the data obtained locally and update the local model.

[0041] Step 3: Add noise.

[0042] Each participant adds sensitivity-calibrated noise to the trained local model and uses the Laplace mechanism to achieve differential privacy in the local model, thereby maximizing query accuracy and minimizing identification of other records when querying the model, preventing attackers from performing differential attacks on the queried model parameters to infer the original data.

[0043] The model with added noise is then uploaded to the InterPlanetary File System, which calculates the hash value of the model parameters and sends it to the blockchain system as a transaction.

[0044] Step 4: Perform a verification transaction.

[0045] In the blockchain, a committee composed of honest nodes is responsible for verifying transactions and producing blocks. After the committee verifies that the transaction signature is legal, the transaction format is correct, and there are no duplicate transactions, the transaction is deemed valid and then submitted to the blockchain ledger.

[0046] Step 5: Perform global fusion.

[0047] After the committee verifies the transaction, the smart contract aggregates the model using the federated averaging algorithm. When the model parameters converge, the model training is completely stopped and the obtained global model is uploaded to the blockchain for storage.

[0048] When the hospital diagnoses and treats patients, it queries the trained global model from the blockchain, inputs the patient's case information, and obtains auxiliary diagnosis and treatment results based on the global model.

[0049] Excellent machine learning models cannot be separated from the support of a large amount of high-quality medical data. Federated learning can break the isolation of case data between hospitals while protecting the privacy of case data within each hospital. In the training process of the global model, with the support of local data from multiple participating hospitals, it will have better diagnostic performance.

[0050] Beneficial Effects

[0051] Compared with the prior art, the method of the present invention has the following advantages:

[0052] 1. This method has good privacy. This method uses federated learning technology to jointly model the data without leaving the local area. In addition, differential privacy noise is added during the local model training process to prevent attackers from using the learned model to infer the user's sensitive information.

[0053] 2. This method has good reliability. The present invention uses blockchain to store and share global models, thereby avoiding problems such as single point failures in centralized aggregators.

[0054] 3. This method has good scalability. In order to reduce the storage pressure on the blockchain, the present invention uploads the trained local model to the Interstellar File System, and then calculates the file hash and uploads it to the blockchain as a transaction. The aggregated global training model is stored in the blockchain account book after consensus verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION

[0056] The method of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0057] Example

[0058] like Figure 1 As shown, specifically, this embodiment elaborates on a blockchain-based medical data sharing privacy protection scheme using federated learning, and the performance of the scheme is reflected by the accuracy of the final model obtained.

[0059] This embodiment describes the privacy protection of blockchain-based medical data sharing using the method of the present invention.

[0060] In this embodiment, there are K participants in the federated learning system, and each participant has its own set of fixed local data.

[0061] Step 1: Store the initial training model w0 (randomly selected parameters) in the medical blockchain. Each participant (user) of federated learning sends a request to the blockchain to obtain the initial model, and the blockchain provides a trusted model storage mechanism for all participants.

[0062] Step 2: After each participant (user) obtains the latest model from the blockchain, they train the model based on the data obtained locally and update the local model.

[0063] When training the model locally, a small batch stochastic gradient descent algorithm is used to implement distributed gradient descent with a fixed learning rate η, as follows:

[0064] When updating the global model parameters in each round, participants (users) calculate the average gradient of local data under the current model parameters, then aggregate these gradients and update the model parameter information according to Formula 1:

[0065]

[0066] Among them, w t+1 、w t are the model parameters of the t+1th round and the tth round respectively, η represents the learning rate, K represents the total number of federated learning participants (users), k represents the number of the current participant (user), and n k represents the basis of the data point index set of participant (user) k, n represents the total number of training sets, and g k represents the gradient of the batch.

[0067] Afterwards, the blockchain node sends the updated model parameter w to each participant (user) t+1 Alternatively, the average gradient Sent to each participant (user), who will calculate and update the model parameters.

[0068] Step 3: The participant adds Laplace noise to the locally updated model parameters and performs a weighted average calculation on the model's parameter results.

[0069] Specifically, sensitivity-calibrated noise is added to the trained local model, and differential privacy is achieved in the local model using the Laplace mechanism. That is, by adding noise (a small amount), the query accuracy can be maximized and the identification of other records can be minimized when querying the model, preventing attackers from performing differential attacks on the queried model parameters to infer the original data.

[0070] The method of adding noise is:

[0071] Add the noise calibrated with sensitivity s to the trained local model m i, and obtain the new local model m′. Use Equation 2 to calculate the sensitivity s:

[0072]

[0073] Among them, D and D′ are two different adjacent data sets with only one record, and the randomization mechanism M provides differential privacy. ε represents the privacy budget. The smaller ε is, the higher the privacy protection density is; the larger ε is, the higher the data availability is, but the lower the data confidentiality is.

[0074] Calculate the new local model m′ according to formula 3:

[0075] m′=m i +Laplace(s / ε) (3)

[0076] Among them, m i represents the local model obtained through training, m′ is the new local model obtained by adding noise calibrated by sensitivity s, Laplace is the Laplace noise mechanism, and the privacy budget ε reflects the degree of data confidentiality.

[0077] Finally, the final aggregated model with added noise is uploaded to the InterPlanetary File System, which calculates the hash value of the model parameters and sends it to the blockchain system as a transaction.

[0078] Step 4: Verify the transaction.

[0079] A committee composed of honest nodes is responsible for verifying transactions and producing blocks. After verification by the committee, only eligible transactions will be submitted to the blockchain ledger;

[0080] Step 5: Global aggregation.

[0081] After the transaction is verified and passed, the model is aggregated and averaged using a secure federated averaging algorithm. The resulting global model is then uploaded to the blockchain for storage.

[0082] When the hospital diagnoses and treats patients, it queries the trained global model from the blockchain, inputs the patient's case information, and obtains auxiliary diagnosis and treatment results based on the global model.

[0083] Specifically, the characters involved in the method in this embodiment are shown in Table 1:

[0084] Table 1 Description of characters involved in the method in this embodiment

[0085]

[0086]

[0087] The present invention proposes a secure federated learning method that combines blockchain and differential privacy technology. The specific process is as follows:

[0088] Input: w0, C t , K, D k , S, ε

[0089] Output:

[0090] (1)initialize w0 broadcast the w0 to all participants

[0091] (2) for round t=1,2,...,do

[0092] (3)C t =max(ρK,1)

[0093] (4) for each participant k∈C t do in parallel

[0094] (5)

[0095] (6) end for

[0096] (7)

[0097] (8)end for

[0098] (9)

[0099] (10)

[0100] (11)for local iteration i from 1to I do

[0101] (12)batches←(Randomly divide the data set Dkinto the size ofbatch M)

[0102] (13) / / Get local model parameters from the last iteration

[0103] (14)for b from 1 to

[0104] (15)Calculate

[0105] (16)

[0106] (17) end for

[0107] (18) end for

[0108] (19)

[0109] (20)

[0110] The input includes the initial model, federated learning participants, the data sets owned by the participants, the sensitivity of differential privacy and the privacy budget. The output of the algorithm is the updated model after adding differential privacy noise.

Claims

1. A medical data sharing privacy protection method based on blockchain using federated learning, characterized in that: The following steps are involved: Step 1: Use blockchain to store the initial model with randomly selected parameters; Each participant in federated learning can send a request to the blockchain to obtain the initial model, and the blockchain provides a trusted model storage mechanism for all participants; Step 2: Federated learning participants perform model training locally; After each participant obtains the latest available model from the blockchain, they train it based on the data obtained locally and update the local model; Step 3: Add noise; Each participant adds sensitivity-calibrated noise to the trained local model and uses the Laplace mechanism to achieve differential privacy in the local model, so as to maximize query accuracy and minimize identification of other records when querying the model, preventing attackers from performing differential attacks on the queried model parameters to infer the original data; The model with added noise is then uploaded to the InterPlanetary File System, which calculates the hash value of the model parameters and sends it to the blockchain system as a transaction. Step 4: Perform verification transaction; In the blockchain, a committee composed of honest nodes is responsible for verifying transactions and producing blocks. After the committee verifies that the transaction signature is legal, the transaction format is correct, and there are no duplicate transactions, the transaction is deemed valid and then submitted to the blockchain ledger. Step 5: Perform global fusion; After the committee verifies the transaction, the smart contract aggregates the model using the federated averaging algorithm. When the model parameters converge, the model training is completely stopped and the obtained global model is uploaded to the blockchain for storage. When the hospital diagnoses and treats patients, it queries the trained global model from the blockchain, inputs the patient's case information, and obtains auxiliary diagnosis and treatment results based on the global model.

2. The medical data sharing privacy protection method based on blockchain using federated learning as claimed in claim 1 is characterized in that: In step 2, when training the model locally, the method of using the small batch stochastic gradient descent algorithm to implement distributed gradient descent with a fixed learning rate η is as follows: When updating the global model parameters in each round, participants calculate the average gradient of local data under the current model parameters, then aggregate these gradients and update the model parameter information according to Formula 1: Among them, w t+1 、w t are the model parameters of the t+1th round and the tth round respectively, η represents the learning rate, K represents the total number of federated learning participants, k represents the number of the current participant, and n k represents the basis of the data point index set of participant k, n represents the total number of training sets, and g k represents the gradient of the batch; Afterwards, the blockchain node sends the updated model parameters w to each participant. t+1 .

3. The medical data sharing privacy protection method based on blockchain using federated learning as claimed in claim 2 is characterized in that: In step 2, the average gradient Sent to each participant, who will calculate and update the model parameters.

4. The medical data sharing privacy protection method based on blockchain using federated learning as claimed in claim 1 is characterized in that: In step 3, the method of adding noise is: Add the noise calibrated with sensitivity s to the trained local model m i , get the new local model m′, and use formula 2 to calculate the sensitivity s: Among them, D and D′ are two different adjacent data sets with only one record, and the randomization mechanism M provides differential privacy; Calculate the new local model m′ according to formula 3: m′=m i +Laplace(s / ε) (3) Among them, m i represents the local model obtained through training, m′ is the new local model obtained by adding the noise calibrated by sensitivity s, Laplace is the Laplace noise mechanism, and the privacy budget ε reflects the degree of data confidentiality. ε represents the privacy budget, the smaller the ε, the higher the privacy protection density; the larger the ε, the higher the data availability, but the lower the data confidentiality.