A reliable federated learning method, system, device and terminal under clustering network architecture
By adopting a clustered network architecture and reputation model in wireless federated learning systems, the system has limited scalability, high energy consumption and vulnerability in large wireless networks, and a more efficient, reliable and secure federated learning process is achieved.
Patent Information
- Application Number
- CN202210626888.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-06-06
AI Technical Summary
Existing wireless federated learning systems are limited in scalability in large wireless networks, high energy consumption and vulnerable to malicious attacks, resulting in model update bias and security issues.
The clustering network architecture is adopted to select clustering users to reduce data transmission, reduce energy consumption, and improve the reliability and security of the system through reputation model and attack detection mechanism.
It improves the scalability and energy efficiency of the wireless federated learning system, extends the system's life cycle, and effectively resists malicious attacks, improving the reliability and security of the system.
Smart Images

Figure CN115150918B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of wireless communication technology, and in particular relates to a reliable federated learning method, system, device and terminal under a clustered network architecture. Background Art
[0002] Currently, data silos are hindering the use of big data necessary for training machine learning models. With the growth of computing power of terminal devices and people's increasing attention to sharing private data, performing machine learning (ML) tasks directly on terminal devices has become more attractive than sending raw data to central servers. To this end, a new machine learning model, Federated Learning (FL), has emerged, which allows organizations or individuals with source data to train a model separately, and then obtain a shared global model through model aggregation. Specifically, a typical client-server (C / S) architecture federated learning system optimizes the global model by repeating the following process: i) clients perform local model training with their own data and send their trained local model parameters to the server, ii) the server collects local models from clients, aggregates them into a global model and broadcasts them to clients, iii) clients further train their local models by using the new global model. In this way, the central server is able to train task models from data stored on terminal devices without sacrificing the privacy of local users. Therefore, federated learning has become one of the most promising technologies in the field of artificial intelligence in the future.
[0003] Although federated learning has unique advantages in edge data processing and user privacy protection, it also encounters many challenges when applied in wireless networks (here referred to as "wireless federated learning"). On the one hand, the limited resources and unreliable channels in wireless networks make it difficult to meet certain tasks that require low latency and high throughput during local model uploads, which also makes the problems of falling behind and fault tolerance in wireless federated learning more common, and it is easy to cause some update deviations. On the other hand, due to the openness and complexity of wireless network architecture and the inability of the central server to control the local training process of the client in real time, wireless federated learning is more vulnerable to various hostile attacks from some malicious users in the network, such as data poisoning attacks, backdoor attacks, reconstruction attacks, etc. In addition, in a typical client-server federated learning system, local clients perform global model aggregation by directly uploading model parameters to the central server. However, in large networks, due to the limited network resources, this centralized framework may lead to high communication delays, thereby increasing the convergence time of the global model. At the same time, in some special unattended environments, such as field environment monitoring, battlefield surveillance, agricultural pest and disease detection, etc., the client of the wireless federated learning system cannot easily replace batteries or charge them. Therefore, in these application scenarios, energy consumption is also a key issue that must be considered.
[0004] In order to solve the problems existing in the existing technology, it is necessary to introduce a new network architecture in the wireless federated learning system. This network architecture should not only take into account the scalability of user devices in large wireless networks, but also the reality that clients in wireless scenarios cannot easily replace batteries or charge them. At the same time, it is also necessary to build a user reliability authentication mechanism to resist malicious attacks in wireless networks.
[0005] Through the above analysis, the problems and defects of the prior art are as follows:
[0006] (1) The wireless federated learning system constructed by existing technology mainly adopts the typical client-server architecture, which cannot meet the requirements of deploying federated learning systems in large wireless networks in practical applications. In addition, energy consumption and security issues caused by malicious attacks have also become key factors restricting the performance of wireless federated learning systems.
[0007] (2) The limited resources and unreliable channels in wireless networks make it difficult to meet certain tasks that require low latency and high throughput during local model uploads. This also makes the problems of lagging behind and fault tolerance in wireless federated learning more common, and can easily cause some update deviations.
[0008] (3) In large networks, due to the limited network resources, the typical client-server federated learning system framework may lead to higher communication delays, thereby increasing the convergence time of the global model, and wireless federated learning is more vulnerable to various hostile attacks from certain malicious users in the network. Summary of the invention
[0009] In response to the problems existing in the prior art, the present invention provides a reliable federated learning method, system, device and terminal under a clustered network architecture, and in particular, relates to a reliable federated learning method, system, medium, device and terminal based on device energy consumption and terminal reputation under a clustered network architecture.
[0010] The present invention is implemented as follows: a reliable federated learning method under a clustered network architecture, the reliable federated learning method under a clustered network architecture comprising:
[0011] The system selects cluster head users according to clustering rules, and associates all users participating in the federated learning task in the network with their nearest trusted cluster head to complete the clustering process; the cluster head user aggregates the local model parameters of the received cluster users to generate a cluster model, and assists the cluster users to update the local reputation table; the base station aggregates the received cluster model parameters to generate a global model, and assists all users in the network to update the local model parameters and reputation table; the above process is repeated until the federated learning task is completed or the user device is exhausted.
[0012] Furthermore, the reliable federated learning method under the clustering network architecture includes the following steps:
[0013] Step 1: The base station publishes the federated learning task and initializes the relevant models and parameters; a number of trusted devices are evenly selected in the network as the first round of cluster head user devices, and other devices select the nearest cluster head user for association and mutually authenticate each other through the local reputation table to complete the clustering process;
[0014] The above steps are the initialization process of the federated learning system.
[0015] Step 2: After the local user device completes each round of training, it uploads the local model parameters to its associated cluster head user. The cluster head user device aggregates all received local model parameters into a cluster model according to the credibility of each user, and is responsible for assisting the cluster users to complete the update of local model parameters and distributed reputation table;
[0016] The above steps greatly reduce the amount of data transmission in the network by aggregating the models within the cluster, effectively reduce the energy consumption of user devices, and extend the life cycle of the entire federated learning system.
[0017] Step 3: After completing several rounds of cluster model aggregation and updating, the cluster head user uploads the current cluster model parameters and part of the reputation table to the base station. The base station aggregates all received cluster model parameters into a global model according to the data proportion in each cluster, and is responsible for assisting all users in the network to complete the update of local model parameters and distributed reputation tables.
[0018] The above steps complete the complete training process of the wireless federated learning system.
[0019] Step 4: After completing several rounds of aggregation updates of the global model, all user devices in the network select new cluster head users according to a specific cluster head selection algorithm and re-cluster.
[0020] The above steps reduce the probability of low-energy or unreliable users becoming cluster heads through a periodic clustering process, making the energy consumption of each user device in the network more balanced and extending the life cycle of the entire network.
[0021] Furthermore, the user reputation update in step 2 and step 3 includes:
[0022] The reputation model is built on the Beta reputation system. The attack detection mechanism in the system divides user behaviors into positive behaviors and negative behaviors. The reputation is expressed by the Beta function:
[0023]
[0024] in, and Respectively represent users The positive and negative behaviors of the users are scored. All user devices participating in the federated learning task in the clustered network architecture maintain a distributed reputation table locally; Indicates user credibility.
[0025] Define Characterization User The credibility of reputation is measured by reputation value. The expectation is expressed as follows:
[0026]
[0027] Define the quantity that represents the influence of user κ on the aggregation model in round t+1 is called "contribution", which is represented by the score of the user's behavior by the attack detection mechanism in the system; The user's behavior is considered positive, otherwise it is considered negative.
[0028] The concept of reputation freshness is adopted to give users' recent behavior evaluations greater weight in the reputation model. The aging weight is used to quantify the freshness of reputation, and a weighted reputation update mechanism is proposed:
[0029]
[0030] Among them, the constant r * and * Represent the weights of positive and negative behaviors respectively, w a ∈(0,1) and w b ∈(0, 1) are the aging weights for positive and negative behaviors respectively; u(·)∈(-1, 1) is the contribution The utility function is used to evaluate the reputation update needs of users with different contributions; it is expressed as follows using the modified hyperbolic tangent function:
[0031]
[0032] Among them, κ ≥ 1 is the scale constant of reputation update, which determines the rate of change of function u(·) around 0; as the value of κ increases, the smaller contribution value Will lead to major changes in reputation.
[0033] During the process of intra-cluster model aggregation, the cluster head user is responsible for verifying the reliability of other users in the cluster and updating the distributed reputation table in the cluster; during the process of global model aggregation, the base station is responsible for verifying the reliability of each model in each cluster, and aggregating some intra-cluster reputation change information submitted by each cluster head, and finally updating the reputation changes of relevant users to the entire network.
[0034] Further, the cluster head selection algorithm in step 4 includes:
[0035] In each round of cluster head user selection process, each user device participating in the federated learning task in the network selects a random number between 0 and 1. If the random number is less than the threshold User equipment Become the cluster head of the current round; Based on the residual energy of user equipment in the clustering network, the average energy of the cluster area, and the environmental factors of user equipment performance, an environment-based cluster head selection algorithm ELEACH is proposed, and the threshold in the cluster head selection algorithm is set to The definition is as follows:
[0036]
[0037] Among them, η is the proportion of cluster heads in the network preset by the system, r is the number of clustering rounds currently in progress, and G is the number of clustering rounds in the previous The set of user devices that have never become cluster heads in round clustering. Is a user device The remaining energy, and represents the average energy of all user devices in the cluster c area in the previous round; Used to measure user devices The weighted sum function with parameter ζ is used to control the proportion of different environmental factors in the probability of cluster head selection.
[0038] Furthermore, the clustering process of the user equipment in step 1 and step 4 includes:
[0039] In the clustering process, cluster head users and ordinary users verify each other's reliability through their own distributed reputation tables. Only mutually trusted cluster head user devices and ordinary user devices can be associated. If the user's local reputation table lacks reputation records for some users, the reputation values of the users are uniformly regarded as the initialized neutral reputation. k,c =0.5.
[0040] In the clustering process, the number of ordinary users associated with each cluster head user is limited. When the number of ordinary user devices associated with a cluster head user device reaches the upper limit, the verification or association request of any other user will be rejected, and the user device will select other neighboring cluster heads to continue verification and association; if the user does not join any cluster, it will become an island user in the network. In the clustering network architecture, the island user is defined to transmit the local model parameters to the cluster head or base station in this round through the cluster head relay associated with it in the previous round.
[0041] Another object of the present invention is to provide a reliable federated learning system under a clustered network architecture using the reliable federated learning method under a clustered network architecture, wherein the reliable federated learning system under the clustered network architecture comprises:
[0042] The user clustering association module is used to select cluster head users according to clustering rules, associate all users in the network with the nearest trusted cluster head, and complete the clustering process;
[0043] The cluster model building module is used to generate a cluster model by aggregating the local model parameters of the cluster users received by the cluster head user, and assist the cluster users to complete the update of the local reputation table;
[0044] The global model building module is used to generate a global model by aggregating the received model parameters within the cluster through the base station, and assist all users in the network to complete the update of local model parameters and reputation tables;
[0045] The local training module is used for local user equipment to use source data to train federated learning tasks, and to perform information interaction and model sharing between ordinary user equipment, cluster head user equipment and base stations;
[0046] A model aggregation module, used to aggregate intra-cluster models and / or global models;
[0047] The attack detection module is used to perform security detection on local models or models within the cluster to block malicious attacks or unreliable model updates, and provide an implementation method for the reputation building and updating module.
[0048] Another object of the present invention is to provide a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0049] The cluster head user is selected according to the clustering rules, and all users in the network are associated with the nearest trusted cluster head to complete the clustering process; the cluster head user aggregates the local model parameters received from the users in the cluster to generate a cluster model, and assists the users in the cluster to complete the update of the local reputation table; the base station aggregates the global model based on the received cluster model parameters, and assists all users in the network to complete the update of local model parameters and reputation tables.
[0050] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0051] The cluster head user is selected according to the clustering rules, and all users in the network are associated with the nearest trusted cluster head to complete the clustering process; the cluster head user aggregates the local model parameters received from the users in the cluster to generate a cluster model, and assists the users in the cluster to complete the update of the local reputation table; the base station aggregates the global model based on the received cluster model parameters, and assists all users in the network to complete the update of local model parameters and reputation tables.
[0052] Another object of the present invention is to provide an information data processing terminal, which is used to implement a reliable federated learning system under the clustering network architecture.
[0053] Another object of the present invention is to provide a data processing base station, which is used to implement a reliable federated learning system under the clustered network architecture.
[0054] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are analyzed from the following aspects:
[0055] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0056] The reliable federated learning method based on device energy consumption and terminal reputation under a clustered network architecture provided by the present invention performs periodic clustering operations on user devices participating in a federated learning task in the network, so that the user's local model update is aggregated into an intra-cluster model through a cluster head user device during the transmission process, and then the global model parameters are updated by transmitting a small amount of intra-cluster model parameters, so as to reduce the average data transmission volume in the network; wherein, the cluster head user device needs to be periodically generated through a cluster head selection algorithm, and the cluster head selection algorithm considers environmental factors including: the remaining energy of the user device, the average energy of the intra-cluster area, and the performance of the user device (network / computing performance), etc.; at the same time, by performing reputation modeling on the terminal users participating in the federated learning task in the network to measure their reliability, users can identify each other through a distributed reputation table constructed in the clustered network, so as to prevent potential malicious attacks in the network.
[0057] The present invention introduces a federated learning system with a clustered network architecture, which can not only enable more users to participate in federated learning tasks in a large network, but also make data transmission more energy-efficient; by considering many factors that affect device energy consumption in the cluster head selection algorithm, the life cycle of the wireless federated learning system can be effectively extended; by introducing a user reliability identification mechanism based on terminal reputation under the clustered network architecture, the reliability and security of the wireless federated learning system can be effectively improved.
[0058] The present invention proposes a wireless federated learning system under a clustered network architecture, which utilizes the system's periodic clustering process to not only enable more users to participate in federated learning tasks in a large network, but also reduce the average data transmission volume in the network through efficient aggregation of model parameters of users in the cluster, making data transmission more energy-efficient, thereby effectively extending the life cycle of the entire system.
[0059] The present invention proposes an environment-based cluster head selection algorithm (ELEACH) by taking into account environmental factors such as the remaining energy of user devices, the average energy of the cluster area, and the performance of user devices (network / computing performance). The algorithm makes the probability of the current user becoming a cluster head related to itself and the surrounding environment, making the energy consumption of devices in the entire federated learning system more balanced and further extending the life cycle of the entire system.
[0060] The present invention proposes a weighted reputation update mechanism and maintains the user reputation table in a distributed manner in a wireless federated learning system under a clustered network architecture, thereby being able to provide a user reliability authentication mechanism based on terminal reputation for ordinary user devices, cluster head user devices, and base stations, thereby being able to effectively reduce the negative impact of malicious attacks and unreliable network updates on the system, and improving the reliability and security of the wireless federated learning system.
[0061] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0062] The present invention overcomes the shortcomings of limited scalability and excessive energy consumption of wireless federated learning under a typical client-server architecture. It adopts a clustered network architecture based on terminal reputation, which not only enables more user devices to participate in federated learning tasks, but also makes the transmission and update process of model parameters more reliable and energy-efficient, thereby effectively extending the life cycle of the entire network while ensuring the security of wireless federated learning.
[0063] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0064] (1) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0065] The present invention overcomes the problems of network scalability and equipment energy consumption of wireless federated learning systems under a typical client-server architecture, and proposes a wireless federated learning method under a clustered network architecture. This technical solution fills the technical gap in the industry at home and abroad.
[0066] (2) The technical solution of the present invention solves a technical problem that people have been eager to solve but have never been able to solve successfully:
[0067] The present invention proposes a clustering method based on device energy consumption and terminal reputation, and uses a weighted reputation update mechanism to update user reputation, which effectively solves the problem that the federated learning system in the wireless network is vulnerable to malicious user attacks, and improves the reliability and security of the wireless federated learning system. This technical solution is an effective supplement to the current security issues in wireless federated learning at home and abroad. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 It is a flow chart of a reliable federated learning method under a clustered network architecture provided by an embodiment of the present invention;
[0070] Figure 2 It is a principle diagram of a reliable federated learning method under a clustering network architecture provided by an embodiment of the present invention;
[0071] Figure 3 It is a scene diagram of a wireless federated learning system under a clustered network architecture provided by an embodiment of the present invention;
[0072] Figure 4 It is a diagram of experimental simulation results of changes in the number of active user devices in a wireless federated learning system under a client-server architecture and a clustered network architecture provided by an embodiment of the present invention;
[0073] Figure 5 It is a diagram of experimental simulation results of the amount of data received by a base station in a wireless federated learning system under a client-server architecture and a clustered network architecture provided by an embodiment of the present invention;
[0074] 6 is a diagram showing experimental simulation results of the change in the number of active user devices in a wireless federated learning system under a clustered network architecture provided by an embodiment of the present invention at different preset cluster head ratios;
[0075] FIG6( a ) is a diagram showing the experimental simulation results of the change in the number of active user devices in a reliable federated learning method based on device energy consumption and terminal reputation under a clustered network architecture provided by an embodiment of the present invention when a lower preset cluster head ratio is used;
[0076] FIG6( b ) is a diagram showing the experimental simulation results of the change in the number of active user devices in a reliable federated learning method based on device energy consumption and terminal reputation under a clustered network architecture provided by an embodiment of the present invention when a higher preset cluster head ratio is used;
[0077] Figure 7 is an experimental simulation result diagram of the amount of data received by the base station under different preset cluster head ratios in the wireless federated learning system under the clustered network architecture provided by an embodiment of the present invention;
[0078] Figure 8 It is a diagram of experimental simulation results of the test accuracy of the wireless federated learning system under the client-server architecture and clustered network architecture provided by the embodiment of the present invention;
[0079] Fig. 9 This is a diagram of experimental simulation results of the test accuracy of the wireless federated learning system under the clustered network architecture provided by an embodiment of the present invention, taking into account the terminal reputation and the proportion of malicious users;
[0080] Fig.10 It is a structural block diagram of a reliable federated learning system under a clustered network architecture provided by an embodiment of the present invention;
[0081] In the figure: 1. User clustering association module; 2. In-cluster model building module; 3. Global model building module; 4. Local training module; 5. Model aggregation module; 6. Attack detection module. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0083] In view of the problems existing in the prior art, the present invention provides a reliable federated learning method, system, device and terminal under a clustered network architecture. The present invention is described in detail below with reference to the accompanying drawings.
[0084] 1. Explanatory Examples In order to enable those skilled in the art to fully understand how to implement the present invention, this section provides an illustrative example that expands and describes the technical solution of the claims.
[0085] like Figure 1 As shown, the reliable federated learning method under the clustering network architecture provided by the embodiment of the present invention includes the following steps:
[0086] S101, select the cluster head user according to the clustering rule, and associate all users in the network with the nearest trusted cluster head, thereby completing the clustering process;
[0087] S102, the cluster head user aggregates and generates a cluster model according to the received local model parameters of the cluster users, and assists the cluster users to complete the update of the local reputation table;
[0088] S103, the base station aggregates and generates a global model according to the received model parameters within the cluster, and assists all users in the network to complete the update of local model parameters and reputation tables.
[0089] like Figure 2 As shown, the reliable federated learning method based on terminal reputation in a wireless network provided by an embodiment of the present invention specifically includes the following steps:
[0090] Step 1: The base station publishes the federated learning task and initializes the relevant models and parameters. It evenly selects several trusted devices in the network as the first round of cluster head user devices. Other devices select the nearest cluster head user for association and authenticate each other through the local reputation table to complete the clustering process.
[0091] Step 2: After the local user device completes each round of training, it will upload its local model parameters to its associated cluster head user. The cluster head user device will aggregate all received local model parameters into a cluster model according to the credibility of each user, and is responsible for assisting the cluster users to complete the update of local model parameters and distributed reputation tables;
[0092] Step 3: After completing several rounds of cluster model aggregation and updating, the cluster head user will upload the current cluster model parameters and part of the reputation table to the base station. The base station will aggregate all received cluster model parameters into a global model according to the data proportion in each cluster, and assist all users in the network to complete the update of local model parameters and distributed reputation tables.
[0093] Step 4: After completing several rounds of global model aggregation updates, all user devices in the network will select new cluster head users according to a specific cluster head selection algorithm and re-cluster.
[0094] The user reputation update mechanism in step 2 and step 3 provided in the embodiment of the present invention specifically includes:
[0095] The reputation model is built on the Beta reputation system. The attack detection mechanism in the system divides user behaviors into positive behaviors and negative behaviors. The reputation can be expressed by the Beta function:
[0096]
[0097] in, and Respectively represent users All user devices participating in the federated learning task under the clustered network architecture need to maintain a distributed reputation table locally, in which the available tuples Indicates user credibility.
[0098] Define a characterization user The measure of credibility of reputation is called "reputation value", which can be used The expectation is expressed as follows:
[0099]
[0100] Define a quantity that represents the influence of user κ on the aggregation model in the t+1th round, that is, It is called "contribution" and can be represented by the score of user behavior by the attack detection mechanism in the system. The user's behavior is considered positive, otherwise it is considered negative.
[0101] In order to solve the problem of latent malicious attacks, the concept of reputation "freshness" can be used to give users' recent behavior evaluations a greater weight in the reputation model. Therefore, the aging weight can be used to quantify the "freshness" of reputation, thus proposing a weighted reputation update mechanism, which is expressed as follows:
[0102]
[0103] Among them, and the constant r * and * Represent the weights of positive and negative behaviors respectively, w a ∈(0,1) and w b ∈(0, 1) are the aging weights for positive and negative behaviors respectively. In addition, u(·)∈(-1, 1) is the contribution The utility function used to evaluate the reputation update needs of users with different contributions can be expressed by a modified hyperbolic tangent function as follows:
[0104]
[0105] Among them, κ ≥ 1 is a scaling constant of reputation update, which determines the rate of change of the function u(·) around 0. Therefore, as the value of κ increases, the smaller contribution value This will lead to major changes in credibility.
[0106] During the process of intra-cluster model aggregation, the cluster head user is responsible for verifying the reliability of other users in the cluster and updating the distributed reputation table in the cluster; during the process of global model aggregation, the base station is responsible for verifying the reliability of each model in each cluster, and aggregating some intra-cluster reputation change information submitted by each cluster head, and finally updating the reputation changes of relevant users to the entire network.
[0107] The cluster head selection algorithm in step 4 provided in the embodiment of the present invention specifically includes:
[0108] In each round of cluster head user selection, each user device participating in the federated learning task in the network will select a random number between 0 and 1. If the random number is less than the threshold User equipment Taking into account the remaining energy of user devices in the cluster network, the average energy of the cluster area, and the performance of user devices (network / computing performance), an environment-based cluster head selection algorithm (ELEACH) is proposed. The definition is as follows:
[0109]
[0110] Among them, η is the proportion of cluster heads in the network preset by the system, r is the number of clustering rounds currently in progress, and G is the number of clustering rounds in the previous The set of user devices that have never become cluster heads in round clustering. Is a user device The remaining energy, and represents the average energy of all user devices in the last round of cluster c. In addition, Used to measure user devices The performance of the cluster head selection is improved by using the weighted sum function with parameter ζ, which can be used to control the proportion of different environmental factors in the probability of cluster head selection.
[0111] The clustering process of the user equipment in step 1 and step 4 provided in the embodiment of the present invention specifically includes:
[0112] Since the selection of cluster heads is adaptive and decentralized, the possibility of uncontrollable malicious attacks in the network increases. Therefore, in the clustering process, cluster head users and ordinary users need to verify each other's reliability through the distributed reputation tables they maintain. Only mutually trusted cluster head user devices and ordinary user devices can be associated. If the user's local reputation table lacks reputation records for some users, the user's reputation value can be uniformly regarded as the initialized neutral reputation. (That is, M k,c =0.5)
[0113] In the clustering process, since network resources are limited, the number of ordinary users that each cluster head user can associate with is also limited. When the number of ordinary user devices associated with a cluster head user device reaches the upper limit, the verification or association request of any other user will be rejected. At this time, the user device can choose other neighboring cluster heads to continue verification and association. If the user does not join any cluster, it becomes an island user in the network.
[0114] In order to facilitate the island users to join the federated learning task, it is defined in the clustered network architecture that the island users can relay the local model parameters to the cluster head or base station of this round through the cluster head associated with them in the previous round.
[0115] like Fig.10 As shown, the reliable federated learning system under the clustering network architecture provided by the embodiment of the present invention includes:
[0116] The user clustering association module 1 is used to select the cluster head user according to the clustering rules, associate all users in the network with the nearest trusted cluster head, and complete the clustering process;
[0117] The in-cluster model building module 2 is used to generate an in-cluster model by aggregating the local model parameters of the in-cluster users received by the cluster head user, and complete the update of the distributed reputation table of the in-cluster users;
[0118] The global model building module 3 is used to generate a global model by aggregating the received model parameters within the cluster through the base station, and complete the update of the distributed reputation table of users among clusters in the whole network;
[0119] The local training module 4 is used for the local user equipment to use the source data to train the federated learning task, and to perform information interaction and model sharing between the common user equipment, the cluster head user equipment and the base station;
[0120] A model aggregation module 5, used for aggregating intra-cluster models and / or global models;
[0121] The attack detection module 6 is used to perform security detection on the user model to block malicious attacks or unreliable model updates, and provide an implementation method for user reputation building and updating.
[0122] 2. Application Examples: In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.
[0123] The relevant technology of the present invention can be mainly applied to a federated learning system deployed in a wireless network to perform specific tasks. Currently, only experimental simulation has been used to verify the feasibility and reliability of the relevant technology of the present invention, as follows:
[0124] 1. Simulation conditions:
[0125] The simulation experiment of the present invention is carried out on a Windows platform, and the main configurations are: CPU is Intel (R) i5-6200U, 2.30GHz; memory is 8G; operating system is Windows 10; and the simulation software environment is Python 3.6+PyTorch.
[0126] by Figure 3 The scene diagram of the wireless federated learning system under the clustered network architecture is a schematic diagram of the simulation scene used in the simulation experiment of the present invention, and the figure includes a wireless federated learning system composed of cluster head user devices, island user devices, malicious user devices, ordinary user devices and base stations.
[0127] Referring to the FORM energy consumption model, the energy cost required to transmit k bits of data can be expressed as follows:
[0128]
[0129] Among them, E elec represents the energy cost of the transmitter electronics, ε amp represents the energy consumption of the transmitting amplifier, D t,r represents the distance between the transmitter t and the receiver r.
[0130] 2. Simulation scenes and contents:
[0131] The simulation experiment uses Figure 3 The simulation scenario shown in the figure is simulated according to different simulation conditions using the reliable federated learning method based on device energy consumption and terminal reputation under the clustering network architecture of the present invention. 2 Unless otherwise specified, the simulation process parameters are as follows: the number of all user devices in the network K = 100, the preset cluster head ratio η = 15%, the preset malicious user device ratio ρ = 10%, the user device learning rate is 0.01, the initial energy of each user device is 2000J, the user device training energy consumption is 20J, the energy consumption of aggregating model parameters once is 1.5J, and the energy consumption of the transmitter electronic device E elec =50nJ / bit, energy consumption of the transmitting amplifier The cluster head selects the control parameter ζ = 1, and the probability of successful data transmission of the user equipment p = 0.35. In addition, in the experimental simulation, a federated learning task is considered to classify handwritten digits using the commonly used MNIST dataset, and 3000 training samples and 3000 test samples are provided from the MNIST dataset to the end user and the central base station respectively. Through the experimental simulation, the following is obtained: Figures 4 to 9 Results shown.
[0132] 3. Evidence of the effects of the embodiments. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with the data, charts, etc. of the test process.
[0133] Figure 4 The changes in the number of active user devices in the wireless federated learning (FL) system under the client-server (C / S) architecture and the clustered network (Clus) architecture are analyzed. Among them, it can be clearly found that under the same environment, the survival rate of user devices in the Clus architecture of FL has been significantly improved compared with the C / S architecture. This is because in the Clus architecture, the local user device does not send its trained model parameters directly to the base station, but relays them to the cluster head of its cluster for data aggregation, and then the cluster head sends the aggregated cluster model to the base station. Through data aggregation at the cluster head, the amount of data transmission in the network can be greatly reduced, thereby reducing the energy consumption of local user devices and extending the life cycle of the entire network. By Figure 4By comparing the number of active user devices of the environment-based clustering rule (ELEACH) proposed in the present invention with the traditional LEACH clustering rule under the clustering FL framework, it can be found that the proposed ELEACH is significantly better than the traditional LEACH. This is because, compared with LEACH, which randomly selects cluster heads, ELEACH considers environmental factors such as the remaining energy, computing performance, reputation of user devices, and regional average energy within the cluster when selecting cluster heads, reducing the probability of user devices with low energy and poor regional environment being selected as cluster heads, thereby making the energy consumption of the entire network more balanced during the FL process and improving the stability and life cycle of the network. Therefore, in Figure 5 (Assuming that the initial energy of each user device is 1000J), compared with the FL of the C / S architecture, the base station in the FL under the Clus architecture can aggregate more local model parameters of terminal users, and the ELEACH clustering rule can further increase the number of local model parameters successfully transmitted to the base station compared with LEACH. Figure 4 The conclusions drawn are consistent.
[0134] Figure 6 and Figure 7 The changes in the number of active user devices and the amount of data received by the base station under different preset cluster head ratios (i.e., η) of cluster FL are given respectively. By comparing Figure 6(a) and Figure 6(b), it can be found that when the preset cluster head ratio is small, the survival rate of user devices in the cluster network decreases significantly with the increase of η, and when η increases to a larger value, the survival rate of user devices in the network is almost no longer affected by the preset cluster head ratio. At the same time, Figure 7 (Assuming that the initial energy of each user device is 500J), it can be found that when the preset cluster head ratio is small, the number of local models aggregated by the base station increases significantly with the increase of η, and when η increases to a larger value, the number of local models aggregated by the base station is no longer affected by the cluster head ratio. This is because, when the preset cluster head ratio is small, as the cluster head ratio increases, the number of isolated user devices in the network decreases relatively, and more local models will be aggregated to the base station through inter-cluster aggregation, resulting in more cluster head energy consumption and transmission energy consumption; when the cluster head ratio increases to a certain value, according to the definition in the cluster head selection algorithm, in the previous A user device that has become a cluster head in a round cannot become a cluster head again. Therefore, there is an upper limit on the proportion of terminal users that actually become cluster heads in ELEACH, which leads to the fact that when the preset cluster head proportion is large, Figures 6 and Figure 7 The wireless FL systems with different η values have similar numbers of surviving users and received data volumes.
[0135] Figure 8 The test accuracy of wireless FL in C / S architecture and Clus architecture is shown. Figure 8In the figure, it can be found that when the environmental parameters are set the same, the FL of the two architectures has similar convergence performance. This is because the convergence performance of FL is only related to the probability of successful transmission of local model parameters to the base station. When there are enough participating users and sufficient device energy, both the traditional C / S architecture and the proposed Clus architecture have little impact on the probability of successful data transmission and are unlikely to affect the global convergence performance.
[0136] Fig. 9 The convergence performance of the reliable federated learning method (RPCR) based on device energy consumption and terminal reputation under the proposed Clus architecture is analyzed. Among them, the clustering federated learning method that does not consider terminal reputation is used as a "baseline" method for comparison, and 15% and 45% malicious users are set in the network for simulation. Fig. 9 From the above, we can see that the number of malicious users has a great impact on the convergence performance of the baseline method that does not consider user reputation, and the test accuracy of the global model will decrease as the number of malicious users in the network increases. In addition, Fig. 9 It also shows that the RPCR under the proposed Clus architecture still has good convergence performance in a network with malicious users, and the proportion of malicious users has little effect on the accuracy of global model testing to a certain extent. This is because RPCR uses a reputation mechanism for verification and data transmission during clustering and model aggregation, avoiding potential malicious users from joining clusters or participating in model aggregation as much as possible, thereby effectively resisting data or model poisoning attacks by malicious users in the network.
[0137] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0138] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A reliable federated learning method under a clustering network architecture, characterized in that: The reliable federated learning method under the clustering network architecture includes: the system selects a cluster head user according to the clustering rules, and associates all users participating in the federated learning task in the network with their nearest trusted cluster heads, thereby completing the clustering process; the cluster head user aggregates the received local model parameters of the users in the cluster to generate a cluster model, and assists the users in the cluster to complete the update of the local reputation table; the base station aggregates the received cluster model parameters to generate a global model, and assists all users in the network to complete the update of the local model parameters and the reputation table; the above process is repeated until the federated learning task is completed or the energy of the user device is exhausted; The reliable federated learning method under the clustering network architecture comprises the following steps: Step 1: The base station publishes the federated learning task and initializes the relevant models and parameters; a number of trusted devices are evenly selected in the network as the first round of cluster head user devices, and other devices select the nearest cluster head user for association and mutually authenticate each other through the local reputation table to complete the clustering process; Step 2: After the local user device completes each round of training, it uploads the local model parameters to its associated cluster head user. The cluster head user device aggregates all received local model parameters into a cluster model according to the credibility of each user, and is responsible for assisting the cluster users to complete the update of local model parameters and distributed reputation table; Step 3: After completing several rounds of cluster model aggregation and updating, the cluster head user uploads the current cluster model parameters and part of the reputation table to the base station. The base station aggregates all received cluster model parameters into a global model according to the data proportion in each cluster, and is responsible for assisting all users in the network to complete the update of local model parameters and distributed reputation tables. Step 4: After completing several rounds of global model aggregation updates, all user devices in the network select new cluster head users according to a specific cluster head selection algorithm and re-cluster; The clustering process of the user equipment in step 1 and step 4 includes: In the clustering process, cluster head users and ordinary users verify each other's reliability through their own distributed reputation tables. Only mutually trusted cluster head user devices and ordinary user devices can be associated. If the user's local reputation table lacks reputation records for some users, the reputation values of the users are uniformly regarded as the initialized neutral reputation. k,c =0.5; During the clustering process, the number of ordinary users associated with each cluster head user is limited; when the number of ordinary user devices associated with a cluster head user device reaches the upper limit, the verification or association request of any other user will be rejected, and the user device will select other adjacent cluster heads to continue verification and association; if the user has not joined any cluster, it will become an island user in the network; in the clustering network architecture, the island user is defined to transmit the local model parameters to the cluster head or base station in this round through the cluster head relay associated with it in the previous round.
2. The reliable federated learning method under the clustering network architecture as claimed in claim 1, characterized in that: The user reputation update in step 2 and step 3 includes: The reputation model is built on the Beta reputation system. The attack detection mechanism in the system divides user behaviors into positive behaviors and negative behaviors. The reputation is expressed by the Beta function: in, and Respectively represent users The positive and negative behaviors of the users are scored; all user devices participating in the federated learning task in the clustered network architecture maintain a distributed reputation table locally; Indicates user credibility; Define Characterization User The credibility of reputation is measured by reputation value. The expectation is expressed as follows: Define the quantity that represents the influence of user κ on the aggregation model in round t+1 is called "contribution", which is represented by the score of the user's behavior by the attack detection mechanism in the system; If the user's behavior is positive, then it is considered to be a positive behavior, otherwise it is a negative behavior; The concept of reputation freshness is adopted to give users' recent behavior evaluations greater weight in the reputation model. The aging weight is used to quantify the freshness of reputation, and a weighted reputation update mechanism is proposed: Among them, the constant r * and * Represent the weights of positive and negative behaviors respectively, w a ∈(0,1) and w b ∈(0, 1) are the aging weights for positive and negative behaviors respectively; u(·)∈(-1, 1) is the contribution The utility function is used to evaluate the reputation update needs of users with different contributions; it is expressed as follows using the modified hyperbolic tangent function: Among them, κ ≥ 1 is the scale constant of reputation update, which determines the rate of change of function u(·) around 0; as the value of κ increases, the smaller contribution value Will lead to a larger change in reputation; During the process of intra-cluster model aggregation, the cluster head user is responsible for verifying the reliability of other users in the cluster and updating the distributed reputation table in the cluster; during the process of global model aggregation, the base station is responsible for verifying the reliability of each model in each cluster, and aggregating some intra-cluster reputation change information submitted by each cluster head, and finally updating the reputation changes of relevant users to the entire network.
3. The reliable federated learning method under the clustering network architecture as claimed in claim 1, characterized in that: The cluster head selection algorithm in step 4 includes: In each round of cluster head user selection process, each user device participating in the federated learning task in the network selects a random number between 0 and 1. If the random number is less than the threshold User equipment Become the cluster head of the current round; Based on the residual energy of user equipment in the clustering network, the average energy of the cluster area, and the environmental factors of user equipment performance, an environment-based cluster head selection algorithm ELEACH is proposed, and the threshold in the cluster head selection algorithm is set to The definition is as follows: Among them, η is the proportion of cluster heads in the network preset by the system, r is the number of clustering rounds currently in progress, and G is the number of clustering rounds in the previous The set of user devices that have never become cluster heads in round clustering. Is a user device The remaining energy, and represents the average energy of all user devices in the cluster c area in the previous round; Used to measure user devices The weighted sum function with parameter ζ is used to control the proportion of different environmental factors in the probability of cluster head selection.
4. A reliable federated learning system under a clustered network architecture using the reliable federated learning method under a clustered network architecture as described in any one of claims 1 to 3, characterized in that: The reliable federated learning system under the clustering network architecture includes: The user clustering association module is used to select cluster head users according to clustering rules, associate all users in the network with the nearest trusted cluster head, and complete the clustering process; The in-cluster model building module is used to generate an in-cluster model by aggregating the local model parameters of the in-cluster users received by the cluster head user, and complete the update of the distributed reputation table of the in-cluster users; The global model building module is used to generate a global model by aggregating the received model parameters within the cluster through the base station, and complete the update of the distributed reputation table of users among clusters in the whole network; The local training module is used for local user equipment to use source data to train federated learning tasks, and to perform information interaction and model sharing between ordinary user equipment, cluster head user equipment and base stations; A model aggregation module, used to aggregate intra-cluster models and / or global models; The attack detection module is used to perform security checks on user models to block malicious attacks or unreliable model updates, and provide an implementation method for user reputation building and updating.
5. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the reliable federated learning method under the clustering network architecture as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the reliable federated learning method under the clustering network architecture as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Node selection and aggregation optimization system and method for federated learning under micro-service architecture
CN114418109A
Mobile user equipment clustering training method for wireless federated learning
CN114553661A