Federal learning framework and method capable of local fine tuning for pregnancy data

Through a locally fine-tuned federated learning framework for pregnancy data, combined with 4-layer DNN and ResNet technology, the model is partially fine-tuned, and semi-homomorphic encryption is used in parameter transfer, the local model performance degradation and data privacy problems are solved, and model performance improvement and data security guarantee are achieved.

CN120087452APending Publication Date: 2025-06-03SHANGHAI JIAOTONG UNIV

Patent Information

Application Number
CN202510165416.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, the parameters issued by the central server will cause local model performance to decline, no encryption is performed during parameter transmission, and the deep neural network structure is complex, resulting in poor generalization performance.

Method used

A local fine-tuning federated learning framework for pregnancy data was designed, a local node model was deployed using a 4-layer DNN network, and a ResNet idea was introduced to perform local fine-tuning of the model. During the parameter transmission process, semi-homomorphic encryption is used to ensure data privacy.

Benefits of technology

Through local fine-tuning technology, the performance of the local model is improved, making its performance trend non-decreasing when it increases in iteration rounds. Semi-homomorphic encryption ensures data privacy, reduces time and space complexity, and simplifies parameter interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087452A_ABST
    Figure CN120087452A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning framework and method capable of local fine tuning for pregnancy data, and relates to the technical field of federated learning, the federated learning framework comprises N local nodes, a parameter transmission channel and a central server, the local nodes use local data to train a classification prediction model to obtain local model parameters, and N is a positive integer; the local model parameters are encrypted; after the local node receives the global parameters issued by the central server, the local node decrypts the global parameters by using the corresponding secret key and performs local fine tuning on the classification prediction model; the parameter transmission channel is responsible for transmitting local model parameters to the central server and issuing global parameters updated by the central server to each local node; and the central server is responsible for aggregating and updating local model parameters. According to the method, the model can be finely adjusted according to the aggregation parameters, so that the performance of the local model is in a non-decreasing trend along with the increase of an iteration round, and meanwhile, semi-homomorphic encryption is performed in a parameter transmission process so as to guarantee data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology, and in particular to a locally fine-tunable federated learning framework and method for pregnancy data. Background Art

[0002] In March 2016, Alpha Go won the match against Lee Sedol, a Korean professional nine-dan player, with a score of 4:1; in May 2017, Alpha Go won the match against Ke Jie, the world's number one Go player, with a score of 3:0 at the Wuzhen Go Summit in China; in November 2022, ChatGPT was released, which can not only interact with users in real time and generate text feedback according to users' semantic needs, but also generate pictures by AI, which has set off a storm in the field of natural language processing. The reason why such large models have achieved remarkable results is that they are supported by massive amounts of data: Alpha Go uses hundreds of thousands of games of Go masters as input for learning; the first generation model of ChatGPT uses 3.1 billion web pages and nearly 300 billion words for training. In an era when artificial intelligence is closely integrated with social life, researchers hope that deep learning models driven by big data can be deployed in various fields as soon as possible to bring convenience to all aspects of daily life.

[0003] Medical data stores a large amount of knowledge that can be used to infer the health status of the human body. Applying large models in the medical field can predict the probability of disease and prevent it, which has great research significance and application prospects. However, how to obtain high-quality and large-scale data sets is the main dilemma faced in building medical large models. Taking pregnancy data as an example, data is often stored in different institutions in the form of islands. If only locally stored data is used to train disease prediction models, the generalization performance of the model is often poor and it performs poorly when processing new samples. Data sharing and aggregation between different institutions are strictly restricted by privacy protection policies. Even data integration between different departments in the same hospital faces many obstacles. Federated learning, as a method to solve the problems of data fragmentation and isolation, allows multiple institutions to jointly train models while protecting data privacy. It can effectively solve the data security and communication cost problems encountered when building large models, and is of great significance for cross-device and cross-regional data sharing and cooperation. Therefore, in order to achieve data interoperability between different hospitals and institutions and enhance the generalization performance of the probability prediction model for pregnancy sequelae, it is a key issue to be solved urgently to design a federated learning framework that can be deployed on a single machine and fine-tuned locally for pregnancy data.

[0004] After searching the existing literature, the closest implementation solutions are as follows: The Chinese patent application number is: 202110968564, and the name is: A Method and Device for Deploying Federated Learning Tasks Based on Containers. The specific approach is as follows: The container management platform receives the task description file of federated learning and generates container group description files for multiple business party devices respectively; the multiple container group description files are sent to the corresponding business party devices respectively, enabling them to execute the federated learning task based on their respective container group description files. This method realizes the management of participating nodes by the central server of federated learning, but does not encrypt the document during the transmission of the task description file, posing a risk of data privacy leakage. The Chinese patent application number is: 202110180514, and the name is: A Federated Learning System Deployed in an Edge Computing Network and Its Learning Method. The specific approach is as follows: The federated learning module and the cloud service module initialize the global model, update it with local data, then modify the topology structure with the assistance of the cloud service module, and distribute the new model to the child nodes of the root node. This method modularizes the federated learning task and is easy to deploy, but the structure within the module needs to be adjusted according to different application scenarios, and the generalization performance is not good. The Chinese patent application number is: 202311222555, and the name is: A Neural Network Deployment Method, Device and Electronic Device for a Federated Learning Architecture. The specific approach is as follows: The federated learning process is divided into three stages: training, inference, and operation, and model parameter interactions are carried out with the central server at different stages. In the training stage, the user uses local data for training and uploads the model parameters to the central server; in the inference stage, the central server sends the trained neural network model to the user, and the user optimizes and adjusts the neural network model structure and parameters according to local data; in the operation stage, the user uploads the core parameters of the neural network to the central server, and the central server monitors the running status of the neural network and conducts control and operations. This method significantly reduces the communication overhead and transmission delay and introduces the idea of fine-tuning the local model, but because its model is relatively complex, the structure and parameters that the user can adjust are limited.

[0005] Therefore, those skilled in the art are committed to developing a single-machine deployment federated learning framework and local fine-tuning method for pregnancy data, deploying the local node model using a 4-layer DNN (Deep Neural Networks) network, introducing the ResNet (Residual Network) idea to perform local fine-tuning on the model, and performing semi-homomorphic encryption during the parameter transfer process to ensure data privacy. Summary of the Invention

[0006] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is that the parameters sent by the central server will cause the performance of the local model to decline, there is no encryption during the parameter transfer process, and the deep neural network structure is complex.

[0007] To achieve the above object, the present invention provides a locally fine-tunable federated learning framework for pregnancy data, including N local nodes, a parameter transmission channel, and a central server. Among them, the local nodes use local data to train a classification prediction model to obtain local model parameters, and encrypt the local model parameters; after receiving the global parameters sent by the central server, the local nodes decrypt them with the corresponding keys and locally fine-tune the classification prediction model; the parameter transmission channel is responsible for transmitting the local model parameters to the central server and sending the updated global parameters of the central server to each local node; the central server is responsible for aggregating the local model parameters and updating them.

[0008] Further, in the single-machine deployment of the federated learning framework, different nodes are deployed in a multi-process manner to achieve the goal of joint training of each node; after completing the training, different nodes save the local parameter model as a global variable for the process where the central server is located to retrieve; after aggregating and updating the parameters, the central server saves them as a global variable for the local nodes to use.

[0009] A locally fine-tunable federated learning method for pregnancy data, the method comprising the following steps:

[0010] Step 1, the local nodes use their respective data to train an initial classification prediction model to obtain local model parameters;

[0011] Step 2, the local nodes encrypt the local model parameters to obtain ciphertext;

[0012] Step 3, each of the local nodes uploads the ciphertext to the central server;

[0013] Step 4, the central server sums and averages the ciphertext to obtain a calculation result;

[0014] Step 5, the central server sends the calculation result to each of the local nodes;

[0015] Step 6, the local nodes decrypt the calculation result to obtain global parameters;

[0016] Step 7, the local nodes make local adjustments to the classification prediction model.

[0017] Further, the classification prediction model is a 4-layer DNN deep neural network classification prediction model, including an input layer, a hidden layer, and an output layer.

[0018] Further, step 1 further includes:

[0019] Step 1.1: Build a Sequential model using the TensorFlow framework and the Keras library, and build a 4-layer DNN deep neural network classification prediction model using the Dense function;

[0020] Step 1.2: Set the hyperparameters for the classification prediction model;

[0021] Step 1.3: Divide the local data into a training set and a test set in a ratio of 4:1, and input the training set into the classification prediction model for forward propagation training;

[0022] Step 1.4: After obtaining the result of forward propagation in the output layer, calculate the difference between the model prediction value and the true value through the cross-entropy function, and calculate the gradients of each layer of the neural network, and update the weights and biases of each layer of neurons through backpropagation;

[0023] Step 1.5: Repeat Step 1.3 and Step 1.4 until the loss function value converges on the training set or reaches the maximum number of iterations, and then verify the trained model on the test set.

[0024] Further, Step 2 further includes:

[0025] Step 2.1: Generate a public key for encryption and a private key for decryption;

[0026] Step 2.2: Encrypt the local model parameters using the public key to obtain the ciphertext.

[0027] Further, Step 2.1 further includes: Randomly select two large prime numbers p and q such that gcd(pq, (p - 1)(q - 1)) = 1, that is, the greatest common divisor of the integer pq and the integer (p - 1)(q - 1) is 1, and p and q are of equal length; Calculate n = pq and λ = lcm(p - 1, q - 1), that is, λ is the least common multiple of the integer p - 1 and the integer q - 1; Calculate g = n + 1, μ = (L(g λ mod n 2 )) -1 mod n, and generate the public key (n, g) and the private key (λ, μ) in this way.

[0028] Further, the formula for the encryption operation in Step 2.2 is:

[0029] c = g m r n mod n

[0030] where c is the ciphertext, and the random number r satisfies gcd(r, n) = 1.

[0031] Further, step 6 further includes: the local node decrypts the calculation result using the private key,

[0032] The decryption formula is:

[0033] m * = L((c * ) λ mod n 2 )·μ mod n

[0034] where c * is the calculation result, and m * is the global parameter.

[0035] Further, step 7 further includes:

[0036] 7.1. The local node loads the local model parameters and the global parameters onto the classification prediction model respectively, and performs performance tests on the test set divided in step 1.3 to obtain a first performance parameter and a second performance parameter respectively;

[0037] 7.2. Select a set of parameters with a higher value from the first performance parameter and the second performance parameter as the initial parameters for the update iteration of the classification prediction model in the next round.

[0038] Compared with the prior art, the present invention has at least the following beneficial technical effects:

[0039] 1. In the present invention, the local node can fine-tune the model according to the aggregation parameters, so that the performance of the local model shows a non-decreasing trend with the increase of the iteration rounds;

[0040] 2. The present invention uses the semi-homomorphic encryption method, which supports addition and constant multiplication operations on ciphertexts, and can be well applied to the parameter aggregation and update process of federated learning; through the semi-homomorphic encryption algorithm, users can entrust a third-party remote server to perform proxy calculations without worrying about data security issues;

[0041] 3. The present invention designs a 4-layer DNN neural network for constructing a prediction model for the probability of suffering from pregnancy sequelae, which reduces the time complexity and space complexity on the basis of ensuring the performance of the model and simplifies the interaction between parameters.

[0042] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the drawings to fully understand the purpose, features and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a framework diagram of a preferred embodiment of the present invention;

[0044] Figure 2 It is the structure diagram of a 4 - layer DNN neural network of a preferred embodiment of the present invention;

[0045] Figure 3 It is the schematic diagram of the homomorphic encryption algorithm of a preferred embodiment of the present invention;

[0046] Figure 4 It is the schematic diagram of local fine - tuning of the local model of a preferred embodiment of the present invention. Detailed implementation manners

[0047] The following introduces multiple preferred embodiments of the present invention with reference to the accompanying drawings of the specification to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.

[0048] This embodiment provides a locally fine - tunable federated learning framework for pregnancy data, as Figure 1 shown, mainly composed of three parts: local nodes, parameter transmission channels, and a central server.

[0049] A neural network classification prediction model is built in the local nodes, and local data is stored. The local nodes use the local data to train the model and encrypt the local model parameters after the training is completed; after receiving the global parameters sent by the central server, the local nodes decrypt them with the corresponding keys, perform local fine - tuning on the model, and use the new parameters as the initial parameters for the next round of iterative training. In the single - machine deployment of the federated learning framework, different nodes can be deployed in a multi - process manner to achieve the goal of joint training of each node.

[0050] The parameter transmission channel is responsible for transmitting the local model parameters to the central server and sending the updated global parameters of the central server to each local node. In the single - machine deployment of the federated learning framework, the parameter transmission process is synchronous: different nodes save the local parameters as global variables after the training is completed for the process where the central server is located to retrieve; the central server saves the aggregated and updated parameters as global variables for the local nodes to use.

[0051] The central server is responsible for aggregating and updating the local model parameters. In the single - machine deployment of the federated learning framework, the process where the central server is located waits for all local node processes to complete training, then performs sum - averaging on the encrypted local model parameters, which involves multiple addition operations and one multiplication operation. After completing the sum - averaging operation, the central server saves the global parameters as global variables for each local node process to call in the next round of iterative training.

[0052] This embodiment also provides a locally fine - tunable federated learning method for pregnancy data, including the following steps:

[0053] Step 11: Local nodes use their respective data to train an initial classification prediction model to obtain local model parameters. In a single-machine deployment, a multi-process method can be used to obtain the model parameters of different nodes simultaneously.

[0054] Step 12: Local nodes encrypt the local model parameters and then upload the ciphertext to the central server. In a single-machine deployment, local nodes generate a key pair locally to encrypt the local model parameters, and then save the ciphertext as a global variable for the process where the central server is located to call.

[0055] Step 13: The central server receives the encrypted local model parameters uploaded by different nodes and updates and iterates the encrypted local model parameters. In a single-machine deployment, the process where the central server is located calls the ciphertext parameters generated by local nodes and performs a summation and averaging operation on them.

[0056] Step 14: The central server distributes the aggregated and updated model parameters to each node. In a single-machine deployment, the central server saves the summation and averaging calculation result as a global variable for the local node process to call.

[0057] Step 15: Local nodes decrypt the parameters distributed by the central server to obtain global parameters, and fine-tune the local model in combination with the local model parameters. In a single-machine deployment, local nodes decrypt the calculation result generated by the central server with the corresponding key, make local adjustments to the local model, and use the adjustment result as the initial parameter for the next round of local training.

[0058] The classification prediction model is a 4-layer DNN deep neural network classification prediction model, which can provide a shallow network that is easy to deploy and has low costs. It constructs a prediction model for pregnancy sequelae diseases for pregnancy data, providing theoretical support for disease prediction, clinical diagnosis, and adjuvant treatment. As Figure 2 shown, the 4-layer DNN deep neural network classification prediction model consists of three parts, namely the input layer, the hidden layer, and the output layer. Each layer of the neural network consists of multiple neurons, and each neuron linearly combines the input signal through weights and biases. The number of neurons in the input layer is 74, which matches the feature dimension of the input pregnancy data. The number of neurons in the first layer of the hidden layer is 32, the number of neurons in the second layer is 16, and the number of neurons in the third layer is 8. The number of neurons in the output layer is 2, which matches the categories of pregnancy sequelae. The input signal reaches the output layer after a series of linear transformations and non-linear effects of the activation function in the hidden layer, and the cross-entropy loss function is used to measure the difference between the model prediction value and the actual label value. For a binary classification problem, the formula for the cross-entropy loss function is shown in Equation 1-1:

[0059]

[0060] where y is the actual label value, is the model prediction value. After obtaining the loss function value, the weights and biases of the neurons are adjusted through the backpropagation gradient update algorithm. By continuously iterating forward propagation and backpropagation, the parameters of the neural network are continuously updated until the difference between the model prediction value and the actual label value is less than the set threshold. DNN has advantages in dealing with complex pattern recognition and feature selection, can learn multi-layer abstract features in the data, and is suitable for large-scale datasets and complex medical data analysis tasks. The specific operation steps are as follows:

[0061] Step 21: Use the TensorFlow framework and Keras library to build a Sequential model, and use the Dense function to build a 4-layer DNN deep neural network. Set the number of neurons in the input layer to 74, the number of neurons in the first hidden layer to 32, the number of neurons in the second hidden layer to 16, the number of neurons in the third hidden layer to 8, and the number of neurons in the output layer to 2. Set the activation function of the hidden layer to the ReLU function, and the activation function of the output layer to the Softmax function.

[0062] Step 22: Set the hyperparameters of the model: Select the Adam optimizer, use the cross-entropy as the loss function, set the batch size to 64, and set the number of epochs to 100 rounds.

[0063] Step 23: Obtain 110,000 pregnancy data from the hospital's obstetrics department, divide the cleaned pregnancy data into a training set and a test set according to a ratio of 4:1, and input the training set into the 4-layer DNN neural network for forward propagation training.

[0064] Step 24: After obtaining the result of forward propagation in the output layer, calculate the difference between the model prediction value and the true value through the cross-entropy function, and calculate the gradients of each layer of the neural network based on this, and update the weights and biases of each layer of neurons through backpropagation.

[0065] Step 25: Repeat Step 23 and Step 24 until the loss function value converges on the training set or reaches the maximum number of iterations, and then verify the trained model on the test set.

[0066] In this embodiment, based on the privacy protection strategy of the semi-homomorphic encryption method, the Paillier homomorphic encryption algorithm is applied in the parameter communication process of federated learning. As Figure 3As shown, the Paillier homomorphic encryption algorithm enables the central server to perform addition and constant multiplication operations on ciphertexts. The result obtained after decryption is consistent with the result of plaintext calculation, effectively protecting data privacy. The addition and constant multiplication operations that the central server needs to perform refer to the operation of summing all local parameters and dividing by the number of nodes after the central server collects the local parameters of N local nodes, involving the summation of different variables and constant multiplication operations. The principle of the Paillier homomorphic encryption algorithm is as follows:

[0067] E(a + b) = E(a) + E(b) (1-2)

[0068] Where E represents the encryption operation on parameters a and b. Performing an addition operation on ciphertexts is equivalent to performing an addition operation on plaintexts, and this encryption process is irreversible: anyone can encrypt data using the public key, but only the entity holding the private key can perform decryption. Without the corresponding decryption key, a third party cannot restore the true content of the plaintext. The specific steps for performing Paillier homomorphic encryption on parameters are as follows:

[0069] Step 31: First, generate keys for encryption and decryption. Randomly select two large prime numbers p and q such that gcd(pq, (p - 1)(q - 1)) = 1, that is, the greatest common divisor of the integer pq and the integer (p - 1)(q - 1) is 1, and p and q are of equal length; calculate n = pq and λ = lcm(p - 1, q - 1), that is, λ is the least common multiple of the integer p - 1 and the integer q - 1; calculate g = n + 1, μ = (L(g λ mod n 2 )) -1 mod n to generate the public key (n, g) and the private key (λ, μ).

[0070] Step 32: Perform an encryption operation on the plaintext information m (0 ≤ m ≤ n). Select a random number r such that gcd(r, n) = 1, and through the formula:

[0071] c = g m r n mod n (1-3)

[0072] Calculate the ciphertext c. When g = n + 1, according to the binomial theorem, the modular exponentiation operation can be simplified to a single modular multiplication operation, that is:

[0073] g m = mn + 1 mod n 2 (1-4)

[0074] Step 33: Perform addition and constant multiplication operations on the ciphertext c in the central server, and use the calculation result c *Feed back to each local node.

[0075] Step 34. The local node uses the formula m * = L((c * ) λ mod n 2 )·μ mod n to decrypt the calculation result c * to obtain the decrypted plaintext m * , that is, the global parameter sent by the central server.

[0076] In Step 15, the local node obtains the global parameter and fine-tunes the local model in combination with the local model parameter. This local fine-tuning method is based on the residual theory, and a "short circuit" mechanism is added to the path where the central server of federated learning transmits parameters to the local node, that is, an identity mapping layer is superimposed. After receiving the global parameter sent by the central server, the local node performs a performance test on the test set divided in Step 23 with the uploaded local parameter, and selects the parameter with better performance as the initial value for the next round of training. When the parameter aggregation update effect in a certain round is not good, it can be set to zero and the local model parameter of the previous round is used. Before adding the residual module, the performance of the local model on the test set generally showed an increasing trend as the number of federated learning iterations increased, but there would be fluctuations in some of these iteration rounds. After adding the residual module, the local model not only ensures that its performance on the test set is non-decreasing, but also helps the overall parameter update of federated learning. As Figure 4 shown, the specific operation of the local fine-tuning method based on the residual theory is as follows:

[0077] Step 41. The local node trains the model with local data to obtain the local model parameter n, encrypts it and uploads it to the central server.

[0078] Step 42. The local node receives the aggregated update parameter sent by the central server and decrypts it to obtain the global parameter n*.

[0079] Step 43. The local node loads the local model parameter n and the global parameter n* into the 4-layer DNN neural network model respectively, and performs a performance test on the test set divided from the original dataset to obtain performances A and A* respectively.

[0080] Step 44. Select a set of parameters with a higher value between A and A* as the initial parameter for the next round of local model update iteration.

[0081] In this embodiment, a federated learning framework for pregnancy data is built, and a local fine-tuning method is introduced to construct a deep neural network classification prediction model for different pregnancy sequelae to assist clinical diagnosis and treatment. A classification accuracy of 95% is achieved on the pregnancy dataset, and it performs well on the test set, which can effectively assist clinical diagnosis and decision-making.

[0082] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the protection scope determined by the claims.

Claims

1. A locally fine-tunable federated learning framework for pregnancy data, characterized by: It includes N local nodes, a parameter transmission channel and a central server, wherein the local node uses local data to train the classification prediction model, obtains local model parameters, and encrypts the local model parameters; after receiving the global parameters sent by the central server, the local node decrypts them with the corresponding key and locally fine-tunes the classification prediction model; the parameter transmission channel is responsible for transmitting the local model parameters to the central server, and sending the global parameters updated by the central server to each local node; the central server is responsible for aggregating and updating the local model parameters.

2. The locally fine-tunable federated learning framework for pregnancy data as claimed in claim 1, characterized in that: In the single-machine deployment of the federated learning framework, different nodes are deployed in a multi-process manner to achieve the goal of joint training of each node; after completing the training, different nodes save the local parameter model as a global variable for the process where the central server is located to call; after aggregating the updated parameters, the central server saves them as global variables for use by the local nodes.

3. A locally fine-tunable federated learning method for pregnancy data, characterized in that: The method comprises the following steps: Step 1: The local nodes use their own data to train the initial classification prediction model to obtain local model parameters; Step 2: The local node encrypts the local model parameters to obtain a ciphertext; Step 3, each of the local nodes uploads the ciphertext to the central server; Step 4, the central server sums and averages the ciphertexts to obtain a calculation result; Step 5: The central server sends the calculation results to each of the local nodes; Step 6: The local node decrypts the calculation result to obtain a global parameter; Step 7: The local node makes local adjustments to the classification prediction model.

4. The locally fine-tunable federated learning method for pregnancy data according to claim 3, characterized in that: The classification prediction model is a 4-layer DNN deep neural network classification prediction model, including an input layer, a hidden layer and an output layer.

5. The locally fine-tunable federated learning method for pregnancy data according to claim 3, characterized in that: The step 1 also includes: Step 1.1, use the Tensorflow framework and Keras library to build a Sequential model, and use the Dense function to build a 4-layer DNN deep neural network classification prediction model; Step 1.2, setting hyper parameters for the classification prediction model; Step 1.3, divide the local data into a training set and a test set according to a ratio of 4:1, and input the training set into the classification prediction model for forward propagation training; Step 1.4, after obtaining the result of forward propagation in the output layer, the difference between the model prediction value and the true value is calculated by the cross entropy function, and the gradient of each layer of the neural network is calculated based on this, and the weights and biases of the neurons in each layer are updated by back propagation; Step 1.5: Repeat steps 1.3 and 1.4 until the loss function value converges on the training set or reaches the maximum number of iterations, and then verify the trained model on the test set.

6. The locally fine-tunable federated learning method for pregnancy data according to claim 3, characterized in that: The step 2 also includes: Step 2.1, generate a public key for encryption and a private key for decryption; Step 2.2: Use the public key to perform encryption operation on the local model parameters to calculate and obtain ciphertext.

7. The locally fine-tunable federated learning method for pregnancy data according to claim 6, characterized in that: The step 2.1 also includes: randomly selecting two large prime numbers p and q, satisfying gcd(pq,(p-1)(q-1))=1, that is, the greatest common factor of the integer pq and the integer (p-1)(q-1) is 1, and the lengths of p and q are equal; calculating n=pq and λ=lcm(p-1,q-1), that is, λ is the least common multiple of the integer p-1 and the integer q-1; calculating g=n+1, μ=(L(g λ modn 2 )) -1 modn, thereby generating the public key (n, g) and private key (λ, μ).

8. The locally fine-tunable federated learning method for pregnancy data according to claim 7, characterized in that: The formula for the encryption operation in step 2.2 is: c=g m r n modern Wherein, c is the ciphertext, and the random number r satisfies gcd(r,n)=1.

9. The locally fine-tunable federated learning method for pregnancy data according to claim 8, characterized in that: The step 6 also includes: the local node uses a private key to decrypt the calculation result, and the decryption formula is: I * =L((c * ) λ modern 2 )·μmodn Among them, c * is the calculation result, m * is the global parameter.

10. The locally fine-tunable federated learning method for pregnancy data according to claim 5, characterized in that: The step 7 also includes: 7.

1. The local node loads the local model parameters and the global parameters to the classification prediction model respectively, performs a performance test on the test set divided in step 1.3, and obtains a first performance parameter and a second performance parameter respectively; 7.

2. Select a set of parameters with higher values ​​between the first performance parameter and the second performance parameter as initial parameters for the next round of updating iteration of the classification prediction model.

Citation Information

Patent Citations

  • Federated learning systems and their learning methods deployed in edge computing networks

    CN113010305B

Cited By

  • Nursing service demand classification system based on kano internet

    CN120822075A