A secure federated learning system using multi-user function encryption

The secure federated learning system, which uses multi-user function encryption, solves the problems of privacy information leakage and low computational efficiency in federated learning. It achieves efficient and secure model parameter transmission and aggregation, supports dynamic user participation, and improves computational efficiency and accuracy.

CN117478388BActive Publication Date: 2026-11-24UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311456164.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2026-11-24
Estimated Expiration
2043-11-03

AI Technical Summary

Technical Problem

Existing federated learning schemes have shortcomings in terms of data security and computational efficiency, especially in terms of privacy information leakage and high computational overhead, making them difficult to apply effectively in real-world scenarios.

Method used

A secure federated learning system employing multi-user function encryption achieves encrypted transmission and efficient aggregation of user model parameters through server, client, and trusted third-party key management services, supporting dynamic user participation and high-precision training.

Benefits of technology

While protecting the confidentiality of user model parameters, it reduces training time and communication power consumption, improves computational efficiency, supports dynamic user joining and leaving, and achieves efficient and secure federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117478388B_ABST
    Figure CN117478388B_ABST
Patent Text Reader

Abstract

The application discloses a kind of security federal learning systems using multi-user function encryption, belong to information security technical field.The system includes server, user end and the trusted third party for providing key management service, third party carries out initialization, calculates public parameter;Third party generates key distribution to the user end where user is located, and according to the user intention of this round, aggregate key is sent to server;User end uses agreed encryption algorithm to use key to encrypt local model parameter and send to server;Server confirms to meet aggregation condition, and after weighting aggregation is received to model parameter, obtain global model, and distribute global model to each user participating in training, complete this round training and wait for next round training.The application realizes security aggregation under the condition of satisfying high model precision, efficient calculation and communication low power consumption, guarantees the confidentiality of user local model parameter in federal learning process, and supports dynamic participation to user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security technology, specifically to a secure federated learning system using multi-user function encryption. Background Technology

[0002] Artificial intelligence (AI), as a strategic technology leading a new round of technological revolution and industrial transformation, has become a key area for major countries worldwide to seek dominance in the new round of national technological competition. With the development of the information society, various industries have accumulated massive amounts of data. This data, held by different entities, is constrained by technological, security, and regulatory limitations, hindering effective sharing and integration, thus forming isolated data silos. Furthermore, the development of the internet and mobile internet era has further accelerated data fragmentation. However, due to concerns about legal policies, regulations, and data privacy, data owners are unwilling to directly exchange raw data, preventing effective data aggregation and thus affecting the effectiveness of machine learning. This severely restricts the technological development and practical application of AI.

[0003] To address these challenges, federated learning has been proposed and is considered a technological solution that combines privacy protection with cross-institutional data sharing. Federated learning is a distributed algorithm and architecture that shares intermediate training results during computation without disclosing the original data. It enables multiple institutions to build a unified, secure, efficient, and compliant multi-source data application ecosystem, achieving cross-institutional data sharing and integration. By expanding the sample size and increasing data dimensionality, it provides strong support for building high-precision models for big data applications, thereby providing richer, higher-quality big data services and creating more value for society. The federated learning framework can connect multiple different data sources to achieve secure data sharing. During data sharing, only encrypted intermediate computation parameters are exchanged, without exchanging the original data, thus achieving the dual goals of data sharing and privacy protection.

[0004] Although federated learning only needs to transmit intermediate computation results, thus ensuring the confidentiality of the original data, recent research indicates that it still presents certain data security challenges. Federated learning can still leak private information from the training data. Specifically, in federated learning, intermediate statistical information from the data owners needs to be exchanged at each iteration. This information can be used to infer sensitive private input data from the data source. Therefore, this information needs to be encrypted locally before being uploaded for aggregation. While federated learning schemes based on secure multi-party computation and homomorphic encryption have been proposed to further enhance privacy, they still suffer from drawbacks such as high computational overhead and long training times, making them difficult to apply in real-world scenarios. Therefore, addressing the low efficiency of secure aggregation in federated learning scenarios is increasingly becoming an important issue in AI security governance.

[0005] This invention provides a secure federated learning system using multi-user function encryption to achieve efficient and privacy-enhancing federated learning.

[0006] The technical solution adopted in this invention is as follows:

[0007] A secure federated learning system using multi-user function encryption, comprising a server, client terminals, and a trusted third party for providing key management services;

[0008] The client is responsible for training local data to obtain a local model. The server is used to collect encrypted parameters of the local models of the users participating in the aggregation, weighted aggregate to obtain a global model and distribute it to the client of each user participating in the training. Each client sets it as a new local model and performs the next round of training. After several rounds of iterative training, the server obtains a centralized machine learning result model based on the currently obtained global model.

[0009] Before each round of training, the server, a trusted third party, and the user interact to obtain the online user intention vector y for that round. i ;

[0010] In each round of training, a trusted third party runs an agreed-upon parameter setting algorithm to generate public parameters pp, and generates a master key msk and a certain number of keys sk according to an agreed-upon key generation algorithm. User i participating in this round of training requests the corresponding key sk from the trusted third party through a secure channel. i ;

[0011] Each user participating in this training round sends their intention vector y to the server and a trusted third party. i and use the agreed machine learning training algorithm locally. For local datasets The corresponding local model is obtained through training. Based on key sk i The model will be encrypted according to the agreed encryption algorithm. The model parameters are encrypted to obtain the aggregated ciphertext ct i and aggregate ciphertext ct i Send your user ID to the server;

[0012] Before aggregation, the server asynchronously queries the aggregated ciphertext ct sent by each user participating in the training. i and user intention vector y i ct will aggregate all the ciphertexts in the current round i Collected encrypted collections for training participants Aggregate all users in the current round into encrypted ct i Collect user sets for training When the waiting time reaches the preset maximum waiting time t max When the number of users participating in the training exceeds the minimum number of users required for training, the server requests the aggregation key ask from a trusted third party.

[0013] After receiving the aggregate key request (ask) from the server, the trusted third party uses the user's intention vector (y) sent by the user. i Configure the local user set for training. and user sets The linear permutation of all user intention vectors sets the local encrypted aggregation weight y; a trusted third party generates an aggregation key ask based on the encrypted aggregation weight y and the master private key msk according to the agreed aggregation key generation algorithm, and then sends the aggregation key ask and the user set... Return to the server;

[0014] After receiving the return value of the aggregate key request from a trusted third party, the server will aggregate... and Compare the results and perform different aggregation processes:

[0015] like The server aggregates data according to the agreed-upon model algorithm, using each user's intention vector y. i For weighted parameter pairs, aggregate encrypted sets All aggregated ciphertext ct i We obtain the global model by performing weighted aggregation. Then, the global model is distributed to each user. To complete this round of training and await the start of the next round;

[0016] like For each For users, their user intention vector y i Set to zero, using the user's intention vector y i For weighted parameter pairs, aggregate encrypted sets All aggregated ciphertext ct i We obtain the global model by performing weighted aggregation. Then, the global model is distributed to each user. To complete this round of training and await the start of the next round;

[0017] Otherwise, terminate the current round of aggregation processing and start the next round of training.

[0018] The technical solution provided by this invention brings at least the following beneficial effects:

[0019] This invention enables the execution of efficient federated learning algorithms while protecting the user's local model, requiring less training time under the same network, and resisting collusion attacks between users and the server. This invention achieves secure aggregation while maintaining high model accuracy, efficient computation, and low power consumption in communication, ensuring the confidentiality of the user's local model parameters during federated learning, and supporting dynamic user participation. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the training process of a secure federated learning system using multi-user function encryption provided in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0023] Function cryptography is considered a novel approach to address privacy concerns in federated learning, but the only known function cryptography solution suffers from serious security and efficiency problems, such as master key leakage and low decryption efficiency, making it impractical.

[0024] The purpose of this invention is to achieve secure aggregation while meeting the requirements of high model accuracy, efficient computation, and low power consumption in communication, so as to ensure the confidentiality of user local model parameters during federated learning and support dynamic participation of users.

[0025] Specifically, the objectives of the embodiments of the present invention are as follows:

[0026] 1) Privacy protection. The model parameters uploaded by users contain sensitive information, which should be protected from disclosure during the federated learning process.

[0027] 2) High efficiency. The solution requires less computation and communication overhead compared to existing solutions, which is especially important in resource-constrained and real-world work scenarios.

[0028] 3) Accuracy Guarantee. The model established by the proposed solution will not sacrifice training accuracy compared to existing solutions.

[0029] 4) Supports dynamic user participation. The solution allows users to freely join and leave during operation.

[0030] like Figure 1 As shown, the secure federated learning system using multi-user function encryption provided in this embodiment of the invention includes: a server, users (user terminals), and a trusted third party (i.e., a key management server). The server's goal is to collect users' local models, weight and aggregate them to obtain a global model, and after multiple iterations, obtain a model that approximates the results of centralized machine learning. Users aim to share local model parameters with the server and other users without disclosing their local datasets, and continuously iterate and update to obtain the final machine learning model. The trusted third party provides a key management service, responsible for setting public parameters and generating various keys required by users and the server. For example, a user holding a unique local dataset can, with the help of this invention, share their local training model with the server and other users without disclosing their local dataset. After obtaining the weighted aggregated global model returned by the server, they can set it as a new local model and perform the next round of training, obtaining a machine learning model with better performance after multiple iterations.

[0031] like Figure 1 As shown, a certain round of training process in this embodiment of the invention can be summarized into four steps:

[0032] 1) A trusted third party performs initialization and calculates the public parameters.

[0033] 2) A trusted third party generates a key and distributes it to the user, and generates an aggregate key based on the user's wishes in this round and sends it to the server.

[0034] 3) Users use a pre-agreed encryption algorithm and a key to encrypt local model parameters and send them to the server.

[0035] 4) After the server confirms that the aggregation conditions are met, it weights and aggregates the received model parameters to obtain the global model, and distributes the global model to each user participating in the training, completing the current round of training and waiting for the next round of training.

[0036] This invention includes five polynomial-time algorithms: TTPSetup, TTPKeyGen, TTPAggKeyGen, Training, and Aggregation. The basic algorithms involved are as follows:

[0037] 1) Trusted Third-Party Initialization: In this embodiment of the invention, a trusted third party runs an agreed-upon setting algorithm to set common parameters. The main functions of this setting algorithm, TTPSetup, are as follows:

[0038] TTPSetup(1 λ): This is a parameter generation algorithm. The input is a parameter λ representing the number of users, and the output is a common parameter pp.

[0039] 2) Key Generation: In this embodiment of the invention, a trusted third party runs an agreed-upon key generation algorithm to generate the master private key and the user keys for each user. The main functions of this key generation algorithm, TTPKeyGen, are as follows:

[0040] TTPKeyGen(pp, n): is a key generation algorithm that takes the public parameter pp and the number of participants n in the current round as inputs and generates the master key msk and the user key sk.

[0041] 3) Aggregate Key Generation: In this embodiment of the invention, a trusted third party runs an agreed-upon aggregate key generation algorithm to generate the aggregate key and the user participation set. The main functions of the aggregated key generation algorithm TTPAggKeyGen are as follows:

[0042] TTPAggKeyGen(pp, msk): This is an aggregate key generation algorithm. The inputs are the public parameters pp, the master key msk, and the aggregate weights y = (y1, y2, ..., y3) of the training data for this round. n Finally, the server aggregation key ask and the user participation set are generated.

[0043] 4) Ciphertext Generation: In this embodiment of the invention, the aggregated ciphertext ct is obtained by a trusted third party running a pre-defined training algorithm. i,l The main functions of the aggregation key generation algorithm Training are as follows:

[0044] This is a ciphertext generation algorithm that takes a user dataset as input. User key sk i User identity i, and training algorithm The final output is the user's aggregated ciphertext ct. i .

[0045] 5) Model Aggregation: In this embodiment of the invention, an agreed-upon aggregation algorithm is run by a trusted third party to obtain the aggregation result D. The main functions of the aggregation algorithm, Aggregation, are as follows:

[0046] This is a ciphertext aggregation algorithm, whose input is a training algorithm. Total user set Maximum user waiting time t max Finally, the aggregated result D for this user is output.

[0047] As one possible implementation, this invention provides a secure federated learning system using multi-user function encryption, comprising: a semi-honest server, semi-honest users, and an honest trusted third party; the server is responsible for collecting the local model encryption parameters of the users participating in the aggregation, weighting and aggregating them to obtain a global model, and sending the global model to each user. After multiple iterations, a model that approximates the result of centralized machine learning is finally obtained. Users are responsible for training local data to obtain local models. Before each round of training, the server, a trusted third party, and the user interact to obtain the online user's intention vector for that round. For example, user i participating in the training sends intention vector y. i = (1, 1, 1) to the server and a trusted third party; if not participating in training, send y. i = (0, 0, 0) (or the server may automatically set this vector to zero later), that is, y i Let be the user's intention vector, with a length of 3 and each value being 1. During each training round, the user requests an encryption key from a trusted third party, uses it to encrypt the local model, and sends it to the server. After model aggregation, the user receives the global model from the server, sets it as the local model, and proceeds to the next training round, continuing for multiple rounds. The trusted third party provides key management services, setting public parameters and generating the required encryption key for each participating user, and setting encryption weights y = (y1, y2, ..., y...) based on the received user intentions. n An aggregation key is generated and sent to the server, where n represents the number of users. In this embodiment of the invention, users do not need to know the overall user intention vector y = (y1, y2, ..., y...). n Only a trusted third party needs to know the value of y. If the server tampers with the value of y later, the decryption process will definitely fail because the trusted third party will generate the corresponding decryption private key based on the value of y.

[0048] In this embodiment of the invention, the federated learning process consists of multiple rounds of iterative training. In each round, a trusted third party begins by running an agreed-upon parameter setting algorithm. The trusted third party generates public parameters pp according to the agreed-upon parameter setting algorithm, and generates a master key msk and a sufficient number of keys sk according to the agreed-upon key generation algorithm. Users i who wish to participate in this round of training need to request the corresponding keys sk from the trusted third party via a secure channel. i This allows them to participate in the training process; each user participating in this round of training first sends their willingness to participate in the training (i.e., sends a user willingness vector) to the server and a trusted third party, and then uses a pre-agreed machine learning training algorithm locally. For local datasets The corresponding local model is obtained through training. Using the key sk iThe model parameters are encrypted using the agreed-upon encryption algorithm to obtain the aggregated ciphertext ct. i and aggregate ciphertext ct i Send your identity (i) to the server.

[0049] Before aggregation, the server will asynchronously query the aggregated ciphertext ct sent by each user participating in the training. i and user intention vector y i Collect them into a set as well as Let represent the set of aggregated ciphertexts participating in training and the set of users participating in training, respectively. When the waiting time reaches the maximum waiting time t... max If the number of users participating in the training exceeds the minimum number of users required for training, the server requests the aggregation key ask from a trusted third party; if it subsequently receives information from users in this round, it will refuse to process it.

[0050] Upon receiving the request from the server, the trusted third party will collect the intention vector y. i User i with the expression (1, 1, 1) is added to the set. That is, the set of users participating in training in the current round. Based on the set. Set the encrypted aggregation weight y = (y1, y2, ..., y3) n This represents a linear permutation of all current user intention vectors. A trusted third party, using the agreed-upon aggregation key generation algorithm (TTPAggKeyGen), combines the weights y and the master private key msk to generate the aggregation key ask, and then shares the aggregation key ask with the user set. Return it to the server.

[0051] After receiving the return value from the trusted third party, the server will collect... and For comparison, when user sets At that time, the server aggregates the ciphertext ct according to the agreed model aggregation algorithm. i Weighted aggregation yields the global model Calculate the federal average of it and M avg This message is sent to all participating users, thus concluding this round of training and preparing them for the next round. At that time, for each This indicates a disconnection has occurred. The user's intention vector (data aggregation weight) y... i After setting the value to zero, proceed with aggregation. Otherwise, terminate the aggregation and start again.

[0052] Optionally, a trusted third party may set the algorithm's common parameter pp based on agreed-upon parameters, specifically as follows:

[0053] TTPSetup(1λ A trusted third party generates two sufficiently large random prime numbers p and q, and calculates N = p × q. Define a global hash function. in, This indicates the modulus after removing 0. 2 The set of integers, i.e. {1, 2, ..., N} 2}, where l represents the input to the hash function, i.e., the hash function in this embodiment of the invention. For string l to set of integers The mapping is used to package the above parameters into public parameters pp = (N, X) and then use them as the algorithm output, where X represents the input limit.

[0054] Optionally, a trusted third party generates the master key msk and key sk based on an agreed-upon key generation algorithm. i Specifically:

[0055] TTPKeyGen(pp, n): This algorithm randomly samples based on the value of n. in, Represents a matrix of dimension m×n The distribution is a discrete Gaussian distribution with variance σ, where m represents the vector dimension (i.e., the number of model parameters) of the data to be aggregated for each person. and This represents the set of all possible sequences of ternary integers. Output the master private key msk = s, and the individual private keys sk. i =s i and input limit x <N / 6n。

[0056] Optionally, a trusted third party generates the aggregate key ask based on an agreed-upon aggregate key generation algorithm. y Specifically:

[0057] TTPAggKeyGen(pp,musk): A trusted third party adds users participating in this aggregation round to the intent set. And arrange the intention vectors (encrypted aggregate weights) of all users as y = (y1, ..., y2) n ), y i ∈{(0,0,0), (1,1,1)}. Then, the ASKeyDer algorithm is called to generate the aggregate key ask. y The specific details of ASKeyDer are as follows:

[0058] ASKeyDer(pp, msk, y): This algorithm generates and outputs the aggregation key for the cryptographic aggregation weight y.

[0059] Optionally, the user can encrypt the model parameters based on an agreed-upon training algorithm to obtain the aggregated ciphertext ct. i,l Specifically:

[0060] Users first train the algorithm based on federated learning. Combine its dataset Training a local model The model This can be further represented as a set of vectors v i = (v1, ... v) m ), where m is the array length of the model to be represented. For vector v i Each coefficient v in i Divide it randomly into three parts x i = (r1, r2, v) i -r1-r2), where random sampling in, Let x represent the set of integers modulo N / 6n, i.e., {0, 1, ..., N / 6n}, and then... i Encryption, using the Enc algorithm to generate ciphertext ct i,l The label l is set to the current aggregation round. The Enc algorithm is as follows:

[0061] Enc(pp, sk) i x i (i, l): This algorithm first processes the plaintext information. Encryption, where x i Each coefficient x i,j satisfy Calculate and output the ciphertext

[0062] Optionally, the server trains the aggregation result D based on the agreed aggregation algorithm, specifically as follows:

[0063] The server asynchronously queries the user for information on which aggregation to participate. The current time is less than or equal to the maximum wait time t. max Meanwhile, the server continuously collects the user's aggregated ciphertext ct i,l and add it to the ciphertext set. At the same time, add the user's identity i to the user set. In the middle. After the collection is completed, when the number of people aggregated... When the threshold t is exceeded, the server queries the trusted third party for the aggregation key ask. y and the corresponding set of user intentions The server will collect and Perform a comparison. If... At that time, the server aggregates the ciphertext ct according to the agreed model aggregation algorithm Dec. i Aggregate based on the ciphertext aggregation weights to obtain the global model. Calculate the federal average of it The Mavg file is then sent to all participating users, thus completing this round of training and preparing for the start of the next round. At that time, for each This indicates a disconnection has occurred. The user's intention vector (data aggregation weight) y... i After setting the values ​​to zero, aggregation continues. Otherwise, the current round of aggregation is terminated, and the TTPKeyGen algorithm is restarted. The Dec algorithm is detailed below:

[0064] Dec(pp, y, ask, {ct) i} i∈{n} This algorithm processes the collected ciphertext {ct} i} i∈{n} Perform aggregation and calculation Finally, output the aggregation result.

[0065] This invention provides a secure federated learning system using multi-user function encryption, which is an efficient and secure federated learning aggregation scheme, hereinafter referred to as SecureFEAgg. To further verify the processing performance of this invention, it is compared with existing function encryption-based solutions HybridAlpha and CryptoFE, and homomorphic encryption-based solution BatchCrypt. This invention demonstrates higher efficiency and significantly improved privacy protection. The specific performance advantages are as follows:

[0066] (1) The distributed function encryption scheme provides privacy protection for the embodiments of the present invention. The embodiments of the present invention use a private key version of the function encryption scheme, which is used as the encryption key; therefore, a secure channel should be used to transmit the private key. The encryption and decryption algorithms of the embodiments of the present invention are constructed and designed entirely according to the distributed function encryption framework, thus not affecting their correctness and security. Furthermore, in the embodiments of the present invention, if an adversary exists... Attempting to infer the user's model, due to the key It is a set of users based on the identity i of all users participating in the training in the current round. It is customized and tied to each user participating in the aggregation. Therefore, It is impossible to infer the model of any single user or any combination thereof. If a user attempts to collect encrypted data of other users in a certain way and launch a possible brute force attack, the attack will not succeed due to the security provided by the underlying functional encryption scheme. The embodiments of the present invention can provide privacy protection even when the cloud server and a subset of users collude. Assume that there are n users participating in model aggregation, and the cloud server colludes with t users. When t<n-1, there are at least two honest users in the system, and the colluding parties can at most recover the sum of the model parameters of the honest users, but cannot infer the actual parameter value of each honest user.

[0067] (2) Compared with the commonly used secure federated learning aggregation schemes, it has advantages in encryption and decryption efficiency. First, the time complexity of three of the most time-consuming algorithms that need to be frequently called during the aggregation process, ASKeyDer, Training, and Aggregation, are compared. In the scheme setting, assume that there are n users and one aggregator, the cost of one multiplication operation is O(t), the cost of one modular exponentiation operation is O(log e) (e is the exponent), and the cost of the Baby-Step Giant-Step (BSGS) algorithm used to calculate the discrete logarithm or order of an element in a finite Abelian group is (P is the modulus). As shown in Table 1, compared with the HybridAlpha algorithm, the embodiments of the present invention reduce the complexity by 2O(log e)+O(t) and in the Training and Aggregation algorithms respectively; compared with the CryptoFE algorithm, it reduces the complexity by O(t) and (n-1)O(log e)+nO(t) in the Training and Aggregation algorithms respectively, which has obvious advantages. Moreover, since the efficiency of the Aggregation algorithm in HybridAlpha will decrease as the model parameters increase, the embodiments of the present invention will perform better for training algorithms with high precision requirements or a large number of training participants.

[0068] Table 1 Comparison of Algorithm Complexity

[0069]

[0070] Furthermore, in experiments where the trained convolutional neural network was used to classify handwritten digits in the MNIST dataset, the embodiments of this invention were compared with HybridAlpha, CryptoFE, and the state-of-the-art homomorphic encryption scheme BatchCrypt. As shown in Table 2, the average encryption time for a single user to encrypt 10274 parameters in the HybridAlpha, CryptoFE, and SecureFEAgg embodiments remained stable at approximately 0.3, 0.75, and 0.52 seconds, respectively. These function-based encryption methods have a significant advantage in encryption compared to the homomorphic BatchCrypt. For decryption, the time for the embodiments of this invention, CryptoFE, and BatchCrypt remained constant at approximately 7 seconds, without changing with precision. However, the decryption time of HybridAlpha increased significantly with increasing precision. As shown in Table 3, the number of users did not affect the encryption time of the four schemes, remaining approximately 0.2, 0.7, 32, and 0.5 seconds, respectively. For decryption, the decryption time of the four schemes CryptoFE, HybridAlpha, BatchCrypt, and SecureFEAgg all increases with the number of trainers, but SecureFEAgg's time is always shorter.

[0071] Table 2. Changes in the main algorithm execution time with training accuracy.

[0072]

[0073] Table 3. Changes in the time consumption of major algorithms with the number of trainees.

[0074]

[0075] Therefore, it can be concluded that the scheme proposed in this embodiment of the invention has significant advantages in terms of encryption and decryption efficiency compared with HybridAlpha, CryptoFE and BatchCrypt.

[0076] (3) The proposed solution in this embodiment of the invention has significant optimizability. Although the basic algorithm of this embodiment of the invention is already superior to similar solutions, the solution can be further optimized. Specifically, it utilizes a large modulus to provide ample plaintext space. This embodiment of the invention can also use plaintext packing technology to compress multiple gradients or weights into the same ciphertext, thereby reducing the number of encryption and decryption operations and reducing the size of the local ciphertext, which can significantly improve computational and communication efficiency.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0078] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.

Claims

1. A secure federated learning system using multi-user function encryption, characterized in that, This includes servers, client terminals, and trusted third parties that provide key management services; The client is responsible for training local data to obtain a local model. The server is used to collect encrypted parameters of the local models of the users participating in the aggregation, weighted aggregate to obtain a global model and distribute it to the client of each user participating in the training. Each client sets it as a new local model and performs the next round of training. After several rounds of iterative training, the server obtains a centralized machine learning result model based on the currently obtained global model. Before each round of training, the server, a trusted third party, and the user interact to obtain the online user intention vector for that round. ; In each round of training, a trusted third party runs an agreed-upon parameter setting algorithm to generate common parameters. And generate the master key according to the agreed key generation algorithm. and a certain number of keys Users participating in this round of training Request the corresponding key from a trusted third party via a secure channel. ; Each user participating in this training round sends their intention vector to the server and a trusted third party. and use the agreed machine learning training algorithm locally. For local datasets The corresponding local model is obtained through training. Based on key The model will be encrypted according to the agreed encryption algorithm. The model parameters are encrypted to obtain aggregate ciphertext. and aggregate ciphertext With their own user ID Send to the server; Before aggregation, the server asynchronously queries the aggregated ciphertext sent by each user participating in the training. and user willingness vector All aggregated ciphertexts in the current round Collect aggregated encrypted text sets for training participants The vectors of all user intentions in the current round Collect user sets for training When the waiting time reaches the preset maximum waiting time When the number of users participating in the training exceeds the minimum number of users required for training, the server requests the aggregation key from a trusted third party. ; Received the aggregate key from the server After the request, the trusted third party uses the user's intention vector sent by the user. Configure the local user set for training. and the user set The linear permutation of all user intention vectors is set as the local encrypted aggregation weight. A trusted third party generates the aggregate key according to the agreed-upon algorithm, based on the encrypted aggregate weight. and master key Generate aggregate key and aggregate key and user set Return to the server; Received aggregate key from trusted third party After receiving the request's return value, the server will collect... and Compare the results and perform different aggregation processes: like The server aggregates user intention vectors according to the agreed model algorithm. For weighted parameter pairs, aggregate encrypted sets All aggregated ciphertext We obtain the global model by performing weighted aggregation. ; like For each Users, their user intention vector Set to zero, based on each user's intention vector. For weighted parameter pairs, aggregate encrypted sets All aggregated ciphertext We obtain the global model by performing weighted aggregation. ; Otherwise, terminate the current round of aggregation processing and start the next round of training.

2. The system as described in claim 1, characterized in that, User Willingness Vector Specifically set as follows: If user Participating in this round of training will result in the user's intention vector being... Set as And send it to the server and a trusted third party; If user If the user does not participate in this round of training, then the user's intention vector will be... Set as The user intention vector is sent to the server and a trusted third party; or, for users who do not participate in this round of training, the user intention vector is not sent to the server and a trusted third party. .

3. The system as described in claim 1, characterized in that, Trusted third parties run the agreed-upon parameter setting algorithm to generate common parameters. Specifically: Select two random prime numbers and And calculate parameters Set input limits ; Define a hash function ,in, This indicates the modulus after removing 0. The set of integers, Labels representing hash functions; The public parameters are obtained based on the parameters N and the input limit X. and publish the hash function. .

4. The system as described in claim 3, characterized in that, A trusted third party generates the master key based on an agreed-upon key generation algorithm. and key Specifically: From Discrete Gaussian Distribution Randomly sample n ternary integer sequences , obtain parameters Where i = 1, 2, ..., n, n represents the number of users, and m represents the number of models. The number of model parameters; Each user needs to aggregate data in a vector dimension. The dimension is The matrix, Indicates variance; Will As the master key The i-th ternary integer sequence The key for the i-th user .

5. The system as described in claim 4, characterized in that, variance satisfy: Input limits satisfy: .

6. The system as described in claim 4, characterized in that, Generate aggregated keys by trusted third parties Specifically .

7. The system as described in claim 4, characterized in that, Based on key The model will be encrypted according to the agreed encryption algorithm. The model parameters are encrypted to obtain aggregate ciphertext. Specifically: Local model The model parameters are represented as a set of vectors. ; From the model Two random numbers are randomly sampled from the set of integers, denoted as . , will vector Each coefficient Randomly split into three parts to obtain parameters Where j = 1, 2, ..., m; based on m parameters Composition vector ; Label the current training round number ,according to Generate the aggregated ciphertext for the current training round .

8. The system as described in claim 4, characterized in that, The server performs weighted aggregation to obtain the global model. Specifically: According to the formula The intermediate aggregation result C is obtained; Then according to the formula Obtain the global model .

9. The system according to any one of claims 1 to 8, characterized in that, The server will obtain the global model When the model is distributed to the client devices of each user participating in the training, the global model is calculated. Federal average and will Distributed to the client terminals of each user participating in the training, each client terminal will Set it as a new local model and proceed with the next round of training.

Citation Information

Patent Citations

  • Federated learning-oriented decentralized function encryption privacy protection method and system

    CN113836556A

  • Federal learning-based model training method, apparatus and device, and medium

    CN114817958A