A safe and reliable distributed learning method

By employing client reputation scoring and delayed gradient averaging, the instability and security issues of federated learning training in mobile networks are addressed, enabling high-precision and high-reliability model training that is suitable for asynchronous secure aggregation.

CN116976468BActive Publication Date: 2026-01-27CHONGQING UNIV OF POSTS & TELECOMM +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310968664.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2026-01-27
Estimated Expiration
2043-08-01

AI Technical Summary

Technical Problem

In mobile network environments, federated learning training may fail due to unstable factors, including frequent communication interruptions between the client and server, excessively long training times caused by changes in the client's geographical location, and network instability. Furthermore, existing methods have failed to effectively address the issues of model training stability and gradient data privacy protection.

Method used

By using a client reputation scoring mechanism, the local model test accuracy, the temporary global model, and the global model from the previous period are evaluated. Reputable clients are selected for aggregation, and delayed gradient averaging and asynchronous safe aggregation methods are used to ensure the stability and security of model training.

Benefits of technology

It improves the performance and robustness of the global model, ensures the safety and reliability of the model, reduces server waiting time, and improves model convergence and client qualification rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116976468B_ABST
    Figure CN116976468B_ABST
Patent Text Reader

Abstract

The application relates to a safe and reliable distributed learning method, and belongs to the field of machine learning, and specifically comprises the following steps: S1: after a server receives a client model, the local iteration round precision of each client is compared with the local model test precision, the temporary global model and the global model of the last period respectively, the credit score of the client model is calculated, and the credit score is saved; S2: delayed gradient average update: the client continuously performs local update, and compensates the gradient aging phenomenon through a gradient correction term. The application can improve the reliability and robustness of the global model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine learning and relates to a safe and reliable distributed learning method. Background Technology

[0002] With the widespread application of artificial intelligence (AI) technologies, big data driving AI models has become a key characteristic of the information age. However, the existence of data silos hinders the application of big data. From a coarse-grained perspective, data is held by multiple service providers; from a fine-grained perspective, data originates from individual individuals or IoT devices. To address the data empowerment problem caused by data silos, the collaborative training of machine learning models by multiple data holders has become increasingly popular in recent years. However, schemes where multiple data holders provide data and a central server integrates the data from multiple parties to train the model raise data privacy and security concerns. To address these challenges, the federated learning framework, where "the model moves while the data remains stationary," has emerged and is gradually becoming a new paradigm for multi-party collaborative model training. In federated learning, each participant transmits model gradient updates in each round to collaboratively train the federated model. Since the data of each participant remains local, data privacy and security are guaranteed.

[0003] While federated learning brings significant benefits to mobile networks, it still faces substantial challenges. On one hand, most existing research assumes that the interaction between the client and server is in a stable state. When a client is mobile during local training, it is highly likely that it will exceed the server's communication range before and after local model training, leading to collaborative training failure. Furthermore, as network models become more complex and sophisticated, local training time increases, significantly reducing the success rate of communication between the mobile client and server. On the other hand, unreliable participating clients may intentionally or unintentionally engage in behaviors that mislead the global model training for the federated learning task. Intentional behavior could involve attackers launching poisoning attacks, sending malicious parameter updates that negatively impact global model performance and thus the current collaborative learning mechanism. Unintentional behavior might be indirectly caused by the dynamic mobile network environment, leading to unintentional actions by mobile devices and ultimately causing collaborative training failure.

[0004] Furthermore, to ensure data security during transmission and computation, transmitted data should be encrypted. Traditional encryption schemes encrypt the raw data before storage; however, such encryption techniques are unsuitable for processing data in cloud-based applications. Therefore, a scheme that allows data to be processed in encrypted form, such as homomorphic encryption, is urgently needed. Although many existing homomorphic encryption schemes have been proposed and improved, they are far from practical because efficiency remains a major challenge in their implementation, limiting the efficient computation of mobile devices. Therefore, these limitations necessitate the development of an improved homomorphic encryption scheme.

[0005] Currently, there are some research works on secure and reliable federated learning. KANG J, XIONG Z, and NIYATO D, in "Reliable federated learning for mobile networks" [in IEEE Wireless Communications, vol. 27, no. 2, pp. 72-80, 2020], designed a reliable worker selection scheme based on reputation metrics and used a consortium blockchain to manage the effective reputation of workers, thereby improving the reliability of federated learning tasks in mobile networks. MOUDOUD H, CHERKAOUI S, and KHOUKHI L, in "Towards a secure and reliable federated learning using blockchain" [in IEEE Global Communications Conference, 2021], proposed a secure and reliable blockchain framework, SRB-FL, tailored for federated learning. It uses blockchain characteristics to achieve collaborative model training in a fully distributed and trusted manner. It also designed a secure federated learning approach based on blockchain sharding to ensure data reliability, scalability, and trustworthiness, and utilizes subjective multi-weight logic to improve the reliability of federated learning components. YE H, LIANG L, and LI GY proposed a robust decentralized stochastic gradient descent method called Soft-DSGD to address the unreliability problem in their paper "Decentralized federated learning with unreliable communications" [in IEEE Journal of Selected Topics in Signal Processing, vol. 16, no. 3, pp. 487-500, 2022]. This method updates model parameters using only a portion of the received messages and optimizes the hybrid weights based on the link reliability matrix of the communication links. While this method considers reliability, it does not take into account the stability of model training or the privacy protection of gradient data, thus affecting the overall reliability of the model.

[0006] In mobile network environments, the training of federated models may fail due to unstable factors, which mainly refer to frequent communication interruptions between the client and the server. There are many factors that can cause these interruptions, especially in environments where the client's geographical location is constantly changing. For example, excessive local training time on the client may cause it to move out of the server's communication range, or network instability may occur. In addition, when the client trains the model with unreliable data, it will degrade the performance of the global model. Therefore, it is necessary to design a federated learning method that ensures normal and reliable model training. Summary of the Invention

[0007] In view of this, the purpose of this invention is to provide a secure and reliable distributed learning method, wherein client-side reliable evaluation simultaneously considers comparisons with the test accuracy of local models in each period, comparisons with temporary global models, and comparisons with the global model of the previous period. This is achieved by eliminating poorly performing models or models that do not contribute to improving the global model. Furthermore, delayed gradient averaging strictly controls the local computation of the client and the aggregation process of the server to execute smoothly in time, thereby obtaining a higher-precision aggregated global model. An asynchronous secure aggregation method is also provided, which securely encrypts the transmitted gradients to prevent external attackers from stealing data through insecure wireless networks. A flexible aggregation method is designed that does not fix the server's waiting time, thus ensuring the normal training of federated learning.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] A safe and reliable distributed learning method includes the following steps:

[0010] S1: After the server receives the client model, it compares the local iteration accuracy of each client with the local model test accuracy, the temporary global model, and the global model of the previous period, calculates the reputation score of the client model, and saves the reputation score.

[0011] S2: Delayed gradient average update: The client continuously updates locally and compensates for gradient aging by using a gradient correction term.

[0012] Furthermore, step S1 specifically includes:

[0013] In having In a mobile environment with multiple clients, assuming i and k represent the ID of the local client that has participated in training and the local training round number, respectively, local[i] stores the accuracy, training loss, and accuracy score of client i during the training process; the training result of client i in the kth local iteration of round t is stored in local[i][t][k]; global model features are stored in the list global[]; the set of clients participating in training is selected based on the model reputation score updated by the client in the current period.

[0014] The credit score is calculated using three parts:

[0015]

[0016] in It is the reputation score of client i during local iteration k times at training round t; It is the accuracy of the trained model after k iterations locally by client i in training round t; acc avg It is the average local model test accuracy in the current training epoch; acc agg It is the result of coarse local aggregation performed by the server, i.e., temporary local aggregation; acc last This represents the global model testing accuracy from the previous round. w1, w2, and w3 are trade-off factors, and w1 + w2 + w3 = 1.

[0017] Furthermore, in step S1, training immediately stops when the learning curve converges or the system reaches the preset number of training rounds; the test accuracy of each local model is compared with three metrics:

[0018] (1) Comparison with the local model test accuracy in each period: The local model trained in each period is used to calculate the average test accuracy, which is the average of all local models of all clients in a certain period. Models that perform worse than the average will be disliked, while models that perform better than the average will be favored.

[0019] (2) Comparison with the temporary global model: Local models that have been further trained but not yet aggregated into the global model are used to generate the temporary global model, which should outperform each local model; Clients that have a positive impact on the global model are selected by comparing with the temporary global model; The potential aggregation performance of all local models is evaluated by using the temporary global model; Poor models with negative reputations are eliminated before being aggregated into the global model;

[0020] (3) Comparison with the global model of the previous period: Compare the test accuracy of each local model with the test accuracy of the global model of the previous period to evaluate the improvement;

[0021] By comparing the reputation score with each metric, a positive reputation score indicates a positive contribution to the local model.

[0022] Furthermore, in step S1, after the edge server receives the gradient parameters from the client, it performs client selection. After selection, a list L is obtained, containing the client IDs to be aggregated. List L is cleared before each round of calculation. The specific steps are as follows:

[0023] S11: The edge server performs reputation score calculations for all clients in the current client set, performing this calculation K times for each client. This completes local[i][t][k], including accuracy, training loss, and accuracy score.

[0024] S12: The edge server calculates the reputation aggregation tolerance ε·K, where ε is the tolerance factor, 0 < ε < 1, and n iThis represents the number of rounds in which client i's reputation score is less than 0 in the current round, when n i When n > ε·K, the client is considered to have poor reputation and is removed from the database; that is, the client ID is not added to L. i When the value is less than or equal to ε·K, the client is considered to have good reputation, and the client is selected to perform the aggregation operation, which means adding the client ID to L;

[0025] S13: The edge server performs an aggregation operation on the clients in the list.

[0026] Furthermore, in step S2, the client continuously performs local updates, enabling it to immediately begin the next round of updates. Gradient correction terms are used to compensate for gradient aging. Specific steps include:

[0027] S21: The client sends an update to the edge server at the end of round t;

[0028] S22: The client continues to perform local updates using local data;

[0029] S23: The edge server executes the aggregation protocol;

[0030] S24: After the client receives the aggregated gradient from the edge server in round t, the client has performed D additional local updates;

[0031] S25: Delayed averaging step: The client replaces the local gradient of round t with the received aggregated gradient;

[0032] Furthermore, in step S2, using This represents the parameters on the i-th client during the k-th iteration in round t. Let represent the corresponding stochastic gradient; in the first round t=1, only local updates are performed, and the last iteration in the first round is represented as:

[0033]

[0034] Where K represents the number of local iterations on the client; w1 represents the aggregated gradient received by the client in the most recent round; and... Abbreviated as When the first round of calculation is complete, the client sends the accumulated gradient. The gradient is sent to the edge server; immediately after the gradient is sent, the client performs a second round of local updates; when the client receives the aggregated gradient from the edge server, it has already performed D additional local updates in the second round, starting from the last iteration of the first round. start

[0035]

[0036] Where (1) is the last iteration of the client before edge server aggregation; (2) is the first round of additional local update of the client; (3) is the first round of local update of the client; at this time, the edge server performs the first round of gradient aggregation.

[0037]

[0038] in This represents the average gradient of the first iteration (k-th iteration); replace all local gradients from the first iteration in the above formula with aggregated gradients. Thus obtain

[0039]

[0040] The number of delayed rounds D is expressed as D = zK + r, where z ≥ 0, z represents the number of rounds skipped due to the delay, and r ∈ [1, K-1].

[0041] By incorporating momentum updates into delayed gradient aggregation, past gradients are combined into log-weighted values, and accumulated gradients are used. and Rewrite update rules

[0042]

[0043] The delayed gradient averaging step size is calibrated using a logarithmic factor, so that... and The ratio is 1:[1+log(z+1)], where z=0 means directly calculating the mean;

[0044] Design an asynchronous compensation factor b, which appears during gradient compensation. and Where b > 0; gradient compensation is improved accordingly based on asynchronous processing.

[0045]

[0046]

[0047] When b = 0, it is in a synchronized state; otherwise, the larger b is, the more difficult the gradient compensation will be. The larger the proportion, the more the compensated model tends to be a global model rather than a local model.

[0048] Furthermore, it also includes constructing an asynchronous safe aggregation method, which the client obtains after completing the iterations of local training. Where j represents the communication round and i represents different clients; the client encrypts the gradient using the public key b before sending it. in yes The result is obtained after integer transformation. The specific transformation method is as follows:

[0049] (1) Encryption phase: in gradient data The basis is multiplied by 10 ef get Where ef is The corresponding number of decimal places;

[0050] (2) Decryption Transformation: In gradient data The basis is divided by 10 ef get Where ef is the encrypted multiplication ef of the client in the previous round; the client then... The data is sent to an edge server, which performs a weighted average over the ciphertext space.

[0051]

[0052] Design a tolerant time threshold, i.e. set two time thresholds T1 and T2 to obtain potentially hidden high-quality local models. The threshold T1 of the previous period should be greater than the time threshold T2 of the later period.

[0053] The specific aggregation method is as follows: when the number of local client models received by the edge server is greater than 0.3N / E, the reputation score is calculated, where N is the total number of clients and E is the total number of edge servers; then, a pass rate hyperparameter P is set, 0 < P < 1, when the number of reliable clients in the local models received by the edge server is not less than... At that time, aggregation is performed immediately without waiting for other clients, where It represents the number of clients received by edge server e in the current round t.

[0054] The beneficial effects of this invention are as follows:

[0055] (1) The safe and reliable distributed learning method proposed in this invention improves the performance of the global model and ensures the robustness of the model by comparing the test accuracy of the local model in each period, the temporary global model, and the global model of the previous period.

[0056] (2) The asynchronous secure aggregation method proposed in this invention not only ensures the qualification rate of the client but also saves the waiting time of the server, and improves the convergence of the model while ensuring the accuracy of the model.

[0057] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0058] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0059] Figure 1 The system model diagram provided for this invention;

[0060] Figure 2 A flowchart for client selection provided by the present invention;

[0061] Figure 3 The computation time and communication time diagram designed for this invention. Detailed Implementation

[0062] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0063] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0064] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0065] Please see Figures 1-3 , Figure 1 The diagram shown is a system model of the present invention, which specifically includes the following components:

[0066] Central server: Receives gradient parameters from edge servers and performs global aggregation. The aggregation method adopted is synchronous aggregation, and the specific aggregation method is parameter averaging. After averaging all parameters, the global parameters are broadcast to the edge servers. It is mainly composed of base stations and other devices with powerful computing capabilities.

[0067] Edge server: Collects parameters from clients and performs edge local aggregation. The aggregation form adopted is asynchronous aggregation. The specific aggregation method is parameter averaging based on the freshness factor. It waits for clients to send gradient parameters within a time threshold range. The client set for each round of aggregation is different. The gradient parameters are decoded before each round of edge aggregation. It is mainly composed of roadside units and other devices with certain computing power.

[0068] Client: After receiving global parameters from the edge server, it trains the local model based on local data. After training, it sparsifies and quantizes the parameters and sends the local gradient parameters and gradient encoding length to the edge server. It mainly consists of mobile vehicles and other devices with limited computing power.

[0069] Please see Figure 2 , Figure 2 The diagram shown is a flowchart of the client selection process designed in this invention, which specifically includes the following steps:

[0070] 1) Data collection: The client collects data on the surrounding environment based on local sensors and performs preprocessing on the data, mainly including the collection of information such as roadside infrastructure, driver behavior and various road conditions.

[0071] 2) Local training: The client performs local iterative training based on local data, and updates the local model based on the global model broadcast by the edge server in different global rounds.

[0072] 3) Calculate the reputation score: compare it with the local model test accuracy in each period, compare it with the temporary global model, and compare it with the global model in the previous period.

[0073] Please see Figure 3 , Figure 3 The diagram shows the computation and communication time of the design of this invention, which specifically includes the following steps:

[0074] In traditional synchronous federated learning, the client sends parameters to the cloud server at the end of each round of local training. After the cloud server completes the aggregation, it broadcasts the results back to the client, which then begins the next round of updates based on its local data. In this method, the client's local computation and the server's aggregation process are executed synchronously in time.

[0075] Specifically, one of the objectives of this invention is to provide a safe and reliable distributed learning method, which includes the following steps:

[0076] S1: Calculate the reputation score of the client model: After the server receives the client model, it compares the local iteration accuracy of each client with the local model test accuracy, the temporary global model, and the global model from the previous period, and saves the reputation score; In the case of... In a mobile environment with multiple users (i.e., clients), let i and k represent the ID of the local client participating in training and the local training round number, respectively. `local[i]` stores the accuracy, training loss, and accuracy score of user i during training. The training result of client i in the k-th local iteration of round t is stored in `local[i][t][k]`. Global model features are stored in the list `global[]`. The set of clients participating in training is selected based on the client's updated model reputation score in the current period.

[0077] Reputation scores are evaluations of each local model to determine whether parameters from those local models should be selected for aggregation into the global model. Because many poorly performing models exist, along with malicious users who can lower the accuracy of the global model, reputation scores help make more reasonable judgments about global training, thus eliminating those underperforming models. Each user has a record and a reputation score, which is initialized at the beginning of each period. The reputation score is calculated using three parts.

[0078]

[0079] in It is the reputation score of client i during local iteration k times at training round t; It is the accuracy of the trained model after k iterations locally by client i in training round t; acc avg It is the average local model test accuracy in the current training epoch; accagg This is the result of coarse local aggregation performed by the server, i.e., temporary local aggregation. This aggregation result is not suitable for integration into the global model; acc last This represents the global model testing accuracy from the previous round. w1, w2, and w3 are trade-off factors, and w1 + w2 + w3 = 1.

[0080] Training stops immediately when the learning curve converges or the system reaches the preset number of training epochs. In the above formula, the test accuracy of each local model needs to be compared with three metrics: (1) Comparison with the test accuracy of local models in each epoch: The trained local models in each epoch are used to calculate the average test accuracy, which is the average of all local models of all clients in a certain epoch. Models that perform worse than the average will be disliked, while models that perform better than the average will be favored. (2) Comparison with the temporary global model: Local models that are further trained but have not yet been aggregated into the global model are used to generate the temporary global model. The performance of the temporary global model should be better than that of each local model. Therefore, comparing with the temporary global model usually selects clients that have a positive impact on the global model. The possible aggregation performance of all local models is evaluated by using the temporary global model. The purpose of this metric is to select the best model in each epoch. Poor models with negative reputations are eliminated before being aggregated into the global model. (3) Comparison with the global model of the previous epoch: The test accuracy of each local model is compared with the test accuracy of the global model of the previous epoch to evaluate the improvement. By comparing the reputation score with each metric, a positive reputation score indicates a positive contribution to the local model. This is a three-way comparison based on the local model's test accuracy. A poorer quality local model compared to the temporary global model will negatively impact this comparison metric. As the local models are further trained after each epoch, their performance improves; therefore, it typically makes a positive contribution to the local model's reputation score compared to the previous global model, implying an improvement over the previous global model.

[0081] After receiving the gradient parameters from the client, the edge server performs client selection, resulting in a list L containing the client IDs to be aggregated. List L is cleared before each round of computation, as follows:

[0082] Step 1: The edge server calculates the reputation score for all clients in the current client set, performing this calculation K times for each client. This completes local[i][t][k], which includes the accuracy, training loss, and accuracy score.

[0083] Step 2: The edge server calculates the reputation aggregation tolerance ε·K, where ε is the tolerance factor, 0 < ε < 1. iThis represents the number of rounds in which client i's reputation score is less than 0 in the current round. When n... i When n > ε·K, the client is considered to have poor reputation and is removed from the database; that is, the client ID is not added to L. i When the value is less than or equal to ε·K, the client is considered to have good reputation, and the client is selected to perform the aggregation operation, which means adding the client ID to L.

[0084] Step 3: The edge server performs an aggregation operation on the clients in the list.

[0085] The usefulness of a local model is calculated using its reputation score, a weighted function of various test accuracy comparisons. If a local model is determined to perform poorly, its parameters are not aggregated into the global model for that period. A record is maintained for each local model to track the number of times it is rejected in the global model aggregation. When a local model is rejected a certain number of times, it is excluded from training. Local models that are repeatedly rejected due to poor performance typically continue to perform poorly compared to other local models. Therefore, by eliminating models with consistently poor performance, it is possible to improve model performance while reducing overall runtime.

[0086] S2: Delayed Gradient Averaging Update: The client performs uninterrupted local updates so that it can immediately start the next round of updates. A gradient correction term is designed to compensate for gradient aging. The specific steps are as follows:

[0087] (1) The client sends an update to the edge server at the end of round t;

[0088] (2) The client continues to use local data to perform local updates;

[0089] (3) The edge server executes the aggregation protocol;

[0090] (4) After the client receives the aggregated gradient of the edge server in round t, the client has performed D additional local updates;

[0091] (5) Delayed averaging step: The client replaces the local gradient of round t with the received aggregate gradient.

[0092] The advantage of this algorithm is that the client does not freeze its local computing power during communication. This represents the parameters on the i-th client during the k-th iteration in round t. Let represent the corresponding stochastic gradient. In the first round at t=1, only local updates are performed, so the last iteration in the first round can be represented as

[0093]

[0094] Where K represents the number of local iterations on the client side; w1 represents the aggregated gradient received by the client in the most recent iteration. For convenience, let's call it... Abbreviated as When the first round of calculation is complete, the client sends the accumulated gradient. The gradient is sent to the edge server. Immediately after the gradient is sent, the client performs a second round of local updates. By the time the client receives the aggregated gradient from the edge server, it has already performed D additional local updates in the second round, starting from the last iteration of the first round. start

[0095]

[0096] Where (1) is the last iteration of the client before edge server aggregation; (2) is the client's first additional local update; and (3) is the client's first local update. At this point, the edge server performs the first round of gradient aggregation.

[0097]

[0098] in This represents the average gradient of the first iteration (k-th iteration). Replace all local gradients from the first iteration in the above formula with aggregated gradients. Thus obtain

[0099]

[0100] In general, the gradient aggregator at the edge server may take several rounds to reach the client, i.e., D > 1. When the latency is high, the situation D > K occurs. To handle this situation, the number of delayed rounds D is represented as D = zK + r, where z ≥ 0, z represents the number of rounds skipped due to latency, and r ∈ [1, K-1].

[0101] By incorporating momentum updates into delayed gradient aggregation, past gradients are combined into log-weighted values, and accumulated gradients are used. and Rewrite update rules

[0102]

[0103] Since the gradient is compensated using a weighted average, the step size of the delayed gradient average is calibrated using a logarithmic factor, so that... and The ratio is 1:[1+log(z+1)], and when z=0, it means to directly calculate the mean.

[0104] The aggregation process is satisfied during normal synchronous aggregation, but in asynchronous aggregation, the following issues arise: and The phenomenon of asynchronous operation. Design an asynchronous compensation factor b, which occurs during gradient compensation. and Where b > 0. Therefore, gradient compensation should be improved accordingly based on asynchronous operation.

[0105]

[0106]

[0107] When b = 0, it is in a synchronized state; otherwise, the larger b is, the more difficult the gradient compensation will be. The larger the proportion, the more the compensated model tends to be a global model rather than a local model.

[0108] A second objective of this invention is to provide an asynchronous secure aggregation method, specifically comprising: the client obtaining the aggregation result after completing the iteration of local training. Where j represents the communication round and i represents different clients. The client encrypts the gradient using the public key b before sending it. in yes The result is obtained after integer transformation. The specific transformation method is: (1) Encryption stage. In gradient data... The basis is multiplied by 10 ef get Where ef is The corresponding number of decimal places. (2) Decryption transformation. In gradient data The basis is divided by 10 ef get Where ef is the encrypted multiplication by the client in the previous round. The client then... The data is sent to an edge server, which performs a weighted average over the ciphertext space.

[0109]

[0110] For traditional asynchronous aggregation, a time threshold T is typically designed to distinguish it from synchronous aggregation. While this can overcome the problem of excessively long waiting times associated with synchronous aggregation to some extent, it also leads to excessively slow global model convergence. However, some clients may have high-quality local data that fails to transmit its local model within the time threshold T, which is essentially an unreasonable discard. Therefore, asynchronous aggregation should be designed with a tolerant time threshold, i.e., setting two time thresholds T1 and T2 to capture potentially hidden high-quality local models. The threshold T1 in the earlier period should be greater than the threshold T2 in the later period.

[0111] This aggregation method is neither traditional synchronous nor traditional asynchronous aggregation, but a flexible one. It does not fix the server's waiting time, making it suitable for latency-sensitive scenarios. Specifically, the aggregation method is as follows: when the number of local client models received by the edge server is greater than 0.3N / E, a reputation score is calculated, where N is the total number of clients and E is the total number of edge servers. Then, a success rate hyperparameter P is set, 0 < P < 1. When the number of reliable clients in the local models received by the edge server is not less than... At that time, aggregation is performed immediately without waiting for other clients, where This represents the number of clients received by edge server e in the current round t. To ensure the convergence speed of the global model, P is typically set to 0.8 or 0.9. One advantage of this aggregation method is that it guarantees both the client qualification rate and saves server waiting time. A higher client qualification rate indicates a higher quality local model, which in turn improves the convergence speed of the global model. This effectively solves the long waiting time problem caused by synchronous or asynchronous aggregation.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A secure and reliable distributed learning method, characterized in that: Specifically, the following steps are included: S1: After the edge server receives the client model, it compares the training model accuracy of the current local iteration of each client with the local model test accuracy, the temporary global model test accuracy, and the global model test accuracy of the previous round, calculates the reputation score of the client model, and saves the reputation score. The set of clients to participate in the aggregation is selected based on the model reputation score updated by the client during the current local iteration. The credit score is calculated using three parts: in It is a client In training rounds Local iteration The credit score for each item; It is a client In training rounds Local iteration The accuracy of the trained model; It is the average local model test accuracy in the current training round; It is the result of coarse local aggregation performed by the central server, i.e., the temporary global model accuracy; This is the accuracy of the global model test in the previous round; It is a trade-off factor, and ; S2: Delayed gradient average update: The client continuously updates locally and compensates for gradient aging by using a gradient correction term. In step S2, the client continuously performs local updates, enabling it to immediately begin the next round of updates. Gradient correction terms are used to compensate for gradient aging. Specific steps include: S21: The client is in the... At the end of the round, the accumulated gradient is sent to the edge server; S22: The client continues to perform local updates using local data; S23: The edge server performs an aggregation operation; S24: When the client receives the edge server's... After the gradient aggregation round, the client has already executed... This is an additional local update; S25: Delayed Gradient Averaging Update: The client replaces the first gradient with the received aggregated gradient. The local gradient of the wheel.

2. The secure and reliable distributed learning method according to claim 1, characterized in that: In step S1, training stops immediately when the learning curve converges or the system reaches the preset number of training rounds; the accuracy of the trained model in the current round is compared with three metrics: (1) Comparison with the test accuracy of local models in each round: The local models trained in each round are used to calculate the average test accuracy, which is the average of all local models of all clients in a certain round. Models that perform worse than the average will be disliked, while models that perform better than the average will be favored. (2) Comparison with the temporary global model: Local models that have been further trained but not yet aggregated into the global model are used to generate the temporary global model. The performance of the temporary global model should be better than that of each local model. The clients that have a positive impact on the global model are selected by comparing with the temporary global model. The potential aggregation performance of all local models is evaluated by using the temporary global model. Poor models with negative reputations are eliminated before being aggregated into the global model. (3) Comparison with the global model of the previous round: Compare the test accuracy of each local model with the test accuracy of the global model of the previous round to evaluate the improvement; By comparing the reputation score with each metric, a positive reputation score indicates a positive contribution to the global model.

3. The secure and reliable distributed learning method according to claim 1, characterized in that: In step S1, after the edge server receives the gradient parameters from the client, it performs client selection and obtains a list after the selection is completed. The list contains the client IDs that need to be aggregated; the list is updated before each round of calculation. To clear the data, follow these steps: S11: The edge server performs reputation score calculations for all clients in the current client set, performing the following for each client. Next, up to this point Complete the missing information; Used for storing clients In the Rounds Training results for each local iteration period; S12: Edge server computing reputation aggregation tolerance ,in It is a tolerance factor. , Representative client The number of iterations in the current round where the reputation score is less than 0, when If the client is deemed to have poor reputation, it will be removed from the database; that is, the client ID will not be added to the database. ;when At that time, the client is deemed to have good credit, and the client is selected to perform the aggregation operation, which involves adding the client ID to the aggregation list. ; S13: The edge server performs an aggregation operation on the clients in the list.

4. The secure and reliable distributed learning method according to claim 1, characterized in that: In step S2, using Indicates the first Wheel inside the first During the nth iteration Parameters on each client, using To represent the corresponding stochastic gradient; in the first round In this case, only local updates are performed, and the last iteration in the first round is represented as: in Indicates the number of local iterations on the client side; This represents the parameter received by the client in the most recent round; Abbreviated as ; When the first round of calculation is complete, the client sends the accumulated gradient. The gradient is sent to the edge server; after the gradient is sent, the client immediately performs a second round of local updates; when the client receives the aggregated gradient sent from the edge server, the client has already executed the second round. This additional local update, starting from the last iteration of the first round. start in This is the last iteration of the client before edge server aggregation; This is the first round of additional local updates on the client side; This is the client's first round of local updates; at this time, the edge server performs the first round of gradient aggregation: in Indicates the first round, number The average gradient of the next iteration; N is the number of clients performing the aggregation operation on the edge server; replace all the first-round local gradients in the above formula with the aggregate gradient. Thus obtain Number of delays Represented as ,in , This indicates the number of rounds skipped due to delay. ; By incorporating momentum updates into delayed gradient aggregation, past gradients are combined into log-weighted values, and accumulated gradients are used. and Rewrite update rules The delayed gradient average step size is calibrated by a logarithmic factor such that and are in the ratio of which means taking the mean directly when ; Design an asynchronous compensation factor. That is, it occurs during gradient compensation. and ,in Gradient compensation is improved accordingly based on asynchronous processing. when It is in a synchronized state when it is in a synchronized state, otherwise The larger the value, the better during gradient compensation. The larger the proportion, the more the compensated model tends to be a global model rather than a local model.

5. The secure and reliable distributed learning method according to claim 1, characterized in that: It also includes constructing an asynchronous safe aggregation method, which the client obtains after completing the iterations of local training. ,in Represents the communication round, Representing different clients; each client uses a public key before sending gradients. Encryption is performed to obtain ,in yes The result is obtained after integer transformation. The specific transformation method is as follows: (1) Encryption stage: in gradient data The basis is multiplied by get ,in yes The corresponding number of decimal places; (2) Decryption transformation: in gradient data Based on the exclusion get ,in It is the encrypted multiplication in the previous round on the client side. ; The client put The data is sent to an edge server, which performs a weighted average over the ciphertext space. Where N is the number of clients performing aggregation operations on the edge server.

Citation Information

Patent Citations

  • Interpretable and secure client selection approach based on prediction confidences for efficient federated learning

    US20250315724A1