A method for fair weighting aggregation based on data contribution in federated learning
By constructing a data contribution evaluation model and a robust aggregation mechanism in UAV swarm federated learning, the problems of data heterogeneity and communication unreliability are solved, enabling more efficient and reliable model training and improving the collaborative learning capability of UAV swarms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-14
AI Technical Summary
Federated learning for drone swarms faces challenges of data heterogeneity and communication unreliability during the aggregation phase, resulting in low model training efficiency, insufficient fairness and robustness, and difficulty in reliable deployment in complex scenarios.
A fair weighted aggregation method based on data contribution is adopted. By calculating the KL divergence of data distribution and data volume, a comprehensive data contribution evaluation model is constructed. Mahalanobis distance is used to identify and filter abnormal clients, thereby achieving robust weighted aggregation.
It improves the fairness and robustness of model training and enhances model accuracy, especially in heterogeneous data environments. Experimental results show that the model accuracy on the MNIST and CIFAR10 datasets has improved by 2% to 9%, respectively.
Smart Images

Figure CN122390000A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of federated learning for unmanned aerial vehicles (UAVs), and specifically to a fair weighted aggregation method based on data contribution in federated learning. Background Technology
[0002] In recent years, with the integrated development of 5G / 6G communication technology, edge computing, artificial intelligence algorithms, and high-precision sensors, unmanned aerial vehicles (UAVs) have evolved from simple aerial photography tools into "low-altitude intelligent agents" with autonomous perception, real-time decision-making, and swarm collaboration capabilities. UAVs are not only integrated carriers of cutting-edge technologies but also reshaping operational paradigms in fields such as emergency rescue, logistics delivery, and environmental monitoring by constructing an integrated air-ground-space collaborative network. Data-driven UAV collaborative models are significantly improving task execution efficiency and system adaptability in complex scenarios through dynamic path planning, real-time resource scheduling, and distributed intelligent processing.
[0003] To protect drone security, many traditional security technologies, such as authentication, encrypted transmission, and intrusion detection, are widely used in drone equipment and swarm networks to ensure the confidentiality and integrity of transmitted and static data. However, traditional centralized protection methods are limited by high bandwidth backhaul energy consumption, cloud-based centralization leading to potential leaks, and data silos hindering collaboration, failing to achieve satisfactory training results in complex and diverse drone scenarios. To address these issues, Federated Learning (FL) technology has been extensively studied by experts and scholars, resulting in a wealth of literature providing new insights for drone security. First proposed by Google in 2016, FL is a distributed machine learning technology that allows multiple participants to collaboratively train a high-precision global model while maintaining data locality. Drone training based on federated learning only requires local model training using onboard computing power, then participating in global aggregation as parameters or gradients, without uploading original high-resolution images or remote sensing coordinates. This reduces the amount of data transmitted back to one percent of its original size, significantly alleviating the pressure on air-to-ground link bandwidth and the conflict between flight energy consumption.
[0004] While federated learning offers significant advantages for drone swarms, its practical application still faces multiple challenges. After completing local training and model transmission, federated learning for drone swarms enters the global aggregation phase, which also faces multi-dimensional challenges that directly impact the overall effectiveness of collaborative learning. On the one hand, due to differences in tasks, hardware, and environments, the local data of drones exhibits significant heterogeneity in distribution, quality, and scale. If traditional equal-weighted aggregation strategies are used, it is difficult to fairly measure the data contributions of each client, affecting not only model performance optimization but also weakening the fairness of system participation. On the other hand, constrained by the dynamic and unstable wireless communication environment, networks often experience high latency, packet loss, and even connection interruptions, leading to incomplete model updates or failure to synchronize in a timely manner. Simultaneously, the system faces the potential threat of malicious nodes injecting abnormal parameters, further jeopardizing the robustness and security of the global model. These challenges collectively increase the difficulty of reliably deploying drone federated learning in complex real-world scenarios. Therefore, how to effectively mitigate heterogeneous bias and resist malicious behavior has become a core scientific issue for the large-scale commercial application of drone federated learning. Summary of the Invention
[0005] Unmanned aerial vehicles (UAVs) have demonstrated significant application potential in emergency rescue and dynamic collaboration scenarios due to their flexible deployment and dynamic coverage. However, the differences in data distribution, performance, and reliability among heterogeneous UAV nodes can easily lead to low training efficiency and model bias, thereby affecting the fairness and robustness of the overall system. To address the issues of high data heterogeneity and abnormal model updates in UAV scenarios, this invention designs a fair weighted aggregation algorithm based on data contribution (FWA-FL) in federated learning.
[0006] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A fair weighted aggregation method based on data contribution in federated learning, comprising the following steps:
[0007] Step 1: Extract core metrics from the local data of the drone client, calculate the KL divergence between the data distribution and the target distribution, and upload the basic information and divergence values to the server; obtain and transmit the local data distribution of each client to the server. Local data volume KL divergence of data distribution At the same time, the server synchronously obtains the client's local model. ;
[0008] Step 2, based on the server information obtained in Step 1 , The data distribution weights and data volume weights are calculated using the exponential decay function and normalization method, respectively; thus, the data distribution weights for each client are obtained. and data volume weight ;
[0009] Step 3, based on the results obtained in Step 2 and The KL divergence is used to measure the deviation of the weight distribution from the uniform distribution. Influence factors on data distribution and data volume are calculated, and a comprehensive data contribution evaluation model is constructed by combining the dual weights and influence factors. The influence factors on data distribution and data volume are then obtained. , and comprehensive data contribution value ;
[0010] Step 4, based on the client-side local model obtained from the server in Step 1. Parameters, through The Mahalanobis distance is calculated using the model gradient to quantify the deviation of each client's local model from the global parameter distribution; thus, the Mahalanobis distance for each client is obtained. and the mean of Mahalanobis distance Standard deviation ;
[0011] Step 5, based on the results obtained in Step 4 , , By setting a filtering threshold using the standard deviation multiple, abnormal clients with large deviations are removed, and their data contribution values are set to 0; thus, the filtered client data contribution values are obtained.
[0012] Step 6: Based on the filtered client data contribution values obtained in Step 5, calculate the final aggregation weight using a normalization method, and combine it with the client-side local model obtained in Step 1. The parameters complete the weighted aggregation of the global model, resulting in the final aggregate weights for each client. and the Global model of wheels .
[0013] In some possible implementations, step 1 specifically involves:
[0014] Step 1.1, each drone client determines its local data distribution. and local data volume Due to the limited availability of drone resources, during the training process and Remain unchanged;
[0015] Step 1.2, Determine the target distribution Initial round To ensure an even distribution, subsequent rounds The aggregate weights from the previous round;
[0016] Step 1.3, the client calculates the local data distribution. With target distribution The KL divergence is given by the formula: ;
[0017] Step 1.4, the client will transfer the local basic information, i.e. and KL divergence Local model The parameters are uploaded to the server uniformly, and no additional complex calculations are performed locally.
[0018] In some possible implementations, step 2 specifically involves:
[0019] Step 2.1, Calculate the data distribution weights The KL divergence is mapped to probability weights using an exponential decay function. The larger the KL divergence, the lower the weight percentage. The formula is as follows:
[0020] ;
[0021] in, This is the sensitivity parameter, with a default value of 1. The larger the value, the stronger the penalty for clients with large distribution differences;
[0022] Step 2.2, Calculate the data volume weights Normalize the data volume of each client, with higher weights for larger data volumes to fully utilize the information value of large-scale data. The formula is as follows:
[0023] .
[0024] In some possible implementations, step 3 specifically involves:
[0025] Step 3.1, Set the baseline target distribution Calculate the data distribution weight distribution respectively Data volume weight distribution and KL divergence , ;
[0026] Step 3.2, calculate the impact factor , The sum of the two is 1, achieving a dynamic balance of the two-dimensional weights. The formula is: , ;
[0027] Step 3.3: Construct a data contribution evaluation model and calculate the comprehensive data contribution value of each client. The formula is: .
[0028] In some possible implementations, step 4 specifically involves:
[0029] Step 4.1: Select the local model uploaded by the client in Step 1. Model gradient As a computational object;
[0030] Step 4.2, calculate the Mahalanobis distance for each client. The formula is: ;in, It is for all clients The mean vector, Let covariance matrix be the variance matrix. It is the transpose matrix;
[0031] Step 4.3, calculate the mean of the Mahalanobis distance for all clients. Standard deviation The formula is: , .
[0032] In some possible implementations, step 5 specifically involves:
[0033] Step 5.1, Set the filtering threshold ,in These are constants selected based on system sensitivity and performance.
[0034] Step 5.2, compare the performance of each client. and ,like > The client was identified as abnormal.
[0035] Step 5.3: Combine the data contribution values obtained from Step 3 for all abnormal clients. Reduced to 0, normal clients remain unchanged. The result remains unchanged, yielding the filtered client data contribution value.
[0036] In some possible implementations, step 6 specifically involves:
[0037] Step 6.1: Normalize the filtered client data contribution values obtained in Step 5 to obtain the final aggregate weight of each client. The formula is: ;
[0038] Step 6.2, the server according to For each client obtained in step 1 No. Local model of wheels Perform weighted aggregation to obtain the first... Global model of wheels The formula is: .
[0039] The beneficial effects of this invention are as follows: To achieve fairness in the training process of UAVs, the data distribution and volume of clients are selected as indicators, and the differences between indicator distributions and the indicator influence factors are measured by calculating the Kullback-Leibler (KL) divergence between indicators. A data contribution evaluation model is constructed based on this, accurately reflecting the unique value of each client's data and its contribution to the training process. To address issues such as incomplete data and outliers during aggregation, Mahalanobis distance is used to calculate the deviation of the client's local model, filtering out clients with large deviations to achieve robust aggregation. Experiments show that the model accuracy of FWA-FL on the MNIST and CIFAR10 datasets of the ResNet18 model is 97.81% and 76.6%, respectively, which is about 2-9% higher than the comparison scheme. Attached Figure Description
[0040] Figure 1 A diagram illustrating a fair weighted aggregation framework based on data contribution in federated learning;
[0041] Figure 2 Flowchart for building a data contribution assessment model;
[0042] Figure 3 A flowchart for robust aggregation;
[0043] Figure 4 Concentration parameter Impact on model accuracy (%);
[0044] Figure 5 for , The trend of change in model accuracy (%) over time;
[0045] Figure 6 The accuracy variations of the FWA-FL scheme compared to the three baseline schemes are shown. Detailed Implementation
[0046] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0047] 1. Scheme Design
[0048] This invention designs a fair, weighted, robust aggregation scheme based on data contribution evaluation, the framework of which is shown in the figure below. Figure 1 As shown in the diagram. Within this framework, the main participants are one server and N drone clients. During the local training phase on the drone clients, the amount of data used to build the evaluation model is... and data distribution Use initial local data on the client. Due to the limited resources of drones and privacy requirements, the amount of local data on the client is limited. and data distribution It remains unchanged. During each training round, the client locally computes the data distribution. With target distribution KL divergence between them, target distribution The weighted average data distribution among clients is used. The weights in the initial round are evenly distributed, and the weights in each subsequent round are the weights calculated in the previous round. The client uploads the KL divergence of the data distribution and the amount of data to the server, which then performs data contribution evaluation and robust aggregation to achieve dynamic weighted aggregation until the model converges, reducing the computational overhead of the drone client.
[0049] like Figure 1 As shown, this invention relates to two entities:
[0050] Client: Calculate local data distribution With target distribution The KL divergence, the divergence value and data size Uploaded to the server;
[0051] Server: Based on all clients , The weights of data volume and distribution for each client are calculated, and then the influence factors of data volume and distribution are calculated to construct a data contribution evaluation model. Further, the local model for each client is calculated. Mahalanobis distance, using Clients with large deviations are filtered out, new client weights are calculated, and robust weighted aggregation is finally achieved.
[0052] 1.1 Constructing a Data Contribution Evaluation Model
[0053] In the model aggregation phase of federated learning, the local data provided by heterogeneous UAV devices often varies significantly in both quality and quantity due to differences in task allocation, hardware configuration, and environment. Traditional average aggregation strategies cannot effectively identify and measure the differentiated contributions of different data sources to the global model, potentially leading to model convergence to a suboptimal solution or even causing result bias. To address these issues, this invention constructs a dual-dimensional contribution evaluation mechanism based on data distribution and data quantity. By synergistically quantifying the differences between these two dimensions, it dynamically balances the impact of data quality and quantity on model training, thereby improving the accuracy of aggregation. The complete process based on data contribution evaluation is as follows: Figure 2 As shown.
[0054] This invention comprises one server and N drone clients, with the data distribution for each client as follows: The data size is Data distribution and data volume are represented by u and v, respectively, and the influence factor is... , .
[0055] Suppose the client dataset is divided into M classes, calculate the data distribution for each client. The weighted average distribution of clients As the target distribution, the weights are the weights calculated in the previous training round. The initial round weights are evenly distributed. The KL divergence from the target distribution to the data distribution is calculated for each client, representing the magnitude of the difference in data distribution. The KL divergence is calculated as follows:
[0056] .
[0057] In the collaborative training process of federated learning, the system should focus more on learning client data that is more consistent with the global data distribution to reduce model bias introduced by distribution differences. To this end, this invention uses an exponential decay function to map the KL divergence between each client data distribution and the global target distribution into probability weights, ensuring that clients with greater distribution differences have a lower proportion in weight allocation. Each client has a weight distribution... The weights in the formula are calculated as follows:
[0058] .
[0059] in, This is a sensitivity parameter; the default value is 1. (The rest of the text appears to be a typo and can be left as is.) Adjust the severity of punishment flexibly. The larger the data distribution, the smaller the weight of the client, and the greater the penalty for the client with large data distribution differences; conversely, the smaller the data distribution, the smaller the penalty.
[0060] In the clients participating in training, the size of their local data directly affects their contribution to the global model. (Regarding probability distribution...) The middle allocates its data volume to each client. The weights are proportional; the more data samples a client holds, the higher its weight, thus making fuller use of the information value of large-scale data during the aggregation process. Each client has a weight distribution... The weights are calculated as follows:
[0061] .
[0062] To distribute evenly Using the baseline target distribution, this mechanism quantifies the actual impact of data distribution and data volume on model aggregation by measuring the deviation between the current weight distribution and the uniform distribution on the client side. This mechanism dynamically assesses and balances the relative importance of these two factors in contribution evaluation, thereby achieving a more accurate assessment of the value of heterogeneous data. The specific formula for calculating the impact factor is as follows:
[0063] , .
[0064] Based on the impact factor, a data contribution evaluation model was constructed, yielding the following results:
[0065] .
[0066] 1.2 Robust Polymerization
[0067] This invention uses Mahalanobis distance to calculate the deviation of the client's local model, thereby achieving robust aggregation. It uses the local model. Model gradient The flowchart for calculating Mahalanobis distance and robust aggregation is as follows: Figure 3 As shown.
[0068] To effectively identify and filter abnormal model updates caused by communication anomalies or malicious attacks, a deviation detection mechanism based on Mahalanobis distance is introduced. This is achieved by calculating the deviation of the local model uploaded by each client. The system can quantitatively evaluate the reliability of each local update by calculating the statistical distance between the parameters and the global reference distribution. (Client-side local model) The Mahalanobis distance is:
[0069] .
[0070] in, It is for all clients The mean vector, Let covariance matrix be the variance matrix. This is the transpose of the matrix.
[0071] By incorporating the parameter covariance structure, the client-side local model can be measured more accurately. The statistical distance between the target and the global parameter mean vector. Smaller updates are typically highly consistent with the overall parameter distribution, indicating that their source is reliable; while Larger updates that deviate significantly from the group distribution suggest possible communication errors or malicious disturbances and should be filtered out.
[0072] Mahalanobis distance mean vector and standard deviation The calculation is as follows:
[0073] , .
[0074] threshold Set as a multiple of the standard deviation of MD. , It is a constant selected based on the required sensitivity level and system performance.
[0075] Finally, use Filtering out clients with significant deviations ensures improved robustness of the federated learning model training against malicious attacks and data heterogeneity. The data contribution evaluation value of the filtered clients is reduced to 0. , These are the clients that were filtered out. The weights of the clients participating in model aggregation are calculated as follows:
[0076] .
[0077] The server depends on the client's weight. The weighted aggregation is performed as follows:
[0078] .
[0079] in, For the client No. Pruning predictor trained in rounds, For the first The global model trained in rounds.
[0080] 2. Experimental Analysis
[0081] 2.1 Experimental Setup
[0082] CIFAR10 and MNIST were used as experimental datasets to simulate images and text information collected by drones in real-world scenarios. The client data distribution and data size were calculated from the client's local dataset.
[0083] The experiments were conducted using two neural network models, ResNet18 and ShuffleNet. ResNet18 was used for scenarios with high accuracy requirements and relatively abundant computing resources, while ShuffleNet was used for edge computing devices, with low memory consumption and low power consumption. ResNet18 was used as the baseline model for this part, verifying that the invention can also work effectively on models with higher computational demands; ShuffleNet is more natural and closer to the complex scenarios of actual drones with limited computing resources, short flight time, and limited storage resources.
[0084] This section primarily focuses on experiments with heterogeneous edge clients, with the dataset distribution set to non-independent and identically distributed (non-IID). The Latent Dirichlet Allocation (LDA) method is used to construct the non-IID data, employing a concentration parameter in LDA. To control data heterogeneity. This invention employs [a specific method / approach] in experiments. The standard settings are used to construct non-IID data.
[0085] The experiment simulated 10 clients, and all clients were selected for FL training. The experiment was conducted on a GV100 GPU server, and each experiment was executed three times to calculate the average metric. The specific experimental environment and parameter settings are shown in Table 1.
[0086] Table 1 Experimental Environment and Parameter Settings
[0087]
[0088] 2.2 Parameter Sensitivity Analysis
[0089] This section explores the impact of the heterogeneity of drone clients and the number of clients N on model accuracy.
[0090] The impact of this factor is significant. In real-world scenarios, the geographical environment, weather conditions, and mission types of drones vary, resulting in inherently heterogeneous data. To systematically evaluate the impact of this factor on training effectiveness, this section uses the LDA method to simulate different data distribution states and adjusts its concentration parameters. To control the level of heterogeneity in client data, Specifically, The smaller the value, the more significant the differences in data distribution among clients, i.e., the higher the degree of heterogeneity; conversely, The larger the value, the more uniform the data distribution tends to be. This is achieved by comparing different... By conducting comparative experiments with different values, we can quantitatively analyze the impact of heterogeneity on the final accuracy of the federated learning model.
[0091] from Figure 4 It can be seen that, with the LDA concentration parameter As the value increased from 0.1 to 10, the model accuracy for each dataset gradually increased and then stabilized. This indicates that the more significant the differences in data distribution among clients (…), the higher the accuracy of the model across datasets. The smaller the value, the lower the model accuracy. Meanwhile, by observing the trend of the average curve, it can be clearly seen that when... When the value rises to 0.5, the slope of the curve becomes significantly slower. Therefore, to effectively balance the relationship between client data heterogeneity and federated learning model accuracy in drone scenarios, this invention selects... The concentration of LDA was used as an experimental parameter to more realistically simulate the actual application scenario of drone federated learning.
[0092] The impact of N. In real-world drone collaborative scenarios, the number of clients participating in training varies due to factors such as network conditions, equipment availability, and energy constraints. This uncertainty in the scale of participation directly affects the model aggregation effect and final accuracy, posing a key challenge that must be addressed in practical deployments. To systematically evaluate the impact of the number of participating clients on model performance, this section sets different client scales. Comparative experiments were conducted to investigate how changes in the number of clients affect the model's convergence speed and final accuracy, providing empirical evidence for the training configuration of real-world systems in dynamic participation environments.
[0093] Table 2. Impact of the number of clients N on model accuracy (%)
[0094]
[0095] Note: The training model is ShuffleNet.
[0096] As shown in Table 2, the accuracy of the model on both the MNIST and CIFAR10 datasets decreases with the increase of the number of clients N. This is because the increased number of clients dilutes the aggregation weights of individual clients, amplifies the gradient direction bias caused by data heterogeneity, and reduces the signal-to-noise ratio of the aggregation process, negatively impacting the update quality of the global model. Simultaneously, the model's convergence speed also slows significantly. This is because as data is distributed across more clients, the amount of local data available to each client decreases, leading to a decline in the statistical stability of local updates. Therefore, more communication rounds are required for the global model to converge. Considering factors such as model performance, convergence efficiency, scenario representativeness, and experimental comparability, this experiment sets the number of clients to N=10.
[0097] Based on the above analysis, this experiment... , The model accuracy was tested under the specified settings, and the changes in model accuracy with each experimental round are as follows: Figure 5 As shown.
[0098] 2.3 Comparative Experiment
[0099] This section aims to compare and analyze the performance of our proposed solution, FWA-FL, with advanced solutions in related fields in heterogeneous data environments. Specifically, this section selects four representative federated learning aggregation schemes for comprehensive comparative evaluation: FedAvg, FedGT, EmbracingFL, and FedAF. FedAvg is a traditional federated learning framework; FedGT aims to identify malicious clients in FL through secure aggregation while protecting privacy; EmbracingFL is a general-purpose FL framework that utilizes a hierarchical partial training method to enable weak clients to participate in training; FedAF trains the global model through client collaborative learning of condensed data and soft labels, fundamentally avoiding client drift and improving data quality and model performance in highly heterogeneous data environments.
[0100] Comparative experiments were conducted on the ResNet18 model to analyze three indicators: the number of convergence rounds, convergence time, and model accuracy. The specific data are shown in Table 3.
[0101] Table 3. Accuracy Comparison of FWA-FL and Comparative Models
[0102]
[0103] As shown in Table 3, the model accuracy of FWA-FL in this invention is improved by approximately 2% to 9% on the MNIST dataset and by approximately 1.5% to 5% on the CIFAR10 dataset, demonstrating a significant accuracy advantage. On the MNIST and CIFAR10 datasets, the number of training epochs required by FWA-FL is similar to that of FedAvg, FedGT, and FedAF, but significantly less than that of EmbracingFL. This indicates that while improving model accuracy, the FWA-FL scheme maintains a relatively fast convergence speed. Regarding convergence time, FWA-FL's convergence times on the MNIST and CIFAR10 datasets are 5 hours and 35 minutes and 6 hours and 23 minutes, respectively. Compared to FedAvg, FedGT, and EmbracingFL, FWA-FL's convergence time is slightly longer, but compared to FedAF, which also incorporates a privacy protection mechanism, it is only 1 hour and 14 minutes longer on the MNIST dataset and 6 hours and 52 minutes shorter on the CIFAR10 dataset, showing a clear advantage. The reason for the long convergence time is that FWA-FL introduces a data contribution evaluation module and a robust aggregation module in each round of aggregation. While improving the model's accuracy and anti-interference ability, the two bring additional computational overhead, which is a reasonable trade-off between accuracy and efficiency.
[0104] Considering all three metrics, FWA-FL demonstrates a significant advantage in model accuracy and maintains strong competitiveness in the number of convergence epochs. The increased convergence time is a necessary consequence of introducing a secure aggregation mechanism. Compared to FedGT and FedAF, which also prioritize privacy and robustness, FWA-FL achieves a better balance between accuracy improvement and convergence efficiency, making it suitable for federated learning scenarios that require high model accuracy while also balancing data heterogeneity and privacy security.
[0105] 2.4 Ablation Experiment
[0106] This section analyzes the roles of the data contribution assessment model and robust aggregation modules in the FWA-FL scheme through ablation experiments. Three control schemes were set up: FFL, which uses only contribution assessment weights for direct aggregation; AFL, which uses only robust aggregation and ignores contribution assessment; and the baseline method LDPTL-FL, which uses neither contribution assessment nor robust aggregation. By systematically comparing the experimental results of the above schemes with the complete FWA-FL, the independent contributions and synergistic enhancement effects of each module on model accuracy, convergence stability, and anti-interference ability can be clearly identified. The accuracy variation of the FWA-FL scheme and the three baseline schemes is shown in the figure below. Figure 6 As shown.
[0107] Figure 6 As can be seen, the FWA-FL scheme achieved high model accuracy in all four experimental settings, validating the effectiveness of the collaborative work between the data contribution assessment and robust aggregation modules. In the CIFAR10-resnet18, MNIST-resnet8, and MNIST-shufflenet experimental settings, the FWA-FL scheme achieved the highest accuracy, approximately 0.1-3% higher than the other three baseline schemes. In the CIFAR10-shufflenet experimental setting, it was only 1.13% lower than the FFL baseline scheme and approximately 0.95% higher than the other two baseline schemes. In summary, the robust aggregation module contributes more significantly to accuracy improvement in complex scenarios, while the data contribution assessment module provides additional gain to model accuracy while ensuring training fairness. The combination of these two modules gives FWA-FL stronger generalization ability and robustness across different datasets and model architectures.
[0108] 2.5 Running Time Overhead
[0109] This section evaluates the practical feasibility of the proposed scheme by statistically analyzing the time consumption during federated learning training. Experiments recorded the average time consumption of each stage of local training on the client side and on the server side in each training round. Fine-grained decomposition was performed on the two key modules of data contribution evaluation model building and robust aggregation on the server side to comprehensively verify the actual performance of the scheme in terms of computational efficiency. The average time consumption per round for each model on different datasets is shown in Table 4.
[0110] Table 4 Average time cost per round of model training
[0111]
[0112] Table 4 shows that the FWA-FL scheme, under the four experimental configurations, kept the total time cost per round within 170 seconds, demonstrating good practicality and deployment feasibility. Regarding the local training time on the client side, the time taken in the four experimental settings ranged from 40 to 60 seconds, effectively meeting the deployment requirements of resource-constrained drone nodes. As for the time consumption of each module on the server side, the data contribution evaluation model construction, as the main computational step on the server side, has its overhead concentrated on the server side and does not occupy local drone resources. For the ResNet18 and ShuffleNet network structures, the module's time consumption was approximately 38-42 seconds and 30 seconds respectively, having no direct impact on the operational burden of the drone nodes. The robust aggregation module's time consumption remained low across all configurations, with ResNet18 at approximately 29.82 seconds, and ShuffleNet at only 5.69 seconds and 6.44 seconds respectively. This indicates that the abnormal client filtering mechanism based on Mahalanobis distance has a low computational cost and can effectively identify and eliminate malicious gradients uploaded by abnormal drone nodes without significantly increasing server processing latency.
[0113] In summary, the FWA-FL scheme concentrates the main computational overhead on the server side, with the client only undertaking local model training tasks, effectively adapting to the practical constraints of limited computing power and bandwidth of UAV nodes. Experimental results verify the practical feasibility and engineering deployment value of this scheme in UAV federated learning scenarios.
[0114] 3. Conclusion
[0115] This invention addresses the challenges of data heterogeneity and communication unreliability encountered during the aggregation phase of UAV swarm federated learning. It proposes a fair, weighted, robust aggregation scheme based on data contribution evaluation. First, by combining a multi-index evaluation mechanism using KL divergence, the scheme quantifies the local data contribution of clients from two dimensions: data distribution and data volume. An influence factor is then introduced to dynamically balance the weights of these two factors, achieving fair aggregation in heterogeneous data environments. Furthermore, an anomaly detection mechanism based on Mahalanobis distance is introduced. This mechanism identifies and filters outlier updates caused by communication anomalies or malicious attacks by calculating the statistical deviation of the client's local model, thereby enhancing the robustness and security of the aggregation process. Experimental results demonstrate that this scheme effectively ensures the fairness of aggregation while improving model convergence performance, providing key technical support for efficient and reliable federated collaborative learning of UAV swarms in complex and dynamic environments.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A fair weighted aggregation method based on data contribution in federated learning, characterized in that, The steps include the following: Step 1: Extract the core indicators of the local data from the drone client, calculate the KL divergence between the data distribution and the target distribution, and upload the basic information and divergence values to the server. Obtain and transmit the local data distribution of each client to the server. Local data volume KL divergence of data distribution At the same time, the server synchronously obtains the client's local model. ; Step 2, based on the server information obtained in Step 1 , The data distribution weight and data volume weight are calculated using the exponential decay function and the normalization method, respectively. Obtain the data distribution weights for each client. and data volume weight ; Step 3, based on the results obtained in Step 2 and The KL divergence is used to measure the deviation of the weight distribution from the uniform distribution. Influence factors on data distribution and data volume are calculated, and a comprehensive data contribution evaluation model is constructed by combining the dual weights and influence factors. The influence factors on data distribution and data volume are then obtained. , and comprehensive data contribution value ; Step 4, based on the client-side local model obtained from the server in Step 1. Parameters, through The model gradient is used to calculate the Mahalanobis distance, which quantifies the degree of deviation between the local model of each client and the global parameter distribution. Obtain the Mahalanobis distance for each client. and the mean of Mahalanobis distance Standard deviation ; Step 5, based on the results obtained in Step 4 , , By setting a filtering threshold using the standard deviation multiple, abnormal clients with large deviations are removed, and their data contribution values are set to 0; thus, the filtered client data contribution values are obtained. Step 6: Based on the filtered client data contribution values obtained in Step 5, calculate the final aggregation weight using a normalization method, and combine it with the client-side local model obtained in Step 1. The parameters complete the weighted aggregation of the global model; Obtain the final aggregate weights for each client. and the Global model of wheels .
2. The fair weighted aggregation method based on data contribution in federated learning according to claim 1, characterized in that, Step 1 is as follows: Step 1.1, each drone client determines its local data distribution. and local data volume Due to the limited availability of drone resources, during the training process and Remain unchanged; Step 1.2, Determine the target distribution Initial round To ensure an even distribution, subsequent rounds The aggregate weights from the previous round; Step 1.3, the client calculates the local data distribution. With target distribution The KL divergence is given by the formula: ; Step 1.4, the client will transfer the local basic information, i.e. and KL divergence Local model The parameters are uploaded to the server uniformly, and no additional complex calculations are performed locally.
3. The fair weighted aggregation method based on data contribution in federated learning according to claim 2, characterized in that, Step 2 is as follows: Step 2.1, Calculate the data distribution weights The KL divergence is mapped to probability weights using an exponential decay function. The larger the KL divergence, the lower the weight percentage. The formula is as follows: ; in, This is the sensitivity parameter, with a default value of 1. The larger the value, the stronger the penalty for clients with large distribution differences; Step 2.2, Calculate the data volume weights Normalize the data volume of each client, with higher weights for larger data volumes to fully utilize the information value of large-scale data. The formula is as follows: 。 4. The fair weighted aggregation method based on data contribution in federated learning according to claim 3, characterized in that, Step 3 specifically involves: Step 3.1, Set the baseline target distribution Calculate the data distribution weight distribution respectively Data volume weight distribution and KL divergence , ; Step 3.2, calculate the impact factor , The sum of the two is 1, achieving a dynamic balance of the two-dimensional weights. The formula is: , ; Step 3.3: Construct a data contribution evaluation model and calculate the comprehensive data contribution value of each client. The formula is: .
5. The fair weighted aggregation method based on data contribution in federated learning according to claim 4, characterized in that, Step 4 specifically involves: Step 4.1: Select the local model uploaded by the client in Step 1. Model gradient As a computational object; Step 4.2, calculate the Mahalanobis distance for each client. The formula is: ;in, It is for all clients The mean vector, Let covariance matrix be the variance matrix. It is the transpose matrix; Step 4.3, calculate the mean of the Mahalanobis distance for all clients. Standard deviation The formula is: , .
6. The fair weighted aggregation method based on data contribution in federated learning according to claim 5, characterized in that, Step 5 specifically involves: Step 5.1, Set the filtering threshold ,in These are constants selected based on system sensitivity and performance. Step 5.2, compare the performance of each client. and ,like > The client was identified as abnormal. Step 5.3: Calculate the combined data contribution value obtained from Step 3 for all abnormal clients. Reduced to 0, normal clients remain unchanged. The result remains unchanged, yielding the filtered client data contribution value.
7. The fair weighted aggregation method based on data contribution in federated learning according to claim 6, characterized in that, Step 6 specifically involves: Step 6.1: Normalize the filtered client data contribution values obtained in Step 5 to obtain the final aggregate weight of each client. The formula is: ; Step 6.2, the server according to For each client obtained in step 1 No. Local model of wheels Perform weighted aggregation to obtain the first... Global model of wheels The formula is: .