A federated learning privacy protection method for intelligent inspection of pumped storage power stations
Patent Information
- Application Number
- CN202211291603.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-10-19
AI Technical Summary
但是联邦学习仍存在间接的隐私泄露风险,参与方之间共享的模型更新信息容易成为被攻击的目标,攻者能基于共享的模型参数或梯度间接地获得参与方数据中较为敏感的信息
[0078](1)本发明提供一种基于自适应阈值的模型参数压缩方法来减少需要加密的数据量,即设备向服务器上传的参数是本地模型参数增量而不是本地模型参数,以降低压缩参数对模型准确率的影响,并通过设置自适应阈值使符合条件的设备与服务器通信以轻量化加密的数据量,从而降低系统的计算和通信开销;
Smart Images

Figure CN116760523B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of pumped storage power stations and federated learning technology. Specifically, it relates to a federated learning privacy protection method for intelligent inspection of pumped storage power stations. Background Technology
[0002] With the continuous development of science and technology and information technology, the intelligent construction of pumped storage power stations has become an inevitable trend. For example, intelligent inspection technologies based on mobile terminals and remote-controlled drones are widely used to replace traditional manual inspection methods, avoiding the uncertainties brought about by manual on-site operations, reducing labor costs, and greatly improving operation and maintenance efficiency. However, these inspection technologies require the inspection data to be transmitted back to the power station's data center for unified data analysis and processing to further determine equipment faults and safe operating status. This makes it impossible to guarantee the real-time analysis and diagnosis of inspection data, and the level of intelligence of individual equipment is not high. In addition, during the process of transmitting inspection data back to the data center, it is easy for attackers to obtain, tamper with, or perform other operations, affecting the safe operation of the power station. Machine learning can learn and analyze inspection data autonomously to a certain extent, but it relies on the inspection data provided by the inspection equipment for centralized learning, and the privacy and security of equipment data cannot be guaranteed. Federated learning, as a distributed machine learning method, can not only achieve the intelligence of individual equipment but also ensure the privacy of equipment inspection data.
[0003] Federated learning is a mechanism where participants share models but not data. It protects user data privacy by only exchanging model updates (such as model parameters and gradients) without data leaving their local machines, thus pioneering a new paradigm for data security. Specifically, each user trains a model locally using their local dataset and only exchanges model parameters or gradients with the server (aggregator), collaboratively training a global model under the server's (aggregator's) coordination. However, federated learning still carries the risk of indirect privacy breaches. The shared model update information among participants is easily targeted, allowing attackers to indirectly obtain sensitive information from the participants' data based on the shared model parameters or gradients. Therefore, applying federated learning to the intelligent inspection system of pumped-storage power stations, enabling various IoT terminal devices within the station to autonomously analyze their safe operating status and diagnose faults, requires consideration of the indirect privacy breaches of equipment inspection data. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a federated learning privacy protection method for intelligent inspection of pumped storage power stations.
[0005] Therefore, the above-mentioned objective of the present invention is achieved through the following technical solution:
[0006] A federated learning privacy-preserving method for intelligent inspection of pumped storage power stations, characterized by the following steps:
[0007] S1: Compress the model parameters obtained by local training on the devices participating in federated learning using a threshold-adaptive parameter compression method, and select the devices that communicate with the server.
[0008] S2: The local model parameter increments uploaded by the device communicating with the server in step S1 are first encrypted using the multi-key RNS-CKKS encryption method, and then uploaded to the server.
[0009] S3: In step S2, the server aggregates the encrypted local model parameter increment uploaded by the device to obtain the encrypted global model parameter increment. The encrypted global model parameter increment is then obtained by using a secret-sharing-based decryption method in conjunction with the online device. This decryption is then sent back to the device.
[0010] S4: The device uses the incremental global model parameters from step S3 to restore the global model parameters;
[0011] S5: Repeat steps S1-S4 until the goal is achieved.
[0012] While adopting the above technical solutions, the present invention may also adopt or combine the following technical solutions:
[0013] As a preferred embodiment of the present invention, step S1 specifically includes the following steps:
[0014] First, in each global iteration, after each device completes its local model training, it calculates its local model parameter increment and calculates a threshold based on the global model parameter increments from previous iterations and the proportion of its samples to the total samples. Second, the calculated local model parameter increment is compared with the threshold. The comparison result determines whether the device transmits parameters to the server; that is, if the local model parameter increment is greater than the threshold, the device transmits parameters to the server; otherwise, it does not transmit them and accumulates them locally. Specifically,
[0015] S101: Threshold Solving
[0016] Suppose that the participants in federated learning are a set of devices M and a server, and the set of devices M is divided into a "lazy" set of devices M. L and "Diligent" equipment set M H There are two categories: "lazy" devices refer to devices that do not communicate with the server in each global iteration, i.e., devices that can be ignored; "diligent" devices refer to devices that communicate with the server in each global iteration.
[0017] Let W be the global model parameters of the server in the t-th iteration. (t) This indicates that the model parameters updated locally on each device are used... This indicates that the global model parameters updated by the server are represented by W. (t+1) This means that the size of the device set |M| = |M L |+|M H |, the number of samples for device m is n m The total number of samples across all devices is n.
[0018] The threshold calculation process is as follows:
[0019] The global model parameter increment for the t-th global iteration update is:
[0020]
[0021] "Lazy" device set M L The incremental local update satisfies equation (2):
[0022]
[0023] From equation (2), we get:
[0024]
[0025] Due to M L The size of a set is never known in advance, so let |M L |=β|M|, while ΔW (t+1) =W (t+1) -W (t) W can only be obtained in the next iteration, so W (t+1) -W (t) Approximately Where: ξ d D is the coefficient;
[0026] Therefore
[0027]
[0028] Therefore, the threshold is:
[0029]
[0030] S102: Select equipment that meets the requirements
[0031] The device trains the model locally to obtain local model parameters and calculates the local model parameter increment ΔW. m (t) , and its second norm value The threshold η obtained in S101 mCompare;
[0032] If the value is greater than or equal to the threshold, the device will communicate with the server; otherwise, it will not communicate with the server and will accumulate its local model parameter increments locally.
[0033] As a preferred embodiment of the present invention, step S2 specifically includes the following steps:
[0034] S201: Encryption Process
[0035] (1) Parameter settings, Setup(q,η,1) λ Let λ be the safety parameter, and N be the dimension of RLWE (R = Z[x] / (x)). N +1), L is the maximum depth of the computation circuit, the fixed integer basis is q, and the basis of the RNS is B = {q0, q1, ..., q}. L}, to satisfy (q j (where the elements are coprime and approximately the same as q), let the ciphertext modulus be... The key distribution on R is χ s The error distribution is χ e random distribution χ r Random sampling a←R Q , where RNS is represented as [a] B =(a (0) ,a (1) ,……a (L) ), return the common parameter pp=(N,Q,χ s ,χ e ,χ r [a] B );
[0036] (2) Key generation, KeyGen(pp): Generate the master private key sk=(1,s), s←χ s The corresponding public key is Where: b (j) =-a (j) ·s+e(modq j ), e←χ e ;
[0037] Each device is assigned a private key share (x) via a secret sharing protocol. i ,s i That is, the private key of each device is sk. i =(1,s i ), 1≤i≤n;
[0038] (3) Encoding, Ecd(ΔW) m(t) ,Δ): Encode the local model parameter increments into m using regular embedding mapping. i Where: Δ represents the scaling factor;
[0039] (4) Encryption, Enc(m i ,pk): User i is randomly sampled r i ←χ r e i0 ,e i1 ←χ e , will m i Encrypted as:
[0040]
[0041] make in: Equations (4) and (5) are respectively:
[0042]
[0043]
[0044] S202: Ciphertext C for local model parameter increments i Transmitted to the server.
[0045] As a preferred embodiment of the present invention, step S3 specifically includes the following steps:
[0046] S301: Converged Ciphertext
[0047] The server aggregates these ciphertexts using a weighted average method, that is... Since the weighted average is performed on the ciphertext, scalar ciphertext multiplication Cmult(μ,C) is used. i (μ represents a scalar, C) i (representing ciphertext) and homomorphic addition Add(C1,C2,……C k (C) i=1,2……k The operation involves two operations (representing ciphertext) and a rescalar operation is required after multiplying scalar ciphertext;
[0048] (1) Scalar multiplication with ciphertext, MC i This represents the result of multiplying a scalar by the ciphertext.
[0049] make
[0050]
[0051] Let MC i =(MC) i0 MC i1 ),in Represented as equations (6) and (7) respectively:
[0052]
[0053]
[0054] (2) Rescaling, MC i 'represents MC i The result after rescaling is given by equation (8):
[0055]
[0056] in:
[0057]
[0058]
[0059] Δ is the scaling factor. It is an approximate error after the ciphertext is rescaled; It is the total approximate error after multiplying the scalar and the ciphertext and scaling it.
[0060] (3) Homomorphic addition, where Csum represents the result obtained by aggregating the local model parameter increments, i.e., the ciphertext of the global model parameter increments.
[0061] Let Csum = (Csum0, Csum1), where:
[0062] Equations (9) and (10) are respectively:
[0063]
[0064]
[0065] S302: Decryption Process
[0066] (1) The server selects t online devices and forms a device set U. The server calculates the decryption coefficient for each device in the device set U.
[0067] (2) Csum1·z i It is sent to each device in U, and each device calculates its decryption share. in Error e * ←χ e and D i Transmitted to the server;
[0068] (3) The server sums up the decryption shares of all devices in U. Then combine it with Adding them together, we get equation (11):
[0069] in:
[0070]
[0071] S303: The server will retrieve the decryption result m obtained from S202. sum Send to all devices.
[0072] As a preferred embodiment of the present invention, step S4 specifically includes the following steps:
[0073] S401: Recovery of global model parameter increments
[0074] Each device uses the reverse process of encoding to decrypt the result m obtained in step S3. sum Decode to obtain the global model parameter increment ΔW (t+1) ;
[0075] S402: Recovery of global model parameters
[0076] Using W t+1 =W t +ΔW (t+1) Obtain the updated global model parameters.
[0077] This invention provides a federated learning privacy protection method for intelligent inspection of pumped storage power stations. It combines fully homomorphic encryption with federated learning to solve the problems of insufficient intelligence of various IoT terminal devices and privacy leakage of inspection data in existing intelligent inspection systems for pumped storage power stations. It also solves the problem of high system overhead caused by applying fully homomorphic encryption to federated learning. Specifically, compared with existing technologies, it has the following advantages:
[0078] (1) This invention provides a model parameter compression method based on adaptive threshold to reduce the amount of data that needs to be encrypted. That is, the parameters uploaded by the device to the server are the local model parameter increments instead of the local model parameters, so as to reduce the impact of compressed parameters on the model accuracy. By setting an adaptive threshold, the device that meets the conditions can communicate with the server to reduce the amount of encrypted data, thereby reducing the computation and communication overhead of the system.
[0079] (2) The present invention provides a secret sharing-based multi-key RNS-CKKS encryption method (SSMR) to incrementally encrypt the model parameters uploaded by the device, so as to protect and further enhance the privacy of the device data, and at the same time prevent the situation that the device cannot be decrypted due to midway exit.
[0080] (3) In traditional inspection techniques for pumped storage power stations, inspection data needs to be transmitted back to the power station's data center for unified data analysis and processing to further determine equipment malfunctions and safe operating status. This method cannot guarantee the real-time analysis and diagnosis of inspection data, and the data is easily obtained and tampered with by attackers during transmission back to the data center, affecting the safe operation of the power station. This invention makes the intelligent inspection tasks of pumped storage power stations more intelligent, enables more timely diagnosis and analysis of equipment malfunctions within the power station, and prevents attackers from obtaining inspection data, thus ensuring the safe operation of the power station. Attached Figure Description
[0081] Figure 1 This is a system model diagram related to the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention.
[0082] Figure 2 The flowchart illustrates the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention.
[0083] Figure 3 The graph shows the effectiveness verification results (model test accuracy) of the parameter compression method in the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention.
[0084] Figure 4 The graph shows the effectiveness verification results (communication overhead) of the parameter compression method in the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention.
[0085] Figure 5 This is a performance comparison chart (model test accuracy) of the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention with different methods.
[0086] Figure 6 This is a performance comparison chart (communication overhead) of the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention with different methods.
[0087] Figure 7 The graph shows the effectiveness verification results of the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention, which supports the mid-process exit of equipment (accuracy rates of different method models).
[0088] Figure 8 This diagram shows the effectiveness verification results of the federated learning privacy protection method for intelligent inspection of pumped storage power stations provided by this invention, which supports the mid-process exit of devices (relationship between model accuracy and the number of exiting devices). Detailed Implementation
[0089] The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
[0090] A federated learning privacy-preserving method for intelligent inspection of pumped storage power stations, characterized by the following steps:
[0091] S1: Compress the model parameters obtained by local training on the devices participating in federated learning using a threshold-adaptive parameter compression method, and select the devices that communicate with the server.
[0092] S2: The local model parameter increments uploaded by the device communicating with the server in step S1 are first encrypted using the multi-key RNS-CKKS encryption method, and then uploaded to the server.
[0093] S3: In step S2, the server aggregates the encrypted local model parameter increment uploaded by the device to obtain the encrypted global model parameter increment. The encrypted global model parameter increment is then obtained by using a secret-sharing-based decryption method in conjunction with the online device. This decryption is then sent back to the device.
[0094] S4: The device uses the global model parameters incrementally from step S3 to restore the global model parameters.
[0095] S5: Repeat steps S1-S4 until the goal is achieved.
[0096] Specifically, step S1 includes the following steps:
[0097] S101: Threshold Solving
[0098] Suppose that the participants in federated learning are a set of devices M and a server, and the set of devices M is divided into a "lazy" set of devices M. L and "Diligent" equipment set M H There are two categories: "lazy" devices refer to devices that do not communicate with the server in each global iteration, i.e., devices that can be ignored; "diligent" devices refer to devices that communicate with the server in each global iteration.
[0099] Let W be the global model parameters of the server in the t-th iteration. (t) This indicates that the model parameters updated locally on each device are used... This indicates that the global model parameters updated by the server are represented by W. (t+1) This means that the size of the device set |M| = |M L |+|M H |, the number of samples for device m is n m The total number of samples across all devices is n.
[0100] The threshold calculation process is as follows:
[0101] The global model parameter increment for the t-th global iteration update is:
[0102]
[0103] "Lazy" device set M L The incremental local update satisfies equation (2):
[0104]
[0105] From equation (2), we get:
[0106]
[0107] Due to M L The size of a set is never known in advance, so let |M L |=β|M|, while ΔW (t+1) =W (t+1) -W (t) W can only be obtained in the next iteration, so W (t+1) -W (t) Approximately Where: ξ d D is the coefficient;
[0108] Therefore
[0109]
[0110] Therefore, the threshold is:
[0111]
[0112] S102: Select equipment that meets the requirements
[0113] The device trains the model locally to obtain local model parameters and calculates the local model parameter increment ΔW. m (t) , and its second norm value The threshold η obtained in S101 m Compare;
[0114] If the value is greater than or equal to the threshold, the device will communicate with the server; otherwise, it will not communicate with the server and will accumulate its local model parameter increments locally.
[0115] Specifically, step S2 includes the following steps:
[0116] S201: Encryption Process
[0117] (1) Parameter settings, Setup(q,η,1) λLet λ be the safety parameter, and N be the dimension of RLWE (R = Z[x] / (x)). N +1), L is the maximum depth of the computation circuit, the fixed integer basis is q, and the basis of the RNS is B = {q0, q1, ..., q}. L}, to satisfy (q j (where the elements are coprime and approximately the same as q), let the ciphertext modulus be... The key distribution on R is χ s The error distribution is χ e random distribution χ r Random sampling a←R Q , where RNS is represented as [a] B =(a (0) ,a (1) ,……a (L) ), return the common parameter pp=(N,Q,χ s ,χ e ,χ r [a] B );
[0118] (2) Key generation, KeyGen(pp): Generate the master private key sk=(1,s), s←χ s The corresponding public key is Where: b (j) =-a (j) ·s+e(modq j ), e←χ e ;
[0119] Each device is assigned a private key share (x) via a secret sharing protocol. i ,s i That is, the private key of each device is sk. i =(1,s i ), 1≤i≤n;
[0120] (3) Encoding, Ecd(ΔW) m (t) ,Δ): Encode the local model parameter increments into m using regular embedding mapping. i Where: Δ represents the scaling factor;
[0121] (4) Encryption, Enc(m i ,pk): User i is randomly sampled r i ←χ r e i0 ,e i1 ←χ e , will m i Encrypted as:
[0122]
[0123] make in: Equations (4) and (5) are respectively:
[0124]
[0125]
[0126] S202: Ciphertext C for local model parameter increments i Transmitted to the server.
[0127] Specifically, step S3 includes the following steps:
[0128] S301: Converged Ciphertext
[0129] The server aggregates these ciphertexts using a weighted average method, that is... Since the weighted average is performed on the ciphertext, scalar ciphertext multiplication Cmult(μ,C) is used. i (μ represents a scalar, C) i (representing ciphertext) and homomorphic addition Add(C1,C2,……C k (C) i=1,2……k The operation involves two operations (representing ciphertext) and a rescalar operation is required after multiplying scalar ciphertext;
[0130] (1) Scalar multiplication with ciphertext, MC i This represents the result of multiplying a scalar by the ciphertext.
[0131] make
[0132]
[0133] Let MC i =(MC) i0 MC i1 ),in Represented as equations (6) and (7) respectively:
[0134]
[0135]
[0136] (2) Rescaling, MC i 'represents MC i The result after rescaling is given by equation (8):
[0137]
[0138] in:
[0139]
[0140]
[0141] Δ is the scaling factor. It is an approximate error after the ciphertext is rescaled; It is the total approximate error after multiplying the scalar and the ciphertext and scaling it.
[0142] (3) Homomorphic addition, where Csum represents the result obtained by aggregating the local model parameter increments, i.e., the ciphertext of the global model parameter increments.
[0143] Let Csum = (Csum0, Csum1), where:
[0144] Equations (9) and (10) are respectively:
[0145]
[0146]
[0147] S302: Decryption Process
[0148] (1) The server selects t online devices and forms a device set U. The server calculates the decryption coefficient for each device in the device set U.
[0149] (2) Csum1·z i It is sent to each device in U, and each device calculates its decryption share. in Error e * ←χ e and D i Transmitted to the server;
[0150] (3) The server sums up the decryption shares of all devices in U. Then combine it with Adding them together, we get equation (11):
[0151] in:
[0152]
[0153] S303: The server will retrieve the decryption result m obtained from S202. sum Send to all devices.
[0154] Specifically, step S4 includes the following steps:
[0155] S401: Recovery of global model parameter increments
[0156] Each device uses the reverse process of encoding to convert m sum Decode to obtain the global model parameter increment ΔW (t+1) ;
[0157] S402: Recovery of global model parameters
[0158] Using W t+1 =W t +ΔW (t+1) Obtain the updated global model parameters;
[0159] S5: Repeat steps S1-S4 until the goal is achieved.
[0160] Figure 3 , Figure 4 To verify the effectiveness of the parameter compression method proposed in this invention, a comparative analysis was conducted between MFHE-PPFL (i.e., MFHE-C-PPFL) and MFHE-PPFL without parameter compression, focusing on model testing accuracy and communication overhead. The results are as follows: Figure 3 and Figure 4 As shown. From Figure 3 It can be seen that the test accuracy of the MFHE-PPFL model after convergence is almost the same as that of MFHE-PPFL, indicating that the parameter compression method of MFHE-PPFL does not affect the final accuracy of the model, and therefore does not affect the model's performance. Figure 4 It can be seen that when the number of iterations is the same, the communication overhead required by MFHE-C-PPFL is always greater than that of MFHE-PPFL. Combined with... Figure 3 and Figure 4 It can be seen that when MFHE-PPFL achieves an accuracy of 98.23%, the user communication overhead is 2923.18MB, while when MFHE-C-PPFL achieves an accuracy of 98.21%, the user communication overhead is 3790.77MB. This shows that when the two methods converge, the communication overhead required by MFHE-PPFL is significantly lower than that of MFHE-C-PPFL, indicating that the parameter compression method can reduce the communication overhead between the user and the server.
[0161] Figure 5 , Figure 6 This paper compares the performance of the MFHE-PPFL method and the XMK-PPFL method proposed in this invention. The model test accuracy of the MFHE-PPFL and XMK-PPFL methods is as follows: Figure 5As shown in the figure, the relationship between model test accuracy and the number of global training epochs is illustrated. The figure shows that MFHE-PPFL converges from epoch 35 with an accuracy of 98.23%, while XMK-PPFL converges from epoch 30 with an accuracy of 98.22%. This indicates that the accuracies of MFHE-PPFL and XMK-PPFL after convergence are almost identical. This is because both MFHE-PPFL and XMK-PPFL use fully homomorphic encryption, a variant of CKKS. Furthermore, the figure shows that MFHE-PPFL converges slower than XMK-PPFL. This is because in MFHE-PPFL, user-uploaded parameters are compressed, resulting in only some users uploading parameters to the server in some training epochs. In contrast, XMK-PPFL does not have parameter compression, and all users upload parameters normally to the server in each epoch. Although MFHE-PPFL converges slower, it does not affect the accuracy after convergence, thus verifying the correctness of the MFHE-PPFL method.
[0162] Figure 6 We only consider the communication overhead between the user and the server because they are the main entities in the federated learning system. Assuming the entire training process has 50 global iterations, the communication overhead of the MFHE-PPFL and XMK-PPFL methods is as follows: Figure 6 As shown in the figure, the communication overhead required for each method within a given training epoch is illustrated. It can be seen from the figure that XMK-PPFL requires more communication overhead than MFHE-PPFL when training for the same number of epochs. Therefore, the privacy-preserving federated learning method (MFHE-PPFL) proposed in this invention can reduce the high communication overhead associated with fully homomorphic encryption methods.
[0163] Figure 7 , Figure 8 To verify the effectiveness of supporting mid-training device dropout, and considering that device dropouts are common during training due to factors such as potential network connection interruptions, this paper compares and analyzes the changes in model test accuracy of MFHE-PPFL-dropout and XMK-PPFL-dropout relative to the case without device dropout, under the same device dropout scenario and experimental environment.
[0164] Assuming a federated learning system has 10 devices participating in training, with a total of 50 global training iterations, and device 8 exits after uploading its parameters to the server in the 10th round, what are the model accuracies of MFHE-PPFL-dropout and XMK-PPFL-dropout in this scenario? Figure 7As shown in the figure, the accuracy of the two methods in the case of no device exits is used as their respective benchmarks. It can be seen from the figure that the model test accuracy of MFHE-PPFL-dropout is lower than that in the case of no user exits during training (MFHE-PPFL). This is because after a device exits, the number of samples in the training dataset decreases, and insufficient samples lead to a lower test accuracy of the finally trained model. The accuracy of XMK-PPFL-dropout is very low because XMK-PPFL decryption requires the participation of all devices. If a device exits, it will be unable to correctly decrypt the aggregated ciphertext, causing abnormal model accuracy and leading to training termination. Therefore, MFHE-PPFL allows devices to exit midway through training. Furthermore, the relationship between the test accuracy after model convergence and the number of device exits in the MFHE-PPFL method is shown in the figure. Figure 8 As shown in the figure, the accuracy decreases as the number of devices exits. This is because the more devices exit, the fewer samples there are in the training dataset, which reduces the accuracy of the model after convergence.
[0165] The above specific embodiments are used to explain and illustrate the present invention, and are only preferred embodiments of the present invention, not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A federated learning privacy-preserving method for intelligent inspection of pumped storage power stations, characterized in that: The method includes the following steps: S1: Compress the model parameters obtained by local training on the devices participating in federated learning using a threshold-adaptive parameter compression method, and select the devices that communicate with the server. S2: The local model parameter increments uploaded by the device communicating with the server in step S1 are first encrypted using the multi-key RNS-CKKS encryption method, and then uploaded to the server. S3: In step S2, the server aggregates the encrypted local model parameter increment uploaded by the device to obtain the encrypted global model parameter increment. The encrypted global model parameter increment is then obtained by using a secret-sharing-based decryption method in conjunction with the online device. This decryption is then sent back to the device. S4: The device uses the incremental global model parameters from step S3 to restore the global model parameters; S5: Repeat steps S1-S4 until the goal is achieved; Step S1 specifically includes the following steps: S101: Threshold Solving Assuming the participants in federated learning are a set of devices With a server, the device set Divided into "lazy" device sets and "Diligent" equipment set There are two categories: "lazy" devices refer to devices that do not communicate with the server in each global iteration, i.e., devices that can be ignored; "diligent" devices refer to devices that communicate with the server in each global iteration. Let the global model parameters of the server in the t-th iteration be... This indicates that the model parameters updated locally on each device are used... This indicates that the server updates the global model parameters using... This indicates the size of the device set. ,equipment The number of samples is The total number of samples across all devices is , ; The threshold calculation process is as follows: The global model parameter increment for the t-th global iteration update is: (1) "Lazy" device set The incremental local update satisfies equation (2): (2) From equation (2), we get: because The size of a set is never known in advance, so let ,and It can only be obtained in the next iteration, so Approximately ,in: , It is a coefficient; Therefore (3) Therefore, the threshold is: S102: Select equipment that meets the requirements The device obtains local model parameters after performing model training locally and calculates the increment of its local model parameters. , and its second norm value The threshold obtained in S101 Compare; If the value is greater than or equal to the threshold, the device will communicate with the server; otherwise, it will not communicate with the server and will accumulate its local model parameter increments locally. Step S2 specifically includes the following steps: S201: Encryption Process (1) Parameter settings, :set up For safety parameters, , It is the dimension of RLWE, with a fixed integer basis. , The base is To satisfy , They are coprime, and with They are approximately the same, let the ciphertext modulus be... , , To calculate the maximum depth of the circuit, The key distribution on is The error distribution is random distribution random sampling ,in: Represented as Return common parameters ; (2) Key generation, Generate master private key , The corresponding public key is ,in: , ; A private key share is allocated to each device via a secret sharing protocol. That is, the private key of each device is ; (3) Encoding, The local model parameter increments are encoded using regular embedding mapping. ,in: Indicates the scaling factor; (4) Encryption, :user random sampling , ,Will Encrypted as: , make ,in: , Equations (4) and (5) are respectively: (4) (5) S202: Ciphertext for incrementing local model parameters Transmitted to the server; Step S3 specifically includes the following steps: S301: Converged Ciphertext The server aggregates these ciphertexts using a weighted average method, that is... Since the weighted average is performed on ciphertext, scalar-ciphertext multiplication is used. Adding homomorphisms Two operations, in which, During the operation, Represents a scalar. Indicating ciphertext, in During the operation, The ciphertext is represented, and the scalar ciphertext multiplication requires rescaling. (1) Multiplying a scalar by a ciphertext, This represents the result of multiplying a scalar by the ciphertext. make make ,in , Represented as equations (6) and (7) respectively: (6) (7) (2) Rescaling, express The result after rescaling is given by equation (8): (8) in: It is a scaling factor. It is an approximate error after the ciphertext is rescaled; It is the total approximate error after multiplying the scalar and the ciphertext and scaling it. (3) Addition of homomorphisms, This represents the ciphertext of the aggregated local model parameter increments, i.e., the global model parameter increments. make ,in: , , Equations (9) and (10) are respectively: (9) (10) S302: Decryption Process (1) The server selects t online devices and forms a device set U. For each device in the device set U, the decryption coefficient is calculated. = ; (2) It is sent to each device in U, and each device calculates its decryption share. ,in ,error and will Transmitted to the server; (3) The server sums up the decryption shares of all devices in U to obtain Then combine it with Adding them together, we get equation (11): in: (11) S303: The server retrieves the decryption result obtained from S302. Send to all devices; Step S4 specifically includes the following steps: S401: Recovery of global model parameter increments Each device uses the reverse process of encoding to decrypt the result obtained in step S3. Decode to obtain the global model parameter increments. ; S402: Recovery of global model parameters use Obtain the updated global model parameters.
Citation Information
Patent Citations
Federal learning training model based on batch increment mode
CN113554181A
Edge privacy protection method based on federal learning
CN114169010A
Communication gradient adaptive compression method based on federated learning
CN114422605A