Federal learning local sharpness optimization method and system based on approximate global perturbation

CN118607661BActive Publication Date: 2026-10-13SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410669693.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2026-10-13
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

[0005]本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种基于近似全局扰动的联邦学习本地锐度优化方法和系统,以解决或部分解决联邦学习的数据异构的特点导致难以在本地实现全局锐度优化的问题

Benefits of technology

[0032](1)实现基于近似全局扰动的联邦学习本地锐度优化:针对部分方法仅优化本地锐度,在全局优化目标上没有考虑损失曲面的不一致性,以及没有考虑到联邦学习的数据异构特点的问题,本发明在本地节点的参数更新过程中,通过估计全局扰动可以有效的优化全局锐度并且提高模型的泛化性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607661B_ABST
    Figure CN118607661B_ABST
Patent Text Reader

Abstract

The application relates to a federated learning local sharpness optimization method and system based on approximate global disturbance, and the method is applied to a local node in federated learning. The optimization method comprises the following steps: obtaining a global model, calculating an approximate global disturbance based on the obtained global model and a global model obtained last time; calculating a local loss based on a preset local model and the approximate global disturbance; updating parameters of the local model based on the local loss and a preset local learning rate, so that local sharpness optimization considering global disturbance is realized. Compared with the prior art, the application realizes federated learning local sharpness optimization based on approximate global disturbance, and has the advantages of small calculation overhead, wide application scenarios and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning technology, and in particular to a federated learning local sharpness optimization method and system based on approximate global perturbation. Background Technology

[0002] In today's big data era, protecting user data privacy and security is increasingly important. Whether it's data captured by sensors, information stored on mobile phones, or hospital records, all contain elements rich in privacy concerns. Compared to the centralized training of traditional deep learning methods, the federated learning framework does not require data to be aggregated on a central server, effectively mitigating privacy leaks during data transmission, storage, and training. It ensures that end-user data is not leaked, making it more secure and reliable than traditional training paradigms. In the federated learning framework, a central server is connected to multiple user nodes. User nodes train models on their own data, while the central server is only responsible for transmitting and aggregating the models locally. Ultimately, the aggregated model on the central server converges and trains on the data from each terminal, forming a globally converged model.

[0003] Due to the varying data distribution across different terminals, the models trained on different nodes differ significantly, often leading to the global model getting stuck in local optima and exhibiting a sharp loss surface. Research both domestically and internationally on mitigating the sharp loss surface problem in federated learning under heterogeneous conditions is still in its early stages. Existing solutions mostly focus on optimizing the sharpness of local nodes, introducing additional computational overhead, such as introducing a sharpness-aware minimization optimizer on the local node, or combining a dynamic regularizer with a sharpness-aware minimization optimizer. These methods either only optimize local sharpness or introduce substantial additional computational overhead, exhibiting significant limitations.

[0004] In summary, existing federated learning-based model training techniques face overfitting issues when dealing with heterogeneous data, and the loss surface at convergence is often sharp and uneven, limiting the generalization ability and practical application of federated learning. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology by providing a local sharpness optimization method and system for federated learning based on approximate global perturbation, so as to solve or partially solve the problem that the heterogeneous nature of data in federated learning makes it difficult to achieve global sharpness optimization locally.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] One aspect of the present invention provides a local sharpness optimization method based on approximate global perturbation in federated learning, applied to local nodes in federated learning, the optimization method comprising the following steps:

[0008] Obtain the global model, and calculate the approximate global perturbation based on the obtained global model and the previously obtained global model;

[0009] The local loss is calculated based on the preset local model and the approximated global perturbation;

[0010] Based on the local loss and the preset local learning rate, the parameters of the local model are updated to achieve local sharpness optimization that takes into account global perturbations.

[0011] As a preferred technical solution, the approximate global disturbance is calculated using the following formula:

[0012]

[0013] Where δ is the global perturbation, w t For the global model received in round t, ρ represents the global model received by the i-th local node in the last iteration, and ρ represents the preset perturbation amplitude.

[0014] As a preferred technical solution, the parameter update of the local model is implemented using the following formula:

[0015]

[0016] in, Let be the parameters received in round t from the global model trained on the i-th local node in round k and round k+1, respectively; δ be the global perturbation; and η be the parameters received in round t. l For local learning rate, Let be the local loss gradient operator for the i-th local node.

[0017] As a preferred technical solution, the optimization objective of the local sharpness optimization that takes into account global perturbations is:

[0018]

[0019] Where F represents the global loss function, and the local batch training data is ζ. i The i-th local node follows the ζ-order. i ~p i The data distribution is given by w, which represents the global model parameters, E, δ, and ρ, which represents the preset perturbation amplitude.

[0020] As a preferred technical solution, the global perturbation before approximation is calculated using the following formula:

[0021]

[0022] Where δ represents the global disturbance, and ρ represents the preset disturbance amplitude. Let ζ be the gradient operator, ζ be the global batch training data, F be the global loss function, and w be the global parameter model.

[0023] Another aspect of the present invention provides a vehicle-to-everything (V2X) system based on federated learning local sharpness optimization using approximate global perturbation, comprising:

[0024] On the server side, a global model is deployed to receive parameters from the local models of each vehicle and update the global model through aggregation.

[0025] Multiple vehicle-side nodes are deployed with local nodes in federated learning, which are used to update the local model by adopting the aforementioned federated learning local sharpness optimization method based on approximate global perturbation.

[0026] As a preferred technical solution, the local model is used to output vehicle action decisions based on input radar point cloud data and / or image information.

[0027] As a preferred technical solution, the following are also included:

[0028] The roadside unit is used to realize data exchange between the server and the vehicle.

[0029] In another aspect, an electronic device is provided, comprising: one or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the aforementioned federated learning local sharpness optimization method based on approximate global perturbation.

[0030] In another aspect, a computer-readable storage medium is provided, comprising one or more programs executable by one or more processors of an electronic device, the one or more programs including instructions for performing the aforementioned federated learning local sharpness optimization method based on approximate global perturbations.

[0031] Compared with the prior art, the present invention has at least the following beneficial effects:

[0032] (1) Realize local sharpness optimization of federated learning based on approximate global perturbation: In view of the problems that some methods only optimize local sharpness, do not consider the inconsistency of loss surface in global optimization objective, and do not take into account the heterogeneous characteristics of data in federated learning, this invention can effectively optimize global sharpness and improve the generalization performance of the model by estimating global perturbation during the parameter update process of local nodes.

[0033] (2) Low computational cost: By approximating the global perturbation, it is not necessary to calculate the gradient, thus saving computational cost.

[0034] (3) Fast convergence speed and low communication cost: To achieve the same accuracy, it requires fewer iterations and lower total communication compared to other similar federated learning algorithms.

[0035] (3) Wide range of applications: This method can be applied in federated learning scenarios, such as vehicle networking systems. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the federated learning local sharpness optimization method based on approximate global perturbation in the embodiment.

[0037] Figure 2 This is a schematic diagram of the vehicle networking system in the embodiment;

[0038] Figure 3 This is a schematic diagram illustrating the estimation principle of global perturbation in the embodiment. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0040] Example 1

[0041] A drawback of some sharpness optimization schemes is that they only optimize local sharpness, failing to consider the inconsistency of the loss surface in the global optimization objective, treating local and global sharpness as the same. Algorithms designed under this assumption cannot, in principle, achieve global flatness in heterogeneous federated data scenarios, making it difficult for federated learning to effectively optimize global sharpness in heterogeneous data situations.

[0042] To address this issue, this embodiment provides a local sharpness optimization method for federated learning based on approximate global perturbation. It improves upon the federated learning system, which is broadly divided into two parts: the model training part at local nodes and the global aggregation part on the server side. This embodiment optimizes the generalization ability of the global model by focusing on the sharpness perception of the model training part at local nodes.

[0043] This embodiment designs an efficient perturbation estimation algorithm that simultaneously optimizes global sharpness and reduces additional computational overhead. It uses a parametric model w and sets a global loss function F and a local loss function Fi. i Assume the global distribution is p, and the i-th node follows a ζ-order. i ~p i Data distribution and satisfying E i [pi = P. There are N nodes in total, the gradient perturbation is δ each time, and the local batch training data is ζ. i Let E be the desired value. The optimization objective for global sharpness perception can then be written as:

[0044]

[0045] This optimization process maximizes the sharpness of the loss surface in the neighborhood internally and minimizes the loss function externally, thus simultaneously optimizing both the loss function and the sharpness around the loss function curve. Definition Let be the gradient operator, ζ be the global batch training data, and ρ be the predefined magnitude. Ignoring communication constraints during local training, the global perturbation is calculated in the global sharpness-aware optimization as follows:

[0046]

[0047] Due to the unavailability of global batch training data and inconsistencies in local models, global perturbations cannot be directly calculated. This embodiment provides an approximate calculation method. See also Figure 3 Use the global update direction obtained from the previous iteration. To replace the global model towards the optimal solution w * Update direction

[0048] Define w t For the global model received in round t, This represents the global model received by node i in the previous iteration. The global perturbation can be approximated as:

[0049]

[0050] Based on the above derivation, see Figure 1 The local sharpness optimization method includes the following steps:

[0051] S1, For local node i, obtain the global model w t Based on the obtained global model and the previously obtained global model Calculate the approximate global perturbation δ;

[0052] S2, based on a pre-built local model And the local loss is calculated based on the approximate global perturbation δ;

[0053] S3, based on the local loss and the preset local learning rate η l The parameters of the local model are updated to achieve local sharpness optimization that takes into account global perturbations.

[0054] Specifically, in this embodiment, the global disturbance is approximately calculated as follows:

[0055]

[0056] Among them, w t For the global model received in round t, Let ρ be the global model received by node i in the previous iteration, and ρ be the perturbation magnitude. After obtaining the global perturbation, the local update can be simplified to:

[0057]

[0058] in For round t, the global model trained for k rounds at the i-th node is received, η l For local learning rate, Let ρ be the local loss gradient operator for the i-th node, and let ρ be the perturbation magnitude.

[0059] This method optimizes global sharpness by estimating global perturbations in heterogeneous data scenarios, while saving computational overhead and improving the model's generalization performance.

[0060] This method does not require additional gradient calculation and approximates the global perturbation. While saving computational overhead, it can effectively optimize global sharpness and improve the model's generalization performance by estimating the global perturbation. This method has a wide range of applications, can improve the global generalization performance of federated learning in heterogeneous scenarios, and is simple to deploy, low in cost, and has almost no additional computational overhead at the server and terminal levels. It also has a theoretical guarantee of global convergence.

[0061] Tested on four benchmark datasets in the federated learning field and compared with numerous federated learning algorithms, it achieved state-of-the-art performance. In some domain generalization problems, it improved accuracy by approximately 3% compared to the latest method and by approximately 7% compared to benchmark algorithms. It surpasses both the latest and benchmark algorithms and has significantly lower computational overhead than other sharpness-aware optimized federated algorithms. Compared to similar algorithms, it reduces computation time by more than half while achieving the same accuracy.

[0062] Example 2

[0063] Based on Example 1, this example provides a vehicle networking system and applies a federated learning local sharpness optimization method based on approximate global perturbation to the vehicle networking system.

[0064] See Figure 2 The vehicle networking system mainly includes:

[0065] The server-side is typically deployed in the cloud or on edge computing devices, where a global model is deployed to receive parameters from the local models of each vehicle and update the global model through aggregation.

[0066] The roadside unit is used to enable data exchange between the server and each vehicle.

[0067] Multiple vehicle terminals, each acting as a local node, maintain a local model, and the local model uses the federated learning local sharpness optimization method based on approximate global perturbation in Example 1 to update parameters.

[0068] Local models can be used to implement various applications of vehicle networking, such as driving decision-making, throttle control, and brake control. Taking driving decision-making as an example, the vehicle is equipped with hardware devices such as radar and cameras. The local model outputs the vehicle's action decision based on the input radar point cloud data and / or image information.

[0069] It should be noted that the above is only a typical application of the present invention. Unless otherwise specified, this method can be applied to other practical scenarios based on federated learning.

[0070] This embodiment of the vehicle networking system based on federated learning provides a unified and efficient federated training framework to address the sharp loss surface during convergence in heterogeneous data scenarios. It combines variance reduction algorithm and dynamic regularizer to optimize global sharpness locally. While optimizing global sharpness locally, global perturbation is estimated based on global updates, which improves the smoothness of the loss surface and enhances the generalization ability of the federated learning algorithm, thereby improving the usability of the federated learning algorithm in practical application scenarios.

[0071] Example 3

[0072] This embodiment provides an electronic device, characterized in that it includes: one or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the federated learning local sharpness optimization method based on approximate global perturbation as described in Embodiment 1.

[0073] Example 4

[0074] This embodiment provides a computer-readable storage medium including one or more programs executable by one or more processors of an electronic device, the one or more programs including instructions for performing the federated learning local sharpness optimization method based on approximate global perturbation as described in Embodiment 1.

[0075] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A vehicle-to-everything (V2X) system based on federated learning local sharpness optimization using approximate global perturbation, characterized in that, include: On the server side, a global model is deployed to receive parameters from the local models of each vehicle and update the global model through aggregation. Multiple vehicle-side nodes are deployed with local nodes for federated learning, which are used to update the local model using a local sharpness optimization method based on approximate global perturbation. The local model is used to output vehicle action decisions based on input radar point cloud data and / or image information. The federated learning local sharpness optimization method based on approximate global perturbation includes the following steps: Obtain the global model, and calculate the approximate global perturbation based on the obtained global model and the previously obtained global model; The local loss is calculated based on the preset local model and the approximated global perturbation; Based on the local loss and the preset local learning rate, the parameters of the local model are updated to achieve local sharpness optimization that takes into account global perturbations. The parameter updates of the local model are implemented using the following formula: in, , The first The global model received in the round is in the first round. The training of the local node wheel, Wheel parameters, This refers to the global perturbation. For local learning rate, For the first Local loss gradient operator for each local node.

2. The vehicle networking system based on federated learning local sharpness optimization using approximate global perturbation as described in claim 1, characterized in that, The approximate global perturbation is calculated using the following formula: in, For global perturbation, For the first The global model received in the round, For the first The global model received by each local node in the last time. This is the preset disturbance amplitude.

3. The vehicle-to-everything (V2X) system based on federated learning and local sharpness optimization using approximate global perturbation as described in claim 1, characterized in that... The optimization objective of the local sharpness optimization that takes into account global perturbations is: in, This represents the global loss function, and the local batch training data is... , No. Each local node obeys Data distribution Represents global model parameters. As expected, For global perturbation, This is the preset disturbance amplitude.

4. The vehicle-to-everything (V2X) system based on federated learning local sharpness optimization using approximate global perturbation as described in claim 1, characterized in that, The global perturbation before approximation is calculated using the following formula: in, For global perturbation, The preset disturbance amplitude, For gradient operators, For global batch training data, Represents the global loss function. This represents the global model parameters.

5. The vehicle-to-everything (V2X) system based on federated learning local sharpness optimization using approximate global perturbation as described in claim 1, characterized in that, Also includes: The roadside unit is used to realize data exchange between the server and the vehicle.

6. An electronic device, characterized in that, include: One or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the vehicle networking system based on federated learning local sharpness optimization of approximate global perturbation as described in any one of claims 1-5.

7. A computer-readable storage medium, characterized in that, Includes one or more programs that are executed by one or more processors of an electronic device, the one or more programs including instructions for executing a vehicle networking system based on federated learning local sharpness optimization of approximate global perturbation as described in any one of claims 1-5.