Decentralized federated learning aggregation method based on trust mechanism and consensus step length
Patent Information
- Application Number
- CN202411893523.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2044-12-20
AI Technical Summary
[0005]为了克服现有的去中心化联邦学习技术中存在的各节点间协作失调,模型聚合时的误差积累等问题,本发明提供了一种基于信任机制和共识步长的去中心化联邦学习聚合方法
针对联合多方用户的联邦学习场景,一般采用的是客户端/服务器架构,服务器则作为联邦学习的中心进行协调,而去中心化联邦学习则是支持参与联邦学习的多方客户端之间自行通信,能够有效处理不同节点上的异构数据,参与方的原始数据不需要共享给其他参与方,只交流模型参数,而本发明通过信任机制和聚合策略的结合,确保多方用户的模型在面对多样化数据时仍然能够保持较高的准确性和一致性;首先,本发明通过计算余弦相似度的方式动态调整每个节点在模型聚合中的贡献,能够有效减少极端节点对全局模型的影响,从而提升模型在不同数据分布下的鲁棒性,特别是在非独立同分布(Non-IID)环境中;另外,本发明通过动态的共识步长设计,去中心化联邦学习能够在不同阶段灵活调整模型参数的更新速率,使得算法在早期快速收敛,同时在后期充分利用本地数据,提高了整体训练效率;本发明提供的去中心化联邦学习架构可以适用于各种不同的设备和应用场景,各节点可以是个人用户的移动设备、边缘计算节点或云端服务器,具有很好的灵活性和可迁移性。
Smart Images

Figure CN119831071B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of federated learning technology, and in particular to a decentralized federated learning aggregation method based on trust mechanisms and consensus steps. Background Technology
[0002] Federated learning faces numerous challenges, such as slow training speed, high resource consumption, and susceptibility to extreme client influence. In the context of decentralized federated learning, current technologies primarily rely on centralized servers for global model parameter aggregation and updates, or the use of decentralized Gossip protocols for model information propagation. However, these methods suffer from several significant technical problems and drawbacks: First, centralized architectures suffer from single points of failure and communication bottlenecks. In centralized federated learning, all participating devices must communicate with the central server, which not only increases the communication burden but also introduces the single point of failure problem of the centralized server. Once the server fails, the entire learning process will be interrupted. Furthermore, as the number of participating nodes increases, the server load and latency also rise sharply, limiting the scalability of federated learning. Second, decentralized methods suffer from low communication efficiency. Decentralized federated learning propagates model parameters between nodes through the Gossip protocol. Although this eliminates the dependence on a central server, the Gossip protocol typically uses random neighbor communication, resulting in slow information transmission speeds, and global convergence in the network requires more communication rounds. This leads to a significant increase in training time in large-scale networks, especially in cases of complex topologies or high network latency. Furthermore, it suffers from insufficient handling of non-independent, identically distributed (Non-IID) data. In many applications, data distributed across different nodes is often non-independent and identically distributed. Existing decentralized federated learning algorithms exhibit poor convergence when dealing with such heterogeneous data, and the final trained global model may not adapt well to the data distribution across all nodes. This is because the model updates of each node differ significantly, leading to error accumulation during model aggregation and making it difficult to achieve effective consensus.
[0003] CN115860150A discloses a decentralized federated learning model training method, which mainly utilizes neighbor selection to address the data heterogeneity problem in decentralized federated learning. Neighbor selection prioritizes information exchange with nodes whose local data distribution is similar, aiming to improve the model's convergence speed and robustness. However, this can lead to uneven information sharing, causing some nodes to lag in information updates, thus affecting the overall model performance. Existing research also focuses on model pruning to address the communication cost problem in decentralized federated learning. Model pruning reduces communication costs by decreasing the number of parameters, thereby improving training efficiency to some extent. However, while reducing model complexity, this method may sacrifice the model's expressive power and accuracy, especially when dealing with non-independent and identically distributed data. Furthermore, these methods face difficulties in balancing training speed, resource consumption, model robustness, and model performance in practical applications. To ensure the model can work effectively with different data distributions across nodes, relying solely on neighbor selection or model pruning often fails to meet all requirements.
[0004] Therefore, existing methods struggle to find a reasonable balance in these aspects, and there is an urgent need to explore improved aggregation methods to optimize collaboration between nodes through more flexible and adaptive strategies, thereby improving the overall performance and efficiency of decentralized federated learning in heterogeneous environments. Summary of the Invention
[0005] To overcome the problems of miscoordination among nodes and error accumulation during model aggregation in existing decentralized federated learning technologies, this invention provides a decentralized federated learning aggregation method based on trust mechanisms and consensus step sizes.
[0006] To achieve the above-mentioned objectives, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a decentralized federated learning aggregation method based on a trust mechanism and consensus step size, the method comprising: S1. Train each node using its local dataset to obtain the feature parameters generated by each node; the feature parameters include feature output and model parameters. S2. Send the feature parameters of each node to the neighboring nodes; S3. Each node calculates the cosine similarity of the feature output based on the feature parameters of the received neighbor nodes, adjusts the trust level of each neighbor node according to the cosine similarity, allocates the aggregation weight of each neighbor node according to the trust level, and updates the model parameters by fusing them according to the aggregation weight. During the update process, the update interval is controlled by the consensus step size. S4. Dynamically update the consensus step size based on the exponential scheduler, and repeat S1 to S4 until the consensus step size reaches the preset convergence value to complete the aggregation.
[0008] According to one specific implementation, in the above aggregation method, adjusting the trust level of each neighbor node based on the cosine similarity specifically includes: When the cosine similarity exceeds a preset threshold, the trust level is increased; When the cosine similarity is lower than a preset threshold, the trust level is reduced.
[0009] According to one specific implementation, in the above aggregation method, the process of calculating the trust level includes: , in, Let be the trust level of the i-th node towards the j-th neighbor node during the t-th round of updates. Let be the trust level of the i-th node towards its j-th neighbor node during the (t+1)-th round update. For learning rate, The trust increment is calculated using the following formula: , in, This represents the feature output of the i-th node at time t. This represents the feature output of the j-th neighbor node at time t. Let cosine similarity be the feature output of the i-th node and its j-th neighbor node. For cosine similarity variables, The preset threshold, , These are constant coefficients.
[0010] According to a specific implementation, in the above aggregation method, the trust level is provided with an upper limit threshold and a lower limit threshold; when the increased trust level exceeds the upper limit threshold, the upper limit threshold is used; when the decreased trust level is less than the lower limit threshold, the lower limit threshold is used.
[0011] According to one specific implementation, in the above aggregation method, the aggregation weight fusion model parameters are updated, and the calculation formula is as follows: , in, Let be the model parameters for the i-th node in round t. For learning rate, It is a loss function The gradient of the local dataset at the i-th node. Let be the model parameters for the j-th neighbor node in round t. For consensus step size, For trust level, These are the model parameters updated for the i-th node in round t+1.
[0012] According to one specific implementation, in the above aggregation method, the communication used to send the feature parameters of each node to neighboring nodes includes the Gossip protocol.
[0013] According to one specific implementation, in the above aggregation method, dynamically updating the consensus step size based on the exponential scheduler includes: The consensus step size is set based on a preset initial value, and then updated to a preset convergence value based on the exponential scheduler. The calculation formula is as follows: , , in, The consensus step size for round t, As a preset initial value, Let r be the growth rate, and r be a constant. This is the update round number at convergence. This is the preset convergence value.
[0014] According to one specific implementation, in the above aggregation method, the preset convergence value of the consensus step size is 1.
[0015] In a second aspect, the present invention provides a computer-readable medium including instructions that, when executed by a processor of a computing system, cause the computing system to perform a decentralized federated learning aggregation method based on a trust mechanism and consensus step size as described in any of the preceding claims.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: For federated learning scenarios involving multiple users, a client / server architecture is typically used, with the server acting as the central coordinator. Decentralized federated learning, however, supports independent communication between participating clients, effectively handling heterogeneous data across different nodes. Participants do not need to share their raw data; they only exchange model parameters. This invention, through a combination of trust mechanisms and aggregation strategies, ensures that the multi-user model maintains high accuracy and consistency even when facing diverse data. First, this invention dynamically adjusts the contribution of each node in model aggregation by calculating cosine similarity, effectively reducing the impact of extreme nodes on the global model and improving its robustness under different data distributions, especially in non-independent and identically distributed (Non-IID) environments. Second, through a dynamic consensus step size design, decentralized federated learning can flexibly adjust the update rate of model parameters at different stages, enabling rapid convergence in the early stages and full utilization of local data in the later stages, improving overall training efficiency. The decentralized federated learning architecture provided by this invention is applicable to various devices and application scenarios; each node can be a personal user's mobile device, edge computing node, or cloud server, offering excellent flexibility and portability. Attached Figure Description
[0017] Figure 1 A flowchart illustrating a decentralized federated learning aggregation method based on trust mechanism and consensus step size provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a decentralized federated learning framework provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the communication process of Bagua Communication provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the experimental results of changing the number of nodes provided in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the experimental results of the impact of heterogeneous data provided in an embodiment of the present invention. Detailed Implementation
[0018] The present invention will be further described in detail below with reference to experimental examples and specific embodiments. However, this should not be construed as limiting the scope of the above-mentioned subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0019] To better understand the technical solution provided by this invention, some terms are explained below.
[0020] First, decentralized federated learning (Decentralized Federated Learning) is a distributed machine learning approach designed to allow multiple devices (such as edge devices or nodes) to collaboratively train models without centralized data. In traditional federated learning, a central server typically coordinates model updates, with each node uploading its locally computed model parameters to the central server for aggregation. In Decentralized Federated Learning, however, there is no central server; nodes communicate directly with each other, sharing model parameters. This approach reduces dependence on a central server, enhances system privacy, lowers communication bottlenecks, and improves fault tolerance and scalability. Each node independently trains its model on local data and then exchanges updated model parameters with neighboring nodes. Through multiple rounds of communication and parameter exchange, the model across the entire system gradually converges to consistency.
[0021] The role of consensus step size in decentralized federated learning has been extensively studied. It effectively controls the fusion rate of model parameters between nodes and their neighbors during each round of model updates. This concept can be traced back to decentralized optimization algorithms such as EXTRA and Push-Sum protocols, where consensus step size is used as a key hyperparameter to control the information fusion rate in multi-node systems. Its core idea is to ensure the stability and global consistency of information propagation, while avoiding excessively fast or slow model convergence.
[0022] In practical applications, static consensus step size settings are not always optimal, especially when dealing with non-independent identically distributed (non-IID) data. Literature has pointed out that static step sizes may lead to excessively rapid model fusion in heterogeneous data scenarios, thus causing local optima. Therefore, an increasing number of studies tend to adopt dynamic consensus step size adjustment strategies. For example, Solmaz et al. proposed a dynamic consensus mechanism in which the consensus step size gradually increases based on the differences between nodes, ensuring that the system retains more local information in the early stages and accelerates convergence later by increasing the step size.
[0023] For example, in the research of Kolomvakis et al., consensus step size was applied to the distributed optimization problem of smart grids, simulating the process of multiple nodes (i.e., smart devices) training a model without relying on a central controller. By adjusting the consensus step size, the system can integrate heterogeneous data sources in the power grid environment, enabling each node to gradually adapt to its differences and ultimately achieve global optimization.
[0024] Another related application comes from Cai et al., who employed dynamic consensus step size scheduling in a decentralized Internet of Things (IoT) environment to address the challenge of heterogeneous data from a large number of edge devices. By adjusting the consensus step size, the system can avoid device parameters converging too quickly in the early stages of training, while accelerating convergence in the later stages, thus improving the efficiency of the entire system.
[0025] The Gossip protocol is a communication protocol used for information propagation and data synchronization in distributed systems. Essentially based on peer-to-peer communication between nodes, it continuously exchanges information with neighboring nodes, eventually leading the entire network to global consensus. Due to its efficiency, robustness, and scalability, this protocol is widely used in distributed computing, decentralized networks, blockchain, and decentralized federated learning.
[0026] The basic idea of the Gossip protocol is similar to a virus propagation model: each node randomly selects a node from its set of neighboring nodes within a periodic time window and exchanges information with it (such as model parameters, local gradients, features, etc.). After the exchange, both nodes update their information and further exchange with their neighboring nodes. This process is repeated continuously until all nodes reach consensus after multiple rounds of communication.
[0027] In decentralized federated learning, the Gossip protocol is used for exchanging model parameters among nodes, eliminating the dependency on a central server. After each training round, the client exchanges its updated model parameters or feature outputs with its neighboring nodes via the Gossip protocol, thereby fusing local models. Through multiple iterations, the Gossip protocol gradually brings the model parameters of all nodes into consistency, ensuring the convergence of the global model.
[0028] In such applications, the localized communication characteristics of the Gossip protocol can reduce bandwidth consumption while maintaining system scalability. Especially in environments with large-scale heterogeneous devices (such as IoT devices) and complex network topologies, the distributed architecture of the Gossip protocol can adapt to the heterogeneity of devices, avoiding the server bottlenecks and single points of failure problems in traditional federated learning.
[0029] Specifically, the technical solutions provided by the embodiments of the present invention will be further described below.
[0030] Please refer to Figure 1 This illustration shows a flowchart of a decentralized federated learning aggregation method based on a trust mechanism and consensus step size provided by an embodiment of the present invention. The method includes: S1. Train each node using its local dataset to obtain the feature parameters generated by each node; the feature parameters include feature output and model parameters.
[0031] Each node i uses its own local dataset. D i The model is trained using samples obtained from the local optimization algorithm SGD, and the model parameters are updated accordingly. w i After training, each node generates its local feature output and calculates its local loss.
[0032] S2. Send the feature parameters of each node to the neighboring nodes.
[0033] After training, each node communicates with its neighbors to exchange model parameters and feature outputs. In this embodiment, the communication uses the Gossip protocol. This peer-to-peer communication does not rely on a central server, enhancing the system's scalability and robustness.
[0034] S3. Each node calculates the cosine similarity of the feature output based on the feature parameters of the received neighbor nodes, adjusts the trust level of each neighbor node according to the cosine similarity, allocates the aggregation weight of each neighbor node according to the trust level, and updates the model parameters by fusing the aggregation weight. During the update process, the update interval is controlled by the consensus step size.
[0035] Specifically, after acquiring the feature outputs of neighboring nodes, each node calculates the cosine similarity between its local feature output and the feature outputs of its neighboring nodes. Based on the similarity results, the node dynamically adjusts its trust in its neighbors. This is the trust mechanism proposed in this embodiment of the invention, which plays a core role in DFL by dynamically adjusting the contribution of neighbors through the similarity of feature outputs. Cosine similarity measures the alignment between two feature vectors, regardless of their magnitude. This makes it particularly useful for handling heterogeneous data: even if clients experience updates of different degrees, they are still considered aligned if their updates follow similar directions. In non-independent identically distributed settings, model outputs from different clients may exhibit significant variations. However, if the feature outputs are consistent (i.e., follow the same trend), these nodes can still be considered trustworthy neighbors. Compared to Euclidean distance or parameter-based differences, cosine similarity can better capture data heterogeneity, reduce the impact of data imbalance, and improve the aggregation process. This allows the model to converge faster and improve accuracy. Furthermore, when the cosine similarity exceeds a preset threshold, the trust is increased; when the cosine similarity is below the preset threshold, the trust is decreased. The trust update formula is as follows: .
[0036] in, Let be the trust level of the i-th node towards the j-th neighbor node during the t-th round of updates. Let be the trust level of the i-th node towards its j-th neighbor node during the (t+1)-th round update. For learning rate, Incremental trust level; Furthermore, Calculate according to the formula , in, This represents the feature output of the i-th node at time t. This represents the feature output of the j-th neighbor node at time t. Let cosine similarity be the feature output of the i-th node and its j-th neighbor node. For cosine similarity variables, The preset threshold, , These are constant coefficients.
[0037] To prevent excessive oscillations, trust levels Limited to the upper and lower limits: , After local training, each node i outputs its features. f i With each neighbor node j∈N i Feature output f j The similarity is compared, and the trust score is updated based on the trust update formula. If the similarity exceeds a threshold τ, the trust score increases: , If the similarity is below the threshold, the trust score will decrease: , When the increased trust level exceeds the upper limit threshold, the upper limit threshold is used; when the decreased trust level is less than the lower limit threshold, the lower limit threshold is used.
[0038] This reward and punishment mechanism dynamically adjusts the contribution of each neighbor node, helping the system adapt to the challenges of non-independent and identically distributed data. The trust mechanism enables the DFL system to dynamically adjust the influence of neighbor nodes in each round, ensuring the robustness of the aggregation process. This adaptability is crucial for addressing the challenges of non-independent and identically distributed data, improving convergence speed, and enhancing model performance.
[0039] Furthermore, during the aggregation phase, nodes calculate and update their model parameters based on their own and their neighbors' parameters. The aggregation formula is: , in, Let be the model parameters for the i-th node in round t. For learning rate, It is a loss function The gradient of the local dataset at the i-th node. Let be the model parameters for the j-th neighbor node in round t. For consensus step size, For trust level, These are the model parameters updated for the i-th node in round t+1.
[0040] S4. Dynamically update the consensus step size based on the exponential scheduler, and repeat S1 to S4 until the consensus step size reaches the preset convergence value to complete the aggregation.
[0041] Specifically, each node dynamically updates the consensus step size γ using an exponential scheduler. Initially, the consensus step size is set based on a preset initial value, and gradually increased to a preset convergence value with each training round. The dynamic update of the consensus step size enables the system to gradually adapt to the differences in heterogeneous data in the early stages of training and accelerate model fusion in the later stages of training.
[0042] Understandably, the consensus step size (also known as the aggregation rate) is a key hyperparameter in DFL, controlling the rate at which each node's model converges to the average of its neighboring models. A fixed consensus step size can lead to convergence problems in non-independent and identically distributed settings, either slowing down convergence or causing overfitting. To address this issue, this embodiment of the invention introduces an exponential scheduler that gradually increases the consensus step size from a preset initial value to a preset convergence value during training. In the early stages, setting a higher consensus step size leads to rapid convergence, thus ignoring valuable local information from each node. As training progresses and the models become more consistent, gradually increasing the consensus step size accelerates model fusion and ensures efficient convergence. The consensus step size update formula is: , It is the consensus step size of round T. It is a preset initial value. It is the growth rate, where r is a constant.
[0043] The step size is updated according to the above formula, and each training iteration will bring it closer to the preset convergence value: , in, This is the update round number at convergence. This is the preset convergence value.
[0044] In one possible implementation, this embodiment sets the preset initial value to 0.1 and the preset convergence value to 1.
[0045] This gradual increase allows the system to balance exploration and exploitation, ensuring early independence while promoting faster convergence later. The exponential scheduler ensures that the DFL system maintains sufficient independence in the early stages, avoiding local optima, and converges rapidly to the global solution as training progresses.
[0046] To better understand the technical solution provided by this invention, please refer to... Figure 2 This diagram illustrates a decentralized federated learning framework provided by an embodiment of the present invention. This framework is based on a trust system with a reward and punishment mechanism and a dynamic consensus step size. In this architecture, each node exchanges model information with its neighbors through peer-to-peer communication, without relying on a central server for coordination. To address the challenges posed by heterogeneous data distribution, the present invention introduces a trust mechanism and a consensus step size in model aggregation. The trust mechanism measures the similarity of feature outputs between the client and its neighboring nodes and assigns different weights to the contributions of the model parameters; the consensus step size controls the rate of parameter updates to balance the model fusion progress.
[0047] It should be noted that the decentralized federated learning architecture provided by this invention can be applied to various devices and application scenarios. Each node can represent any computing device, such as a server, personal computer, computer workstation, smartphone, tablet, smart camera, smart car or other types of cellular phone, media consumption device, wearable device, set-top box, game console, etc., or a personal user's mobile device, edge computing node, client or cloud server. It should be noted that the nodes of the method described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of hardware computing devices.
[0048] Furthermore, the performance of the DFL-ATC proposed in this embodiment of the invention will be compared with two well-known algorithms: the centralized federated learning method FedAvg and the decentralized D-PSGD, and they will be used as baselines.
[0049] Specifically, the basic experiments: In the first experiment, the performance of DFL-ATC was evaluated after more than 100 rounds of global training on the MNIST, CIFAR-10, and CIFAR-100 datasets. Each node was trained locally for 10 rounds, and then synchronized with its neighbors via gossip communication, as follows. Figure 3As shown in Table 1, the model exchanges parameters with its neighbors, and the consensus step size gradually increases from 0.08 to 1 throughout the training process. The results demonstrate that DFL-ATC significantly improves prediction performance and accelerates convergence. As shown in Table 1, DFL-ATC not only accelerates convergence but also significantly improves prediction accuracy. Compared to D-PSGD, DFL-ATC achieves a 17.4% improvement in accuracy, and under certain conditions, it outperforms FedAvg by 9.7%. These improvements highlight DFL-ATC's ability to enhance the efficiency and effectiveness of distributed training.
[0050] Table 1. Final accuracy of different algorithms
[0051] Experiments with varying node counts: Additional experiments were conducted using 4, 6, and 8 nodes to examine how the number of nodes affects performance. As the number of nodes increases, the heterogeneity of the local data intensifies, making model training more challenging. Consequently, model accuracy slightly decreases. However, as... Figure 4 As shown, when α=0.1, DFL-ATC consistently outperforms FedAvg and D-PSGD in accuracy across all configurations for training different models for 100 epochs on different datasets and with varying numbers of clients. This demonstrates that DFL-ATC maintains strong performance even as network size increases, providing a robust solution for decentralized learning in highly heterogeneous environments.
[0052] Impact of Heterogeneous Data: Dirichlet distributed data with α values of 0.1, 0.5, and 1 were used to simulate different levels of data heterogeneity. Smaller α values lead to more imbalanced data distributions between nodes, similar to a non-independent and identically distributed scenario. As expected, model accuracy decreases with decreasing α values, but DFL-ATC still outperforms both baselines in all settings. In the most challenging scenario for testing model accuracy (α=0.1), DFL-ATC was tested on MNIST, CIFAR-10, and CIFAR-100, consistently achieving superior performance, demonstrating its broad applicability and robustness to extreme heterogeneity. Results are as follows... Figure 5 As shown, the accuracy of different models trained for 100 epochs on different datasets and with different numbers of clients is evaluated when α=0.1, using 8 nodes for the experiments. When training on the MNIST dataset, overfitting is prone to occur due to the simplicity of the MNIST dataset, thus a subsequent decrease in accuracy is observed. However, this decrease is not observed on other datasets.
[0053] Experimental results confirm that the trust mechanism and consensus step size have a positive impact on decentralized federated learning in non-independent and identically distributed environments. DFL-ATC not only accelerates convergence but also improves accuracy across various datasets and configurations. Its performance outperforms D-PSGD by 17.4% and FedAvg by 9.7%, highlighting its robustness, scalability, and effectiveness in distributed training in heterogeneous environments.
[0054] Taking into account the above numerical experimental results, in areas where federated learning is applicable to certain extreme data sets and where some high-quality public datasets currently exist, the method provided in this embodiment of the invention can produce relatively good application results, for example: 1. Satellite Network In satellite constellation applications, the DFL-ATC algorithm allows satellites to share information in a decentralized manner without relying on a central server. This is because the constellation cannot decide which satellite should act as the central server, as the orbits and positions of all satellites are potentially variable, and communication between any satellite and the ground station may be restricted at any given time. Therefore, the decentralized architecture effectively avoids single points of failure and communication bottlenecks inherent in centralized systems, thereby improving system reliability and scalability. Satellites typically face high latency and bandwidth limitations; decentralized federated learning enables satellites to update and optimize models in real time, improving the efficiency of tasks such as environmental monitoring and climate change research. Simultaneously, the trust mechanism dynamically evaluates the cooperation quality among satellites, ensuring that critical tasks can rely on high-performing satellites, thus enhancing the overall collaborative capabilities of the constellation.
[0055] 2. Smart Healthcare In the field of smart healthcare, decentralized federated learning significantly enhances data privacy protection. Hospitals and medical devices often face stringent privacy and compliance requirements, and the DFL-ATC algorithm enables collaborative model training without sharing sensitive patient information. Since medical data is typically distributed across multiple hospitals and devices, no centralized institution can securely aggregate all the data; therefore, decentralized approaches effectively reduce the risk of potential data breaches. Trust mechanisms enable the system to dynamically identify and utilize medical devices that provide high-quality data, thereby improving the accuracy of disease prediction and diagnostic models. Simultaneously, the application of dynamic consensus step sizes helps address the inconsistencies in data distribution across different hospitals, allowing models to better adapt to the needs of various patients and improve the personalization and accuracy of healthcare services.
[0056] 3. Drone swarms In drone swarm applications, the DFL-ATC algorithm improves collaborative efficiency through decentralization. When drones perform tasks, such as disaster relief or environmental monitoring, they can share perception information and model parameters in real time without relying on a ground control center. Since drones may be in different locations during missions, and the ground control center may not be able to receive data from all drones in real time, decentralized federated learning reduces communication latency and enhances real-time decision-making capabilities. Furthermore, the introduction of a trust mechanism helps drones dynamically evaluate and select reliable neighbors for information exchange, ensuring that each drone can more effectively utilize its surrounding environmental information, improving overall mission completion efficiency. Dynamic consensus step size allows drones to flexibly adjust the model fusion speed according to mission complexity and environmental changes, adapting to different operational scenarios.
[0057] Specifically, in federated learning scenarios involving multiple users, a client / server architecture is generally adopted, with the server acting as the central coordinator. Decentralized federated learning, however, supports independent communication between participating clients, effectively handling heterogeneous data across different nodes. Participants do not need to share their raw data with other participants; they only exchange model parameters. This invention, through a combination of trust mechanisms and aggregation strategies, ensures that the models of multiple users maintain high accuracy and consistency when facing diverse data. Based on the above-mentioned problem-solving process, deploying the DFL-ATC method to implement the technical solution provided in this embodiment of the invention yields the following expected practical effects: 1. High Training Efficiency: Through its dynamic consensus step size design, DFL-ATC can flexibly adjust the update rate of model parameters at different stages. This adaptability enables the algorithm to converge quickly in the early stages, while making full use of local data in the later stages, thus improving overall training efficiency.
[0058] 2. Enhancing Model Robustness: The trust mechanism dynamically adjusts each node's contribution to model aggregation by evaluating the similarity of feature outputs among neighboring nodes. This approach effectively reduces the impact of extreme participants on the global model, thereby improving the model's robustness under different data distributions, especially in non-independent and identically distributed (Non-IID) environments.
[0059] 3. Optimized Resource Utilization: DFL-ATC reduces reliance on a central server through decentralized peer-to-peer communication, thereby lowering communication costs and resource consumption. This makes the algorithm more scalable in large-scale distributed systems and suitable for application in resource-constrained environments such as the Internet of Things and edge computing.
[0060] 4. Adapting to heterogeneous data: This algorithm can effectively handle heterogeneous data on different nodes. Through the combination of trust mechanism and aggregation strategy, it ensures that the model can still maintain high accuracy and consistency when facing diverse data.
[0061] 5. Enhanced User Experience: In practical applications, DFL-ATC enables faster model training and updates while ensuring data privacy and security, thereby improving the user experience. For example, in smart devices and applications, users can receive more accurate personalized services while protecting their sensitive information from leakage.
[0062] Through these characteristics, the DFL-ATC algorithm has not only promoted the development of decentralized federated learning technology, but also provided strong support for practical applications in multiple fields such as healthcare, financial risk control, and intelligent transportation, indicating a broad future prospect.
[0063] In addition, embodiments of the present invention also provide a computer-readable medium including instructions that, when executed by a processor of a computing system, cause the computing system to perform a decentralized federated learning aggregation method based on a trust mechanism and consensus step size as described in any of the preceding claims.
[0064] In embodiments of the present invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0065] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.
[0066] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0067] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.
[0068] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM).
[0069] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0070] 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, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A decentralized federated learning aggregation method based on trust mechanism and consensus step size, characterized in that, The method includes: For each drone in a drone swarm, perception information and model parameters are shared in real time through a decentralized federated learning aggregation method; the decentralized federated learning aggregation method includes: S1. Train each drone using its local dataset to obtain the feature parameters generated by each drone; the feature parameters include feature output and model parameters. S2. Send the characteristic parameters of each drone to the neighboring drones; S3. Each drone calculates the cosine similarity of the feature output based on the feature parameters received from neighboring drones, adjusts the trust level of each neighboring drone according to the cosine similarity, assigns an aggregation weight to each neighboring drone based on the trust level, and updates the model parameters by fusing them according to the aggregation weight. During the update process, the update interval is controlled by the consensus step size. S4. Dynamically update the consensus step size based on the exponential scheduler, and repeat S1 to S4 until the consensus step size reaches the preset convergence value to complete the aggregation. Specifically, adjusting the trust level for each neighboring drone based on the cosine similarity includes: When the cosine similarity exceeds a preset threshold, the trust level is increased; When the cosine similarity is lower than a preset threshold, the trust level is reduced; The process of calculating the trust level includes: , in, Let be the trust level between the i-th drone and its j-th neighbor drone at the t-th round update. Let be the trust level between the i-th drone and its j-th neighbor drone at the (t+1)-th round update. For learning rate, The trust increment is calculated using the following formula: , in, This represents the feature output of the i-th drone at time t. This represents the feature output of the j-th neighboring drone at time t. Let cosine similarity be the feature output of the i-th drone and its j-th neighboring drone. For cosine similarity variables, For the preset threshold, , These are constant coefficients; The parameters of the aggregated weight fusion model are updated based on the above, and the calculation formula is as follows: , in, Let be the model parameters for the i-th drone in round t. For learning rate, It is a loss function Gradient of the local dataset on the i-th drone, Let be the model parameters for the j-th neighboring drone in round t. For consensus step size, These are the model parameters updated for the i-th drone in round t+1.
2. The decentralized federated learning aggregation method based on trust mechanism and consensus step size according to claim 1, characterized in that, The trust level has an upper threshold and a lower threshold; when the increased trust level exceeds the upper threshold, the upper threshold is used; when the decreased trust level is less than the lower threshold, the lower threshold is used.
3. The decentralized federated learning aggregation method based on trust mechanism and consensus step size according to claim 1, characterized in that, The communication used to send the characteristic parameters of each drone to neighboring drones includes the Gossip protocol.
4. The decentralized federated learning aggregation method based on trust mechanism and consensus step size according to claim 1, characterized in that, The consensus step size is dynamically updated based on the exponential scheduler, including: The consensus step size is set based on a preset initial value, and then updated to a preset convergence value based on the exponential scheduler. The calculation formula is as follows: , , in, The consensus step size for round t, As a preset initial value, Let r be the growth rate, and r be a constant. This is the number of update rounds at convergence. This is the preset convergence value.
5. The decentralized federated learning aggregation method based on trust mechanism and consensus step size according to claim 4, characterized in that, The preset convergence value is 1.
6. A computer-readable medium, characterized in that, Includes instructions that, when executed by a processor of a computing system, cause the computing system to perform the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Decentralized federated learning model training method
CN115860150A