A secure distributed SAR image target recognition method based on federated learning
By adopting asynchronous federated learning methods and centralized fusion algorithms in federated learning, the problems of low training efficiency and relatively convergent model in synchronous federated learning are solved, and more efficient training and more accurate models are achieved.
Patent Information
- Application Number
- CN202411266895.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-09-11
AI Technical Summary
In synchronous federated learning, some of the communication efficiency is low or the failed clients will lag in training progress, resulting in extremely low training efficiency; at the same time, local information of clients with large local data sets, low communication efficiency or poor connection quality may not be fully utilized, resulting in a partial convergence of the global model.
The asynchronous federated learning method is used to divide up the uplink and downlink time slots on the timeline. In each round of training, the server uses a centralized fusion algorithm to update the global model. The client judges whether to use the latest global model for training based on the loss function value, calculates the contribution of each client in the global model update, and clusters and packages the upload model parameters first according to the device parameters.
Asynchronous federated learning improves training efficiency, avoids convergence, ensures that the update of low-quality clients does not affect the global model, reduces communication costs and server computing burden, and improves the overall quality and accuracy of the model.
Smart Images

Figure CN119206437B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and in particular to a secure distributed SAR image target recognition method based on federated learning. Background Art
[0002] With the development of synthetic aperture radar (SAR) technology, SAR images are increasingly used in military and civilian fields. As one of the key technologies for SAR image interpretation, the accuracy and efficiency of SAR image target recognition are crucial to improving the application value of SAR images. However, SAR images have special properties different from optical images, such as inherent coherent speckle noise and complex geometric and electromagnetic deformations, which makes SAR image target recognition face great challenges.
[0003] Traditional SAR image target recognition methods usually rely on centralized data processing, which means that data needs to be transmitted from various collection points to a central server for unified processing. However, this method has several significant problems: first, the network bandwidth consumption during data transmission is huge and costly; second, data privacy and security are difficult to guarantee. Once the data transmission process is intercepted or the central server is attacked, sensitive information may be leaked; finally, the central server needs to process massive amounts of data, which places extremely high demands on computing power and storage capacity.
[0004] In order to solve the above problems, federated learning has emerged as a distributed machine learning paradigm. Federated learning allows multiple clients to collaborate on training models without centralizing data in one place, thereby protecting data privacy and reducing communication costs. Under the federated learning framework, each client uses local data to train a local model, and then only sends model parameters or updates to the server for aggregation and update of the global model. This approach not only utilizes decentralized data resources, but also ensures data security and privacy.
[0005] In the process of federated learning, a large number of clients uploading data at the same time will bring unbearable communication overhead to the network, and even cause system congestion. In synchronous federated learning, the server will perform global updates only after receiving all local models from the client in each round. Some clients with low communication efficiency or failures will lag behind the training progress, resulting in extremely low training efficiency and making training very difficult. At the same time, the local information of clients with large local data sets, low communication efficiency or poor connection quality may not be fully utilized, resulting in partial convergence of the global model. Summary of the invention
[0006] The purpose of the present invention is to provide a secure distributed SAR image target recognition method based on federated learning to solve the following technical problems:
[0007] Since some clients with low communication efficiency or faults will lag behind the training progress, the training efficiency is extremely low and training becomes very difficult. At the same time, the local information of clients with large local data sets, low communication efficiency or poor connection quality may not be fully utilized, resulting in partial convergence of the global model.
[0008] The purpose of the present invention can be achieved through the following technical solutions:
[0009] A secure distributed SAR image target recognition method based on federated learning includes the following steps:
[0010] Implement multiple rounds of training process among all clients, each round of training process divides uplink and downlink time slots on the time axis;
[0011] In a single downlink time slot of each training round, the server updates the global model using a centralized fusion algorithm, combining the local model parameters from each client, and calculates each client's contribution to the global model update based on each client's local gradient and the global gradient;
[0012] The client receives the updated global model and the contribution of any client in the global model update, and calculates the loss function value L(w) of the global model on the validation dataset and the loss function value f of each client local model on the local dataset. i (w), the client determines whether to use the latest global model for training based on the comparison of loss function values;
[0013] In the uplink time slot, the weight of each client is calculated according to the performance index of this round of training, and the trained local model parameters of the client greater than the preset weight and the corresponding global model version number are uploaded to the server within the specified time slot. The server performs the next round of global model update and optimization based on the collected local model parameters; and updates the weight based on the contribution of each client in this round of update;
[0014] The clients to be uploaded are clustered based on their device parameters. According to the clustering results, the client model parameters of the same cluster are packaged and uploaded first. The server continuously collects model parameter updates from the clients until the model finally converges.
[0015] As a further solution of the present invention: the client determines whether to use the latest global model for training based on the comparison of the loss function value; the calculation process is:
[0016] The local model on each client is trained by optimizing its loss function on the local dataset, using f i (w) represents the loss predicted by the model with parameter w on the i-th client, then the loss on the client can be expressed as:
[0017]
[0018] The loss function of the global model is:
[0019]
[0020] where n i represents the number of samples on the i-th client, n is the total number of data points for all clients, represents the jth data sample of the i-th client, where Output features, is the corresponding true label, μ is the regularization parameter that controls the strength of consistency between the local update and the global model; w t is the parameter of the global model of the current round; w is the model parameter;
[0021] If the loss function value of the local model is greater than or equal to the loss function value of the global model, the client may choose to use the latest global model for training; if the loss function value of the local model is less than the loss function value of the global model, the client continues to train the original global model.
[0022] As a further solution of the present invention: the process of calculating the contribution of each client in the global model update is:
[0023] The contribution C of each local model is calculated by calculating the cosine similarity between the local gradient of each client and the global gradient in each round as the evaluation function i, The calculation formula is:
[0024]
[0025] where u i represents the local gradient of the client, u global represents the global gradient.
[0026] As a further solution of the present invention: the calculation process of calculating the weight of each client according to the performance index of this round of training is:
[0027] For all clients, select each client’s data size, model loss, and CPU usage as performance indicators, convert the model loss and CPU usage into very large indicators, and mark the jth performance indicator of the i-th client as x ij , j = 1, 2, 3, the performance index is standardized to generate the standardized index z ij , based on the standardized index, a standardized matrix is generated, and the conversion formula for the standardized processing is:
[0028]
[0029] The normalized matrix is expressed as:
[0030]
[0031] Calculate the Euclidean distance D between each standardized indicator in the matrix and the maximum value of the indicator type i + , and the minimum value Z of the indicator type - The Euclidean distance D i - ; then the initial score s of the i-th client i for:
[0032]
[0033] Normalize the initial score and mark the transmission speed between each client and the server as V. Then the weight S of the i-th client is i for:
[0034]
[0035] As a further solution of the present invention: the calculation process of the Euclidean distance is:
[0036] Mark the maximum value of any type of normalized index as z j + , the minimum value is marked as z j - , then the Euclidean distance D corresponding to any index i + and D i - The calculation formula is:
[0037]
[0038] where γ j Represents the coefficient of each indicator.
[0039] As a further solution of the present invention: the process of updating the weight is:
[0040] Except for the first round, each time the global model is updated, αS i +βC i The value of is used as the new weight of the i-th client, where α and β are coefficients, and α+β=1.
[0041] As a further solution of the present invention: for clients with weights lower than the preset weights, first receive the latest global model parameters sent by the server, and continue to train the previous round of global models. When the previous round of training is completed, if the uplink time slot has not arrived, train a new round of global models.
[0042] As a further solution of the present invention: the clustering process is:
[0043] Step 1: The device parameters of the client include but are not limited to geographic location, device type, computing power, operating time period, operating system and software environment, and the device parameters are normalized;
[0044] Step 2: Represent the parameters of each device as a multidimensional feature vector x i , randomly select K initial cluster centers r1, r2, …, r K , where K is the preset number of clusters;
[0045] Step 3: For each device’s feature vector x i , calculate the distance d to each cluster center:
[0046]
[0047] Among them, x i,m is the mth eigenvalue of the i-th multidimensional eigenvector, c k,m is the mth eigenvalue of the kth cluster center, M is the total dimension of the eigenvector, k∈1,...,K,
[0048] Step 4: Assign the device to the nearest cluster center. For each cluster, calculate the mean of the feature vectors of all devices belonging to the cluster as the new cluster center. The update formula is:
[0049]
[0050] Among them, N k represents the number of devices in the kth cluster, S k represents the set of devices belonging to the kth cluster;
[0051] Step 5: Repeat steps 3 and 4 until the cluster center no longer changes significantly or the preset maximum number of iterations is reached, and finally K device sets are formed. The model parameters belonging to the same device set are packaged and uploaded in turn.
[0052] Beneficial effects of the present invention:
[0053] (1) Aiming at the problems of communication efficiency differences and frequent failures in the SAR image target recognition S system, the present invention proposes an asynchronous federated centralized fusion and local decision framework based on the advantages of asynchronous federated learning in balancing instantaneous communication loads by transmitting in different time slots and allowing the server to adaptively perform global model updates to improve overall training efficiency. The framework makes full use of the new information contained in each round of local models, avoids partial convergence by forcing the influence of each client's local data set to be proportional to its share, and thus improves model training efficiency.
[0054] (2) The present invention evaluates the performance of each client's local model in this round of training and calculates weights accordingly, ensuring that only those local model parameters that contribute positively to the global model are uploaded and aggregated; this helps to avoid the negative impact of low-quality updates on the global model, thereby improving the overall quality and accuracy of the model; determining parameter upload based on weights can effectively allocate communication resources and server processing capabilities, focusing limited resources on those clients that are most likely to improve model performance; unnecessary data transmission is reduced, reducing communication costs, especially in bandwidth-limited or unstable network environments;
[0055] (3) The present invention ensures that the local updates of each client can effectively contribute to the improvement of the global model, avoids the uploading of invalid updates, reduces the computational burden of the server during model aggregation, and thus improves training efficiency; and by updating the weights according to the client's contribution after each round of training, the present invention implements a dynamic adjustment mechanism that can better adapt to changes in data distribution and newly added clients, ensuring the flexibility and robustness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention will be further described below in conjunction with the accompanying drawings.
[0057] Figure 1 It is a schematic diagram of the process of the present invention;
[0058] Figure 2 This is a workflow diagram of SAR image target recognition of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] See also Figure 1-2As shown, the present invention is a secure distributed SAR image target recognition method based on federated learning, comprising the following steps:
[0061] Implement multiple rounds of training process among all clients, each round of training process divides uplink and downlink time slots on the time axis;
[0062] In a single downlink time slot of each training round, the server updates the global model using a centralized fusion algorithm, combining the local model parameters from each client, and calculates each client's contribution to the global model update based on each client's local gradient and the global gradient;
[0063] The client receives the updated global model and the contribution of any client in the global model update, and calculates the loss function value L(w) of the global model on the validation dataset and the loss function value f of each client local model on the local dataset. i (w), the client determines whether to use the latest global model for training based on the comparison of loss function values;
[0064] In the uplink time slot, the weight of each client is calculated according to the performance index of this round of training, and the trained local model parameters of the client greater than the preset weight and the corresponding global model version number are uploaded to the server within the specified time slot. The server performs the next round of global model update and optimization based on the collected local model parameters; and updates the weight based on the contribution of each client in this round of update;
[0065] The clients to be uploaded are clustered based on their device parameters. According to the clustering results, the client model parameters of the same cluster are packaged and uploaded first. The server continuously collects model parameter updates from the clients until the model finally converges.
[0066] In a preferred embodiment of the present invention, the client determines whether to use the latest global model for training based on the comparison of the loss function value; the calculation process is:
[0067] The local model on each client is trained by optimizing its loss function on the local dataset, using f i (w) represents the loss predicted by the model with parameter w on the i-th client, then the loss on the client can be expressed as:
[0068]
[0069] The loss function of the global model is:
[0070]
[0071] where n irepresents the number of samples on the i-th client, n is the total number of data points for all clients, represents the jth data sample of the i-th client, where Output features, is the corresponding true label, μ is the regularization parameter that controls the strength of consistency between the local update and the global model; w t is the parameter of the global model of the current round; w is the model parameter;
[0072] If the loss function value of the local model is greater than or equal to the loss function value of the global model, the client may choose to use the latest global model for training; if the loss function value of the local model is less than the loss function value of the global model, the client continues to train the original global model.
[0073] By comparing the loss function values of the local model and the global model on the client, the client can independently decide whether to use the latest global model for training. This strategy can effectively utilize local computing resources and avoid unnecessary local training when the global model already provides good enough performance. At the same time, this method can also promote rapid convergence of the model and improve the overall efficiency and model quality of the federated learning system. By evaluating the performance of the local model and the global model, the client can more flexibly adapt to the changing data environment and task requirements, thereby optimizing the federated learning process and ensuring the accuracy and robustness of the final model.
[0074] In another preferred embodiment of the present invention, the process of calculating the contribution of each client in the global model update is:
[0075] The contribution C of each local model is calculated by calculating the cosine similarity between the local gradient of each client and the global gradient in each round as the evaluation function i, The calculation formula is:
[0076]
[0077] where u i represents the local gradient of the client, u global represents the global gradient.
[0078] By calculating the cosine similarity between the client's local gradient and the global gradient to evaluate each client's contribution to the global model update, this method can more accurately identify clients that have a significant impact on the improvement of the global model. Doing so can more effectively utilize the computing power of each client and ensure that only those updates that provide useful information are aggregated into the global model, thereby improving the efficiency of model training and the performance of the final model.
[0079] In another preferred embodiment of the present invention, the calculation process of calculating the weight of each client according to the performance index of this round of training is:
[0080] For all clients, select each client’s data size, model loss, and CPU usage as performance indicators, convert the model loss and CPU usage into very large indicators, and mark the jth performance indicator of the i-th client as x ij , j = 1, 2, 3, the performance index is standardized to generate the standardized index z ij , based on the standardized index, a standardized matrix is generated, and the conversion formula for the standardized processing is:
[0081]
[0082] The normalized matrix is expressed as:
[0083]
[0084] Calculate the Euclidean distance D between each standardized indicator in the matrix and the maximum value of the indicator type i + , and the minimum value Z of the indicator type - The Euclidean distance D i - ; then the initial score s of the i-th client i for:
[0085]
[0086] Normalize the initial score and mark the transmission speed between each client and the server as V. Then the weight S of the i-th client is i for:
[0087]
[0088] In a preferred case of this embodiment, the calculation process of the Euclidean distance is:
[0089] Mark the maximum value of any type of normalized index as z j + , the minimum value is marked as z j - , then the Euclidean distance D corresponding to any index i + and D i - The calculation formula is:
[0090]
[0091] where γ jRepresents the coefficient of each indicator.
[0092] It is worth noting that the process of updating the weights is:
[0093] Except for the first round, each time the global model is updated, αS i +βC i The value of is used as the new weight of the i-th client, where α and β are coefficients, and α+β=1.
[0094] In another preferred embodiment of the present invention, for clients with weights lower than preset weights, the latest global model parameters sent by the server are first received, and the global model of the previous round is continued to be trained. When the previous round of training is completed, if the uplink time slot has not arrived, a new round of global model is trained.
[0095] In another preferred embodiment of the present invention, the clustering process is:
[0096] Step 1: The device parameters of the client include but are not limited to geographic location, device type, computing power, operating time period, operating system and software environment, and the device parameters are normalized;
[0097] Step 2: Represent the parameters of each device as a multidimensional feature vector x i , randomly select K initial cluster centers r1, r2, …, r K , where K is the preset number of clusters;
[0098] Step 3: For each device’s feature vector x i , calculate the distance d to each cluster center:
[0099]
[0100] Among them, x i,m is the mth eigenvalue of the i-th multidimensional eigenvector, c k,m is the mth eigenvalue of the kth cluster center, M is the total dimension of the eigenvector, k∈1,...,K,
[0101] Step 4: Assign the device to the nearest cluster center. For each cluster, calculate the mean of the feature vectors of all devices belonging to the cluster as the new cluster center. The update formula is:
[0102]
[0103] Among them, N k represents the number of devices in the kth cluster, S k represents the set of devices belonging to the kth cluster;
[0104] Step 5: Repeat steps 3 and 4 until the cluster center no longer changes significantly or the preset maximum number of iterations is reached, and finally K device sets are formed. The model parameters belonging to the same device set are packaged and uploaded in turn.
[0105] By clustering client devices, tasks and computing loads can be reasonably allocated according to the actual computing capabilities of the devices and environmental characteristics. After clustering, clients belonging to the same cluster can upload model parameters at the same time, which helps reduce the number of communications and data transmission between the server and the client, thereby reducing communication costs, which is especially important in bandwidth-constrained environments.
[0106] Clustering makes the processing of model updates more centralized and organized. The server can manage model updates more efficiently because it can organize and process data by device cluster, rather than processing updates from each device one by one.
[0107] The clustering strategy allows the system to better adapt to the capabilities of different types of devices, ensuring that even devices with poor performance can be effectively utilized, thereby improving the inclusiveness and robustness of the federated learning system.
[0108] Client devices are divided into the same cluster according to their features, and the model parameters of the same device set are transmitted. The server can then process the model parameters of the transmitted batch while transmitting the model parameters of the subsequent batches, thereby achieving the effect of training while transmitting, improving the efficiency of the server's global update, and further accelerating the model training and optimization process.
[0109] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A secure distributed SAR image target recognition method based on federated learning, characterized in that: The following steps are involved: Implement multiple rounds of training process among all clients, each round of training process divides uplink and downlink time slots on the time axis; In a single downlink time slot of each training round, the server updates the global model using a centralized fusion algorithm, combining the local model parameters from each client, and calculates each client's contribution to the global model update based on each client's local gradient and the global gradient; The client receives the updated global model and the contribution of any client in the global model update, and calculates the loss function value L(w) of the global model on the validation dataset and the loss function value f of each client local model on the local dataset. i (w), the client determines whether to use the latest global model for training based on the comparison of loss function values; In the uplink time slot, the weight of each client is calculated according to the performance index of this round of training, and the trained local model parameters of the client greater than the preset weight and the corresponding global model version number are uploaded to the server within the specified time slot. The server performs the next round of global model update and optimization based on the collected local model parameters; and updates the weight based on the contribution of each client in this round of update; The clients to be uploaded are clustered based on their device parameters. According to the clustering results, the client model parameters of the same cluster are packaged and uploaded first. The server continuously collects model parameter updates from the clients until the model finally converges.
2. According to the secure distributed SAR image target recognition method based on federated learning in claim 1, it is characterized in that: The client determines whether to use the latest global model for training based on the comparison of the loss function value; the calculation process is: The local model on each client is trained by optimizing its loss function on the local dataset, using f i (w) represents the loss predicted by the model with parameter w on the i-th client, then the loss on the client can be expressed as: The loss function of the global model is: Where n i represents the number of samples on the i-th client, n is the total number of data points for all clients, represents the jth data sample of the i-th client, where Output features, is the corresponding true label, μ is the regularization parameter that controls the strength of consistency between the local update and the global model; w t is the parameter of the global model of the current round; w is the model parameter; If the loss function value of the local model is greater than or equal to the loss function value of the global model, the client may choose to use the latest global model for training; if the loss function value of the local model is less than the loss function value of the global model, the client continues to train the original global model.
3. The secure distributed SAR image target recognition method based on federated learning according to claim 1 is characterized in that: The process of calculating each client's contribution to the global model update is: The contribution C of each local model is calculated by calculating the cosine similarity between the local gradient of each client and the global gradient in each round as the evaluation function i, The calculation formula is: where u i represents the local gradient of the client, u global represents the global gradient.
4. The secure distributed SAR image target recognition method based on federated learning according to claim 1 is characterized in that: The calculation process of calculating the weight of each client based on the performance indicators of this round of training is: For all clients, select the data size, model loss, and CPU usage of each client as performance indicators, convert the model loss and CPU usage into very large indicators, and mark the jth performance indicator of the i-th client as x ij , j = 1, 2, 3, the performance index is standardized to generate the standardized index z ij , based on the standardized index, a standardized matrix is generated, and the conversion formula for the standardized processing is: The normalized matrix is expressed as: Calculate the Euclidean distance D between each standardized indicator in the matrix and the maximum value of the indicator type i + , and the minimum value Z of the indicator type - The Euclidean distance D i - ; then the initial score s of the i-th client i for: Normalize the initial score and mark the transmission speed between each client and the server as V. Then the weight S of the i-th client is i for:
5. The method for secure distributed SAR image target recognition based on federated learning according to claim 4 is characterized in that: The calculation process of the Euclidean distance is: Mark the maximum value of any type of normalized index as z j + , the minimum value is marked as z j - , then the Euclidean distance D corresponding to any index i + and D i - The calculation formula is: where γ j Represents the coefficient of each indicator.
6. The method for secure distributed SAR image target recognition based on federated learning according to claim 3 or 4, characterized in that: The process of updating the weights is: Except for the first round, each time the global model is updated, αS i +βC i The value of is used as the new weight of the i-th client, where α and β are coefficients, and α+β=1.
7. The secure distributed SAR image target recognition method based on federated learning according to claim 1, characterized in that: For clients with weights lower than the preset weight, they first receive the latest global model parameters sent by the server and continue to train the previous round of global models. When the previous round of training is completed, if the uplink time slot has not arrived, a new round of global model training is performed.
8. The secure distributed SAR image target recognition method based on federated learning according to claim 1 is characterized in that: The clustering process is: Step 1: The device parameters of the client include but are not limited to geographic location, device type, computing power, operating time period, operating system and software environment, and the device parameters are normalized; Step 2: Represent the parameters of each device as a multidimensional feature vector x i , randomly select K initial cluster centers r1, r2, …, r K , where K is the preset number of clusters; Step 3: For each device’s feature vector x i , calculate the distance d to each cluster center: Among them, x i,m is the mth eigenvalue of the i-th multidimensional eigenvector, c k,m is the mth eigenvalue of the kth cluster center, M is the total dimension of the eigenvector, k∈1,...,K, Step 4: Assign the device to the nearest cluster center. For each cluster, calculate the mean of the feature vectors of all devices belonging to the cluster as the new cluster center. The update formula is: Among them, N k represents the number of devices in the kth cluster, S k represents the set of devices belonging to the kth cluster; Step 5: Repeat steps 3 and 4 until the cluster center no longer changes significantly or the preset maximum number of iterations is reached, and finally K device sets are formed. The model parameters belonging to the same device set are packaged and uploaded in turn.
Citation Information
Patent Citations
Improved transverse synchronous federated learning aggregation acceleration method
CN116629350A
Multi-layer federated learning scheme based on sampling aggregation optimization
CN116702881A