Server-side adaptive parameter aggregation method and system

Through the server-side adaptive parameter aggregation method, combined with the improved joint mean and adaptive aggregation algorithm, the problem of data islands and insufficient computing power in transmission line defect detection is solved, the detection accuracy and model stability are improved, and a more efficient Global model training and generalization capabilities.

CN118820818AInactive Publication Date: 2024-10-22STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411289022.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-10-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are data islands, data privacy and security issues in traditional transmission line defect detection, and insufficient single node computing power, resulting in low model training efficiency and poor generalization ability.

Method used

The server-side adaptive parameter aggregation method is adopted, and through the improved joint mean algorithm and adaptive aggregation algorithm, the advantages of different algorithms are integrated, the learning rate is dynamically adjusted, a two-stage global model is generated, and hierarchical model differences are used for adaptive aggregation to ensure global Model stability and generalization ability.

Benefits of technology

Significantly improve the detection accuracy and stability of the transmission line defect detection model, solve the problems of data imbalance, training efficiency and model generalization ability, make full use of the contributions of different nodes or equipment, and improve the performance and generalization of the global model. ization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820818A_ABST
    Figure CN118820818A_ABST
Patent Text Reader

Abstract

The invention provides a server-side adaptive parameter aggregation method and system, and belongs to the technical field of power grid transmission line defect detection. Comprising the following steps: carrying out joint training on K clients, loading a local data set by each client, and entering a state of waiting for initializing a global model; a global model is issued to each client, and the client loads the global model and takes the global model as an initial training local model parameter of the client; training is carried out according to a specified training round, if the specified round is reached, the joint training task is ended, otherwise, each client uses a local data set to carry out training until all the K clients are trained; and taking the calculated hierarchical model difference as a pseudo gradient of an adaptive aggregation algorithm, and generating and storing a two-stage global model. According to the method, the joint mean value algorithm and the adaptive aggregation algorithm are fused, advantage complementation is achieved, defect detection tasks are better processed, false detection and missing detection are reduced, and the problems of data imbalance, training efficiency and model generalization ability are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid transmission line defect detection, and in particular to a service-side adaptive parameter aggregation method and system. Background Art

[0002] As a key link in power transmission, the safe and stable operation of transmission lines is directly related to the reliability of power supply. Transmission lines are spread all over the country, covering a vast geographical area. Therefore, efficient and accurate detection of their defects has become a core challenge in power maintenance.

[0003] Traditional transmission line defect detection mainly relies on manual inspection and single-node computer vision technology. Circuit defect data is scattered in devices or systems in different regions, resulting in the following problems in the training of traditional transmission line defect detection models: (1) There is a lack of effective sharing and connection between data, forming data islands, making it impossible to fully integrate and analyze data collected in different environments, thereby affecting the data diversity and generalization ability of the transmission line defect detection model. (2) Data privacy and security issues are prominent. (3) There is an upper limit on computer hardware performance, which makes it impossible to train large-scale data on a single node.

[0004] Although federated learning can solve the above problems well, the existing federated learning algorithms still have some problems: (1) The model parameters of different training nodes or devices are different, and a single parameter aggregation algorithm is difficult to guarantee the convergence and stability of the global model. (2) The computing power and data quality of different training nodes or devices are different. A single parameter aggregation algorithm is difficult to guarantee that all nodes or devices can contribute to the global model. (3) Only using a single parameter aggregation algorithm for parameter aggregation makes it difficult to fully utilize the advantages of different algorithms to improve the performance of the model. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a server-side adaptive parameter aggregation method and system, which solves the problems of data imbalance, training efficiency and model generalization ability, especially in the application of transmission line defect detection, significantly improves the detection accuracy and model stability.

[0006] In order to achieve the above objectives, on the one hand, the present invention provides a server-side adaptive parameter aggregation method, comprising the following steps: S1, the server selects K clients for joint training, and each client loads the local data set and enters the state of waiting for initialization of the global model; S2. In the initial stage, after the server initializes the global model, it sends the global model parameters to each client. The client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iterative stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration and sends the second-stage global model to the client for training. S3, determine whether the client has reached the preset training rounds, if so, end the joint training task and the process, otherwise, each client uses the improved joint mean algorithm to train the local model using the local data set and enter S4; S4. Determine whether all K clients have completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client based on the training results to obtain a first-stage global model and enter S5. Otherwise, return to S3 until all clients have completed training. S5. Calculate the hierarchical model difference based on the current one-stage global model and the global model of the previous round of training; S6. Use the hierarchical model difference as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iteration stage in S2.

[0007] The beneficial effects of the present invention are as follows: in view of the problems existing in the traditional transmission line defect detection model training method, the present invention aims to integrate the advantages of different algorithms, utilize the complementarity of different algorithms, and integrate the improved joint mean algorithm with the adaptive aggregation algorithm. While ensuring the universality and good effect of the joint mean algorithm, combined with the adaptability and stability of the adaptive aggregation algorithm, the performance and generalization ability of the global model are further improved, and the problems of data islands, privacy security and hardware performance upper limit are solved, and the training efficiency and generalization ability of the global model are improved. The present invention makes full use of the complementary advantages of different algorithms, fully considers the contribution of different nodes or devices under the premise of ensuring stability and convergence, and effectively improves the performance and generalization ability of the joint learning model of transmission line defect detection.

[0008] Furthermore, after the server initializes the global model, it sends the global model parameters to each client, and the client loads the initialized global model parameters as the initial training local model parameters of the client, which are specifically: A1. At the beginning, after the server initializes the global model, it sends the global model parameters to each client. A2. The client loads the initialized global model parameters and uses them as initial parameters. The client uses the global model parameters to perform local model training on the local data set to generate local model parameters. A3. After the training is completed, the client sends the updated local model parameters back to the server. A4. The server collects all updated local model parameters of the clients and aggregates them to generate a new global model. A5. The server sends the new global model parameters to the client, and the client uses the new global model parameters as new initial parameters to train the local model.

[0009] Furthermore, the expression of the local model parameter is as follows:

[0010] in, Indicates Training round, k The local model parameters of each client, Indicates Training round, k The local model parameters of each client, represents the learning rate, Indicates k The gradients calculated by the local model of each client when training on the local dataset.

[0011] Furthermore, the expression of the one-stage global model in S4 is as follows:

[0012] in, Indicates The one-stage global model obtained after the aggregation of training rounds, Represents the client index, Indicates the total number of clients. Indicates the total number of client samples, Indicates The number of samples of clients, Indicates Training round, k The local model parameters of each client.

[0013] Furthermore, the expression of the hierarchical model difference in S5 is as follows:

[0014]

[0015]

[0016] in, represents hierarchical model differences, represents the hierarchy of the global model, Represents the global model i The layer parameters are aggregated using the global model using the joint mean algorithm. Indicates the last round of global model i Layer parameters, represents the global model aggregated using the joint mean algorithm in the first stage, Represents the client index, Indicates the total number of clients. It represents the ratio parameter between the number of client samples and the loss. Indicates the total number of client samples, Indicates k The number of samples of clients, Indicates The loss ratio of clients to all clients, and Both indicate k The loss value of the local model trained by the client on the local dataset, Indicates Training round, k The local model parameters of each client, Indicates the index number of the client.

[0017] The beneficial effect of the above further scheme is: the present invention proposes an improved model hierarchical difference calculation method, which not only considers the number of client data samples, but also considers the impact of factors such as the client's local data distribution and quality on the aggregation effect. The loss in the client training process is used as an indirect indicator to measure the client's local data distribution and quality factors. In this way, the contribution of the client to the global model can be more accurately reflected, thereby improving the performance and generalization ability of the global model. Compared with the traditional method that only considers the number of client data samples, the present invention can better utilize the diversity and quality of client data, thereby reducing the weight distribution bias and improving accuracy. The present invention introduces the parameter , to adjust the ratio between the number of client data samples and the training loss, so that the global model can better adapt to the distribution and quality differences of client data. The present invention can better handle the problem of uneven data distribution, improve the generalization ability of the global model, and reduce the performance degradation caused by data distribution differences.

[0018] Furthermore, the expression of the first-order moment estimate is as follows:

[0019] in, Indicates t The first moment estimate of the training epoch, represents the training round, represents the decay rate of the first-order moment estimate, Indicates The first moment estimate of the training epoch, represents pseudo gradient.

[0020] Furthermore, the expression of the second-order moment estimation is as follows:

[0021] in, Indicates t The second moment estimate of the training epoch, represents the decay rate of the second-order moment estimate, Indicates The second moment estimate of the training epoch, represents pseudo gradient.

[0022] Furthermore, the updating formula of the global model parameters is as follows:

[0023] in, Indicates The training round uses the global model updated by the adaptive aggregation algorithm, represents the global model before updating, represents the learning rate, Indicates t The first moment estimate of the training epoch, Indicates t The second moment estimate of the training epoch, represents a constant, Represents the weight decay term.

[0024] The beneficial effect of the above further solution is that the present invention introduces a weight decay term , in order to control the complexity of the global model and improve the generalization performance of the global model. In this way, the overfitting problem can be avoided and the stability and generalization performance of the model can be improved.

[0025] Furthermore, the expression of the global optimal objective function of the server is as follows:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031]

[0032]

[0033] in, min Indicates taking a small value. w represents the global model parameters, represents the global optimal objective function of the server, Represents the client index, Indicates the total number of clients. Indicates k The local objective function of each client, Indicates k The amount of data per client, Indicates samples, Indicates k The local dataset of each client. Indicates that the local client defect detection model SSD is in the sample The loss value on Indicates the number of default boxes corresponding to the matched real boxes, represents the classification loss, represents the matching indicator variable, Represents the confidence score of each category predicted, A hyperparameter representing the weight between balancing classification loss and localization loss, represents the positioning loss, Represents the offset of each predicted default box relative to the original shape, represents the parameters of the ground-truth box, represents the set of positive class labels, Indicates A default box, Indicates Does the default box match the The set of positive labels The ground-truth bounding box, Indicates The default boxes belong to the set of positive labels The probability of represents the set of negative class labels, Indicates The default boxes belong to the set of negative class labels The probability of Indicates The default boxes belong to the set of positive labels The confidence level, Indicates different coordinate types, Represents the horizontal coordinate of the center point of the object, The vertical coordinate of the center point of the object. Indicates height, Indicates Does the default box match the The ground-truth bounding box, represents the smooth L1 loss function, represents the predicted coordinates, Indicates the actual coordinates.

[0034] On the other hand, the present invention provides a server-side adaptive parameter aggregation system, which is applied to a server-side adaptive parameter aggregation method, including: The first processing module is used for the server to select K clients for joint training, and each client loads a local data set and enters a state of waiting for initialization of the global model; The second processing module is used to send global model parameters to each client after the server initializes the global model at the beginning stage, and the client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iteration stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration, and sends the second-stage global model to the client for training; The third processing module is used to determine whether the client has reached the preset training round. If so, the joint training task is terminated and the process is terminated. Otherwise, each client uses the local data set to train the local model through the improved joint mean algorithm and enters the fourth processing module. The fourth processing module determines whether the K clients have all completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client according to the training results to obtain a first-stage global model and enter the fifth processing module. Otherwise, it returns to the third processing module until all clients have completed training. A fifth processing module is used to calculate the hierarchical model difference according to the currently obtained one-stage global model and the global model of the previous round of training; The sixth processing module is used to use the hierarchical model differences as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iterative stage in the second processing module.

[0035] The beneficial effects of the present invention are as follows: the present invention is based on the joint mean algorithm (FedAvg) and the adaptive aggregation algorithm (FedAdam), integrates the two algorithms, realizes complementary advantages, further improves the effect of joint learning, can better handle defect detection tasks, reduce false detections and missed detections, and effectively solves the problems of data imbalance, training efficiency and global model generalization ability, especially in the application of transmission line defect detection, significantly improves the detection accuracy and the stability of the global model. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The figure is a flow chart of the method of the present invention.

[0037] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0038] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0039] Example 1 like Figure 1 As shown, the present invention provides a server-side adaptive parameter aggregation method, and its implementation method is as follows: S1, the server selects K clients for joint training, and each client loads the local data set and enters the state of waiting for initialization of the global model; S2. In the initial stage, after the server initializes the global model, it sends the global model parameters to each client. The client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iterative stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration and sends the second-stage global model to the client for training. In the initial stage, after the server initializes the global model, it sends the global model parameters to each client, and the client loads the initialized global model parameters and uses them as the initial training local model parameters of the client, which are specifically: A1. At the beginning, after the server initializes the global model, it sends the global model parameters to each client. A2. The client loads the initialized global model parameters and uses them as initial parameters. The global model parameters are used on the local data set to perform local model training to generate local model parameters. A3. After the training is completed, the client sends the updated local model parameters back to the server. A4. The server collects all updated local model parameters of the clients and aggregates them to generate a new global model. A5. The server sends the new global model parameters to the client, and the client uses the new global model parameters as new initial parameters to train the local model. S3, determine whether the client has reached the preset training rounds, if so, end the joint training task and the process, otherwise, each client uses the improved joint mean algorithm to train the local model using the local data set and enter S4; S4. Determine whether all K clients have completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client based on the training results to obtain a first-stage global model and enter S5. Otherwise, return to S3 until all clients have completed training. S5. Calculate the hierarchical model difference based on the current one-stage global model and the global model of the previous round of training; S6. Use the hierarchical model difference as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iteration stage in S2.

[0040] In this embodiment, the present invention combines the federated mean algorithm (FedAvg) with the adaptive aggregation algorithm (FedAdam), fully utilizes the complementary advantages of different algorithms, and iterates training to find the global optimal parameters. , improving the global model performance.

[0041] In this embodiment, a power transmission line defect detection system based on the server-side adaptive parameter aggregation algorithm (SAPAA-MMF) with multi-method fusion is constructed. First, the server initializes the global model parameters and distributes them to each client. Each client performs local training based on the local data set, updates the global model parameters using the stochastic gradient descent method, and then uploads the updated global model parameters to the server. The update formula of the global model parameters is as follows:

[0042] in, Indicates The training round uses the global model updated by the adaptive aggregation algorithm, represents the global model before updating, represents the learning rate, Indicates t The first moment estimate of the training epoch, Indicates t The second moment estimate of the training epoch, represents a constant, Represents the weight decay term.

[0043] In this embodiment, after receiving the local model parameters uploaded by the client, the server first uses the improved joint mean algorithm to aggregate the parameters and generate a global model. Then, the hierarchical difference between the global model and the previous round of global model is calculated and used as the pseudo gradient of the adaptive aggregation algorithm FedAdam algorithm. During the calculation process, the aggregation weight of the global model parameters is adjusted according to the number of samples and training loss of the client to ensure the balance of contributions from different clients.

[0044] In this embodiment, the joint mean algorithm is mainly used to solve the problem of data distribution differences and has good effect and adaptability. In the joint mean algorithm, the server is used to aggregate the local model parameters uploaded by the client, and the client performs local model training on the local data set. After local training, the local model parameters are generated. :

[0045] in, Indicates Training round, k The local model parameters of each client, Indicates Training round, k The local model parameters of each client, represents the learning rate, Indicates k The gradients calculated by the local model of each client when training on the local dataset.

[0046] In this embodiment, the server is used to aggregate the local model parameters uploaded by the client. The server aggregates the local model parameters uploaded by each client according to the following formula:

[0047] in, Indicates The global model obtained after the aggregation of training rounds, Represents the client index, Indicates the total number of clients. Indicates the total number of client samples, Indicates The number of samples of clients, Indicates Training round, k The local model parameters of each client.

[0048] In this embodiment, the server generates a global model after aggregation and sends it to each client for subsequent rounds of training until the global model converges or reaches the end condition.

[0049] In this embodiment, the adaptive aggregation algorithm is used to solve the convergence speed and stability problems of the global model. The adaptive aggregation algorithm dynamically adjusts the learning rate through the first-order moment estimation and the second-order moment estimation to accelerate the convergence and stability of the global model. The expression of the first-order moment estimation in the adaptive aggregation algorithm is as follows:

[0050] in, Indicates t The first moment estimate of the training epoch, represents the training round, represents the decay rate of the first-order moment estimate, Indicates The first moment estimate of the training epoch, represents pseudo gradient.

[0051] Choose a different The first-order moment estimation is used to simulate the influence of momentum, which helps to improve the stability of global model parameter updates.

[0052] In this embodiment, the expression of the second-order moment estimation is as follows:

[0053] in, Indicates t The second moment estimate of the training epoch, represents the decay rate of the second-order moment estimate, Indicates The second moment estimate of the training epoch, represents pseudo gradient.

[0054] By considering the second-order moment estimation, the adaptive aggregation algorithm can more flexibly respond to gradient changes in the parameter space. In some cases, the gradient will change dramatically, and the second-order moment estimation can capture the trend of this change and help adjust the learning rate to make the algorithm more robust. Finally, the global model parameter update formula is:

[0055] in, Indicates The training round uses the global model updated by the adaptive aggregation algorithm, represents the global model before updating, represents the learning rate, Indicates t The first moment estimate of the training epoch, Indicates t The second moment estimate of the training epoch, represents the weight decay term, Represents a constant, a small constant added for numerical stability to prevent division by zero.

[0056] In this embodiment, the pseudo gradient is based on the adaptive aggregation algorithm, which is integrated with the weighting of the client data samples by the joint mean algorithm, and the hierarchical model difference is used as the pseudo gradient of the adaptive aggregation algorithm:

[0057] In this embodiment, the first stage uses the global model aggregated by the joint mean algorithm. The optimized expression is as follows:

[0058] No. The expression for the loss ratio of a client to all clients is as follows:

[0059] in, represents hierarchical model differences, represents the hierarchy of the global model, Represents the global model i The layer parameters are aggregated using the global model using the joint mean algorithm. represents the last round of global model i Layer parameters, represents the global model aggregated using the joint mean algorithm in the first stage, Represents the client index, Indicates the total number of clients. It represents the ratio parameter between the number of client samples and the loss. Indicates the total number of client samples, Indicates k The number of samples of clients, Indicates The loss ratio of clients to all clients, and Both indicate k The loss value of the local model trained by the client on the local dataset, Indicates Training round, k The local model parameters of each client, Indicates the index number of the client.

[0060] This formula converts a set of losses into a probability distribution so that its value range falls between (0,1). , input Negative numbers are used to make smaller After exponential operation, it approaches 1, while the larger It approaches 0, corresponding to a larger loss, the global model learning effect is poor, and the loss ratio should be small, while a smaller loss, the global model learning effect is good, and the loss ratio should be large.

[0061] In this embodiment, the adaptive aggregation algorithm introduces a weight decay penalty in its update to control the complexity of the global model to avoid overfitting. The optimized global model is updated as follows:

[0062] in, Indicates The training round uses the global model updated by the adaptive aggregation algorithm, represents the global model before updating, represents the learning rate, Indicates t The first moment estimate of the training epoch, Indicates t The second moment estimate of the training epoch, represents a constant, Represents the weight decay term, which is a non-negative real number. During training, it is usually set to 0.0001.

[0063] In this embodiment, the expression of the global optimal objective function of the server is as follows:

[0064]

[0065]

[0066]

[0067]

[0068]

[0069]

[0070]

[0071] in, min Indicates taking a small value. w represents the global model parameters, represents the global optimal objective function of the server, Represents the client index, Indicates the total number of clients. Indicates k The local objective function of each client, Indicates k The amount of data per client, Indicates samples, Indicates k The local dataset of each client. Indicates that the local client defect detection model SSD is in the sample The loss value on Indicates the number of default boxes corresponding to the matched real boxes, represents the classification loss, represents the matching indicator variable, Represents the confidence score of each category predicted, A hyperparameter representing the weight between balancing classification loss and localization loss, represents the positioning loss, Represents the offset of each predicted default box relative to the original shape, represents the parameters of the ground-truth box, represents the set of positive class labels, Indicates A default box, Indicates Does the default box match the The set of positive labels The ground-truth bounding box, Indicates The default boxes belong to the set of positive labels The probability of represents the set of negative class labels, Indicates The default boxes belong to the set of negative class labels The probability of Indicates The default boxes belong to the set of positive labels The confidence level, Indicates different coordinate types, Represents the horizontal coordinate of the center point of the object, The vertical coordinate of the center point of the object. Indicates height, Indicates Does the default box match the The ground-truth bounding box, represents the smooth L1 loss function, represents the predicted coordinates, Indicates the actual coordinates.

[0072] In this embodiment, five professionally labeled transmission line defect data sets are selected for algorithm performance evaluation through experimental verification. The results show that the detection accuracy of the present invention is higher than that of the improved joint mean algorithm FedAvgM, the federated YOGI algorithm FedYogi, the truncated mean algorithm TrimmedAvg, and other algorithms in typical defect detection tasks such as cement pole breakage and anti-vibration hammer slippage, and the false detection and missed detection are significantly reduced.

[0073] In this embodiment, visualization analysis and Friedman statistical test are used to further confirm the significant advantages of the present invention in the evaluation indicators of the server and client, and prove the effectiveness of multi-method fusion and the superiority of the overall performance of the algorithm.

[0074] Example 2 like Figure 2 As shown, the present invention provides a server-side adaptive parameter aggregation system, which is applied to a server-side adaptive parameter aggregation method, including: The first processing module is used for the server to select K clients for joint training, and each client loads a local data set and enters a state of waiting for initialization of the global model; The second processing module is used to send global model parameters to each client after the server initializes the global model at the beginning stage, and the client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iteration stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration, and sends the second-stage global model to the client for training; The third processing module is used to determine whether the client has reached the preset training round. If so, the joint training task is terminated and the process is terminated. Otherwise, each client uses the local data set to train the local model through the improved joint mean algorithm and enters the fourth processing module. The fourth processing module determines whether the K clients have all completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client according to the training results to obtain a first-stage global model and enter the fifth processing module. Otherwise, it returns to the third processing module until all clients have completed training. A fifth processing module is used to calculate the hierarchical model difference according to the currently obtained one-stage global model and the global model of the previous round of training; The sixth processing module is used to use the hierarchical model differences as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iterative stage in the second processing module.

[0075] like Figure 2 The server-side adaptive parameter aggregation system provided in the illustrated embodiment can execute the technical solution shown in the server-side adaptive parameter aggregation method in the above method embodiment, and its implementation principle and beneficial effects are similar and will not be repeated here.

[0076] In this embodiment, the present application can divide the functional units according to the server-side adaptive parameter aggregation method. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of units in the present invention is schematic and is only a logical division. There may be other division methods in actual implementation.

[0077] In this embodiment, in order to realize the principles and beneficial effects of the server-side adaptive parameter aggregation method, the server-side adaptive parameter aggregation system includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the schematic units and algorithm steps described in the embodiments disclosed in the present invention, the present invention can be implemented in the form of hardware and / or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven manner depends on the specific application and design constraints of the technical solution. Different methods can be used for each specific application to implement the described function, but such implementation should not be considered to exceed the scope of this application.

Claims

1. A server-side adaptive parameter aggregation method, characterized in that: The following steps are involved: S1, the server selects K clients for joint training, and each client loads the local data set and enters the state of waiting for initialization of the global model; S2. In the initial stage, after the server initializes the global model, it sends the global model parameters to each client. The client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iterative stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration and sends the second-stage global model to the client for training. S3, determine whether the client has reached the preset training rounds, if so, end the joint training task and the process, otherwise, each client uses the improved joint mean algorithm to train the local model using the local data set and enter S4; S4. Determine whether all K clients have completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client based on the training results to obtain a first-stage global model and enter S5. Otherwise, return to S3 until all clients have completed training. S5. Calculate the hierarchical model difference based on the current one-stage global model and the global model of the previous round of training; S6. Use the hierarchical model difference as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iteration stage in S2.

2. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: In the initial stage, after the server initializes the global model, it sends the global model parameters to each client, and the client loads the initialized global model parameters and uses them as the initial training local model parameters of the client, which are specifically: A1. At the beginning, after the server initializes the global model, it sends the global model parameters to each client. A2. The client loads the initialized global model parameters and uses them as initial parameters. The global model parameters are used on the local data set to perform local model training to generate local model parameters. A3. After the training is completed, the client sends the updated local model parameters back to the server. A4. The server collects all updated local model parameters of the clients and aggregates them to generate a new global model. A5. The server sends the new global model parameters to the client, and the client uses the new global model parameters as new initial parameters to train the local model.

3. The method for server-side adaptive parameter aggregation according to claim 2, characterized in that: The expressions of the local model parameters are as follows: in, Indicates Training round, k The local model parameters of each client, Indicates Training round, k The local model parameters of each client, represents the learning rate, Indicates k The gradients calculated by the local model of each client when training on the local dataset.

4. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The expression of the one-stage global model in S4 is as follows: in, Indicates The one-stage global model obtained after the aggregation of training rounds, Represents the client index, Indicates the total number of clients. Indicates the total number of client samples, Indicates The number of samples of clients, Indicates Training round, k The local model parameters of each client.

5. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The expression of the hierarchical model difference in S5 is as follows: in, represents hierarchical model differences, represents the hierarchy of the global model, Represents the global model i The layer parameters are aggregated using the global model using the joint mean algorithm. Indicates the last round of global model i Layer parameters, represents the global model aggregated using the joint mean algorithm in the first stage, Represents the client index, Indicates the total number of clients. It represents the ratio parameter between the number of client samples and the loss. Indicates the total number of client samples, Indicates k The number of samples of clients, Indicates The loss ratio of clients to all clients, and Both indicate k The loss value of the local model trained by the client on the local dataset, Indicates Training round, k The local model parameters of each client, Indicates the index number of the client.

6. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The expression of the first-order moment estimate is as follows: in, Indicates t The first moment estimate of the training epoch, represents the training round, represents the decay rate of the first-order moment estimate, Indicates The first moment estimate of the training epoch, represents pseudo gradient.

7. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The expression of the second-order moment estimate is as follows: in, Indicates t The second moment estimate of the training epoch, represents the decay rate of the second-order moment estimate, Indicates The second moment estimate of the training epoch, represents pseudo gradient.

8. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The updating formula of the global model parameters is as follows: in, Indicates The training round uses the global model updated by the adaptive aggregation algorithm, represents the global model before updating, represents the learning rate, Indicates t The first moment estimate of the training epoch, Indicates t The second moment estimate of the training epoch, represents a constant, Represents the weight decay term.

9. The method for server-side adaptive parameter aggregation according to claim 1, characterized in that: The expression of the global optimal objective function of the server is as follows: in, min Indicates taking a small value. w represents the global model parameters, represents the global optimal objective function of the server, Represents the client index, Indicates the total number of clients. Indicates k The local objective function of each client, Indicates k The amount of data per client, Indicates samples, Indicates k The local dataset of each client. Indicates that the local client defect detection model SSD is in the sample The loss value on Indicates the number of default boxes corresponding to the matched real boxes, represents the classification loss, represents the matching indicator variable, Represents the confidence score of each category predicted, A hyperparameter representing the weight between balancing classification loss and localization loss, represents the positioning loss, Represents the offset of each predicted default box relative to the original shape, represents the parameters of the ground-truth box, represents the set of positive class labels, Indicates A default box, Indicates Does the default box match the The set of positive labels The ground-truth bounding box, Indicates The default boxes belong to the set of positive labels The probability of represents the set of negative class labels, Indicates The default boxes belong to the set of negative class labels The probability of Indicates The default boxes belong to the set of positive labels The confidence level, Indicates different coordinate types, Represents the horizontal coordinate of the center point of the object, Represents the ordinate of the center point of the object, Indicates height, Indicates Does the default box match the The ground-truth bounding box, represents the smooth L1 loss function, represents the predicted coordinates, Indicates the actual coordinates.

10. A server-side adaptive parameter aggregation system, characterized in that: The server-side adaptive parameter aggregation system is applied to a server-side adaptive parameter aggregation method, including: The first processing module is used for the server to select K clients for joint training, and each client loads a local data set and enters a state of waiting for initialization of the global model; The second processing module is used to send global model parameters to each client after the server initializes the global model at the beginning stage, and the client loads the initialized global model parameters and uses them as the initial training local model parameters of the client. In the iteration stage, as the joint learning proceeds, the server generates a second-stage global model after each iteration, and sends the second-stage global model to the client for training; The third processing module is used to determine whether the client has reached the preset training round. If so, the joint training task is terminated and the process is terminated. Otherwise, each client uses the local data set to train the local model through the improved joint mean algorithm and enters the fourth processing module. The fourth processing module determines whether the K clients have all completed training. If so, the server uses the improved joint mean algorithm to aggregate the local model parameters uploaded by the client according to the training results to obtain a first-stage global model and enter the fifth processing module. Otherwise, it returns to the third processing module until all clients have completed training. A fifth processing module is used to calculate the hierarchical model difference according to the currently obtained one-stage global model and the global model of the previous round of training; The sixth processing module is used to use the hierarchical model differences as the pseudo gradient of the adaptive aggregation algorithm, calculate the first-order moment estimation and second-order moment estimation involved in the adaptive aggregation algorithm, and use the adaptive aggregation algorithm to perform adaptive aggregation, generate a two-stage global model, and store the parameters of the two-stage global model of this round, and dynamically adjust the learning rate through the first-order moment estimation and the second-order moment estimation, and send the two-stage global model parameters to the client, and return to the iterative stage in the second processing module.

Citation Information

Patent Citations

  • Narrow-sense asynchronous personalized federated learning adaptive aggregation method

    CN115796274A

  • Adaptive aggregation for joint learning

    CN115879564A

  • Federal learning algorithm based on zero-order self-adaption

    CN116992974A

  • Model training method and device based on multitask clustering federal personalized learning

    CN117313901A

  • Lightweight user privacy protection system and method based on federal learning

    CN118013585A