A model training method and device, electronic equipment and storage medium

By employing addition and multiplication secret sharing techniques and homomorphic encryption algorithms in federated learning, we have achieved improved computational efficiency and security while protecting client privacy, thus solving the problems of privacy leakage and model performance degradation caused by Byzantine attacks in federated learning.

CN119047597BActive Publication Date: 2025-12-12SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410918210.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2025-12-12
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

In federated learning, existing technologies are insufficient in terms of privacy protection and computational efficiency due to issues such as model performance degradation and data leakage caused by Byzantine attacks.

Method used

An additive secret sharing technique is used to send the incremental local model parameters to two servers respectively, and a multiplicative secret sharing technique is used for privacy calculations. Combined with a homomorphic encryption algorithm, pre-generated information is generated, which improves the efficiency and security of secret sharing.

Benefits of technology

While protecting client privacy, it improves computational efficiency and anti-attack capabilities, solves privacy leakage problems, and ensures the security and accuracy of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047597B_ABST
    Figure CN119047597B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a model training method and device, electronic equipment and storage medium, which are related to a server and a client, the server includes a first server and a second server, the method comprises: in the process of federated learning, the client sends local model parameter increments to the two servers respectively through additive secret sharing technology, the server uses multiplicative secret sharing technology to realize privacy calculation of the local model parameter increments, privacy calculation of client trust score and privacy calculation of client robust aggregation, thereby protecting the privacy of the client while improving the calculation efficiency and the ability to resist attacks, solving the problem of privacy leakage, and compared with the mode based on inadvertent transmission or confusion circuit, the pre-generated information for multiplicative secret sharing can be generated through a homomorphic encryption algorithm during the waiting period of the server, so as to improve the efficiency of secret sharing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a model training method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the rapid popularization of intelligent terminal equipment, a large amount of personal information data is collected by various network platforms. The traditional machine learning needs to collect all the information to the center server first, and then perform model training, which leads to the privacy data of the client being easily leaked.

[0003] As a distributed machine learning mode, federated learning allows multiple clients to complete model training locally without letting data leave the local client, which protects the data privacy to a certain extent. However, due to the distributed characteristics of federated learning, it is vulnerable to Byzantine attacks. Byzantine nodes may maliciously tamper with model parameters, steal data of other nodes and destroy the federated learning process, leading to model performance degradation and data leakage, and privacy security problems.

[0004] The prior art uses a robust aggregation method to make federated learning not affected by Byzantine attacks, but usually the client directly sends the increment of the model parameter to the server, which has the risk of privacy leakage, or the client sends the sign function of the model parameter increment to the server, and the server performs a series of privacy calculations according to the sign function of the model parameter increment, but there is a certain accuracy loss. SUMMARY

[0005] In view of the above problems, the embodiments of the present application provide a model training method and device, electronic equipment and storage medium to overcome the above problems or at least partially solve the above problems.

[0006] The embodiments of the present application disclose a model training method, relating to a server and a client, the server comprising a first server and a second server, the method comprising:

[0007] The first server creates global model parameters corresponding to an initial global model, obtains server model parameter increments corresponding to the global model parameters, and sends the global model parameters to a target client;

[0008] The target client performs training processing according to the global model parameters, obtains local model parameter increments corresponding to the global model parameters, splits the local model parameter increments according to additive secret sharing to obtain first local model parameter increments and second local model parameter increments, and sends the first local model parameter increments to the first server and the second local model parameter to the second server;

[0009] The first server and the second server perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment;

[0010] The first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and perform calculation in combination with the stability index to obtain a trust score of the local model parameter increment;

[0011] The first server and the second server perform calculation according to the trust score to obtain a global model parameter increment corresponding to the initial global model;

[0012] The first server updates the global model parameter corresponding to the initial global model according to the global model parameter increment, and outputs a target global model corresponding to the initial global model.

[0013] Optionally, the obtaining of the server model parameter increment corresponding to the global model parameter comprises:

[0014] The first server obtains a first data set for the global model parameter;

[0015] The first server trains the global model parameter by using the first data set to obtain a server model parameter corresponding to the global model parameter;

[0016] The first server performs calculation on the server model parameter and the global model parameter by using the following formula (1) to obtain a server model parameter increment corresponding to the global model parameter:

[0017]

[0018] wherein, The server model parameter increment is Δθ, The server model parameter is θ, The global model parameter is θ.

[0019] Optionally, the obtaining of the local model parameter increment corresponding to the global model parameter comprises:

[0020] The target client obtains a second data set for the global model parameter;

[0021] The target client trains the global model parameter by using the second data set to obtain a local model parameter corresponding to the global model parameter;

[0022] The target client calculates the local model parameter increment corresponding to the global model parameter by using the local model parameter and the global model parameter according to formula (2) as follows:

[0023]

[0024] wherein, is the local model parameter increment, is the local model parameter, is the global model parameter.

[0025] Optionally, the method comprises: the first server and the second server pre-generate array information according to a homomorphic encryption algorithm, and the array information is used for multiplicative secret sharing between the first server and the second server.

[0026] Optionally, the first server and the second server pre-generate array information according to a homomorphic encryption algorithm, comprising:

[0027] The first server generates a key pair {N, λ, g} according to the homomorphic encryption algorithm, and sends the public key {N, g} to the second server;

[0028] The first server randomly generates an integer a and Δ1c, encrypts a according to the public key to obtain E(a), and sends E(a) to the second server;

[0029] The second server randomly generates an integer b and Δ2c, encrypts Δ2c according to the public key to obtain E(Δ2c), and calculates a ciphertext val = [E(a)] b · [E(Δ2c)] -1 , and sends it to the first server

[0030] The first server decrypts the ciphertext according to the private key to obtain Δ1c = D(val);

[0031] The first server and the second server determine a random number r0;

[0032] The first server calculates a' = a·r0 and b' = b·r0 according to the random number r0;

[0033] The second server calculates a' = a·r0 and b' = b·r0 according to the random number r0;

[0034] wherein, Δ1c' + Δ2c' = a' b'.

[0035] Optionally, the first server and the second server perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment, comprising:

[0036] The first server splits the first local model increment Δ1g ij to obtain Δ1g ij -a′ ij and a′ ij , and sends Δ1g ij -a′ ij to the second server;

[0037] The second server splits the second local model increment Δ2g ij to obtain Δ2g ij -b′ ij and b′ ij , and sends Δ2g ij -b′ ij to the first server;

[0038] The first server performs multiplicative operation on Δ2g ij -b′ ij , Δ1c′ ij and a′ ij according to the following formula (3) to obtain a first shared result of the local model increment, and sends it to the second server:

[0039] Δ1z ij = a′ ij (Δ2g ij -b′ ij ) + Δ1c′ ij (3)

[0040] wherein Δ1z ij is the first shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0041] The second server performs multiplicative operation on Δ1g ij -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (4) to obtain a second shared result corresponding to the local model increment, and sends it to the first server:

[0042] Δ2z ij = (Δ1g ij -a′ ij ) Δ2g ij + Δ2c′ij (4)

[0043] wherein, Δ2z ij is the second sharing result, i=1, 2, …, τ, j=1, 2, …, d;

[0044] The first server and the second server perform calculation by using the first sharing result and the second sharing result according to the following formulas (5), (6) and (7), to obtain the stability index of the local model parameter increment:

[0045]

[0046] wherein, Δ2z ij is the second sharing result, Δ2z ij is the second sharing result, is the stability index of the local model parameter increment, i=1, 2, …, τ, j=1, 2, …, d.

[0047] Optionally, the first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and perform calculation in combination with the stability index, to obtain a trust score of the local model parameter increment, including:

[0048] The first server splits the server model parameter increment g 0j to obtain g 0j -a′ ij and a′ ij , and sends g 0j -a′ ij to the second server;

[0049] The second server splits the second local model increment Δ2g ij to obtain Δ2g ij -b′ ij and b′ ij , and sends Δ2g ij -b′ ij to the first server;

[0050] The first server performs multiplicative operation on Δ2g ij -b′ ij , a′ ij and Δ1c′ ij according to the following formula (8), to obtain a third sharing result, and sends it to the second server:

[0051] Δ1u ij =a′ ij (Δ2gij -b′ ij )+Δ1c′ ij (8)

[0052] wherein, Δ1u ij is the third sharing result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0053] The second server performs multiplication operation on g 0j -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (9) to obtain a fourth sharing result and sends to the first server:

[0054] Δ2u ij = (g 0j -a′ ij )Δ2g ij + Δ2c′ ij (9)

[0055] wherein, Δ2u ij is the fourth sharing result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0056] The first server and the second server perform calculation respectively on the third sharing result, the fourth sharing result and the stability index of the local model parameter increment according to the following formula (10), (11) and (12) to obtain the trust score of the local model parameter increment.

[0057]

[0058] wherein, Δ1u ij is the third sharing result, Δ2u ij is the fourth sharing result, is the stability index of the local model parameter increment, TS i is the trust score, i = 1, 2, …, τ, j = 1, 2, …, d.

[0059] Optionally, the first server and the second server obtain the global model parameter increment corresponding to the initial global model according to the trust score calculation, comprising:

[0060] The first server performs calculation on the trust score and the first local model parameter increment according to the following formula (13) to obtain a first global model parameter increment:

[0061]

[0062] wherein, is the first global model parameter increment, TS i is the trust score, is the first local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d;

[0063] The second server calculates the second global model parameter increment using the trust score and the second local model parameter increment according to the following formula (14) and sends it to the first server, and the specific formula is as follows:

[0064]

[0065] wherein, is the second global model parameter increment, TS i is the trust score, is the second local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d;

[0066] The first server calculates the global model parameter increment corresponding to the initial global model using the first global model parameter increment and the second global model parameter increment according to the following formula (15):

[0067]

[0068] wherein, is the global model parameter increment, is the first global model parameter increment, is the second global model parameter increment.

[0069] Optionally, the first server updates the global model parameter corresponding to the initial global model according to the global model parameter increment, comprising:

[0070] The first server calculates the updated global model parameter using the global model parameter increment, the global model parameter, and the global learning rate according to the following formula (16):

[0071]

[0072] wherein, is the global model parameter, and α is the global learning rate, is the global model parameter increment.

[0073] Embodiments of the present application also disclose a model training device, relating to a server and a client, wherein the server comprises at least a first server and at least one second server, and the device comprises:

[0074] An initialization module is configured to create global model parameters corresponding to an initial global model, obtain server model parameter increments corresponding to the global model parameters, and send the global model parameters to a target client.

[0075] A local training module is configured to perform training processing based on the global model parameters, obtain local model parameter increments, split the local model parameter increments based on additive secret sharing to obtain first local model parameter increments and second local model parameter increments, send the first local model parameter increments to the first server, and send the second local model parameter increments to the second server.

[0076] A first calculation module is configured to perform multiplicative secret sharing based on the first local model parameter increments and the second local model parameter increments to obtain a stability index of the local model parameter increments.

[0077] A second calculation module is configured to perform multiplicative secret sharing based on server model parameter increments and the second local model parameter increments, and perform calculation in combination with the stability index to obtain a trust score of the local model parameter increments.

[0078] An aggregation module is configured to perform calculation based on the trust score to obtain global model parameter increments corresponding to the initial global model.

[0079] An updating module is configured to update the global model parameters corresponding to the initial global model based on the global model parameter increments, and output a target global model corresponding to the initial global model.

[0080] Embodiments of the present application also disclose an electronic device, characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus.

[0081] The memory is configured to store a computer program.

[0082] The processor is configured to execute the program stored on the memory to implement the method according to the embodiments of the present application.

[0083] Embodiments of the present application also disclose a computer readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to the embodiments of the present application.

[0084] Embodiments of the present application have the following advantages:

[0085] In the embodiment of the present application, in the process of model training, the client sends the local model parameter increment to two servers respectively through additive secret sharing, avoiding data leakage, and the server uses multiplicative secret sharing technology to realize privacy calculation of the client's local model parameter increment, privacy calculation of the client's trust score and privacy calculation of the client's robust aggregation, thereby protecting the privacy of the client while improving the calculation efficiency and the ability to resist attacks, solving the problem of privacy leakage, and compared with the mode based on inadvertent transmission or confusion circuit, the pre-generated information for multiplicative secret sharing can be generated through homomorphic encryption algorithm during the waiting period of the server, so as to improve the efficiency of secret sharing. BRIEF DESCRIPTION OF DRAWINGS

[0086] Figure 1 is a step flow chart of a model training method provided in the embodiment of the present application;

[0087] Figure 2 is a whole flow chart of model training provided in the embodiment of the present application;

[0088] Figure 3 is a structure block diagram of a model training device provided in the embodiment of the present application;

[0089] Figure 4 is a block diagram of an electronic device provided in the embodiment of the present application;

[0090] Figure 5 is a schematic diagram of a computer readable medium provided in the embodiment of the present application. DETAILED DESCRIPTION

[0091] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0092] As an example, in the scene of federated learning, multiple clients are allowed to complete model training locally, without letting data leave the local client, which protects the data privacy to a certain extent. However, due to the distributed characteristics of federated learning, it is easy to be attacked by the Byzantine attack. The Byzantine node may maliciously tamper with the model parameters, steal the data of other nodes and destroy the federated learning process, resulting in the decline of model performance and data leakage, and the problem of privacy security.

[0093] The prior art usually directly sends local model parameter increments to a server for multiple clients, the server calculates a trust score of the local model parameter increments of each client, and obtains an average value of the model parameter increments by weighted average of the model parameter increments of the respective clients according to the trust score, and finally updates the global model parameters according to the average value of the model parameter increments, and outputs the global model, while in this scheme, the client directly sends the model parameter increments to the server, which has the risk of privacy leakage.

[0094] Compared with the prior art, the application has the advantages that in the process of federated learning, the client sends the local model parameter increments to two servers respectively through additive secret sharing technology, and realizes the privacy calculation of the local model parameter increments, the privacy calculation of the client trust score, and the privacy calculation of the client robust aggregation by using multiplicative secret sharing technology, thereby improving the calculation efficiency and the ability to resist attacks while protecting the privacy of the client, solving the problem of privacy leakage, and generating pre-generated information about any real number by means of homomorphic encryption algorithm, improving the efficiency of secret sharing.

[0095] Reference Figure 1 A step flowchart of a model training method provided in an embodiment of the application is shown, involving a server and a client, the server including a first server and a second server, and specifically can include the following steps:

[0096] Step 101, the first server creates global model parameters corresponding to an initial global model, obtains server model parameter increments corresponding to the global model parameters, and sends the global model parameters to a target client;

[0097] In the embodiment of the application, the server and the client each play a different role and cooperate to train a shared machine learning model. The client is responsible for training the model using its local data and uploading the local model parameter increments to the server for aggregation, and the server is responsible for receiving the local model parameter increments from multiple clients and aggregating to obtain updated global model parameters. Specifically, in the process of model training, the first server creates global model parameters corresponding to an initial global model and sends the global model parameters to a target client, and trains according to the global model parameters to obtain server model parameter increments corresponding to the global model parameters.

[0098] The target client is selected by the first server from a plurality of clients according to a preset rule to participate in the current round of training, the preset rule is to randomly select a preset number of clients, or the selection can be performed by other manners, for example, according to historical participation data of the clients, a client with a high contribution degree to model training is selected for training to improve the performance of the generated model, or the client is selected for training according to fairness to determine that each client has an opportunity to participate in the training. The present application does not limit this.

[0099] In a preferred embodiment of the present application, the step 101 of obtaining the server model parameter increment corresponding to the global model parameter comprises:

[0100] The first server obtains a first data set for the global model parameter;

[0101] The first server trains the global model parameter by using the first data set to obtain a server model parameter corresponding to the global model parameter; the first server calculates the server model parameter increment corresponding to the global model parameter by using the server model parameter and the global model parameter according to the following formula (1):

[0102]

[0103] wherein, is the server model parameter increment, is the server model parameter, is the global model parameter.

[0104] In the embodiment of the present application, the first server obtains a data set for training, wherein the first server can train by using a clean data set owned by itself, the first server trains the data set according to the global model parameter to obtain a server model parameter, and then combines the global model parameter to calculate the server model parameter increment, so that when the first server evaluates the local model parameter increment of the target client in the future, the server model parameter increment of the first server can be verified and adjusted to ensure the generalization ability of the model on different data sets.

[0105] Step 102, the target client trains and processes according to the global model parameter to obtain a local model parameter increment corresponding to the global model parameter, splits the local model parameter increment according to additive secret sharing to obtain a first local model parameter increment and a second local model parameter increment, and sends the first local model parameter increment to the first server, and the second local model parameter to the second server;

[0106] In the embodiment of the present application, the target client trains according to the global model parameters, obtains the local model parameter increment, and then splits the local model parameter increment into two parts according to additive secret sharing, and respectively sends the partial increments of different local model parameters to different servers according to an encryption algorithm, where the encryption algorithm can be an encryption algorithm such as AES or 3DES. Specifically, the client splits the local model parameter increment into two parts through secret sharing technology and sends them to different servers respectively, so that the client can send the model parameter increment to the server without leaking the complete model parameters, avoiding privacy exposure, and the first server and the second server each hold a part of the local model parameter increment, which can help to disperse the processing load and improve the processing capacity and efficiency of the system.

[0107] In a preferred embodiment of the present application, the step 102 of obtaining the local model parameter increment corresponding to the global model parameter comprises: the target client obtaining a second data set for the global model parameter; the target client training the global model parameter using the second data set to obtain a local model parameter corresponding to the global model parameter; and the target client calculating the local model parameter increment corresponding to the global model parameter using the local model parameter and the global model parameter according to the following formula (2):

[0108]

[0109] wherein, is the local model parameter increment, is the local model parameter, is the global model parameter.

[0110] In a preferred embodiment of the present application, the method further comprises: the first server and the second server pre-generate array information according to a homomorphic encryption algorithm, and the array information is used for multiplicative secret sharing between the first server and the second server.

[0111] In the embodiment of the present application, the homomorphic encryption algorithm can be a Paillier homomorphic encryption algorithm. Specifically, the first server and the second server generate a random number and encrypt the random number through the homomorphic encryption algorithm to obtain pre-generated information, and then the first server and the second server perform multiplicative secret sharing according to the pre-generated information. Compared with the mode based on the oblivious transfer or the garbled circuit, the present application can generate pre-generated information for multiplicative secret sharing during the waiting period of the server by means of the homomorphic encryption algorithm, thereby improving the efficiency of secret sharing.

[0112] In a preferred embodiment of the present application, the first server and the second server pre-generate array information according to a homomorphic encryption algorithm, including:

[0113] The first server generates a key pair according to the homomorphic encryption algorithm, and sends the public key to the second server;

[0114] The first server randomly generates an integer a and Δ1c, encrypts a according to the public key to obtain E(a), and sends E(a) to the second server;

[0115] The second server randomly generates an integer b and Δ2c, encrypts Δ2c according to the public key to obtain E(Δ2c), and calculates a ciphertext val=[E(a)] b ·[E(Δ2c)]- 1 and sends it to the first server;

[0116] The first server decrypts the ciphertext according to the private key to obtain Δ1c=D(val);

[0117] The first server and the second server determine a random number r0;

[0118] The first server calculates a′=a·r0according to the random number r0,

[0119] The second server calculates b′=b·r0according to the random number r0,

[0120] Where Δ1c′+Δ2c′=a′b′.

[0121] Step 103, the first server and the second server perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment;

[0122] In an embodiment of the present application, the first server and the second server each hold a part of the local model parameter increment, calculate the local model parameter partial increment by multiplicative secret sharing, and obtain the sharing result of the local model parameter partial increment. The first server and the second server can calculate the product of the increments without leaking the complete model parameter increment they hold, and further calculate the stability index of the local model parameter increment according to the shared values of the first server and the second server. The stability index is used to evaluate the volatility or consistency of the model parameter update.

[0123] In a preferred embodiment of the present application, the step 103, the first server and the second server perform multiplication secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment, comprising:

[0124] The first server splits the first local model increment Δ1g ij to obtain Δ1g ij -a′ ij and a′ ij , and sends Δ1g ij -a′ ij to the second server;

[0125] The second server splits the second local model increment Δ2g ij to obtain Δ2g ij -b′ ij and b′ ij , and sends Δ2g ij -b′ ij to the first server;

[0126] The first server performs multiplication operation on Δ2g ij -b′ ij , Δ1c′ ij and a′ ij according to the following formula (3) to obtain a first shared result of the local model increment, and sends it to the second server:

[0127] Δ1z ij = a′ ij (Δ2g ij -b′ ij ) + Δ1c′ ij (3)

[0128] wherein Δ1z ij is the first shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0129] The second server performs multiplication operation on Δ1g ij -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (4) to obtain a second shared result corresponding to the local model increment, and sends it to the first server:

[0130] Δ2z ij = (Δ1g ij -a′ ij ) Δ2g ij+ Δ2c' ij (4)

[0131] wherein, Δ2z ij is the second sharing result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0132] The first server and the second server calculate using the first sharing result and the second sharing result according to the following formulas (5), (6) and (7) to obtain the stability index of the local model parameter increment:

[0133]

[0134] wherein, Δ1z ij is the first sharing result, Δ2z ij is the second sharing result, is the stability index of the local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d.

[0135] In the embodiment of the application, the first server and the second server each hold a part of the local model parameter increment, and the first server and the second server perform multiplicative secret sharing according to the pre-generated information, which can effectively reduce the communication amount between the first server and the second server, improve the efficiency of multiplicative secret sharing, and through multiplicative secret sharing, the first server and the second server can jointly calculate the product of the increments without revealing the complete model parameter increment held by each of them, and the modulus of the local model parameter increment is calculated according to the sharing results of the first server and the second server, and in federated learning, the modulus of the local model parameter increment can be used to analyze the convergence of model training, and if the modulus of the local model parameter increment of a certain client is abnormally large, it may indicate that there is a problem with the data or calculation of the client, therefore, the modulus of the local model parameter increment is taken as the stability index of the local model parameter increment in the application to evaluate the stability of the local model parameter of the target client.

[0136] In step 104, the first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and calculate in combination with the stability index to obtain the trust score of the local model parameter increment.

[0137] In the embodiment of the application, the first server has the server model parameter increment, and the second server has a part of the local model parameter increment, and through multiplicative secret sharing, the first server and the second server can calculate the trust score of the local model parameter without exposing the data, and the trust score is used to measure the credibility of the local model parameter increment of the client.

[0138] In an embodiment of the present application, in the step 104, the first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and calculate the stability index to obtain a trust score of the local model parameter increment, comprising:

[0139] The first server splits the server model parameter increment g 0j to obtain g 0j -a′ j and a′ ij , and sends g 0j -a′ ij to the second server;

[0140] The second server splits the second local model increment Δ2g ij to obtain Δ2g ij -b′ ij and b′ ij , and sends Δ2g ij -b′ ij to the first server;

[0141] The first server performs multiplicative operation on Δ2g ij -b′ ij , a′ ij and Δ1c′ ij according to the following formula (8) to obtain a third shared result and sends it to the second server:

[0142] Δ1u ij = a′ ij (Δ2g ij -b′ ij ) + Δ1c′ ij (8)

[0143] Wherein, Δ1u ij is the third shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0144] The second server performs multiplicative operation on g 0j -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (9) to obtain a fourth shared result and sends it to the first server:

[0145] Δ2u ij = (g 0j -a′ ij ) Δ2g ij + Δ2c′ij (9)

[0146] wherein, Δ2u ij is the fourth shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0147] The first server and the second server calculate the trust score of the local model parameter increment by using the stability indicators of the third shared result, the fourth shared result and the local model parameter increment respectively according to the following formulas (10), (11) and (12);

[0148]

[0149] wherein, Δ2u ij is the third shared result, Δ2u ij is the fourth shared result, is the stability indicator of the local model parameter increment, TS i is the trust score, i = 1, 2, …, τ, j = 1, 2, …, d.

[0150] In the embodiment of the application, the first server holds the server model parameter increment, and the second server holds part of the local model parameter increment. The shared values are obtained by calculating through the homomorphic encryption algorithm and the multiplicative secret sharing. The first server and the second server can calculate the product of the increments without leaking the model parameter increments held by each other, and then combine the modulus of the local model parameter increment of the client to calculate the trust score of the local model parameter increment of the target client.

[0151] In step 105, the first server and the second server calculate the global model parameter increment corresponding to the initial global model according to the trust score.

[0152] In the embodiment of the application, the first server and the second server determine the global model parameter increment according to the trust score calculated before. The trust score reflects the credibility and quality of the local model parameter increment of each client. That is, the global model parameter increment is determined by using the trust score, which can ensure that the global model is more affected by the high-quality client model update.

[0153] In a preferred embodiment of the application, in the step 105, the first server and the second server calculate the global model parameter increment corresponding to the initial global model according to the trust score, including:

[0154] The first server obtains a first global model parameter increment by using the trust score and the first local model parameter increment according to the following formula (13) :

[0155]

[0156] wherein, TS is the first global model parameter increment, and i TS is the trust score, is the first local model parameter increment, i = 1, 2, …, τ, and j = 1, 2, …, d;

[0157] The second server obtains a second global model parameter increment by using the trust score and the second local model parameter increment according to the following formula (14) and sends the second global model parameter increment to the first server, and the specific formula is as follows:

[0158]

[0159] wherein, TS is the second global model parameter increment, and i TS is the trust score, is the second local model parameter increment, i = 1, 2, …, τ, and j = 1, 2, …, d;

[0160] The first server obtains a global model parameter increment corresponding to the initial global model by using the first global model parameter increment and the second global model parameter increment according to the following formula (15) :

[0161]

[0162] wherein, TS is the global model parameter increment, TS is the first global model parameter increment, TS is the second global model parameter increment.

[0163] In the embodiments of the present application, the first server and the second server determine the weight value of the local model parameter partial increment through the trust score, calculate the global model parameter partial increment corresponding to the different local model partial increment, and then determine the global model parameter increment according to the global model parameter partial increment of the first server and the global model parameter partial increment of the second server. It can be understood that the trust score of the local model parameter increment is used to determine how to aggregate the local model parameter increment to generate the global model parameter increment. By using the trust score to determine the global model parameter increment, it can be ensured that the finally generated global model is more affected by the high-quality target client, thereby improving the performance and generalization ability of the model.

[0164] In step 106, the first server updates the global model parameters corresponding to the initial global model according to the global model parameter increment, and outputs a target global model corresponding to the initial global model.

[0165] In the embodiment of the present application, the first server updates the global model parameters corresponding to the initial global model according to the global model parameter increment, obtains the updated global model parameters, i.e., the aggregated global model parameters, and outputs the target global model through the aggregated global model parameters.

[0166] In an embodiment of the present application, in step 106, the first server updates the global model parameters corresponding to the initial global model according to the global model parameter increment, which includes:

[0167] The first server calculates the updated global model parameters by using the global model parameter increment, the global model parameters and the global learning rate according to the following formula (16):

[0168]

[0169] wherein, is the global model parameter, and a is the global learning rate, is the global model parameter increment.

[0170] In the embodiment of the present application, the global learning rate is pre-set or adjusted in real time through training, and the first server updates the global model parameters of the initial global model by combining the global model parameter increment with the global learning rate, obtains the aggregated global model parameters, and determines the aggregated global model parameters according to the dynamic learning rate strategy, which helps the target global model to achieve better performance more quickly.

[0171] Referring to Figure 2 , a whole step flowchart of model training provided in the embodiment of the present application is shown, which specifically includes:

[0172] The server P1 establishes the global model parameters corresponding to the initial global model

[0173] The server P1 selects τ clients from the plurality of clients to participate in training, and sends the global model parameters to the clients C i (i=1, 2, …, τ);

[0174] The clients C i (i=1, 2, …, τ) train the local data according to the global model parameters, calculate the local model parameter increment, and split the local model parameter increment into two parts send the two parts to the server P1 Send to server P1, and Send to server P2;

[0175] Server P1 locally trains the local data set according to the global model parameters, and calculates the server model parameter increment

[0176] Server P1 and P2 calculate and using multiplicative secret sharing, and obtain the modulus of the local model parameter increment sent by each client C i (i = 1, 2, …, τ)

[0177] Server P1 and P2 calculate 0j and Δ2g ij using multiplicative secret sharing, and obtain the trust score TS i of each client model parameter;

[0178] Server P1 calculates the secret sharing value of the global model parameter increment according to the trust score TS i

[0179] Server P2 calculates the secret sharing value of the global model parameter increment according to the trust score TS i and sends it to server P1;

[0180] Server P1 calculates the global model parameter increment and according to and updates the global model parameter according to the global model parameter increment .

[0181] When the number of iterations reaches the requirement, stop training and output the final global output model.

[0182] It should be noted that for the method embodiment, in order to simply describe, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the order of the described actions, because according to the embodiments of the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0183] Referring to Figure 3 ​​, a structural block diagram of a model training device provided in an embodiment of the present application is shown, which relates to a server and a client, the server at least includes a first server and at least one second server, and the device includes:

[0184] The initialization module 301 is configured to create a global model parameter corresponding to an initial global model, and obtain a server model parameter increment corresponding to the global model parameter, and send the global model parameter to a target client.

[0185] The local training module 302 is configured to perform training processing according to the global model parameter, obtain a local model parameter increment, split the local model parameter increment according to additive secret sharing to obtain a first local model parameter increment and a second local model parameter increment, and send the first local model parameter increment to the first server and the second local model parameter to the second server.

[0186] The first calculation module 303 is configured to perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment.

[0187] The second calculation module 304 is configured to perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and perform calculation in combination with the stability index to obtain a trust score of the local model parameter increment.

[0188] The aggregation module 305 is configured to perform calculation according to the trust score to obtain a global model parameter increment corresponding to the initial global model.

[0189] The update module 306 is configured to update the global model parameter corresponding to the initial global model according to the global model parameter increment, and output a target global model corresponding to the initial global model.

[0190] In an embodiment of the present application, the initialization module 301 is further configured to obtain a first data set for the global model parameter, train the global model parameter using the first data set to obtain a server model parameter corresponding to the global model parameter, and calculate the server model parameter and the global model parameter using the following formula (1) to obtain a server model parameter increment corresponding to the global model parameter:

[0191]

[0192] wherein, the server model parameter increment is the server model parameter is the global model parameter is.

[0193] In an embodiment of the present application, the local training module 302 is further configured to obtain a second data set for the global model parameters; train the global model parameters using the second data set to obtain local model parameters corresponding to the global model parameters; and calculate the local model parameters corresponding to the global model parameters using the local model parameters and the global model parameters to obtain a local model parameter increment corresponding to the global model parameters:

[0194]

[0195] wherein, the local model parameter increment is Δ1g the local model parameter is Δ1g the global model parameter is Δ1g

[0196] In an embodiment of the present application, the device further comprises an array information generation module, which is configured to pre-generate array information according to a homomorphic encryption algorithm, and the array information is used for multiplicative secret sharing between the first server and the second server.

[0197] In an embodiment of the present application, the array information generation module is specifically configured to generate a key pair {N, λ, g} according to the homomorphic encryption algorithm, and send a public key {N, g} to the second server; randomly generate an integer a and Δ1c, encrypt a according to the public key to obtain E(a), and send E(a) to the second server; randomly generate an integer b and Δ2c, encrypt Δ2c according to the public key to obtain E(Δ2c), calculate a ciphertext val = [E(a)] b ·[E(Δ2c)] -1 , and send to the first server; decrypt the ciphertext according to the private key to obtain Δ1c = D(val); determine a random number r0; calculate a′ = a·r0 and b′ = b·r0 according to the random number r0; and send a′ and b′ to the first server. wherein, Δ1c′ + Δ2c′ = a′b′.

[0198] In an embodiment of the present application, the first calculation module 303 is further configured to split the first local model increment Δ1g ij to obtain Δ1g ij -a′ ij and a′ ij , and send Δ1g ij -a′ ij to the second server; and split the second local model increment Δ2g ij to obtain Δ2gij -b′ ij and b′ ij , and Δ2g ij -b′ ij is sent to the first server; the multiplication operation is performed on Δ2g ij -b′ ij , Δ1c′ ij and a′ ij according to the following formula (3) to obtain the first shared result of the local model increment and send to the second server:

[0199] Δ1z ij =a′ ij (Δ2g ij -b′ ij )+Δ1c′ ij (3)

[0200] wherein Δ1z ij is the first shared result, i=1, 2, …, τ, j=1, 2, …, d;

[0201] The multiplication operation is performed on Δ1g ij -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (4) to obtain the second shared result corresponding to the local model increment and send to the first server:

[0202] Δ2z ij =(Δ1g ij -a′ ij )Δ2g ij +Δ2c′ ij (4)

[0203] wherein Δ2z ij is the second shared result, i=1, 2, …, τ, j=1, 2, …, d;

[0204] The stability index of the local model parameter increment is obtained by calculating the first shared result and the second shared result according to the following formulas (5), (6) and (7):

[0205]

[0206] wherein Δ1z ij is the first shared result, Δ2z ij is the second shared result, is the stability index of the local model parameter increment, i=1, 2, …, τ, j=1, 2, …, d.

[0207] In one embodiment of the present application, the second computing module 304 is further configured to send the server model parameter increment g 0j to the second server; split the second local model increment Δ2g 0j -a′ ij and b′ ij , and send Δ2g 0j -b′ ij to the first server; and perform a multiplication operation on Δ2g ij -b′ ij , a′ ij and Δ1c′ ij according to the following formula (8) to obtain a third shared result and send it to the second server: ij -b′ ij ij -b′ ij ij ij

[0208] Δ1u ij = a′ ij (Δ2g ij -b′ ij ) + Δ1c′ ij (8)

[0209] where Δ1u ij is the third shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0210] to the first server: perform a multiplication operation on g 0j -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (9) to obtain a fourth shared result and send it to the first server:

[0211] Δ2u ij = (g 0j -a′ ij ) Δ2g ij + Δ2c′ ij (9)

[0212] where Δ2u ij is the fourth shared result, i = 1, 2, …, τ, j = 1, 2, …, d;

[0213] ​​​​The stability indicators of the third shared result, the fourth shared result and the local model parameter increment are calculated respectively according to the following formulas (10), (11) and (12) to obtain the trust score of the local model parameter increment;

[0214]

[0215] wherein Δ1u ij is the third shared result, Δ2u ij is the fourth shared result, is the stability indicator of the local model parameter increment, TS i is the trust score, i = 1, 2, …, τ, j = 1, 2, …, d.

[0216] In an embodiment of the present application, the aggregation module 305 is further configured to calculate the first global model parameter increment according to the following formula (13) by using the trust score and the first local model parameter increment:

[0217]

[0218] wherein, is the first global model parameter increment, TS i is the trust score, is the first local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d.

[0219] The second global model parameter increment is calculated according to the following formula (14) by using the trust score and the second local model parameter increment, and is sent to the first server, and the specific formula is as follows:

[0220]

[0221] wherein, is the second global model parameter increment, TS i is the trust score, is the second local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d.

[0222] The global model parameter increment corresponding to the initial global model is calculated according to the following formula (15) by using the first global model parameter increment and the second global model parameter increment:

[0223]

[0224] wherein, is the global model parameter increment, a first global model parameter increment, a second global model parameter increment.

[0225] In an embodiment of the present application, the updating module 306 is further configured to obtain the updated global model parameter by calculating the global model parameter increment, the global model parameter and a global learning rate according to the following formula (16):

[0226]

[0227] wherein, is the global model parameter, and a is the global learning rate, is the global model parameter increment.

[0228] For the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0229] In addition, the embodiment of the present application further provides an electronic device, such as a server, a terminal or the like. Figure 4 As shown in the figure, the electronic device includes a processor 401, a communication interface 402, a memory 404 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 404 complete mutual communication through the communication bus 404,

[0230] The memory 404 is configured to store a computer program.

[0231] The processor 401 is configured to execute the program stored in the memory 404, and implement the model training method described in the above embodiments.

[0232] The communication bus mentioned in the above terminal can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0233] The communication interface is configured to communicate between the above terminal and other devices.

[0234] The memory can include a random access memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0235] The processor described above can be a general processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0236] As shown in the method for training a model provided in another embodiment of the present application, Figure 5 As shown in the method for training a model provided in another embodiment of the present application,

[0237] In the above embodiments, the implementation can be achieved entirely or partially by software, hardware, firmware or any combination thereof. When implemented by software, the implementation can be achieved entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are entirely or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)) and the like.

[0238] It is to be noted that, as used in this document, the terminology "first", "second", etc. is merely used to differentiate one entity or action from another, and does not necessarily imply or require any actual relationship or order between or among the entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0239] Each of the embodiments in the present specification is described in a related manner, and the same or similar parts among the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiments.

[0240] The above only describes the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A model training method, characterized in that, The method relates to a server and a client, the server comprises a first server and a second server, and the method comprises the following steps: The first server creates global model parameters corresponding to an initial global model, obtains a server model parameter increment corresponding to the global model parameters, and sends the global model parameters to a target client; The target client performs training processing according to the global model parameters, obtains a local model parameter increment corresponding to the global model parameters, splits the local model parameter increment according to additive secret sharing, obtains a first local model parameter increment and a second local model parameter increment, and sends the first local model parameter increment to the first server and the second local model parameter to the second server; The first server and the second server perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment, and obtain a stability index of the local model parameter increment; The first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and calculate a trust score of the local model parameter increment in combination with the stability index; The first server and the second server calculate the global model parameter increment corresponding to the initial global model according to the trust score; The first server updates the global model parameters corresponding to the initial global model according to the global model parameter increment, and outputs a target global model corresponding to the initial global model.

2. The method of claim 1, wherein, The server model parameter increment corresponding to the global model parameters is obtained by: The first server obtains a first data set for the global model parameters; The first server trains the global model parameters by using the first data set, and obtains server model parameters corresponding to the global model parameters; The first server calculates the server model parameter increment corresponding to the global model parameters by using the server model parameters and the global model parameters according to the following formula (1): wherein, is the server model parameter increment, is the server model parameter, is the global model parameter.

3. The method of claim 1, wherein, The local model parameter increment corresponding to the global model parameters is obtained by: The target client obtains a second data set for the global model parameters; The target client trains the global model parameters by using the second data set, and obtains local model parameters corresponding to the global model parameters; The target client calculates the local model parameter increment corresponding to the global model parameters by using the local model parameters and the global model parameters according to the following formula (2): wherein, is the local model parameter increment, is the local model parameter, is the global model parameter.

4. The method of claim 1, wherein, The method comprises: The first server and the second server pre-generate array information according to a homomorphic encryption algorithm, and the array information is used for multiplicative secret sharing between the first server and the second server.

5. The method of claim 4, wherein, The first server and the second server pre-generate array information according to a homomorphic encryption algorithm, and the array information is used for multiplicative secret sharing between the first server and the second server. The first server generates a key pair {N, λ, g} according to the homomorphic encryption algorithm, and sends the public key {N, g} to the second server; The first server randomly generates an integer a and Δ1c, encrypts a according to the public key to obtain E(a), and sends E(a) to the second server; The second server randomly generates an integer b and Δ2c, encrypts Δ2c according to the public key to obtain E(Δ2c), and calculates a ciphertext val = [E(a) + b * E(Δ2c)] mod n b · [E(Δ2c)] -1 and sends to the first server. The first server decrypts the ciphertext according to the private key to obtain Δ1c=D(val); The first server and the second server determine a random number r0; The first server performs calculation according to the random number r0, obtains a' = a r0and The second server performs calculation according to the random number r0, obtains b' = b r0 and Where Δ1c′+Δ2c′=a′b′.

6. The method of claim 5, wherein, The first server and the second server perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment to obtain a stability index of the local model parameter increment, including: The first server sends the first local model increment Δ1g ij Splitting is performed to obtain Δ1g ij -a′ ij and a′ ij and sends Δ1g ij -a′ ij to the second server; The second server sends the second local model increment Δ2g ij Splitting is performed to obtain Δ2g ij -b′ ij and b′ ij and sends Δ2g ij -b′ ij to the first server; The first server performs multiplication operation on Δ2g ij -b′ ij , Δ1c′ ij and a′ ij according to following formula (3) to obtain the first shared result of the local model increment and sends to the second server: Δ1z ij = a' ij (Δ2g ij - b' ij )+ Δ1c' ij (3) where Δ1z ij is the first shared result, i = 1, 2, …, τ, j = 1, 2, …, d; The second server adopts Δ1g ij -a′ ij , Δ2g ij and Δ2c′ ij performs multiplication operation according to the following formula (4), obtains the second shared result corresponding to the local model increment, and sends to the first server: Δ2z ij = (Δ1g ij - a′ ij )Δ2g ij + Δ2c′ ij (4) where Δ2z ij is the second shared result, i = 1, 2,..., τ, j = 1, 2,..., d; The first server and the second server calculate the stability index of the local model parameter increment by using the first sharing result and the second sharing result according to the following formulas (5), (6) and (7): wherein Δ1z ij is the first shared result, Δ2z ij is the second shared result, is a stability indicator of the local model parameter increment, i = 1, 2,..., τ, j = 1, 2,..., d.

7. The method of claim 6, wherein, The first server and the second server perform multiplicative secret sharing based on the server model parameter increment and the second local model parameter increment, and combine the stability index to calculate a trust score of the local model parameter increment, including: said first server sends said server model parameter increment g 0j is split to obtain g 0j -a′ ij and a′ ij and sends g 0j -a′ ij to said second server; The second server sends the second local model increment Δ2g ij Splitting is performed to obtain Δ2g ij -b′ ij and b′ ij and sends Δ2g ij -b′ ij to the first server; The first server performs multiplication operation on Δ2g ij -b′ ij , a′ ij and Δ1c′ ij according to the following formula (8) to obtain a third shared result and sends it to the second server: Δ1u ij = a' ij (Δ2g ij - b' ij )+ Δ1c' ij (8) where Δ1u ij is the third sharing result, i = 1, 2, …, τ, j = 1, 2, …, d; The second server performs multiplication operation on g 0j -a′ ij , Δ2g ij and Δ2c′ ij according to the following formula (9) to obtain the fourth shared result and sends it to the first server: g2c′=g2c′+a′+Δ2g+Δ2c′ Δ2u ij = (g 0j -a′ ij )Δ2g ij +Δ2c′ ij (9) where Δ2u ij is the fourth sharing result, i = 1, 2, …, τ, j = 1, 2, …, d; The first server and the second server calculate the trust score of the local model parameter increment by using the third sharing result, the fourth sharing result and the stability index of the local model parameter increment according to the following formulas (10), (11) and (12), respectively: wherein Δ1u ij is the third sharing result, Δ2u ij is the fourth sharing result, is a stability index of the local model parameter increment, TS i is a trust score, i = 1, 2, …, τ, j = 1, 2, …, d.

8. The method of claim 7, wherein, The first server and the second server calculate the global model parameter increment corresponding to the initial global model according to the trust score, including: The first server calculates the first global model parameter increment by using the trust score and the first local model parameter increment according to the following formula (13): wherein, is the first global model parameter increment, TS i is the trust score, is the first local model parameter increment, i = 1, 2,..., τ, j = 1, 2,..., d; The second server calculates the second global model parameter increment by using the trust score and the second local model parameter increment according to the following formula (14), and sends it to the first server, and the specific formula is as follows: wherein, is the second global model parameter increment, TS i is the trust score, is the second local model parameter increment, i = 1, 2, …, τ, j = 1, 2, …, d; The first server calculates the global model parameter increment corresponding to the initial global model by using the first global model parameter increment and the second global model parameter increment according to the following formula (15): wherein, is the global model parameter increment for the first global model parameter, is the first global model parameter increment for the first global model parameter, is the second global model parameter increment for the second global model parameter.

9. The method of claim 8, wherein, The first server updates the global model parameter corresponding to the initial global model according to the global model parameter increment, including: The first server calculates the updated global model parameter by using the global model parameter increment, the global model parameter and the global learning rate according to the following formula (16): wherein, is a global model parameter, and a is a global learning rate, is the global model parameter increment.

10. A model training device, involving a server and a client, the server comprising at least a first server and at least one second server, the device comprising: An initialization module for creating a global model parameter corresponding to an initial global model, and obtaining a server model parameter increment corresponding to the global model parameter, and sending the global model parameter to a target client; An initialization module for creating a global model parameter corresponding to an initial global model, and obtaining a server model parameter increment corresponding to the global model parameter, and sending the global model parameter to a target client; The local training module is configured to perform training processing according to the global model parameters, obtain a local model parameter increment, split the local model parameter increment according to additive secret sharing, obtain a first local model parameter increment and a second local model parameter increment, send the first local model parameter increment to the first server, and send the second local model parameter to the second server; The first calculation module is configured to perform multiplicative secret sharing based on the first local model parameter increment and the second local model parameter increment, and obtain a stability index of the local model parameter increment; The second calculation module is configured to perform multiplicative secret sharing based on a server model parameter increment and the second local model parameter increment, and perform calculation in combination with the stability index, and obtain a trust score of the local model parameter increment; The aggregation module is configured to perform calculation according to the trust score, and obtain a global model parameter increment corresponding to the initial global model; The updating module is configured to update the global model parameter corresponding to the initial global model according to the global model parameter increment, and output a target global model corresponding to the initial global model.

11. An electronic device, comprising: The computer readable storage medium stores instructions, and when the instructions are executed by one or more processors, the processors perform the method of any one of claims 1-9.

12. A computer readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-9. ​ ​

Citation Information

Patent Citations

  • Federated learning training data privacy enhancement method and system

    CN110572253A

  • Privacy protection federated learning method, system and device in distributed environment and medium

    CN116383864A