An asynchronous federated learning method in a wireless network
By employing an asynchronous federated learning method in wireless networks, grouping users, and utilizing a priority scheduling strategy, the problems of channel environment and resource constraints in wireless networks are solved, improving the accuracy and efficiency of model training, and making it suitable for data analysis in metaverse scenarios.
Patent Information
- Application Number
- CN202310460800.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-26
AI Technical Summary
In wireless networks, how to design an efficient federated learning strategy that takes into account complex channel environments, heterogeneous user data, and limited communication resources, while improving model training accuracy and efficiency, especially in analyzing all user-generated data in a metaverse scenario.
An asynchronous federated learning approach is adopted. By constructing a federated learning-based wireless network system architecture, users are grouped into multiple groups. Each group selects the user with the best communication link status as the 'header' for local model training and aggregation. A priority-based user scheduling strategy is used, combined with channel status, model age, and the importance of local model updates, to optimize the loss function of the global model to improve training accuracy.
In wireless networks, it improves the accuracy and efficiency of model training, effectively utilizes limited communication resources, adapts to complex channel environments and user heterogeneity, and enhances the training performance of machine learning models.
Smart Images

Figure CN116484976B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of federated learning, and more particularly to an asynchronous federated learning method in a wireless network. BACKGROUND
[0002] In recent years, federated learning (FL) enables machine learning model training in a distributed manner and is increasingly applied in the field of wireless communication for communication network system operation, monitoring, optimization, etc., which can effectively analyze a large amount of data collected by users for inference, prediction and decision-making. Federated learning utilizes the distributed computing resources of each user to perform local machine learning model training using its local data, and only shares model parameters with the base station, which also effectively protects data privacy.
[0003] Federated learning has been applied to various wireless communication scenarios, such as vehicular communication, localization, and semantic communication. The implementation of federated learning in a wireless network is accomplished by users and base stations in collaboration. In each round of global communication, users receive the global model from the base station and perform further training using their local data sets. The base station then aggregates the local models from the users to update the global model. Most existing research assumes that the base station can only aggregate when each user has completed its local model update, which is synchronous federated learning (SynFL). However, the slowest user will significantly reduce learning performance. Therefore, asynchronous federated learning (AsynFL) is proposed, in which the server performs model aggregation as soon as it receives local model updates from each user without waiting to receive all local updates. However, frequent communication with the base station causes a significant waste of communication resources for users.
[0004] In a wireless network, each user is always moving on different paths or in different target areas to collect data of the entire environment, which results in each user obtaining different types and amounts of data sets. Prospective applications, especially Metaverse scenario creation, require analysis of all user-generated data, so the comprehensiveness of data should be considered when training machine learning models.
[0005] This means that the local model updates of any user should not be discarded throughout the training process. But due to limited communication resources and random fading of channel environment, only a limited number of users can upload their local model updates in each round of communication, and some users may not be able to upload in time due to limited computing power. Therefore, it is very important to design an appropriate user scheduling strategy to include local updates from as many users as possible. In recent years, most of the existing work has studied the design of user scheduling strategies based on the significance of local model updates, channel conditions and data uncertainty, update transmission success probability and user model update age (AoU, Age-of-Update) information. However, in wireless networks, the communication performance has a significant impact on the training performance of the machine learning model, so this should be considered when designing the user scheduling strategy.
[0006] Therefore, how to design an efficient federated learning strategy in a wireless network, considering the complex channel environment, user data heterogeneity and limited communication resources in the wireless network, and improving the model training accuracy and efficiency is a problem that needs to be solved by those skilled in the art. SUMMARY
[0007] Therefore, the present application provides an asynchronous federated learning method in a wireless network, which considers the complex channel environment in the wireless network and improves the training accuracy of the model.
[0008] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0009] An asynchronous federated learning method in a wireless network, comprising the following steps:
[0010] A wireless network system architecture based on federated learning is constructed, the system architecture comprises N users and a base station, each user moves in a given target area with different moving paths and continuously collects data; the data sets collected by all users are used to cooperatively train a machine learning model;
[0011] At the beginning of each training round, the base station groups the users according to the importance of the local model updates of each user, and selects the user with the best communication link state in each group as the "header", and sends the global model to the "header" of each group;
[0012] The "header" of each group sends the global model to the given user, and the user trains the local model based on the global model and the local data set; each "header" collects the training completion signals from the users in the group within a specified time, and schedules the users in the group that have completed the training according to the preset rules, receives the local model uploaded by the scheduled users and aggregates to generate a group model;
[0013] Each "header" uploads the generated group model to the base station in a synchronized manner, and the base station aggregates the group models to generate a global model;
[0014] The parameter vector that minimizes the loss function F(ω) of the global model is found as the training target, and the final machine learning model is obtained.
[0015] Further, the set represents the user set, and each user has a local data set D i , and the data set size is |D i |; Set represents the entire data set collected by all users in the wireless network, and the size is |D|, and the data set of each user is different, that is
[0016] Further, when the local model of the scheduled user is aggregated, the group model update is represented as:
[0017]
[0018] wherein, represents the group model update from the jth group G j ; represents the scheduled user set; represents the local model of user i generated in the t-1th round of training; ω t-1 represents the global model generated in the t-1th round of training;
[0019] When the group model is aggregated at the base station, the global model update is represented as:
[0020]
[0021] wherein, H(j) represents the aggregation weight coefficient, which is related to the model update importance j; represents the importance set of the user cluster, and the users are divided into J groups according to the importance of the local model update.
[0022] Further, when the user receives the global model sent by the "header", before starting the local training, an initialization process is performed: the received global model and the local model obtained by the previous training are weighted and summed to obtain the initial model for the current training, which is represented as:
[0023]
[0024] wherein, denotes the latest local model parameters of user i that failed to be delivered to the base station before round t, denotes the weight coefficient related to the model age; denotes the global model received by user i in round t training;
[0025] Users who complete local training within the specified time receive the updated global model from the base station, continue to perform the next initialization process, and update their respective local models using the online gradient descent algorithm.
[0026] Further, when users perform local training, each group of "headers" accepts training completion signals from users within the group within a time threshold, and the set of users who complete training within the time threshold is denoted by Γ, and a group of users is selected to upload their local models from the set, and the selected set of users is denoted by Users who do not complete local training within the specified time do not participate in the current global aggregation process, save the trained model parameters locally, and wait for the next round of updates.
[0027] Further, when each "header" collects training completion signals from users within the group within the specified time, a priority-based user scheduling strategy is adopted, and the priorities of all users within the group who complete training are sorted in descending order after sorting, and the users are scheduled in descending order; priority is represented as a trade-off between channel state information g, model age η, and local model update importance j, denoted as:
[0028] c = λ1·η + λ2·g + λ3·j
[0029] where λ1, λ2, λ3 represent weight coefficients, η represents model update age, g represents channel state information, and j represents the importance of user local model update.
[0030] Further, the communication delay of user i's local update upload is The channel state is evaluated and denoted as:
[0031]
[0032] R i = γ i Blog2(1+SNR i )
[0033] where S model represents the size of the model update, R i represents the transmission rate of user i to the base station; γ i B represents the bandwidth allocated to user i, SNR i represents the signal-to-noise ratio of user i received at the base station, defined as where Pi denotes the transmission power of user i to the base station, N0denotes the noise variance, denotes the path loss between user i and the base station.
[0034] Further, the model age index of user i in the t-th round of training is denotes:
[0035]
[0036]
[0037] where, denotes the latest round before the t-th global iteration of user i is scheduled, ε i (r) denotes the transmission scheduling indicator of user i in the r-th round, r = 1 indicates that user i is scheduled to transmit its local model in the r-th round, and r = 0 indicates that it is not scheduled.
[0038] Further, the importance j of the local model update of user i is denoted as the 2-norm of the local model update Local model update of user i is:
[0039]
[0040] where, denotes the learning rate, denotes the gradient calculated at user i; ω t denotes the global model generated in the t-th round of training; denotes the local model of user i generated in the t+1-th round of training.
[0041] Further, the loss function of the global model is in the form of the sum of the loss functions of a set of local models;
[0042] The loss function of the local model of user i is defined as:
[0043]
[0044] where, ω i (η i ) denotes the local model of user i, which is a model age related parameter, η i denotes the model age of user i; denotes the local data set of user i; k denotes the data sample D i from the data set D i denotes the local data set of user i; after user i submits the data point (x k , y k ), some information about the loss function F iinformation as feedback, and these information are unknown before;
[0045] The loss function of the global model is represented as:
[0046]
[0047] to find the optimal parameter vector ω that minimizes the loss function F(ω) of the global model * The optimization objective is represented as:
[0048]
[0049] where, denotes the set of scheduled users; D denotes the entire data set collected by all users in the wireless network.
[0050] According to the technical solution described above, compared with the prior art, the present disclosure provides an asynchronous federated learning method in a wireless network. In view of the current situation of complex channel environment, user heterogeneity and diversity, and limited channel resources in the wireless network, the wireless network characteristics are considered, and the periodic aggregation grouping asynchronous learning mechanism based on local update and user scheduling is used, which greatly improves the model training accuracy and the efficiency of federated learning. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0052] Figure 1 The flowchart of the asynchronous federated learning method in the wireless network provided by the present application;
[0053] Figure 2 The schematic diagram of the wireless network system architecture provided by the present application;
[0054] Figure 3 The time slot schematic diagram of the asynchronous federated learning method in the wireless network provided by the present application;
[0055] Figure 4 The data flow transmission schematic diagram between the user, the group and the base station provided by the present application. DETAILED DESCRIPTION
[0056] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0057] As shown in the drawings, Figure 1 the embodiments of the present application disclose a method for asynchronous federated learning in a wireless network, comprising the following steps:
[0058] A wireless network system architecture based on federated learning is constructed, the system architecture comprising N users and a base station, each user moving in a given target area with different moving paths and continuously collecting data (such as image data or video data); the data sets collected by all users are used to collaboratively train a machine learning model; specifically, the set represents the user set, and each user is set to have a local data set D i , the data set size being |D i |; it is set that represents the entire data set collected by all users in the wireless network, the size being |D|, and the data set of each user is different, i.e.
[0059] At the beginning of each round of training, the base station groups the users according to the importance of the local model update of each user, and selects the user with the best communication link state in each group as the "header", and sends the global model to the "header" of each group;
[0060] The "header" of each group sends the global model to the given user (i.e. the user that completes the training within the specified time threshold in the last round of training), and the user trains the local model based on the global model and the local data set; each "header" collects the training completion signals from the users in the group within a specified time, and schedules the users in the group that have completed the training according to a predetermined rule, receives the local model uploaded by the scheduled users and aggregates to generate a group model; wherein the set of users that complete the training within the specified time threshold is denoted as Γ, and the set of scheduled users is denoted as
[0061] Each "header" uploads the generated group model to the base station in a synchronous manner, and the base station aggregates the group models to generate a global model;
[0062] The training target is to find the parameter vector that minimizes the loss function F(ω) of the global model, until the final machine learning model is obtained. The optimization problem of the global model is to jointly train a machine learning model with the local data set of each user distributed in the heterogeneous network, the base station and the user in the wireless network, and the training target is to find the optimal parameter vector ω * minimizes the experience loss function F(ω). The loss function of the global model is the sum of the loss functions of a group of local models;
[0063] The loss function of the local model of user i is defined as:
[0064]
[0065] where ω i (η i ) represents the local model of user i, which is a model age related parameter, η i represents the model age of user i; D i represents the local data set of user i; k represents the data sample from the data set D i ; (x k , y k ) represents the data point; after user i submits (x k , y k ), some information about the loss function F i will be displayed as feedback, and these information is unknown before;
[0066] The loss function of the global model is represented as:
[0067]
[0068] The training target is to find the optimal parameter vector ω * that minimizes the loss function F(ω) of the global model.
[0069]
[0070] where u represents the scheduled user set; D represents the entire data set collected by all users in the wireless network.
[0071] Specifically, the training process mainly includes the following parts, taking the tth round of global training as an example:
[0072] 1) The base station sets a time threshold.
[0073] 2) The base station calculates the communication link state of each user and the importance of their respective local model update. According to the importance of the local model update of each user, the users are classified into J groups. In each group In this way, the user with the best communication link status in each group is selected as the "header" responsible for model aggregation within the group and communication with the base station.
[0074] 3) The base station broadcasts the global model ω t-1 to each group's "header".
[0075] 4) After the "header" receives the global model, it distributes them to part of the users in the group.
[0076] 5) When the user receives the global model, the user begins local training.
[0077] 6) The "header" accepts training completion signals from users within a time threshold, and the set of users who complete training within the time threshold is denoted by Γ, and a set of users is selected from the set to upload their local model, denoted by The set of scheduled users is denoted by
[0078] Users who do not complete local training within the specified time are called "stragglers", and they will not participate in the current global aggregation process. They cannot participate in this round of global model updates, but save the trained model parameters locally and wait for the next round of updates.
[0079] 7) After the "header" receives the local model from the user, it performs model aggregation based on the FedAvg algorithm to generate a group model.
[0080] 8) The base station aggregates the model updates uploaded by each "header" in a synchronous federated learning manner. When the cluster model is aggregated at the base station, the aggregated weight coefficient is related to the importance of each group j.
[0081] 9) The global model is broadcast
[0082] When the users complete their local updates within the specified time, they can receive the updated global model broadcast by the base station.
[0083] In one specific embodiment, in part 5), before the user starts local training after receiving the global model sent by the "header", an initialization process is performed: the received global model is weighted and summed with the local model obtained by previous training as the initial model for current training, denoted by
[0084]
[0085] wherein, denotes the latest local model parameters of user i who failed to deliver to the base station before t rounds, denotes the weight coefficient related to the model age (AoU, Age-of-Update); denotes the global model received by user i in the t-th round of training;
[0086] Users who complete local training within the specified time receive the updated global model from the base station, continue to perform the next initialization process, and update their respective local models using the online gradient descent algorithm.
[0087] Online learning (OL, Online Learning) is a machine learning paradigm for real-time data that uses continuous feedback obtained from data to learn and update the best predictor for future data. The main goal of online learning is to minimize the cumulative error of the entire data sequence. Online learning is based on dynamic streaming data and cannot directly optimize this goal. The online gradient descent (OGD, Online Gradient Descent) algorithm is one of the most popular online learning optimization algorithms. In fact, online gradient descent is similar to stochastic gradient descent in batch learning. Observations are processed in order and not reused. The OGD weight update rule can be written as:
[0088]
[0089] where α t is the learning rate; is the gradient of the benefit loss function. We denote the prediction of each model at t as f t .
[0090] In one specific embodiment, part 6), when users perform local training, each group "header" accepts training completion signals from users within the group within a time threshold, and the set of users who complete training within the time threshold is denoted by Γ. A set of users is selected from the set to upload their local models, and the selected set of users is denoted by Users who do not complete local training within the specified time do not participate in the current global aggregation process, save the trained model parameters locally, and wait for the next round of updates.
[0091] Specifically, when each "header" collects training completion signals from users within the group within a specified time, a priority-based user scheduling strategy is used to sort the priorities of all users who complete training within the group in descending order, and the users are scheduled in descending order. The top-ranked users are scheduled; the priority is a trade-off between channel state information g, model age η, and local model update importance j, and is denoted as:
[0092] c = λ1·η + λ2·g + λ3·j
[0093] Wherein, λ1, λ2, λ3 represent weight coefficients, η represents model update age, g represents channel state information, j represents the importance of user local model update.
[0094] The embodiment of the application combines channel state information, model age and local model importance to determine the priority order of the scheduled users.
[0095] ①For channel state, in each communication round, it is assumed that users access the base station using frequency division multiple access (FDMA) technology, and each user is allocated to a specific frequency band in the electromagnetic spectrum. During the conversation, only one user has the right to access a specific frequency band. It is assumed that the user channel is re-allocated every few global iterations, and the user channel remains unchanged in the communication round.
[0096] The communication delay of the local update uploaded by user i The channel state is evaluated, denoted as:
[0097]
[0098] Wherein, S model represents the size of the model update, R i represents the transmission rate of user i to the base station.
[0099] For user i, the transmission rate of user i to the base station is defined as:
[0100] R i = γ i Blog2(1+SNR i )
[0101] Wherein, γ i B represents the bandwidth allocated to user i, SNR i represents the signal-to-noise ratio of user i received at the base station, defined as Wherein, P i represents the transmission power of user i to the base station, N0 represents the noise variance, represents the path loss between user i and the base station.
[0102] ②For model age, the model age index of user i in the tth round of training is denoted as:
[0103]
[0104]
[0105] Wherein, represents the latest round before the tth global iteration of user i is scheduled, εi (r) represents the transmission scheduling indicator of user i in the rth round, r = 1 represents that user i is scheduled to transmit its local model in the rth round, and r = 0 represents not being scheduled.
[0106] ③ For the importance of local model update:
[0107] The importance j of the local model update of user i is represented as the 2-norm of the local model update Local model update of user is:
[0108]
[0109] wherein, denotes the learning rate, denotes the gradient calculated at user i; ω t denotes the global model generated in the tth round of training; denotes the local model of user i generated in the t+1th round of training.
[0110] In one specific embodiment, federated learning is a classic distributed learning method. It allows users to use local data sets for local training, and then shares the trained model parameters to the base station for model aggregation, so as to update the global model. In federated learning, only model parameters are shared between users and base stations, and original data are not shared, and users do not need to share information with each other. After receiving the local model from the user, the "header" adopts federated average (FedAvg, Federated Average) as the model aggregation method, and generates a group model based on the FedAvg algorithm for model aggregation.
[0111] In the tth round of training, after receiving the local model updates from the scheduled user set , the "header" aggregates the received information and updates the group model as:
[0112]
[0113] wherein, denotes the group model update from the jth group G j ; denotes the scheduled user set; denotes the local model of user i generated in the t-1th round of training; ω t-1 denotes the global model generated in the t-1th round of training.
[0114] In Part 8), the base station aggregates the model updates uploaded by each "header" in a synchronized federated learning manner. When the clustering model is aggregated at the base station, the aggregation weight can be represented as a function inversely proportional to the value of j. At the t-th global iteration, the global model update is represented as:
[0115]
[0116] where H(j) represents the aggregated weight coefficient related to the model update importance j; denotes the importance set of user clusters, and users are divided into J groups according to the importance of local model updates.
[0117] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the apparatus disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0118] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An asynchronous federated learning method in a wireless network, characterized in that, The method comprises the following steps: A wireless network system architecture based on federated learning is constructed, the system architecture comprising N users and a base station, each user moving in a given target area with different moving paths and continuously collecting data; the data sets collected by all users are used to collaboratively train a machine learning model; At the beginning of each round of training, the base station groups the users according to the importance of the local model updates of each user, and selects the user with the best communication link state in each group as a "header", and sends the global model to the "header" of each group; The "header" of each group sends the global model to the given user, and the user trains the local model based on the global model and the local data set; each "header" collects the training completion signals from the users in the group within a specified time, and schedules the users whose training is completed according to a preset rule, receives the local model uploaded by the scheduled users, aggregates the local models to generate a group model; Each "header" uploads the generated group model to the base station in a synchronous manner, and the base station aggregates the group models to generate a global model; The parameter vector that minimizes the loss function F(ω) of the global model is taken as the training target until the final machine learning model is obtained; Using a set Let S = {u1, u2,..., un} represent a set of users, where each user i, has a local data set D i , with size |D i |; let D = U D i represent the entire data set collected by all users in the wireless network, with size |D|, and each user's data set is different, i.e. In the t-th round of training, the update of the group model when the local models of the scheduled users are aggregated is represented as: wherein, denotes the group model update from the j-th group G j ; denotes the set of scheduled users; denotes the local model of user i generated in the t-1-th round of training; ω t-1 denotes the global model generated in the t-1-th round of training; When the group model is aggregated at the base station, the update of the global model is represented as: Wherein, H(j) represents a weight coefficient of aggregation, which is related to the model update importance j; An importance set of user clusters is represented, and users are divided into J groups according to the importance of local model update.
2. The method of claim 1, wherein, Before the user starts local training after receiving the global model sent by the "header", an initialization process is performed: the received global model and the local model obtained by previous training are weighted and summed to obtain an initial model for the current training, represented as: wherein, denotes the latest local model parameters of user i that failed to be delivered to the base station before round t, denotes a weight coefficient related to the model age; denotes the global model received by user i at the tthround of training. The user who completes the local training within a specified time receives the updated global model from the base station, continues to perform the next initialization process, and updates the local model using an online gradient descent algorithm.
3. The method of Claim 1, wherein, When the users perform local training, each group "header" accepts the training completion signals from the users in the group within a time threshold, and the set of users who complete the training within the time threshold is denoted as Γ, and a set of users is selected from the set to upload their local models, and the selected set of users is denoted as Users who do not complete the local training within the specified time do not participate in the current global aggregation process, save the trained model parameters locally, and wait for the next round of updates.
4. The method of federated learning in wireless networks as claimed in claim 1, wherein, When each "header" collects the training completion signals from the users in the group within a specified time, a user scheduling strategy based on priority is adopted, the priority of all users whose training is completed in the group is sorted in descending order, and the users are scheduled in descending order; the priority is represented as a trade-off among channel state information g, model age η and local model update importance j, represented as: c = λ1·η + λ2·g + λ3·j Where λ1, λ2, λ3 represent weight coefficients, η represents model update age, g represents channel state information, and j represents the importance of the local model update of the user.
5. The method of claim 4, wherein, Communication latency for user i's local update upload Assessing the channel state, denoted as: R i = γ i Blog2(1+SNR i ) where S model denotes the size of the model update, R i denotes the transmission rate of user i to the base station; γ i B denotes the bandwidth allocated to user i, SNR i denotes the signal-to-noise ratio at the base station received from user i, defined as where P i denotes the transmission power of user i to the base station, N0denotes the noise variance, denotes the path loss between user i and the base station.
6. The method of federated learning in wireless networks according to claim 4, wherein, User i's model age index in the tth round of training is represented as: wherein, denotes the latest round before the t-th global iteration that user i is scheduled, ε i (r) denotes the transmission scheduling indicator of user i in the r-th round, r = 1 indicates that user i is scheduled to transmit its local model in the r-th round, r = 0 indicates not scheduled.
7. The method of claim 4, wherein, The importance of the local model update for user i is denoted as the 2-norm of the local model update Local model update for a user is: where, denotes the learning rate, denotes the gradient computed at user i; ω t denotes the global model generated in the tth round of training; denotes the local model of user i generated in the t+1th round of training.
8. The method of federated learning in wireless networks according to claim 1, wherein, The loss function of the global model is the sum of the loss functions of a group of local models; The loss function of the local model of user i is defined as: where ω i i denotes the local model of user i, which is a model-age dependent parameter, η i denotes the model age of user i; D i denotes the local dataset of user i; k denotes a data sample from the dataset D i ; after user i submits a data point (x k , y k ), some information about the loss function F i will be revealed as feedback, and these information are unknown before that. The loss function of the global model is represented as: to find the optimal parameter vector ω that minimizes the loss function F(ω) of the global model * Optimization objective, denoted as: wherein, denotes the set of scheduled users; D denotes the entire data set collected by all users in the wireless network.