A medical data privacy protection analysis method based on federated learning
By employing adaptive dynamic noise encryption and nonlinear adjustment mechanisms, the privacy protection issue of cross-institutional data collaboration in federated learning is addressed, improving the training efficiency and accuracy of the global model and enabling transparent and tamper-proof global model updates.
Patent Information
- Application Number
- CN202510830374.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-06-20
AI Technical Summary
Existing federated learning methods cannot effectively and securely facilitate cross-institutional data collaboration and sharing while protecting patient privacy, and the training efficiency and accuracy of global models are relatively low.
An adaptive dynamic noise encryption mechanism and a nonlinear adjustment mechanism are adopted. By encrypting gradients at medical nodes and decrypting and weighting them on a central server, combined with blockchain records and transparent verification, data privacy protection and the efficiency and accuracy of model training are ensured.
It achieves flexible and efficient privacy protection, balances the speed and convergence effect of model training, avoids overfitting or underfitting, and ensures the transparency and immutability of the global model.
Smart Images

Figure CN120705908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a medical data privacy protection analysis method based on federated learning. BACKGROUND
[0002] With the gradual digitization and informatization of medical data, medical institutions increasingly rely on big data analysis to improve patient treatment outcomes, optimize clinical decision-making, and advance medical research. However, medical data contains a large amount of sensitive personal health information, and traditional medical data processing methods often rely on centralized data storage and analysis. Although this approach can fully utilize the powerful computing capabilities of central servers, it also poses a risk of privacy leakage.
[0003] Federated learning, as a distributed machine learning method, enables the collaborative training of a global model by various data holders (such as different medical institutions) without sharing raw data. Each medical institution trains a model based on local data and uploads updated model parameters to a central server for aggregation, which effectively avoids the privacy risks associated with centralized data storage. However, despite the data privacy protection provided by federated learning, the differences in data volume, data distribution, and network environment among various nodes still pose challenges in terms of model training efficiency, aggregation quality, and privacy protection.
[0004] Meanwhile, the existing technology also has the technical problems of being unable to effectively and securely perform cross-institution data collaboration and sharing while protecting patient privacy, and having low training efficiency and precision of the global model while ensuring medical data privacy protection. SUMMARY
[0005] The present application provides a medical data privacy protection analysis method based on federated learning to solve the technical problems of being unable to effectively and securely perform cross-institution data collaboration and sharing while protecting patient privacy, and having low training efficiency and precision of the global model while ensuring medical data privacy protection.
[0006] The medical data privacy protection analysis method based on federated learning of the present application specifically includes the following technical solutions:
[0007] A medical data privacy protection analysis method based on federated learning includes the following steps:
[0008] S1. Treat medical institutions as medical nodes and deploy federated learning local clients respectively, obtain and preprocess local data sets to obtain preprocessed local data sets, train local models based on preprocessed local data sets, and perform gradient updates while introducing an adaptive dynamic noise encryption mechanism to obtain encrypted local gradients;
[0009] S2. uploading the encrypted local gradient to the central server, performing decryption processing to obtain the decrypted gradient, performing weighted aggregation operation, updating the global model, obtaining the parameter of the global model after gradient update, and introducing a nonlinear adjustment mechanism to adjust the parameter of the global model.
[0010] Preferably, the S1 specifically comprises:
[0011] Each medical node trains a local model according to its preprocessed local data set, and the goal of each medical node is to minimize the local loss function and update the gradient of the local loss function to obtain the gradient of the loss function calculated by the medical node under the current local model parameter.
[0012] Preferably, the S1 specifically comprises:
[0013] After training the local model, each medical node encrypts the calculated gradient, introduces an adaptive dynamic noise encryption mechanism, dynamically adjusts the noise intensity according to the data volume and data distribution characteristics of each medical node, and the current state of the global model.
[0014] Preferably, the S1 specifically comprises:
[0015] In the implementation process of the adaptive dynamic noise encryption mechanism, an adjustment factor and an adaptive adjustment coefficient are introduced to adjust the noise standard deviation and control the relationship between the noise standard deviation and the global sample data volume, and the proportion of the sample data in the preprocessed local data set of each medical node to the total number of sample data in the preprocessed local data set of all medical nodes is combined with the sum of the variances of the local model loss functions of all medical nodes to obtain the noise standard deviation for encrypting the gradient of each medical node.
[0016] Preferably, the S1 specifically comprises:
[0017] In the implementation process of the adaptive dynamic noise encryption mechanism, by introducing adaptive dynamic noise, the noise size of each medical node is automatically adjusted according to its data volume and data distribution characteristics to obtain the gradient after noise addition of each medical node.
[0018] Preferably, the S1 specifically comprises:
[0019] The noise-added gradient is symmetrically encrypted to obtain the encrypted gradient, and then the encrypted local gradient is finally obtained.
[0020] Preferably, the S2 specifically comprises:
[0021] At the central server, the local gradient encrypted by each medical node is decrypted by a private key to obtain a decrypted gradient, and the decrypted gradient is weighted and aggregated at the central server to update the global model to obtain the parameter of the global model after gradient update.
[0022] Preferably, S2 specifically comprises:
[0023] Based on the parameter of the global model after gradient update, a nonlinear adjustment mechanism is introduced, which dynamically adjusts the update step according to the current error of the global model to optimize the global model and obtain the global model parameter after nonlinear adjustment.
[0024] Preferably, S2 specifically comprises:
[0025] After the update and nonlinear adjustment of the global model parameter are completed, each medical node will continue to train according to the new global model parameter until the preset stopping condition is met, and a blockchain record and transparent verification are introduced to ensure that the global model updating process is transparent and tamper-proof.
[0026] The technical scheme of the present application has the following advantages:
[0027] 1. By introducing an adaptive dynamic noise encryption mechanism, the noise intensity is dynamically adjusted according to the data volume, data distribution characteristics of each medical node and the current state of the global model. This method makes privacy protection more flexible and efficient, and further enhances the ability of data privacy protection.
[0028] 2. By introducing a nonlinear adjustment mechanism, the global model update step is dynamically adjusted according to the error of the global model. This mechanism controls the step length when the error is large, so that the global model can be adjusted more smoothly in the convergence process, avoiding over-update or insufficient update. This dynamic adjustment mechanism effectively balances the training speed and convergence effect of the model, avoiding the overfitting or underfitting problems that may occur in the traditional fixed step update method. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 A flowchart of a medical data privacy protection analysis method based on federated learning according to the present application. DETAILED DESCRIPTION
[0030] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0032] The following description, in conjunction with the accompanying drawings, details a specific scheme for a medical data privacy protection analysis method based on federated learning provided by this invention.
[0033] See attached document Figure 1 The diagram illustrates a flowchart of a healthcare data privacy protection analysis method based on federated learning, provided by an embodiment of the present invention. The method includes the following steps:
[0034] S1. Treat medical institutions as medical nodes and deploy local clients of federated learning to obtain and preprocess local datasets to obtain preprocessed local datasets; train local models based on preprocessed local datasets and perform gradient updates, while introducing an adaptive dynamic noise encryption mechanism to obtain encrypted local gradients.
[0035] Medical institutions are designated as medical nodes, and local clients for federated learning are deployed at each node. Each medical node acquires patient medical data through its local client, including basic information (such as age, gender, and medical history), clinical data (such as diagnostic reports and test results), and other health-related information, forming a local dataset. This local dataset undergoes preprocessing steps such as handling missing values, data standardization, feature engineering, and normalization to obtain a preprocessed local dataset, which is then represented as... ,in, Indicates the first Preprocessed local dataset for each medical node express The Middle Input features of each sample yes The Middle The true label or target output of a sample is usually related to the input features. Related disease diagnosis, treatment effects, or expected health outcomes, It is the first Preprocessed local dataset of each medical node The number of samples in the first digit, i.e., the number of samples in the second digit. The number of patient data participating in the training on each medical node; the preprocessing process is a technique well known to those skilled in the art, and will not be described in detail here.
[0036] Furthermore, a local model is trained at each medical node based on its preprocessed local dataset to extract disease prediction or other health-related information. This local model is trained by each medical node (i.e., the medical institution) on its preprocessed local dataset, and its model architecture is determined according to the specific needs of each medical institution, such as classification models, regression models, or deep learning models, which will not be elaborated here. The training objective of each medical node is to minimize the local loss function. The gradient of the local loss function is updated. Based on the standard gradient descent and backpropagation algorithms, the gradient update calculation formula is as follows:
[0037]
[0038] in, It is the first Each medical node has the following local model parameters. The loss function calculated below For local model parameters The gradient is used to guide how the local model updates its parameters in each round of training to reduce the value of the loss function, thereby improving the accuracy of the local model; It is a local model In the Input features of each sample For local model parameters The gradient represents the current local model's gradient with respect to the i-th... Input features of each sample The sensitivity is calculated using existing backpropagation algorithms; It is a loss function For the The true label of each sample and model predicted labels The gradient reflects the contribution of the error between the true label and the model's predicted label to the loss function, such as that calculated based on standard loss functions like mean squared error (MSE) or cross-entropy loss. It is a local model for the first Input features of each sample The predicted output, i.e. the model's predicted label, is obtained through the local model. The output obtained depends on the specific model type; Indicates the local model for the first Input features of each sample The predicted output.
[0039] Furthermore, after local model training, each medical node encrypts the calculated gradients to prevent data leakage during subsequent transmission. Unlike traditional differential privacy techniques, an adaptive dynamic noise encryption mechanism is introduced. Specifically, the noise intensity is dynamically adjusted based on the data volume and distribution characteristics of each medical node, as well as the current state of the global model. The standard deviation of the noise... The calculation formula is as follows:
[0040]
[0041] in, It is in the The noise standard deviation used for encryption gradients on each medical node; This is a adjustment factor used to adjust the magnitude of the noise standard deviation. It should be selected based on the privacy protection requirements of the actual application, with a reference value range of [value missing]. The specific value depends on privacy protection requirements and computing resource limitations; It is the total number of samples in the preprocessed local dataset of all medical nodes, representing the total amount of sample data of all medical nodes in the entire federated learning process. It plays a normalization role, making the relationship between the noise standard deviation of each medical node and the global sample data volume more reasonable. This is an adaptive adjustment coefficient used to control the relationship between the noise standard deviation and the global sample data size. It is determined based on expert experience, and the reference range is [range to be specified]. ; This represents the total number of medical nodes; It is the first The variance of the local model loss function corresponding to each medical node represents the distribution of the training error of the local model on the preprocessed local dataset. It describes the proportion of the sample data volume in the preprocessed local dataset of each medical node to the total number of samples in the preprocessed local dataset of all medical nodes, reflecting the data distribution characteristics of each medical node, that is, the proportion of the sample data volume in the preprocessed local dataset of each medical node to the global sample data volume. The sum of variances of the local model loss functions of all medical nodes is calculated, reflecting the current state of the global model. By reflecting the changes in the local model loss function of each medical node, the noise intensity of each medical node can be dynamically adjusted, thereby improving the efficiency of privacy protection.
[0042] By introducing adaptive dynamic noise, the noise level of each medical node can be automatically adjusted according to its data volume and data distribution characteristics. For example, medical nodes with larger data volumes will have lower noise levels to avoid affecting the efficiency of local model training due to excessive noise, while medical nodes with smaller data volumes will have higher noise levels to enhance privacy protection.
[0043] Gradient after adding noise to each medical node It is calculated using the following formula:
[0044]
[0045] in, It has a mean of 0 and a variance of Gaussian noise, It is an identity matrix.
[0046] In this way, the medical node not only completes the gradient calculation, but also adds enough noise to the gradient to obtain the noisy gradient.
[0047] Furthermore, the noisy gradient is further protected using existing symmetric encryption (such as AES) to obtain an encrypted gradient, preventing any information leakage during local model data transmission. Finally, the encrypted local gradient is obtained. .
[0048] S2. Upload the encrypted local gradient to the central server for decryption to obtain the decrypted gradient. Then, perform a weighted aggregation operation to update the global model, obtain the parameters of the global model after gradient update, and introduce a nonlinear adjustment mechanism to adjust the global model parameters.
[0049] The encrypted local gradients from each medical node are uploaded to a central server, which acts as a coordinator and aggregator within the federated learning framework. Its main responsibilities are managing and coordinating the operation of the entire federated learning architecture, receiving local model updates from each medical node, and performing global aggregation to update the global model. Specifically, on the central server, the encrypted local gradients from each medical node are decrypted using a private key to obtain the decrypted gradients. The decrypted gradients are then weighted and aggregated on a central server. Furthermore, the global model is updated using an existing gradient descent algorithm. The purpose of weighted aggregation is to adjust the gradients based on the number of samples in the preprocessed local dataset at each medical node. The influence of each medical node on the global model update is determined by its data volume; medical nodes with larger data volumes should have a greater impact on the global model. The central server performs weighted aggregation of the decrypted gradients from each medical node and then uses existing gradient descent algorithms to derive the global model update formula:
[0050]
[0051] wherein, is the parameter of the current global model, i.e. the model parameter updated according to the weighted aggregation of the gradients; is the parameter of the global model in the last round, i.e. the parameter used by the global model before the update in the current round; is the learning rate, used to control the step size of the update of the global model parameter, determining the amplitude of each gradient descent, and a value that is too large will lead to over-update, and a value that is too small may lead to slow convergence speed, and is determined according to expert experience method combined with the specific type of global model, and the reference value range is ; is the weight of the th medical node in the global model update process, which is calculated based on the proportion of the data volume of the arbitrary medical node to the total data volume of all medical nodes, ;
[0052] Further, in order to avoid the situation of over-update or insufficient update, a nonlinear adjustment mechanism is introduced, which dynamically adjusts the update step size according to the current error of the global model. If the error of the global model is large, a larger step size is allowed, and vice versa, so as to optimize the global model smoothly.
[0053] The specific nonlinear adjustment formula is:
[0054]
[0055] wherein, is the global model parameter after nonlinear adjustment; is the adjustment coefficient, used to control the amplitude of nonlinear adjustment, determining the influence degree of error size on step size adjustment, and the adjustment can smooth the update process of the global model, avoid over-adjustment of the global model, and is determined according to expert experience method, and the reference value range is ; is the hyperbolic tangent function, a common activation function, which has a smooth S-shaped curve, and its role is to suppress extreme values when updating the global model, to ensure that the adjustment amplitude will not be too large; is the gradient of the global model, is the loss function of the global model, obtained by weighted combination of the local model loss functions of all medical nodes; is the L2 norm; is the L2 norm of the global model gradient, representing the size of the current gradient of the global model, measuring the size of the training error of the global model. When the gradient norm of the global model is large, it means that the current local model error is large; is an error threshold, determining when to perform the nonlinear adjustment, when the L2 norm of the global model gradient exceeds the error threshold, the nonlinear adjustment will increase the step size, thus accelerating the update of the global model, otherwise, the step size will be relatively small, avoiding over-adjustment, determined according to the expert experience method, the reference material range is ; represents the ratio between the L2 norm of the global model gradient and the preset error threshold, measuring the size of the current training error of the global model relative to the error threshold; is a weighting term, used to adjust the amplitude of the nonlinear update; Through the hyperbolic tangent mapping, the influence range is limited between , thus smoothing the update step size, avoiding excessive gradient update, which can prevent the update step size from being too high when the error is too large, thus leading to unstable training; represents the final adjustment factor, controlling the dynamic adjustment of the global model update step size.
[0056] After completing the update and nonlinear adjustment of the global model parameters, each medical node will continue to train according to the new global model parameters until the preset stopping condition according to the expert experience method is met.
[0057] Further, the steps of introducing blockchain recording and transparent verification are introduced to ensure that the global model update process is transparent and tamper-proof. After each aggregation, the central server records the hash value of the global model, the ID of the participating medical nodes, the version information and the update timestamp into the blockchain, ensuring the tamper-proof and traceability of the update process.
[0058] Through the blockchain technology, all global model update operations will be recorded and verified, increasing the transparency and trustworthiness of the global model training process.
[0059] In summary, a medical data privacy protection analysis method based on federated learning is completed.
[0060] The order of the embodiments of the application is only for description, not representing the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or can be advantageous.
[0061] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other, and each embodiment mainly describes the differences from other embodiments.
[0062] The above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent features; and these modifications 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 application, and should be included in the protection scope of the present application.
Claims
1. A method for privacy protection analysis of medical data based on federated learning, characterized in that, Includes the following steps: S1. Using medical institutions as medical nodes, deploy local federated learning clients on each node to acquire and preprocess local datasets, resulting in preprocessed local datasets. Train local models based on the preprocessed local datasets and update the gradients of the local loss function to obtain the gradients of the loss function with respect to the local model parameters. Simultaneously, introduce an adaptive dynamic noise encryption mechanism to obtain encrypted local gradients. In the implementation of the adaptive dynamic noise encryption mechanism, introduce adjustment factors and adaptive adjustment coefficients, and calculate the noise standard deviation used for encryption gradients on each medical node. Based on the noise standard deviation used for encryption gradients on each medical node and the gradient of the loss function with respect to the local model parameters, calculate the noisy gradient for each medical node. Perform symmetric encryption processing on the noisy gradients to obtain encrypted gradients, and finally obtain the encrypted local gradients. S2. Upload the encrypted local gradient to the central server, decrypt it to obtain the decrypted gradient, perform weighted aggregation operation to update the global model, obtain the parameters of the global model after gradient update, and introduce a nonlinear adjustment mechanism to adjust the global model parameters. The nonlinear adjustment mechanism dynamically adjusts the update step size based on the current error of the global model, optimizes the global model, and obtains the global model parameters after nonlinear adjustment.
2. The method for privacy protection analysis of medical data based on federated learning according to claim 1, characterized in that, S1 specifically includes: At each medical node, a local model is trained based on its preprocessed local dataset. The goal of training each medical node is to minimize the local loss function and update the gradient of the local loss function to obtain the gradient of the loss function with respect to the local model parameters calculated by the medical node under the current local model parameters.
3. The method for privacy protection analysis of medical data based on federated learning according to claim 2, characterized in that, S1 specifically includes: After local model training, each medical node encrypts the calculated gradients by introducing an adaptive dynamic noise encryption mechanism. The noise intensity is dynamically adjusted based on the data volume and distribution characteristics of each medical node, as well as the current state of the global model.
4. The method for privacy protection analysis of medical data based on federated learning according to claim 3, characterized in that, S1 specifically includes: In the implementation of the adaptive dynamic noise encryption mechanism, adjustment factors and adaptive adjustment coefficients are introduced to adjust the noise standard deviation and control the relationship between the noise standard deviation and the global sample data volume, respectively. The ratio of the sample data volume in the preprocessed local dataset of each medical node to the total number of samples in the preprocessed local dataset of all medical nodes is combined with the sum of the variances of the local model loss functions of all medical nodes to obtain the noise standard deviation used for encryption gradients on the medical nodes.
5. The method for privacy protection analysis of medical data based on federated learning according to claim 4, characterized in that, S1 specifically includes: In the implementation of the adaptive dynamic noise encryption mechanism, adaptive dynamic noise is introduced so that the noise level of each medical node is automatically adjusted according to its data volume and data distribution characteristics, thus obtaining the gradient of each medical node after noise addition.
6. The method for privacy protection analysis of medical data based on federated learning according to claim 1, characterized in that, S2 specifically includes: At the central server, the encrypted local gradients of each medical node are decrypted using a private key to obtain the decrypted gradients. The central server then performs weighted aggregation on the decrypted gradients to update the global model, resulting in the parameters of the global model after the gradient update.
7. The method for privacy protection analysis of medical data based on federated learning according to claim 1, characterized in that, S2 specifically includes: The formula for the nonlinear adjustment mechanism is: ; in, These are the global model parameters after nonlinear adjustment; These are the parameters of the current global model; It is an adjustment factor; It is the hyperbolic tangent function; It is the gradient of the global model. It is the loss function of the global model; It is the error threshold.
8. The method for privacy protection analysis of medical data based on federated learning according to claim 7, characterized in that, S2 specifically includes: After completing the update and nonlinear adjustment of the global model parameters, each medical node will continue training according to the new global model parameters until the preset stopping conditions are met; and blockchain records and transparent verification are introduced to ensure that the global model update process is transparent and tamper-proof.