Privacy protection and efficient communication image recognition method based on ranking federal learning

By adopting a ranking-based federated learning method and double masking mechanism in federated learning, the problem of exposing data information and communication overhead for the client sharing intermediate model parameters is solved, efficient privacy protection and communication efficiency are achieved, and data security is supported for the client to go offline in the middle.

CN119834964AActive Publication Date: 2025-04-15BEIJING INST OF TECH +1

Patent Information

Application Number
CN202411891562.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

In federated learning, the intermediate model parameters shared by the client may expose local data information, and the communication overhead is large, and due to network bandwidth limitations, the client may be offline in the middle, resulting in inaccurate aggregation.

Method used

Ranking-based federated learning method is adopted to protect the local data privacy of the client through the double masking mechanism, and reduce communication overhead through edge pop-up algorithms and voting mechanisms, supporting the mask recovery mechanism for the client to go offline in the middle.

Benefits of technology

While ensuring the performance and privacy protection of image recognition models, it reduces communication overhead, reduces communication costs by more than 8 times, and ensures the security of client data throughout the federated learning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119834964A_ABST
    Figure CN119834964A_ABST
Patent Text Reader

Abstract

The invention provides a ranking federated learning-based privacy protection and efficient communication image recognition method, and communication efficiency is improved by transmitting ranking-based vote numbers instead of traditional gradients. In combination with a secret sharing protocol and a Diffie-Hellman key protocol, a dual mask mechanism which can protect ranking parameter privacy and is locally uploaded by a client is designed, and a malicious cloud server or the client cannot use information mastered by the malicious cloud server or the client to infer privacy information of other clients. The problem that local data information is still possibly exposed by intermediate model parameters shared by a client in federated learning is solved. In addition, mask reconstruction is achieved through some online client interactions to support accurate aggregation when clients exit in the federated learning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of privacy-preserving federated learning, and in particular relates to a privacy-preserving and communication-efficient image recognition method based on ranked federated learning. Background Art

[0002] In the era of big data, the conflict between data fusion needs and data privacy protection has become increasingly prominent. Federated learning, as a distributed machine learning framework, allows collaborative training of global models by sharing model parameters without directly exchanging raw data. Specifically, each client independently trains a model based on local data, and then uploads the trained model parameters to the server. The server aggregates these parameters to update the global model and sends the updated global model to each client. Federated learning avoids centralized data collection and transforms centralized learning from "models do not move, data moves" to "data does not move, models move", thereby better protecting the privacy of training data and promoting the use of distributed data resources.

[0003] However, federated learning still has the risk that model parameters (i.e. gradients and weights, etc.) may be used to infer the client's original data. Existing technologies mainly protect them through homomorphic encryption, secure multi-party computing, and differential privacy. At the same time, the parameters of the federated learning model are huge, which leads to high communication costs. Existing privacy-preserving federated learning work reduces communication costs by improving local training efficiency and reducing the number of communication rounds, optimizing client selection strategies, and model compression methods. However, since the communication between the client and the server still relies on traditional model parameters, the degree of communication cost reduction is limited. In addition, limited network bandwidth and the geographical dispersion of client data may aggravate the communication overhead problem in federated learning, and even cause the client to be disconnected midway.

[0004] That is to say, although federated learning can reduce the risk of data leakage to a certain extent, the intermediate model parameters shared by the client may still expose local data information. In addition, federated learning also faces problems such as high communication overhead for model updates and the possibility that clients with limited network bandwidth may go offline midway, resulting in inaccurate aggregation. Summary of the invention

[0005] To solve the above problems, the present invention provides a privacy-preserving and communication-efficient image recognition method based on ranked federated learning. The double mask mechanism of ranked federated learning can reduce the communication overhead by more than 8 times while ensuring the performance and privacy protection of the image recognition model.

[0006] A privacy-preserving and communication-efficient image recognition method based on ranked federated learning, wherein an image recognition model obtained by federated learning of a cloud server and multiple clients is used for image recognition, wherein the image recognition model is obtained by:

[0007] S1: A trusted third party generates two public and private key pairs for each client, which are used for mask generation and identity authentication encryption respectively. Each client sends its two public keys as messages to the cloud server. When the cloud server receives at least t messages, it broadcasts the received public key list to the clients that are still online in the current round.

[0008] S2: Each client randomly selects a first mask seed and distributes the seed and the private key used for mask generation to other clients according to the secret sharing protocol;

[0009] S3: Each client uses the public key for identity authentication encryption to authenticate and encrypt its own identity information and the identity information of the client shared with itself, and sends the obtained ciphertext to the cloud server;

[0010] S4: The cloud server determines whether it has received at least t ciphertexts in the current round. If so, it broadcasts the currently received ciphertext and the global ranking of the edge importance between each network node in the image recognition model of the current round to the clients that are still online in the current round. In the first round, the cloud server ranks the edge importance between each network node in the image recognition model according to the initialized edge score.

[0011] S5: Each client reorders the local edge scores according to the received global ranking, and then uses the edge pop-up algorithm to update the reordered local edge scores, and finally obtains the local ranking of the current round according to the updated local edge scores;

[0012] S6: Each client converts the local ranking of the current round into a vote number, and uses the first mask seed selected by itself in step S2 and the private key for mask generation shared by itself and other clients to superimpose double mask perturbations on the vote number, and then uploads the obtained masked vote number to the cloud server;

[0013] S7: Each client decrypts the ciphertext received in step S4. If the decryption is successful, the client sends the first mask seed slices of other clients that are still online in the current round obtained by sharing in step S2 to the cloud server, and at the same time sends the private key slices of other clients that are offline in the current round obtained by sharing in step S2 to the cloud server;

[0014] S8: The cloud server determines whether it has received at least t messages in the current round, where the messages are the first mask seed slices and the private key slices. If yes, the cloud server uses a secret reconstruction algorithm to reconstruct the first mask seed and the private key used for mask generation, and calculates the corresponding shared key according to the reconstructed structure;

[0015] S9: The cloud server aggregates the masked votes corresponding to all clients received in step S6 based on the shared key, and uses the Argsort function to generate a new global ranking for the aggregated new votes, and then returns to step S1 to start the next round of iteration until the set number of iterations is reached. The global ranking obtained when the set number of iterations is used as the edge importance ranking between the nodes in the image recognition model, and the edges between the nodes are weighted according to the edge importance ranking to obtain the final image recognition model.

[0016] Furthermore, in step S1, a method for generating a public key and a private key pair of any client m is as follows:

[0017]

[0018] Among them, KA.Gen represents the algorithm for generating public-private key pairs, public parameters pp = (G, q, g, H), q represents the order, G represents a group of order q, g represents the generator, and H represents the hash function. and They represent the private key and public key of client m for authentication encryption, and They represent the private key and public key of client m used for mask generation respectively.

[0019] Furthermore, in step S2, the method for any client m to share the seed and private key is:

[0020] From the finite field Z of positive integers q Randomly select a positive integer as the first mask seed b m ;

[0021] Client m uses the secret sharing protocol to send the first mask seed b m and the private key used for mask generation Share with another client u:

[0022]

[0023] Among them, SS.Share represents the secret sharing algorithm, t is the secret sharing threshold, U1 represents the set of surviving clients that are still online in the current step, represents the private key of client m for mask generation, b u,mIndicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u, (u,b u,m ) represents the seed data packet shared by client m to client u, Indicates the private key data packet shared by client m to client u.

[0024] Further, in step S3, any client m and any client u that shares secrets with client m corresponds to a ciphertext x u,m :

[0025]

[0026] Among them, AE.Enc represents the encryption algorithm, KA.Agree represents the negotiated shared key algorithm, The private key of client u for authentication encryption. b represents the public key of client m for authentication encryption. u,m Indicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u. || represents the concatenation of strings.

[0027] Furthermore, in step S5, the method for any client m to obtain the local ranking of the current round is:

[0028] Use the Sort function to sort the local edge scores from small to large to obtain the rearranged local edge scores;

[0029] According to the global ranking, the re-arranged local edge scores are assigned to the edges between each network node in the image recognition model, wherein the smaller the local edge score is assigned to the lower-ranked edge, and the larger the local edge score is assigned to the higher-ranked edge, thereby obtaining the re-assigned edges between each network node in the image recognition model;

[0030] The edge pop-up algorithm is used to update the local edge scores in the re-assigned image recognition model to obtain the updated local scores.

[0031]

[0032] Where EP represents the edge pop-up algorithm, E represents the number of local rounds, and Ω m represents the local data of client m, K represents the set constant, η represents the learning rate, θ ωDenote the weights of the edges between the nodes in the local image recognition model of client m, θ s Denote the scores of the edges between the nodes in the local image recognition model of client m;

[0033] Use the Argsort function to rank the edges between the network nodes in the updated local scores in the image recognition model to obtain the local ranking of client m in the current round.

[0034] Furthermore, in step S6, any client m uses the Argsort function to convert the local ranking in the current round into the number of votes.

[0035] Furthermore, in step S6, the masked vote number y m of any client m is obtained as follows:

[0036]

[0037] where v m is the number of votes converted from the local ranking of client m in the current round, U2 is the set of surviving clients still online in the current step, q m,u is the shared secret key negotiated between client m and client u, and KA.Agree represents the algorithm for negotiating the shared secret key, represents the private key of client m for mask generation, represents the public key of client u for mask generation, PRG represents the pseudo-random number generator, b m is the first-layer mask seed selected by client m, u ∈ U2: m < u represents the clients in the set of surviving clients U2 with numbers less than m, and u ∈ U2: m > u represents the clients in the set of surviving clients U2 with numbers greater than m.

[0038] Furthermore, in step S7, the method for any client m to decrypt the ciphertext received in step S4 is as follows:

[0039] Decrypt the ciphertext according to the following formula:

[0040]

[0041] where AE.Enc represents the encryption algorithm, KA.Agree represents the algorithm for negotiating the shared secret key, represents the private key of client u for authenticated encryption, represents the public key of client m for authenticated encryption, b u,m represents the first-layer mask seed b m shared by client m to client u as the slice of the first-layer mask seed, Represents the private key of client m The private key slice shared with client u, || represents the concatenation of strings, χ u,m represents the ciphertext corresponding to client m and client u that shares secrets with client m, and u′ represents the ciphertext x u,m The decryption number corresponding to the client u is obtained after decryption, and m′ represents the decryption of the ciphertext x u,m The decryption number corresponding to the client u obtained after decryption;

[0042] Determine whether the equation u=u′∧m=m′ is equal. If they are equal, the decryption is successful.

[0043] Furthermore, in step S8, the method for obtaining the shared key corresponding to any client m is:

[0044]

[0045] in, represents the private key of client m for mask generation, SS.Recon represents the secret reconstruction algorithm, Represents the private key of client m The private key slice shared to client u, U4 is the set of surviving clients that are still online in the current step, t is the secret sharing threshold, b u,m Indicates the first mask seed b of client m m The first masked seed slice shared with client u;

[0046] Calculate the corresponding shared key:

[0047]

[0048] Among them, q m,u The shared key negotiated by client m and client u. KA.Agree indicates the negotiated shared key algorithm. Indicates the public key of client u used for mask generation.

[0049] Furthermore, in step S9, the method for the cloud server to perform voting aggregation is:

[0050]

[0051] Among them, v total is the new number of votes after aggregation, U3 is the set of surviving clients still online after step S6, U2 is the set of surviving clients still online after step S3, and y m is the number of mask votes corresponding to client m, q m,u is the shared key negotiated by client m and client u, PRG represents a pseudo-random number generator, bm The first-layer mask seed selected for client m, where m ∈ U3, u ∈ U2\U3: m < u represents the clients with numbers less than m in the set of surviving clients U2 but not in the set of surviving clients U3, and m ∈ U3, u ∈ U2\U3: m > u represents the clients with numbers greater than m in the set of surviving clients U2 but not in the set of surviving clients U3.

[0052] Beneficial effects:

[0053] 1. The present invention provides a privacy-protected and communication-efficient image recognition method based on ranked federated learning. By combining the secret sharing protocol and the Diffie-Hellman key protocol, a dual-mask mechanism capable of protecting the privacy of the ranked parameters uploaded by clients locally is designed. Specifically, a dual mask is added before the local client uploads the parameters, and during the aggregation phase, the masks can be mutually cancelled or reconstructed and eliminated. Neither the malicious cloud server nor the client can use the information they possess to infer the privacy information of other clients, thus ensuring that the data of each client will not be leaked during the entire federated learning process, and solving the problem that the intermediate model parameters shared by clients in federated learning may still expose local data information; that is, the present invention proposes a method for a privacy-protected and efficient federated learning image recognition model based on ranked communication rather than traditional gradients, which can reduce the communication cost while ensuring accuracy and privacy protection, so as to protect the client data and the ranked model parameters uploaded by the client from being exposed during the entire federated learning process.

[0054] 2. The present invention provides a privacy-protected and communication-efficient image recognition method based on ranked federated learning. By combining the edge-pop algorithm, the global model is collaboratively trained based on the ranking of the random network edge, and a voting mechanism is adopted to aggregate and update the global model, reducing the communication overhead and ensuring the efficiency of the federated learning communication process.

[0055] 3. The present invention provides a privacy-protected and communication-efficient image recognition method based on ranked federated learning. By combining the secret sharing protocol, a mechanism supporting the mid-course disconnection of clients is designed. Specifically, the mask seed is secretly shared before mask generation. After that, even if some clients disconnect midway, only a certain number of online clients are required to reconstruct and eliminate the mask seed, thus ensuring the accuracy of aggregation; that is, the present invention designs a mask recovery mechanism supporting the mid-course disconnection of clients, allowing the masks of the mid-course disconnected clients to be reconstructed by interacting with some online clients, thus ensuring the accuracy during vote aggregation and solving the problem that the mid-course disconnection of clients leads to inaccurate aggregation. Brief description of the drawings

[0056] Figure 1A flow chart of a training method for a privacy-preserving and communication-efficient image recognition model based on ranked federated learning provided by the present invention. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0058] The present invention proposes a privacy-preserving and communication-efficient image recognition method based on ranked federated learning. It mainly designs a double mask mechanism to protect the privacy of ranking-based parameters uploaded locally by the client, ensuring the security of original data and intermediate parameters in the federated learning process. In the present invention, even if some clients go offline during the federated learning process, mask reconstruction can be performed by interacting with some online clients to maintain the accuracy of the aggregation results. In addition, the present invention improves communication efficiency by uploading ranking-based parameter information instead of traditional gradients. The present invention is practical and can maintain good model performance while achieving privacy protection and secure aggregation, and also has advantages in reducing communication overhead.

[0059] The present invention mainly involves two entities: cloud servers and clients. The cloud server is mainly responsible for broadcasting and updating the global ranking of each round. The client is an independent entity with different data sets, such as image data. Each client calculates the ranking of the network edge in the random network based on its local image data and votes. After being perturbed by the double mask mechanism, the mask votes are uploaded to the cloud server, thereby collaboratively training the global image recognition model under the federated learning framework. The ultimate goal is to obtain a subnetwork that minimizes the average loss of the client. The present invention assumes that the cloud server and all clients are honest and curious. Specifically, although the cloud server and clients strictly follow the standard procedures required to complete the federated learning task, they are also curious about the image privacy information of other clients and may try to use previously acquired knowledge to infer or obtain the image privacy information of other clients.

[0060] Specifically, Figure 1 As shown, a privacy-preserving and communication-efficient image recognition method based on ranked federated learning is used to perform image recognition using an image recognition model obtained by federated learning of a cloud server and multiple clients, wherein the image recognition model is obtained by:

[0061] S0: System initialization.

[0062] The system initialization mainly deploys a client set and a cloud server. The client's local training set contains a certain number of image samples. The system initializes the weights and scores for the network based on the random seed selected by the cloud server. Among them, this random seed is shared with the clients, and the clients can re-establish the initial weights and scores locally.

[0063] Specifically, given the randomly initialized initial network θ, a set of N clients U = {C1, C2, …, C N}, a cloud server S and security parameter k, and using a secret sharing protocol with threshold (t, N), perform the following steps:

[0064] Generate public parameters:

[0065] (G,q,g,H)←KA.Param(k);

[0066] Return pp = (G, q, g, H);

[0067] Initialize network parameters:

[0068] Choose a random seed SEED←Z q ;

[0069] θ ω ←SKC(θ,SEED);

[0070] θ s ←KU(θ,SEED);

[0071] Among them, t represents the threshold of the secret sharing protocol, q represents the order, G represents a group of order q, g represents the generator, H represents the hash function, KA.Param represents the algorithm for generating public parameters, pp represents the public parameters, and Z q represents a finite field, θ ω represents the weight of the network θ, SKC represents the signed Kemming constant algorithm, θ s represents the score of the network θ, and KU represents the Kaiming uniform algorithm.

[0072] S1: A trusted third party generates two public and private key pairs for each client, which are used for mask generation and identity authentication encryption respectively. Each client sends its two public keys as messages to the cloud server. When the cloud server receives at least t messages, it broadcasts the received public key list to the clients that are still online in the current round.

[0073] Among them, given the public parameter pp, for the client m∈U, the method of generating one of the public key and private key pairs of any client m is as follows:

[0074]

[0075] Among them, KA.Gen represents the algorithm for generating public-private key pairs, public parameters pp = (G, q, g, H), q represents the order, G represents a group of order q, g represents the generator, and H represents the hash function. and They represent the private key and public key of client m for authentication encryption, and They represent the private key and public key of client m used for mask generation respectively.

[0076] Client m sends To the cloud server, when the cloud server receives at least t messages, the broadcast list Given all clients in the surviving client set U1, U1 represents the surviving client set of this step.

[0077] S2: Each client randomly selects a first mask seed and distributes the seed and the private key used for mask generation to other clients according to the secret sharing protocol;

[0078] Among them, for client m∈U1, the method for any client m to share the seed and private key is:

[0079] From the finite field Z of positive integers q Randomly select a positive integer as the first mask seed b m ;

[0080] Client m uses the secret sharing protocol to send the first mask seed b m and the private key used for mask generation Share with another client u:

[0081]

[0082] Where SS.Share represents the secret sharing algorithm, t is the secret sharing threshold, U1 represents the set of surviving clients that are still online in step S2, represents the private key of client m for mask generation, b u,m Indicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u, (u,b u,m ) represents the seed data packet shared by client m to client u, Indicates the private key data packet shared by client m to client u.

[0083] It should be noted that the secret sharing protocol refers to: The key to the secret sharing protocol with a threshold of (t, N) is to divide the secret into N shares independently. If t shares are known, the original secret can be recovered, but if only t-1 shares are known, the original secret cannot be reconstructed. SS.Share is used in the secret sharing phase, and SS.Recon is used in the secret reconstruction phase.

[0084] S3: Each client uses the public key for identity authentication encryption to authenticate its own identity information and the identity information of the client shared with itself, and sends the obtained ciphertext to the cloud server; identity authentication encryption means: AE.Enc is used to encrypt plaintext, and AE.Dec is used to decrypt ciphertext;

[0085] Among them, any client m and any client u that shares secrets with client m corresponds to a ciphertext χ u,m :

[0086]

[0087] Among them, AE.Enc represents the encryption algorithm, KA.Agree represents the negotiated shared key algorithm, The private key of client u for authentication encryption. b represents the public key of client m for authentication encryption. u,m Indicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u. || represents the concatenation of strings.

[0088] S4: The cloud server determines whether it has received at least t ciphertexts in the current round. If so, it broadcasts the currently received ciphertext and the global ranking of the edge importance between each network node in the image recognition model of the current round to the clients that are still online in the current round. In the first round, the cloud server ranks the edge importance between each network node in the image recognition model according to the initialized edge score.

[0089] It should be noted that steps S1 to S4 are mainly divided into two stages: key generation and key sharing. In the key generation stage, the trusted third party generates two public and private key pairs for each client, which are used for mask generation and identity authentication encryption respectively. Among them, the trusted third party is a fully trusted key management center, and the communication channel between the trusted third party and any entity is secure. In the key sharing stage, for each client, a first mask seed is randomly selected, and this seed and the private key used for mask generation are distributed to all clients according to the secret sharing protocol. In order to ensure confidentiality and integrity during the sharing process, identity authentication encryption is also required.

[0090] Then, the client m ciphertext χ u,m To the cloud server, when the cloud server receives at least t messages, broadcast the ciphertext list and the global ranking of the current round Given all clients in U2, U2 represents the set of surviving clients of step S4.

[0091] S5: Each client reorders the local edge scores according to the received global ranking, and then uses the edge pop-up algorithm to update the reordered local edge scores, and finally obtains the local ranking of the current round according to the updated local edge scores;

[0092] Among them, for the first round of global ranking, given the initialization score θ s , perform the following steps:

[0093]

[0094] in, It indicates the global ranking of round 1. It should be noted that in the first round, the global ranking of image recognition is calculated based on the initialized network score, and this global ranking is broadcast to all clients in the surviving client set. For other rounds, the cloud server broadcasts the updated global ranking of image recognition.

[0095] Furthermore, for client m∈U2, given the score θ s and global ranking Wherein, U2 represents the set of surviving clients in step S4, It represents the global ranking of the dth round. The method for any client m to obtain the local ranking of the current round is:

[0096] S51: Use the Sort function to sort the local edge scores from small to large to obtain the rearranged local edge scores

[0097] S52: assigning the re-arranged local edge scores to the edges between each network node in the image recognition model according to the global ranking, wherein a smaller local edge score is assigned to an edge with a lower ranking, and a larger local edge score is assigned to an edge with a higher ranking, thereby obtaining the re-assigned edges between each network node in the image recognition model;

[0098] For example, suppose θ s =[0.3,0.8,0.5,0.4,0.9,1.3], Among them, θ s In the example, the score of edge 1 is 0.3, the score of edge 2 is 0.8, and so on. In the figure, edge 2 has the lowest ranking and edge 5 has the highest ranking, so:

[0099] Sort(θ s ) = [0.3, 0.4, 0.5, 0.8, 0.9, 1.3]

[0100] Then it means θ s [2] = 0.3, θ s [4] = 0.4, θ s [0] = 0.5, θ s [1] = 0.8, θ s [3] = 0.9, θ s [5]=1.3, then the rearranged θ s =[0.5,0.8,0.3,0.9,0.4,1.3].

[0101] S53: Use the edge pop-up algorithm to update the local edge score in the re-assigned image recognition model to obtain the updated local score

[0102]

[0103] Where EP represents the edge pop-up algorithm, E represents the number of local rounds, and Ω m represents the local data of client m, K represents the set constant, η represents the learning rate, θ ω represents the weight of the edges between nodes in the local image recognition model of client m, θ s represents the fraction of edges between nodes in the local image recognition model of client m;

[0104] It should be noted that the edge popping algorithm is an algorithm for finding a "super-masked" high-performance sub-network. "Super-masked" refers to a sub-network of a randomly initialized network that can achieve high accuracy without training.

[0105] S54: Use the Argsort function to update the local score rank the edges between each network node in the image recognition model under to obtain the local ranking of the current round of client m

[0106] It can be seen that in step S5, the client re - ranks the local scores of the network according to the received global ranking of image recognition in the current round. Through the edge pop - up algorithm, the client searches for a highly efficient sub - network with local search performance close to fully trained in the local area and updates the scores, so as to calculate the local ranking of each edge of the image recognition network according to the finally updated scores.

[0107] S6: Each client converts the local ranking of the current round into a number of votes, and uses the first - layer mask seed selected by itself in step S2 and the private key for mask generation shared with other clients to superimpose double - mask perturbation on the number of votes, and then uploads the obtained masked number of votes to the cloud server;

[0108] Among them, any client m uses the Argsort function to convert the local ranking of the current round into a number of votes

[0109]

[0110] The masked number of votes y of any client m m is obtained as follows:

[0111]

[0112] Among them, v m is the number of votes converted from the local ranking of the current round by client m, U2 is the set of surviving clients still online in step S4, q m,u is the shared key negotiated between client m and client u, and KA.Agree represents the algorithm for negotiating the shared key, represents the private key of client m for mask generation, represents the public key of client u for mask generation, PRG represents the pseudo - random number generator, b m is the first - layer mask seed selected by client m, u ∈ U2:m < u represents the clients in the surviving client set U2 with numbers less than m, and u ∈ U2:m > u represents the clients in the surviving client set U2 with numbers greater than m.

[0113] The clients send the list to the cloud server. When the cloud server receives at least t messages, it broadcasts the U3 list, where U3 represents the set of surviving clients still online in step S6.

[0114] It should be noted that a pseudorandom number generator (PRG) is a number sequence that can generate values ​​that are close to random but are actually generated through a deterministic computing process. Before the output of a pseudorandom number generator is given, it is impossible to accurately predict the next random number; given a random number sequence, it is impossible to reversely deduce the internal state or seed of the generator.

[0115] It can be seen that in step S6, the client votes for the edges in the network according to its local ranking of image recognition to obtain the local vote count, and then performs double mask perturbation on it and uploads it to the cloud server. m The client also needs to use the Diffie-Hellman key agreement to calculate the shared key q m,u As the second mask seed. When the cloud server receives enough messages from the client, it will broadcast the list of surviving clients.

[0116] It should be noted that the Diffie-Hellman key agreement means: KA.Param is used for parameter generation, KA.Gen is used to generate key pairs, and KA.Agree is used to negotiate shared keys between clients.

[0117] S7: Each client decrypts the ciphertext received in step S4. If the decryption is successful, the client sends the first mask seed slices of other clients that are still online in the current round obtained by sharing in step S2 to the cloud server, and at the same time sends the private key slices of other clients that are offline in the current round obtained by sharing in step S2 to the cloud server;

[0118] The method for any client m to decrypt the ciphertext received in step S4 is:

[0119] Decrypt the ciphertext according to the following formula:

[0120]

[0121] Among them, AE.Enc represents the encryption algorithm, KA.Agree represents the negotiated shared key algorithm, The private key of client u for authentication encryption. b represents the public key of client m for authentication encryption. u,m Indicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u, || represents the concatenation of strings, χ u,mrepresents the ciphertext corresponding to client m and client u that shares secrets with client m, and u′ represents the ciphertext x u,m The decryption number corresponding to the client u is obtained after decryption, and m′ represents the decryption of the ciphertext x u,m The decryption number corresponding to the client u obtained after decryption;

[0122] Determine whether the equation u=u′∧m=m′ is equal. If they are equal, the decryption is successful.

[0123] For example, client m decrypts successfully and sends a shared And send shared b to online client u∈U3 u,m to the cloud server.

[0124] S8: The cloud server determines whether it has received at least t messages in the current round, where the messages are the first mask seed slices and the private key slices. If yes, the cloud server uses a secret reconstruction algorithm to reconstruct the first mask seed and the private key used for mask generation, and calculates the corresponding shared key according to the reconstructed structure;

[0125] The method for obtaining the shared key corresponding to any client m is as follows:

[0126]

[0127]

[0128] in, represents the private key of client m for mask generation, SS.Recon represents the secret reconstruction algorithm, Represents the private key of client m The private key slice shared to client u, U4 is the set of surviving clients that are still online in the current step, t is the secret sharing threshold, b u,m Indicates the first mask seed b of client m m The first masked seed slice shared with client u;

[0129] Calculate the corresponding shared key:

[0130]

[0131] Among them, q m,u The shared key negotiated by client m and client u. KA.Agree indicates the negotiated shared key algorithm. Indicates the public key of client u used for mask generation.

[0132] S9: The cloud server votes and aggregates the masked vote counts corresponding to all clients received in step S6 based on the shared key, and uses the Argsort function to generate a new global ranking from the aggregated new vote counts which represents the global ranking of the next round, and then returns to step S1 to start the iteration of the next round until the set number of iterations is reached. The global ranking obtained when setting the number of iterations is used as the ranking of the importance of the edges between the nodes in the image recognition model, and weights are assigned to the edges between the nodes according to the edge importance ranking to obtain the final image recognition model that minimizes the average loss of all clients when completing the image recognition task;

[0133] Among them, the method for the cloud server to perform vote aggregation is:

[0134]

[0135] where v total is the new vote count after aggregation, U3 is the set of surviving clients still online after step S6, U2 is the set of surviving clients still online after step S4, y m is the masked vote count corresponding to client m, q m,u is the shared key negotiated between client m and client u, PRG represents a pseudorandom number generator, b m is the first-layer masked seed selected by client m, m ∈ U3, u ∈ U2\U3: m < u represents the clients with numbers less than m in the set of surviving clients U2 but not in the set of surviving clients U3, and m ∈ U3, u ∈ U2\U3: m > u represents the clients with numbers greater than m in the set of surviving clients U2 but not in the set of surviving clients U3.

[0136] It should be noted that in steps S7 - S9, first decrypt the ciphertext for the surviving clients. If the conditions are met after decryption, send the private key-related share to the clients that went offline midway, and send the first-layer masked seed-related share to the online clients to the cloud server. When the cloud server receives a sufficient number of messages from the clients, it will reconstruct the private key and the first-layer masked seed of the clients accordingly according to the secret sharing protocol. The corresponding shared key can be recalculated through the reconstructed private key, so as to obtain the second-layer masked seed of the offline clients. Finally, perform the aggregation operation of the client votes. During this process, the masks will be cancelled or eliminated after reconstruction.

[0137] In summary, the present invention can solve the following three technical problems:

[0138] 1. Privacy protection. The present invention needs to ensure that the data of each client will not be leaked during the federated learning process, including that the server cannot infer the client's privacy information from the acquired data, and the client cannot infer the privacy information of other clients based on the information it has. At the same time, even if some clients go offline midway, the privacy security of each client can still be guaranteed.

[0139] 2. Robustness. The client may go offline at any time due to network problems, hardware failures or other reasons. The present invention needs to ensure that the system is not affected by the client going offline, support the dynamic participation of the client in the federated learning process, and maintain the continuity and accuracy of model training and the privacy protection of data.

[0140] 3. High efficiency. The large model parameters in federated learning lead to high communication overhead. The present invention needs to reduce the data volume of communication model parameters in traditional federated learning by adopting a lightweight communication mechanism and algorithm optimization, thereby improving the communication efficiency of federated learning.

[0141] Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may certainly make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A privacy-preserving and communication-efficient image recognition method based on ranked federated learning, characterized in that: An image recognition model obtained by federated learning between a cloud server and multiple clients is used for image recognition, wherein the image recognition model is obtained by: S1: A trusted third party generates two public and private key pairs for each client, which are used for mask generation and identity authentication encryption respectively. Each client sends its two public keys as messages to the cloud server. When the cloud server receives at least t messages, it broadcasts the received public key list to the clients that are still online in the current round. S2: Each client randomly selects a first mask seed and distributes the seed and the private key used for mask generation to other clients according to the secret sharing protocol; S3: Each client uses the public key for identity authentication encryption to authenticate and encrypt its own identity information and the identity information of the client shared with itself, and sends the obtained ciphertext to the cloud server; S4: The cloud server determines whether it has received at least t ciphertexts in the current round. If so, it broadcasts the currently received ciphertext and the global ranking of the edge importance between each network node in the image recognition model of the current round to the clients that are still online in the current round. In the first round, the cloud server ranks the edge importance between each network node in the image recognition model according to the initialized edge score. S5: Each client reorders the local edge scores according to the received global ranking, and then uses the edge pop-up algorithm to update the reordered local edge scores, and finally obtains the local ranking of the current round according to the updated local edge scores; S6: Each client converts the local ranking of the current round into a vote number, and uses the first mask seed selected by itself in step S2 and the private key for mask generation shared by itself and other clients to superimpose double mask perturbations on the vote number, and then uploads the obtained masked vote number to the cloud server; S7: Each client decrypts the ciphertext received in step S4. If the decryption is successful, the client sends the first mask seed slices of other clients that are still online in the current round obtained by sharing in step S2 to the cloud server, and at the same time sends the private key slices of other clients that are offline in the current round obtained by sharing in step S2 to the cloud server; S8: The cloud server determines whether it has received at least t messages in the current round, where the messages are the first mask seed slices and the private key slices. If yes, the cloud server uses a secret reconstruction algorithm to reconstruct the first mask seed and the private key used for mask generation, and calculates the corresponding shared key according to the reconstructed structure; S9: The cloud server aggregates the masked votes corresponding to all clients received in step S6 based on the shared key, and uses the Argsort function to generate a new global ranking for the aggregated new votes, and then returns to step S1 to start the next round of iteration until the set number of iterations is reached. The global ranking obtained when the set number of iterations is used as the edge importance ranking between the nodes in the image recognition model, and the edges between the nodes are weighted according to the edge importance ranking to obtain the final image recognition model.

2. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S1, the method for generating one of the public key and private key pairs of any client m is as follows: Among them, KA.Gen represents the algorithm for generating public-private key pairs, public parameters pp = (G, q, g, H), q represents the order, G represents a group of order q, g represents the generator, and H represents the hash function. and They represent the private key and public key of client m for authentication encryption, and They represent the private key and public key of client m used for mask generation respectively.

3. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S2, the method for any client m to share the seed and private key is: From the finite field Z of positive integers q Randomly select a positive integer as the first mask seed b m ; Client m uses the secret sharing protocol to send the first mask seed b m and the private key used for mask generation Share with another client u: Among them, SS.Share represents the secret sharing algorithm, t is the secret sharing threshold, U1 represents the set of surviving clients that are still online in the current step, represents the private key of client m for mask generation, b u,m Indicates the first mask seed b of client m m The first masked seed slice shared with client u, Represents the private key of client m The private key slice shared with client u, (u, b u,m ) represents the seed data packet shared by client m to client u, Indicates the private key data packet shared by client m to client u.

4. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S3, any client m and any client u that shares secrets with client m corresponds to a ciphertext x u,m : Among them, AE.Enc represents the encryption algorithm, KA.Agree represents the negotiated shared key algorithm, The private key of client u for authentication encryption. b represents the public key of client m for authentication encryption. u,m Indicates the first mask seed b of client m m The first masked seed slice shared to client u, Represents the private key of client m The private key slice shared with client u. || represents the concatenation of strings.

5. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S5, the method for any client m to obtain the local ranking of the current round is: Use the Sort function to sort the local edge scores from small to large to obtain the rearranged local edge scores; According to the global ranking, the re-arranged local edge scores are assigned to the edges between each network node in the image recognition model, wherein the smaller the local edge score is assigned to the lower-ranked edge, and the larger the local edge score is assigned to the higher-ranked edge, thereby obtaining the re-assigned edges between each network node in the image recognition model; The edge pop-up algorithm is used to update the local edge scores in the re-assigned image recognition model to obtain the updated local scores. Where EP represents the edge pop-up algorithm, E represents the number of local rounds, and Ω m represents the local data of client m, K represents the set constant, η represents the learning rate, θ ω represents the weight of the edges between nodes in the local image recognition model of client m, θ s represents the fraction of edges between nodes in the local image recognition model of client m; Use the Argsort function to sort the updated local scores The edges between network nodes in the image recognition model are ranked to obtain the local ranking of client m in the current round.

6. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S6, any client m uses the Argsort function to convert the local ranking of the current round into the number of votes.

7. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S6, the number of masked votes y of any client m m The method to obtain is: Among them, v m is the number of votes converted from the local ranking of the current round by client m, U2 is the set of surviving clients still online in the current step, q m,u is the shared key negotiated between client m and client u, and KA.Agree represents the algorithm for negotiating the shared key, represents the private key of client m for mask generation, represents the public key of client u for mask generation, PRG represents the pseudo-random number generator, b m is the first-layer mask seed selected by client m, u ∈ U2: m < u represents the clients in the set of surviving clients U2 with numbers smaller than m, and u ∈ U2: m > u represents the clients in the set of surviving clients U2 with numbers larger than m.

8. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S7, the method for any client m to decrypt the ciphertext received in step S4 is: Decrypt the ciphertext according to the following formula: Among them, AE.Enc represents the encryption algorithm, KA.Agree represents the negotiated shared key algorithm, The private key of client u for authentication encryption. b represents the public key of client m for authentication encryption. u,m Indicates the first mask seed b of client m m The first masked seed slice shared with client u, Represents the private key of client m The private key slice shared with client u, || represents the concatenation of strings, χ u,m represents the ciphertext corresponding to client m and client u that shares secrets with client m, and u′ represents the ciphertext x u,m The decryption number corresponding to the client u is obtained after decryption, and m′ represents the decryption of the ciphertext x u,m The decryption number corresponding to the client u obtained after decryption; Determine whether the equation u=u′∧m=m′ is equal. If they are equal, the decryption is successful.

9. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning as claimed in claim 1, characterized in that: In step S8, the method for obtaining the shared key corresponding to any client m is: in, represents the private key of client m for mask generation, SS.Recon represents the secret reconstruction algorithm, Represents the private key of client m The private key slice shared to client u, U4 is the set of surviving clients that are still online in the current step, t is the secret sharing threshold, b u,m Indicates the first mask seed b of client m m The first masked seed slice shared with client u; Calculate the corresponding shared key: Among them, q m,u The shared key negotiated by client m and client u. KA.Agree indicates the negotiated shared key algorithm. Indicates the public key of client u used for mask generation.

10. The privacy-preserving and communication-efficient image recognition method based on ranked federated learning according to claim 1, characterized in that: In step S9, the cloud server performs voting aggregation in the following manner: Among them, v total is the new aggregated vote count, U3 is the set of surviving clients still online after step S6, U2 is the set of surviving clients still online after step S3, y m is the masked vote count corresponding to client m, q m,u is the shared key negotiated between client m and client u, PRG represents a pseudorandom number generator, b m is the first masked seed selected by client m, m ∈ U3, u ∈ U2\U3: m < u represents the clients with numbers less than m in the set of surviving clients U2 but not in the set of surviving clients U3, m ∈ U3, u ∈ U2\U3: m > u represents the clients with numbers greater than m in the set of surviving clients U2 but not in the set of surviving clients U3.

Citation Information

Patent Citations

  • Federal learning privacy protection method and system, medium, equipment and terminal

    CN115883076A

  • Personalized privacy protection medical data aggregation method and system

    CN118395472A

  • Privacy protection method and system for financial data sharing based on federated learning

    US20230328043A1

Cited By

  • Safe aggregation method and system based on reputation model and lightweight mask reconstruction

    CN120875089A