Terminal scheduling method and device in wireless federated learning

By receiving the local model and loss function estimates from the receiving terminal, the terminal scheduling is dynamically adjusted, which solves the problem of slow convergence speed in wireless federated learning and achieves efficient training in dynamic environments.

CN113723620BActive Publication Date: 2025-11-28HITACHI LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010449214.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-25
Publication Date
2025-11-28
Estimated Expiration
2040-05-25

AI Technical Summary

Technical Problem

In dynamic wireless environments and with varying training data distributions, existing terminal scheduling methods in wireless federated learning struggle to guarantee convergence speed, leading to increased training latency.

Method used

By receiving the local model of the receiving terminal, the value of the loss function, the convexity estimate, and the smoothness estimate, the terminal scheduling in each round is dynamically adjusted, and the terminal selection is optimized by utilizing gradient diversity estimation information, thus achieving efficient federated learning in dynamic environments.

Benefits of technology

By maximizing model accuracy within a limited training latency, this approach addresses the slow convergence speed of existing terminal scheduling algorithms in dynamic environments and improves the efficiency of wireless federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113723620B_ABST
    Figure CN113723620B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a terminal scheduling method and device in wireless federated learning. The method provided by the embodiment of the application dynamically adjusts the scheduled terminal in each round of federated learning through gradient information estimation performed by each terminal in each round of federated learning and time consumption estimation performed by a wireless access point in the round, can maximize the model accuracy that can be obtained by federated learning within limited training delay, and thereby solves the problem that the existing terminal scheduling algorithm can only use certain preset fixed parameters, and it is difficult to guarantee the convergence speed of federated learning under dynamic wireless environment and variable training data distribution.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine learning, and particularly, the present application relates to a terminal scheduling method and device in wireless federated learning. BACKGROUND

[0002] According to Cisco's estimate, in 2021, nearly 850 zettabytes of data will be generated at the network edge every year. These valuable data can bring various artificial intelligence (AI) services for end users by utilizing the rapidly developed deep learning technology in recent years. However, training an AI model (usually a deep neural network) via a conventional centralized training method requires aggregating all raw data to a central server. Since uploading raw data via a wireless channel can consume a large amount of wireless bandwidth resources and introduce huge transmission delay, and when raw data is uploaded to the central server, it will cause privacy problems, so it is impractical to use the traditional centralized training method in a wireless network.

[0003] In order to solve the above problems, the prior art has proposed a new distributed model training framework, called federated learning (FL). Federated learning (FL) is a new framework for analyzing large amounts of distributed data and training learning models at the network edge, which can play a role in protecting data privacy.

[0004] A typical wireless FL system controls the computing power of multiple terminal devices, which are coordinated by a central controller, usually a base station (BS), to train a model in an iterative manner. In each iteration (also called round) of FL, participating devices update local models using their local data and then send the local models to the BS for global model aggregation. By updating model parameters locally, FL utilizes data and computing power distributed across devices, so it can shorten model training latency and maintain data privacy. Therefore, FL has become a potential technology for distributed data analysis and model training in wireless networks, and has been used in many applications, such as resource allocation optimization in vehicle-to-vehicle (V2V) communication and content recommendation for smartphones, etc.

[0005] However, implementing FL in practical wireless networks faces several key challenges that have not been fully addressed. Due to the scarce wireless spectrum resources and limited training delay budget, only a limited number of devices are allowed to upload local models in each round, and the device scheduling strategy affects the convergence rate of FL in two ways. On one hand, in each round, the BS cannot perform global model aggregation until all scheduled devices have finished updating and uploaded their local model updates. Therefore, devices with limited computing capability or poor channel conditions can significantly slow down the model aggregation. Scheduling more devices can lead to longer waiting time per round due to the reduced bandwidth allocated to each scheduled device and the higher probability of having a lagging device. On the other hand, scheduling more devices can increase the convergence rate per round and can potentially reduce the number of rounds needed to reach the same accuracy. Therefore, if the total training time, i.e., the number of rounds multiplied by the average waiting time per round, is considered, device scheduling is necessary and should be carefully optimized to balance the waiting time per round and the number of required rounds to optimize the total training time. Moreover, the scheduling strategy should also adapt itself to the dynamic wireless environment.

[0006] Recently, there have been many studies considering implementing FL in wireless networks. To reduce the upload latency introduced by global model aggregation, existing techniques propose a new analog aggregation technique. For analog aggregation, scheduled devices simultaneously transmit their local models in the wireless multiple-access channel via analog modulation, and due to the waveform superposition property of the wireless channel, the BS is able to receive the aggregated model. Although the analog aggregation technique can greatly reduce the upload latency, strict time synchronization is required among devices. While for FL based on digital transmission, scheduled devices need to share limited wireless resources, and there is already a series of work studying the problem of resource allocation. For example, there are related studies that employ time division multiple access (TDMA) techniques at the media access control (MAC) layer and jointly optimize device CPU frequency, transmission latency, and local model accuracy to minimize the weighted sum of training latency and total device energy consumption. There are also related studies that consider similar FL systems with frequency division multiple access (FDMA), where bandwidth allocation, CPU frequency, transmission latency, and local model precision are jointly optimized. There are also related work that optimizes the frequency of global aggregation of FL systems under heterogeneous resource constraints. In all the above studies, each round of FL involves all devices, but due to the limited wireless bandwidth, this is often infeasible in practical wireless FL applications. In addition, another series of work proposes to use device scheduling to optimize the convergence speed of FL. For example, an existing technique proposes a heuristic scheduling strategy that jointly considers the channel state and the importance of the local update model. However, the proposed scheduling strategy is only evaluated experimentally and cannot theoretically guarantee the convergence performance of FL.

[0007] It can be seen that the terminal scheduling method in wireless federated learning is often based on certain preset fixed parameters, such as scheduling a fixed number of terminals in each round of training, or scheduling as many terminals as possible in a fixed time period. However, these preset fixed parameters are often difficult to dynamically adjust after the wireless federated learning is deployed, which may cause the training convergence speed of the wireless federated learning to slow down in a dynamically changing wireless environment, thereby affecting the performance of the wireless federated learning in a delay-limited scenario. SUMMARY

[0008] The technical problem to be solved by the embodiments of the present application is to provide a terminal scheduling method and device in wireless federated learning, which can ensure the convergence speed of federated learning in a dynamic wireless environment and a variable training data distribution.

[0009] To solve the above technical problems, according to one aspect of the present application, a terminal scheduling method in wireless federated learning is provided, comprising:

[0010] The wireless access point receives the local partial model and the value, convexity estimation value and smoothness estimation value of the local loss function sent by each terminal scheduled in the current round after the completion of the current round of federated learning;

[0011] According to the local partial model sent by each terminal, the global model of the current round is updated; according to the value of the local loss function of all terminals scheduled in the current round, the value of the global loss function of the current round is calculated, and whether to update the optimal global model is determined according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model;

[0012] According to the global model of the last round and the local partial model sent by each terminal, the gradient diversity estimation value of the local loss function of each terminal in the current round is calculated;

[0013] According to the gradient estimation information of each terminal in the current round, the scheduled terminals of the next round of federated learning are generated, wherein the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function.

[0014] According to another aspect of the present application, a terminal scheduling method in wireless federated learning is provided, comprising:

[0015] In the current round of federated learning, the terminal updates the local partial model, obtains the value of the local loss function, and estimates the convexity estimation value and the smoothness estimation value of the local loss function;

[0016] The terminal sends the updated local partial model and the value, convexity estimation value and smoothness estimation value of the local loss function to the wireless access point.

[0017] According to another aspect of the present application, a wireless access point is also provided, comprising:

[0018] The data receiving module is configured to receive the local partial model and the value, convexity estimation value and smoothness estimation value of the local loss function sent by each terminal scheduled in the current round after the completion of the current round of federated learning;

[0019] The model updating module is configured to update the global model of the current round according to the local partial model sent by each terminal; calculate the value of the global loss function of the current round according to the value of the local loss function of all terminals scheduled in the current round, and determine whether to update the optimal global model according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model;

[0020] a diversity calculation module configured to calculate a gradient diversity estimation value of a local loss function of each terminal in a current round according to a global model of a previous round and a local model sent by each terminal;

[0021] a scheduled terminal generation module configured to generate a scheduled terminal of a next round of federated learning according to gradient estimation information of each terminal in the current round, wherein the gradient estimation information comprises a convexity estimation value, a smoothness estimation value and a gradient diversity estimation value of the local loss function.

[0022] According to another aspect of the present application, there is also provided a wireless access point comprising a processor, a memory and a program stored in the memory and executable in the processor, which, when executed by the processor, implements the steps of the terminal scheduling method in the wireless federated learning as described above.

[0023] According to another aspect of the present application, there is also provided a terminal comprising:

[0024] a model updating module configured to update a local model in a current round of federated learning, obtain a value of a local loss function and estimate a convexity estimation value and a smoothness estimation value of the local loss function;

[0025] a data sending module configured to send the updated local model and the value, the convexity estimation value and the smoothness estimation value of the local loss function to a wireless access point.

[0026] According to another aspect of the present application, there is also provided a terminal comprising a processor, a memory and a program stored in the memory and executable in the processor, which, when executed by the processor, implements the steps of the terminal scheduling method in the wireless federated learning as described above.

[0027] The present application also provides a computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the terminal scheduling method in the wireless federated learning as described above.

[0028] Compared with the prior art, the terminal scheduling method and device in the wireless federated learning provided by the present application have at least the following beneficial effects: the present application can dynamically adjust the scheduled terminals in each round by gradient information estimation performed by each terminal in each round of federated learning and current round time estimation performed by a wireless access point, so as to maximize the model accuracy that can be obtained by federated learning within a limited training delay, thereby solving the problem that the existing terminal scheduling algorithm can only use certain preset fixed parameters, which makes it difficult to ensure the convergence speed of federated learning under dynamic wireless environment and variable training data distribution. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0030] Figure 1 An application scenario diagram of the terminal scheduling method of the embodiments of the present application;

[0031] Figure 2 A flowchart of the terminal scheduling method of the embodiments of the present application applied to the wireless access point side;

[0032] Figure 3 A flowchart of the terminal scheduling method of the embodiments of the present application applied to the terminal side;

[0033] Figure 4 A flowchart of the terminal scheduling method of the embodiments of the present application applied to the terminal side;

[0034] Figure 5 A flowchart of the terminal model updating in each round of federated learning of the embodiments of the present application;

[0035] Figure 6 An interaction flowchart of the terminal scheduling method of the embodiments of the present application;

[0036] Figure 7 A structure diagram of the wireless access point provided by the embodiments of the present application;

[0037] Figure 8 Another structure diagram of the wireless access point provided by the embodiments of the present application;

[0038] Figure 9 A structure diagram of the terminal provided by the embodiments of the present application;

[0039] Figure 10 Another structure diagram of the terminal provided by the embodiments of the present application. DETAILED DESCRIPTION

[0040] In order to make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail in combination with the drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help a comprehensive understanding of the embodiments of the present application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, in order to be clear and concise, the description of known functions and structures is omitted.

[0041] It should be understood that all instances in which terms are preceded by“one or more” or“one or more of the” are intended to encompass one, more than one, or all of the preceding listed items. It is further noted that the terms“comprise,”“comprising,”“include,”“including” and“comprising” or“comprises” when used in this specification are taken to specify the presence of stated features, integers, steps or components but do not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof. It is further noted that the term“or” as used in a phrase such as“A or B” does not mean that “A and B” is excluded.

[0042] In various embodiments of the present application, it should be understood that the magnitude of the serial number of the following processes does not mean the order of execution, the execution order of the processes should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0043] The embodiment of the present application provides a terminal scheduling method in wireless federated learning, which can maximize the accuracy of the model obtained by training within the limited training delay in the dynamic wireless environment and under the condition of arbitrary training data distribution, thereby solving the problem that the existing terminal scheduling algorithm can only use certain preset fixed parameters, which leads to the difficulty in guaranteeing the convergence speed of federated learning under the dynamic wireless environment and the variable training data distribution.

[0044] Please refer to Figure 1 , Figure 1A block diagram of a wireless communication system to which embodiments of the present application can be applied is shown. The wireless communication system includes a plurality of terminals 101 and a wireless access point 102. Among them, the terminal 101 can also be referred to as a user terminal or a user equipment (UE), and the terminal 101 can be specifically a terminal-side device such as a mobile phone, a tablet personal computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a personal digital assistant (Personal Digital Assistant, PDA), a mobile Internet device (Mobile Internet Device, MID), a wearable device, or a vehicle-mounted device, and it should be noted that the specific type of terminal 101 is not limited in the embodiments of the present application. The wireless access point 102 can be a wireless transceiver point (TRP), a base station, and a core network element, wherein the above-mentioned base station can be a base station of 5G and later versions (such as gNB, 5G NR NB, etc.), or a base station in other communication systems (such as eNB, WLAN access point, or other access points, etc.), wherein the base station can also be referred to as a node B, an evolved node B, an access point, a base transceiver station (BTS), a radio base station, a radio transceiver, a basic service set (BSS), an extended service set (ESS), a node B, an evolved node B (eNB), a home node B, a home evolved node B, a WLAN access point, a WiFi node, or some other appropriate term in the field, as long as the same technical effect is achieved, and the base station is not limited to a specific technical term.

[0045] The terminal scheduling method provided by the embodiments of the present application is suitable for use in a wireless federated learning process as shown, which includes a wireless access point and a plurality of terminals in the coverage of the wireless access point, and the main steps of the method include: Figure 1 (1) The terminal estimates the gradient on the basis of wireless federated learning, and sends the gradient estimation information to the wireless access point. (2) The wireless access point schedules the terminals according to the gradient estimation information. Specifically:

[0046] The process of a federated learning application generally includes: (1) the core network receives a model training task; (2) the core network allocates the training task to each wireless access point, including the model to be trained, the training learning rate, the number of local model updates, and the limit of the total training delay; (3) the wireless access point (such as the wireless access point 102 in Figure 1 After receiving the training task allocated by the core network, the wireless access point (such as the wireless access point 102 in Figure 1participate in the federated learning; (4) after the federated learning is completed, the wireless access point can transmit the model parameters obtained through the training back to the core network or leave the model parameters in the terminal.

[0047] Figure 1 A wireless federated learning system in a wireless access point coverage is provided. The wireless federated learning includes a plurality of mobile terminals 101 and a wireless access point 102. The wireless federated learning is an iterative distributed machine learning model training framework. In each iteration (referred to as a round), first, each participating terminal downloads the current global model parameters from the wireless access point (usually in the form of broadcast by the wireless access point, such as Figure 1 Step 103 in FIG. 1). After the download is completed, all terminals update the local model according to their own local training data set (such as Figure 1 Step 104 in FIG. 1), and after the update is completed, upload the local model update to the wireless access point through the wireless network (such as Figure 1 Step 105 in FIG. 1). After the wireless access point receives the model updates uploaded by all participating devices in the current round, the global model is updated (such as Figure 1 Step 106 in FIG. 1), and the next round of federated learning can be entered.

[0048] The method of the embodiment of the present application will be described below from the wireless access point side and the terminal side respectively.

[0049] Please refer to Figure 2 The terminal scheduling method in the wireless federated learning provided by the embodiment of the present application, when applied to the wireless access point 102 shown in Figure 1 , includes the following steps.

[0050] Step 21, the wireless access point receives the local model, the value of the local loss function, the convexity estimation value and the smoothness estimation value of each terminal scheduled in the current round after the completion of the current round of federated learning.

[0051] Here, in each round of federated learning, each scheduled terminal will update the local model of the terminal in the current round of federated learning, obtain the value of the local loss function, and estimate the convexity estimation value and the smoothness estimation value of the local loss function, and then the terminal will send the updated local model, the value of the local loss function, the convexity estimation value and the smoothness estimation value to the wireless access point. The wireless access point can receive the above data sent by each scheduled terminal.

[0052] Step 22, updating the global model of the current round according to the local partial model sent by each terminal; calculating the value of the global loss function of the current round according to the value of the local loss function of all terminals scheduled in the current round; and determining whether to update the optimal global model according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model.

[0053] Here, after the wireless access point receives the updated local partial model sent by all terminals scheduled in the current round of learning, the global model of the current round can be updated according to the local partial model sent by each terminal.

[0054] In addition, in the embodiment of the application, the wireless access point can also calculate the value of the global loss function of the current round according to the value of the local loss function of all terminals scheduled in the current round, and determine whether to update the optimal global model according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model. If the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model, the optimal global model is updated to the global model obtained in the current round, otherwise, the optimal global model remains unchanged. Here, the optimal global model is the optimal global model obtained until the current round of federated learning.

[0055] Step 23, calculating the gradient diversity estimation value of the local loss function of each terminal in the current round according to the global model of the last round and the local partial model sent by each terminal.

[0056] Here, the wireless access point also calculates the gradient diversity of the local loss function of each terminal in the current round based on the local partial model sent by each terminal. Specifically, the wireless access point can estimate the gradient of the local loss function of each terminal in the current round according to the global model of the last round and the local partial model sent by each terminal; calculate the gradient of the global loss function of the current round according to the gradient of the local loss function of all terminals scheduled in the current round; and then calculate the gradient diversity of the local loss function of each terminal in the current round according to the gradient of the local loss function of each terminal in the current round and the gradient of the global loss function of the current round.

[0057] Step 24, generating the scheduled terminals of the next round of federated learning according to the gradient estimation information of each terminal in the current round, wherein the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function.

[0058] Here, the wireless access point can weight and sum the gradient estimation information of all terminals participating in federated learning in the current round according to the gradient estimation information of each terminal in the current round and the weight of the terminal in the proportion of the local training data set in the global training data set, to obtain the global value of the gradient estimation information of all terminals in the current round, the gradient estimation information including the convexity estimation value, the smoothness estimation value and the diversity of the gradient of the local loss function; then, according to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round, the scheduled terminals of the next round of federated learning are generated.

[0059] For example, the global value of the gradient estimation information of all terminals in the current round can be calculated according to the following formula:

[0060] And

[0061] Wherein, D represents all terminals participating in federated learning; D i D represents the size of the local training data set; D represents the size of the global training data set; D represents the global value of the convexity estimation value of the local loss function of all terminals participating in federated learning; D D represents the global value of the smoothness estimation value of the local loss function of all terminals participating in federated learning; D represents the global value of the gradient diversity estimation value of the local loss function of all terminals participating in federated learning; D represents the convexity estimation value of the local loss function of terminal i; D represents the smoothness estimation value of the local loss function of terminal i; D represents the gradient diversity estimation value of the local loss function of terminal i.

[0062] More specifically, the terminal scheduling of the next round of federated learning according to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round can be as shown in the following table: Figure 3

[0063] Please refer to Figure 3 In the case that the number of terminals in the candidate terminal set is greater than 0, the following steps are repeatedly executed until the calculated training cost C value no longer decreases, and the terminals in the first set are taken as the scheduled terminals of the next round of federated learning:

[0064] Step 301, traversing the terminals in the candidate terminal set, respectively estimating the time consumption of the federated learning in the current round of learning with the terminal and the first set as the scheduled terminal, and determining the target terminal with the shortest time consumption.

[0065] ​Here, the estimation of the time consumption of the federated learning of the terminal and the first set as scheduled terminals in the current round can be performed according to the wireless network standard, network available bandwidth, channel conditions between the terminal and the wireless access point, and other factors. More detailed estimation methods can be referred to related prior art, which will not be described herein.

[0066] In step 302, the total number of rounds of federated learning is estimated according to the preset total training time budget and the shortest time consumption. The value of the training cost C of the federated learning of the target terminal and the first set and as scheduled terminals is calculated according to the total number of rounds, the global value of the convexity estimation value in the current round, the global value of the smoothness estimation value in the current round, and the gradient diversity of the local loss function of each terminal in the current round.

[0067] Here, the ratio of the preset total training time budget to the shortest time consumption is rounded down to obtain the estimated value of the total number of rounds of federated learning.

[0068] In step 303, it is determined whether the training cost C value calculated in the current round decreases relative to the training cost C value calculated in the last round. If yes, proceed to step 304, otherwise, end the process.

[0069] In step 304, when the value of the training cost C calculated in the current round decreases relative to the locally maintained C value, the target terminal is added to the first set, the target terminal is deleted from the candidate terminal set, and the locally maintained C value is updated to the value of the training cost C calculated in the current round. In addition, when the C value is calculated for the first time, since the C value is not locally maintained, the target terminal is directly added to the first set, and the C value calculated is used as the initial value of the locally maintained C value.

[0070] Next, a calculation method of the value of the training cost C is provided. Specifically, the value of the training cost C can be calculated according to the following formula:

[0071]

[0072] wherein,

[0073]

[0074]

[0075] η represents a preset learning rate; is a preset system parameter; τ represents the estimated number of executable rounds of federated learning; τ represents the number of updates to the local model in each round of federated learning; ρ represents all terminals participating in federated learning. The global value of the convexity estimate of the local loss function; h(τ) represents; M represents the set of all terminals participating in federated learning. The number of elements in the middle; |Π| represents the number of terminals scheduled in the current round; β represents the global value of the smoothness estimate of the local loss function; D i D represents the size of the local training dataset; δ represents the size of the global training dataset; i δ represents the gradient diversity estimate of the local loss function of terminal i; δ represents the total number of terminals participating in federated learning. The global value of the gradient diversity of the local loss function. The derivation of the above formula is further explained below.

[0076] It can be seen that, The value of C is determined by the scheduled terminal in the current round. Therefore, by calculating the magnitude of the C value under different first sets (i.e., different scheduled terminals), we can compare the impact of various first sets on the convergence speed of federated learning, and thus obtain a first set that makes federated learning converge faster.

[0077] Through the above steps, this embodiment of the invention introduces the gradient estimation information of the terminal in the current round when determining the terminal to be scheduled in each round. In addition to basic federated learning local model updates and uploading model update information, the scheduled terminal also estimates and uploads gradient information. The wireless access point estimates the contribution of each terminal to the convergence speed of federated learning based on the gradient estimation information uploaded by the terminal, thereby continuously selecting the device that consumes the least time in model updates, thus maximizing the convergence speed of federated learning through terminal scheduling.

[0078] Before step 23 above, the wireless access point can determine whether the time consumed by the federated learning up to the current round exceeds the preset total training time budget; if it exceeds the preset total training time budget, the optimal global model is output as the training result and the process ends; if it does not exceed the preset total training time budget, step 23 above is executed. In this way, an iterative training process can be implemented until the final global model is obtained.

[0079] Please refer to Figure 4 The terminal scheduling method in wireless federated learning provided in this embodiment of the invention is applied to... Figure 1 When terminal 101 is shown, it includes:

[0080] In step 41, the terminal updates the local model in the current round of federated learning, obtains the value of the local loss function, and estimates the convexity estimate value and the smoothness estimate value of the local loss function.

[0081] Here, the terminal can use the local loss function to respectively calculate a first loss value of the global model received in the current round of federated learning and a second loss value of the local model updated in the current round of federated learning, calculate a first norm of the difference between the first loss value and the second loss value, and calculate a second norm of the difference between the global model received in the current round of federated learning and the local model updated in the current round of federated learning, calculate a ratio of the first norm to the second norm to obtain the convexity estimate value of the local loss function, then calculate a third norm of the difference between the gradient of the first loss value and the gradient of the second loss value, and calculate a ratio of the third norm to the second norm to obtain the smoothness estimate value of the local loss function.

[0082] In step 41, the terminal sends the updated local model and the value, convexity estimate value and smoothness estimate value of the local loss function to the wireless access point.

[0083] Through the above steps, the terminal of the embodiment of the application sends the gradient estimation information obtained in the current round of learning to the wireless access point, so that the wireless access point can use the above gradient estimation information to generate the scheduled terminal in the next round of federated learning, thereby helping the wireless access point to select the device that consumes the least time in model updating, and further realizing the maximization of the convergence speed of federated learning through terminal scheduling.

[0084] Figure 5 Further, a flowchart of the terminal in each round of federated learning is given, which includes:

[0085] In step 501, in each round of federated learning, the terminal determines whether local model updating is needed according to whether the current round is scheduled. In this step, the information needed for the terminal to determine whether to perform local model updating includes the set of scheduled terminals determined in the last round of federated learning, i.e., whether each terminal participates in the current round of training.

[0086] In step 502, if yes, the terminal first uses the stochastic gradient descent (SGD) or gradient descent (GD) algorithm to update the local machine learning model parameters using the local training data set. Here, the information needed for updating the model includes the local model parameters and the local training data set.

[0087] Step 503: Subsequently, the terminal estimates the smoothness and convexity estimates of the local loss function (collectively referred to as gradient estimation information in this paper) based on the changes in model parameters before and after the update, and uploads the gradient estimation information and local model update information to the wireless access point. Here, the information required to calculate the gradient estimation information includes: local model parameters before the update, local model parameters after the update, and local training dataset.

[0088] Figure 6 This is a flowchart illustrating an interaction between a wireless access point and a terminal, provided in an embodiment of the present invention. Specifically, it includes:

[0089] Step 601: Consider a wireless federated learning with a total training latency constraint. First, all terminals participating in the federated learning are connected by a wireless access point, and the gradient estimation information of each terminal is initialized.

[0090] Step 602: At the beginning of each round of federated learning, determine whether the training time consumed by federated learning up to the current moment exceeds the preset total training time budget. If it does, end the federated learning; otherwise, start the current round of federated learning. The relevant information required for this step includes: the limit of the total training time budget and the training time already consumed.

[0091] Step 603, in each round, first execute Figure 3 The terminal scheduling algorithm shown determines the terminals scheduled in the current round. The relevant information required for this step is as follows: Figure 3 All the information needed for steps 301-304 in the process.

[0092] Step 604: Subsequently, all terminals execute the terminal federated learning process shown in Figure 4 in parallel. The relevant information required for this step is as follows: Figure 5 All the information needed for steps 501-503 in the process.

[0093] Step 605: Finally, after receiving the gradient estimation information and local model update information uploaded by each scheduled terminal, the wireless access point updates the global model information and records the gradient estimation information. The information required in this step includes: the updated model parameters of the scheduled terminal, the smoothness, convexity, and gradient diversity estimates of the local loss function of the scheduled terminal, etc., and then proceeds to the next round of federated learning.

[0094] Taking a wireless federated learning system comprising two terminals A and B and a wireless access point C as an example, the method described above in the embodiments of the present invention includes the following steps:

[0095] 1) Terminals A and B are connected to wireless access point C respectively. Wireless access point C initializes the gradient estimation information of terminals A and B stored therein.

[0096] 2) the wireless access point C judges whether the total training time is exhausted, if not, step 3 is continuously executed, otherwise, the current federated learning process is ended;

[0097] 3) the wireless access point C executes the terminal scheduling algorithm shown in the formula (1); Figure 3

[0098] 4) the terminals A and B respectively execute the terminal federated learning process shown in the formula (2); Figure 5

[0099] 5) the wireless access point C receives the model update and gradient estimation information uploaded by the scheduled terminal;

[0100] 6) the wireless access point C performs global model update, updates the gradient estimation information of the terminals A and B saved by the wireless access point C, and returns to step 2.

[0101] The terminal scheduling method of the embodiment of the application is introduced above, the embodiment of the application schedules the terminals on the wireless federated learning algorithm deployed in a wireless access point and within the coverage range of the wireless access point, and has the following advantages:

[0102] The embodiment of the application can dynamically adjust the scheduled terminal in each round through the gradient information estimation performed by each terminal in each round of federated learning and the current round time consumption estimation performed by the wireless access point, so as to maximize the model accuracy that can be obtained by the federated learning within the limited training delay, thereby solving the problem that the existing terminal scheduling algorithm can only use some preset fixed parameters, and it is difficult to guarantee the convergence speed of the federated learning under the dynamic wireless environment and the variable training data distribution.

[0103] The related derivation process of the calculation formula of the training cost C value described above is introduced here. Table 1 gives the definition of the related parameters or variables that may be involved in the embodiment of the application. In addition, the symbol “←” generally represents that the parameter on the right side of the symbol is assigned to the variable on the left side of the symbol. It should be noted that the following derivation process is only taken as an example of the application scenario of the FDMA system, and the above application scenario does not constitute a limitation on the application scenario of the embodiment of the application, and the embodiment of the application can also be applied to other scenarios.

[0104]

[0105] Table 1

[0106] Firstly, the system model is as follows:

[0107] Consider a FL system consisting of one BS and M terminals, and these devices are served by The index. Each terminal i has a local data set including ​​a training data sample. Here x i,d is the d-th s-dimensional input data vector at terminal i, y i,d is the label output of x i,d . The entire dataset is denoted by D , where the total number of samples is Here it is assumed that all local datasets do not overlap with each other.

[0108] The goal of the training process of federated learning is to find the model parameters w such that a certain loss function over the entire dataset is minimized. The optimization objective can be expressed as

[0109]

[0110] where the local loss function F i (w) over the dataset D i is defined as

[0111]

[0112] The loss function f(w, x i,d , y i,d ) is used to capture the error of the model parameters w on the input-output data pair {x i,d , y i,d}. Table 2 gives some examples of commonly used loss functions used in machine learning models.

[0113]

[0114] Table 2

[0115] A. Federated Learning over Wireless Networks

[0116] FL uses an iterative method to solve the problem of equation (1), and each loop indexed by k contains the following 3 steps.

[0117] 1) The BS first decides which devices to schedule to participate in the current round, i.e., the set of terminal devices scheduled in round k (i.e., the k-th round) is denoted by Π k . Then the base station broadcasts the current global model to all scheduled devices, where denotes the historical scheduling decisions up to the (k-1)-th round.

[0118] 2) Each scheduled device i e Π k receives the global model (e.g., w ), and updates its local model by applying a gradient descent algorithm on its local dataset:

[0119]

[0120] where η is the learning rate. The local model update is repeated τ times, and τ is considered as a fixed system parameter. Then, the updated local model is uploaded to the BS. In the following sections of this document, w i,k is used to denote

[0121] 3) After receiving all uploaded models, the BS aggregates them (i.e., performs a weighted average of the uploaded local models according to the size of the local data set) to obtain a new global model:

[0122]

[0123] B. Latency Model

[0124] Consider an arbitrary round k, the total latency of the k-th round is composed of the following parts:

[0125] 1) Computation latency: To characterize the randomness of the computation latency of the local model update, a shifted exponential distribution can be used:

[0126]

[0127] where a i > 0 and μ i > 0 are parameters indicating the maximum value and fluctuation of the computation capability, respectively. It is assumed that a i and μ i remain constant throughout the training process. Moreover, the computation latency of the model aggregation at the BS is ignored here due to the relatively strong computation capability of the BS and the low complexity of the model aggregation.

[0128] 2) Communication latency: Regarding the local model upload phase of the scheduled terminal devices, consider a FDMA system with total bandwidth B, where the bandwidth allocated to terminal device i is denoted as γ i,k B, where γ i,k is the allocation ratio satisfying , where 0 ≤ γ i,k ≤ 1. Thus, the achievable transmission rate (bit / s) can be written as where P i denotes the transmit power of terminal device i, which remains constant between different rounds, h i,k denotes the corresponding channel gain, and N0 is the noise power density. Thus, the communication latency time of terminal device i is:

[0129]

[0130] where S denotes wi,k in bits. Since the transmit power of the BS is much higher than that of the terminal devices, and the BS uses the entire downlink bandwidth to broadcast the model, the latency of the broadcast global model is ignored here.

[0131] Due to the synchronization model aggregation of the FL, the total delay per round is determined by the slowest device among all the scheduled devices, i.e.,

[0132]

[0133] C. Problem Formulation

[0134] A joint bandwidth allocation and scheduling problem is formulated to optimize the convergence rate of the FL with respect to time. Specifically, let K denote the total number of rounds within the training time budget T, and minimize the global loss function within T where is the optimal model parameter with the smallest global loss function value throughout the training process, defined as follows:

[0135]

[0136] For simplicity, use [K] and [M] to denote {1, 2,..., K} and {1, 2,..., M}, respectively. The optimization problem can be expressed as:

[0137]

[0138] s.t.

[0139]

[0140]

[0141]

[0142]

[0143] where Here,

[0144]

[0145] To solve P1, it is necessary to know how K and Π [K] affect the loss function of the final global model, i.e. Because it is almost impossible to find an exact analytical expression [K] for K and Π , it is converted to find the upper bound of . And the local computation latency and the wireless channel state hi,k can vary with different k, thus is the optimal scheduling policy can be non-stationary. Moreover, due to the iterative nature of FL, the global model is related to the scheduling policy of all past rounds. Therefore, it is difficult to obtain upper bound under non-stationary scheduling policy. Another difficulty is that the problem has a high-dimensional solution space, because the optimization variable [K] , γ [K] , is related to K, which itself is an optimization variable.

[0146] In the following, P1 is solved in the following way. First, P1 is separated into two sub-problems, i.e., device scheduling and bandwidth allocation. Then the bandwidth allocation sub-problem is solved analytically. Further, based on the derived convergence bound of FL under optimal bandwidth allocation and fixed random scheduling policy, the device scheduling sub-problem is approximately solved using a joint device scheduling and bandwidth allocation algorithm.

[0147] Here, a solution to the joint device scheduling and bandwidth allocation is provided.

[0148] P1 is decomposed into the following form. First, given the scheduling policy of the k-th round (i.e., Π k ), the bandwidth allocation sub-problem of the k-th round can be expressed as:

[0149]

[0150] s.t.

[0151]

[0152]

[0153] Then, the optimal value of is denoted as The device scheduling sub-problem can be expressed as:

[0154]

[0155] s.t.

[0156]

[0157] A. Bandwidth Allocation

[0158] The P2 optimal solution can be obtained using the following theorem:

[0159] Theorem 1: The optimal bandwidth allocation of P2 is:

[0160]

[0161] in, W(·) is the Lambert-W function, t * (Π k Let ) be the objective value of P2, such that:

[0162]

[0163] Due to the Lambert-W function term in (10), where the independent variable is via Γ i,k t * (Π k Therefore, a binary search algorithm is proposed to numerically obtain the optimal value of P2. Starting from the initial search region [t]... low , t up Starting with the target value t above the upper bound of [], the bandwidth required for the current target value t is iteratively calculated according to (9), and the search area is halved based on whether the bandwidth meets the bandwidth constraint. Given the accuracy requirement of the search results (i.e., ε), the complexity of the algorithm is []. The magnitude.

[0164] B. Convergence Analysis

[0165] To solve P3, we analyze the convergence of FL under a fixed random scheduling strategy Π, where Π randomly schedules a fixed number (specifically |Π|) of devices among all devices in each round. (Derivation) The lower limit, its explanation accuracy and w * The error between the accuracy, where defined in (8) The optimal model parameters, w, have the minimum global loss function value throughout the entire training process. * These are the true optimal model parameters that minimize F(w).

[0166] Before proceeding with the convergence analysis, some notation is introduced, as shown in Table 1. For a fixed random scheduling policy П, the notation used is... to indicate Introduce two auxiliary model parameter vectors, where w k (k≥1) is used to indicate the relationship at the beginning of the k-th round. Synchronize and schedule all devices in the k-th round (i.e. The updated model parameter vector, v k (k≥1) is used to indicate the relationship at the beginning of the k-th round. The model parameter vector is synchronized and updated via centralized gradient descent. During the k-th round of centralized gradient descent, v k according to Updated τ times.

[0167] For ease of analysis, the following assumptions are made on the loss function F(·).

[0168] Assumption 1. Assume the following loss function for all terminal devices:

[0169] F i (w) is convex;

[0170] F i (w) is ρ-Lipschitz, i.e., for any w, w', ||F i (w) - F i (w')|| ≤ ρ||w - w'||;

[0171] F i (w) is β-smooth, i.e., for any w, w', w - w' = ∑i∈[m]ai(w - w')i,

[0172] For any i and w, the difference between the local gradient and the global gradient can be bounded by and define

[0173] These assumptions are widely used in the literature for FL convergence analysis, although the loss function of some machine learning models (e.g., neural networks) does not fully satisfy them, especially the convexity assumption. However, the inventors found through experimental results that the proposed scheduling strategy works well even for neural networks.

[0174] First, an upper bound of the difference between the global model aggregated from the fixed random scheduling strategy Π (i.e., ) and w k is obtained.

[0175] Definition 1. A strategy Π is defined as a fixed random scheduling strategy if and only if Π is a uniformly random sample of a subset of size |Π| from all terminal devices and |Π| remains constant throughout the training process.

[0176] Theorem 2. For any k and fixed random scheduling strategy Π (|Π| ≥ 1), there has been

[0177]

[0178] where The expectation value takes into account the randomness of Π.

[0179] Note that the learning rate η > 0, otherwise the gradient descent process becomes insignificant. Also have β > 0 and δ i > 0, otherwise the loss function and its gradient become trivial. Thus, for x = 1, 2,..., τ, gi (x) > 0, therefore A > 0, where A is defined in formula (11). Clearly, A is independent of Π, and As |П| decreases, scheduling fewer devices leads to The larger upper limit, that is A larger upper limit means that scheduling fewer devices results in slower convergence in terms of rounds. Furthermore, when When scheduling all devices, B(П) reaches its lower limit of zero, which is consistent with w. k The definition is consistent.

[0180] Compare Theorem 2 with existing technology. k By combining convergence analysis, we can obtain the following theorem, which defines the optimal model parameters throughout the entire training process. The loss function and the true optimal model parameters w * The differences between them.

[0181] Theorem 3: When When and П are fixed random scheduling policies, and F(w) * The difference between them satisfies:

[0182]

[0183] in,

[0184] The expected value takes into account the randomness of П.

[0185] Theorem 3 quantifies the trade-off between the waiting time per round and the required number of rounds. Scheduling more devices increases the waiting time per round and thus reduces the number of possible rounds (i.e., K) within a given training time budget T, while a smaller K can reduce the... The lower bound. Meanwhile, scheduling more devices lowers the value of B(Π) as shown in Theorem 2, while a smaller B(Π) can increase... The lower bound of the time limit. Therefore, the scheduling strategy should be carefully optimized to balance the trade-off between the waiting time per round and the number of rounds required, in order to minimize the loss function of the optimal global model (i.e., ).

[0186] C. Equipment Scheduling Algorithm

[0187] In real-world wireless networks, due to fluctuations in wireless channels and device computing power, local computation latency increases. and wireless channel status h i,k This may change in different rounds k. Therefore, for k′>k, in the k-th round, and h i,k′unknown, which makes constraint (C3.1) in P3 difficult to handle, because for k' > k, unknown. To solve this problem, P3 is solved approximately here. Consider any round k and any scheduling policy Π k , approximately assume that Π k is used throughout the training process, so the total number of communication rounds can be approximated as where denotes the floor function. Therefore, P3 can be approximated as a myopic problem in each round:

[0188]

[0189] s.t.

[0190]

[0191] For a given global loss function, F(w * ) is constant, and therefore minimizing is equivalent to maximizing Moreover, the learning rate η can be chosen to be small enough to satisfy Therefore, the objective of P4 can be approximated by maximizing the lower bound of according to Theorem 3, which is equivalent to minimizing the denominator of the right-hand side of (12):

[0192]

[0193] s.t.

[0194]

[0195] The above approximate scheduling subproblem P5 is exactly the training cost C value in the foregoing.

[0196] The derivation process of the formula of the training cost C value is introduced above.

[0197] A specific implementation of the terminal scheduling scheme applying the embodiments of the present application will be further introduced in the following. Since constraint (C5.2) is still combinatorial optimization, the approximate scheduling subproblem P5 is difficult to solve. Therefore, the following greedy scheduling algorithm is proposed for the scheduled device.

[0198] Greedy scheduling algorithm

[0199] S1, initialize Π as an empty set

[0200] S2, perform greedy scheduling: where t *(·) is given by a preset algorithm, which can be various existing algorithms in the prior art, and the present document does not limit this;

[0201] S3, estimate and update and П←П∪{x};

[0202] S4, calculate

[0203] S5, when the following loop is executed:

[0204] S6, greedy scheduling where t * (·) is given by a preset algorithm;

[0205] S7, estimate

[0206] S8, calculate

[0207] S9, if C'>C, the following loop is executed:

[0208] S10, C'>C, end the flow;

[0209] S11, otherwise, go to S12;

[0210] S12, update Π←Π∪{x}, C←C'

[0211] S13, end the S9 loop;

[0212] S14, end the S5 loop;

[0213] S15, return Π.

[0214] In the above greedy scheduling algorithm, the model update and the device with the least upload time are iteratively selected into the scheduling device set (S6) until the objective function of P5 starts to increase (S9-S10). The complexity of the above greedy scheduling algorithm is of the order of , which is more efficient than the natural brute force search algorithm of the order of .

[0215] However, since the unknown true optimal model w * is not insignificant for the analysis of the value of , the value of is regarded as a fixed system parameter throughout the training process. It is shown in experiments that fixing performs well on different system settings (such as data distribution and cell radius), while searching It is not difficult to find appropriate values.

[0216] The above introduces various methods of the embodiments of the application, and the following further provides devices for implementing the above methods.

[0217] Please refer to Figure 7 The wireless access point 70 provided by the embodiments of the application comprises:

[0218] The data receiving module 71 is configured to receive, by the wireless access point, the local partial model, the value of the local loss function, the convexity estimation value and the smoothness estimation value sent by each terminal after the completion of the federated learning in the current round.

[0219] The model updating module 72 is configured to update the global model in the current round according to the local partial model sent by each terminal, calculate the value of the global loss function in the current round according to the value of the local loss function of all the terminals scheduled to the current round, and determine whether to update the optimal global model according to whether the value of the global loss function in the current round is better than the value of the global loss function corresponding to the optimal global model.

[0220] The diversity calculation module 73 is configured to calculate the gradient diversity estimation value of the local loss function of each terminal in the current round according to the global model in the last round and the local partial model sent by each terminal.

[0221] The scheduled terminal generation module 74 is configured to generate the scheduled terminals for the federated learning in the next round according to the gradient estimation information of each terminal in the current round, wherein the gradient estimation information comprises the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function.

[0222] Through the above modules, the wireless access point of the embodiments of the application can maximize the model accuracy that the federated learning can obtain within the limited training delay.

[0223] Optionally, the diversity calculation module is further configured to:

[0224] estimate the gradient of the local loss function of each terminal in the current round according to the global model in the last round and the local partial model sent by each terminal.

[0225] calculate the gradient of the global loss function in the current round according to the gradient of the local loss function of all the terminals scheduled to the current round.

[0226] calculate the gradient diversity estimation value of the local loss function of each terminal in the current round according to the gradient of the local loss function of each terminal in the current round and the gradient of the global loss function in the current round.

[0227] Optionally, the scheduled terminal generation module is further configured to

[0228] According to the gradient estimation information of each terminal in the current round and the weight of the terminal taken as the ratio of the local training data set of the terminal in the global training data set, the gradient estimation information of all terminals participating in the federated learning in the current round is weighted and summed to obtain the global value of the gradient estimation information of all terminals in the current round, and the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function;

[0229] According to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round, the scheduled terminals of the next round of federated learning are generated.

[0230] Optionally, the scheduling terminal generation module is further configured to

[0231] initialize a first set as empty;

[0232] In the case that the number of terminals in the candidate terminal set is greater than 0, the following steps are repeatedly executed until the calculated training cost C value no longer decreases, and the terminals in the first set are taken as the scheduled terminals of the next round of federated learning:

[0233] traverse the terminals in the candidate terminal set, respectively estimate the time consumption of the federated learning in the current round with the terminal and the first set as scheduled terminals, and determine the target terminal with the shortest time consumption;

[0234] According to the preset total training time budget and the shortest time consumption, the total number of rounds of federated learning is estimated; according to the total number of rounds, the global value of the convexity estimation value in the current round, the global value of the smoothness estimation value in the current round, and the gradient diversity of the local loss function of each terminal in the current round, the value of the training cost C value of the federated learning with the target terminal and the first set as scheduled terminals is calculated.

[0235] When the value of the training cost C value calculated at present decreases relative to the locally maintained C value, the target terminal is added to the first set, the target terminal is deleted from the candidate terminal set, and the locally maintained C value is updated to the value of the training cost C value calculated at present.

[0236] Optionally, the scheduling terminal generation module is further configured to calculate the value of the training cost C value according to the following formula:

[0237]

[0238] wherein,

[0239]

[0240]

[0241] η represents a learning rate; is a preset system parameter; represents an estimated value of the executable rounds of federated learning; τ represents the number of updates of the local local model in each round of federated learning; ρ represents a global value of the convexity estimation value of the local loss function of all terminals participating in federated learning; h(τ) represents; M represents the number of elements in the set of all terminals participating in federated learning ; |Π| represents the number of terminals scheduled in the current round; β represents a global value of the smoothness estimation value of the local loss function; D i represents the size of the local training data set; δ i represents the gradient diversity estimation value of the local loss function of terminal i; δ represents the global value of the gradient diversity of the local loss function of all terminals participating in federated learning; D represents the size of the global training data set.

[0242] Optionally, the wireless access point described above further includes:

[0243] The loop judgment module is configured to, before calculating the gradient diversity of the local loss function of each terminal in the current round, judge whether the consumed time of the federated learning until the current round exceeds the preset total training time budget according to the global model of the last round and the local local model sent by each terminal; in the case of exceeding the preset total training time budget, output the optimal global model as a training result; in the case of not exceeding the preset total training time budget, trigger the diversity calculation module to calculate the gradient diversity of the local loss function of each terminal in the current round.

[0244] As Figure 8 shown in the figure, the embodiment of the application further provides another wireless access point 80, which specifically includes a processor 81, a memory 82, a bus system 83, a receiver 84 and a transmitter 85. Wherein, the processor 81, the memory 82, the receiver 84 and the transmitter 85 are connected through the bus system 83, the memory 82 is used to store instructions, the processor 81 is used to execute the instructions stored in the memory 82 to control the receiver 84 to receive signals and control the transmitter 85 to send signals;

[0245] Wherein, the processor 81 is used to read the program in the memory and execute the following process:

[0246] receive the local local model sent by each terminal scheduled in the current round after the completion of the federated learning in the current round, and the value, convexity estimation value and smoothness estimation value of the local loss function;

[0247] The global model of the current round is updated according to the local partial model sent by each terminal, the value of the global loss function of the current round is calculated according to the value of the local loss function of all terminals scheduled to the current round, and whether the optimal global model is updated is determined according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model.

[0248] The gradient diversity estimation value of the local loss function of each terminal in the current round is calculated according to the global model of the last round and the local partial model sent by each terminal.

[0249] The scheduled terminal of the next round of federated learning is generated according to the gradient estimation information of each terminal in the current round, wherein the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function.

[0250] It should be understood that in the embodiments of the present application, the processor 81 can be a central processing unit (CPU), and the processor 81 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), ready-to-program gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0251] The memory 82 can include read-only memory and random access memory, and provide instructions and data to the processor 81. Part of the memory 82 can also include non-volatile random access memory. For example, the memory 82 can also store device type information.

[0252] The bus system 83 can include not only a data bus, but also a power bus, a control bus and a state signal bus, etc. However, for the sake of clarity, all the buses are marked as bus system 83 in the figure.

[0253] In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor 81 or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution completion, or executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the memory 82, and the processor 81 reads the information in the memory 82, and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0254] The program is executed by the processor to implement Figure 2 All implementation manners in the terminal scheduling method in the wireless federated learning shown in the description and the same technical effects can be achieved, and thus details are not repeated here.

[0255] In some embodiments of the application, a computer readable storage medium is also provided, which stores a program that is executed by a processor to implement the following steps:

[0256] Receiving the local partial model, the value of the local loss function, the convexity estimation value and the smoothness estimation value of each terminal scheduled in the current round after the completion of the current round of federated learning;

[0257] According to the local partial model sent by each terminal, the global model of the current round is updated; according to the value of the local loss function of all terminals scheduled in the current round, the value of the global loss function of the current round is calculated, and whether the optimal global model is updated is determined according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model;

[0258] According to the global model of the last round and the local partial model sent by each terminal, the gradient diversity estimation value of the local loss function of each terminal in the current round is calculated;

[0259] According to the gradient estimation information of each terminal in the current round, the scheduled terminals of the next round of federated learning are generated, wherein the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function.

[0260] The program is executed by the processor to implement all implementation manners of the terminal scheduling method applied to the wireless access point described above, and the same technical effects can be achieved, and thus details are not repeated here.

[0261] As shown in Figure 9 The embodiment of the application also provides a terminal 90, which comprises:

[0262] The model updating module 91 is configured to update the local partial model in the current round of federated learning, obtain the value of the local loss function, and estimate the convexity estimation value and the smoothness estimation value of the local loss function.

[0263] The data sending module 92 is configured to send the updated local partial model, and the value, the convexity estimation value and the smoothness estimation value of the local loss function to the wireless access point.

[0264] Optionally, the model updating module is further configured to:

[0265] The first loss value of the global model received in the current round of federated learning and the second loss value of the local model updated in the current round of federated learning are calculated by using the local loss function; the first norm of the difference between the first loss value and the second loss value is calculated, and the second norm of the difference between the global model received in the current round of federated learning and the local model updated in the current round of federated learning is calculated; the ratio of the first norm and the second norm is calculated to obtain the convexity estimation value of the local loss function;

[0266] The third norm of the difference between the gradient of the first loss value and the gradient of the second loss value is calculated, and the ratio of the third norm and the second norm is calculated to obtain the smoothness estimation value of the local loss function.

[0267] As shown in Figure 10 The embodiment of the application also provides another terminal 100, which specifically comprises a processor 101, a memory 102, a bus system 103, a receiver 104 and a transmitter 105. The processor 101, the memory 102, the receiver 104 and the transmitter 105 are connected through the bus system 103, the memory 102 is used for storing instructions, and the processor 101 is used for executing the instructions stored in the memory 102 to control the receiver 104 to receive signals and control the transmitter 105 to transmit signals.

[0268] The processor 101 is used for reading programs in the memory and performing the following processes:

[0269] In the current round of federated learning, the local model is updated, the value of the local loss function is obtained, and the convexity estimation value and the smoothness estimation value of the local loss function are estimated.

[0270] The terminal transmits the updated local model, the value of the local loss function, the convexity estimation value and the smoothness estimation value to the wireless access point.

[0271] It should be understood that, in the embodiment of the application, the processor 101 can be a central processing unit (CPU), and the processor 101 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), ready-to-program gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0272] The memory 102 can include read-only memory and random access memory, and provide instructions and data to the processor 101. A portion of the memory 102 can also include non-volatile random access memory. For example, the memory 102 can also store device type information.

[0273] The bus system 103 can include not only a data bus, but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, all the buses are marked as the bus system 103 in the figure.

[0274] In the implementation process, the steps of the above method can be completed by the integrated logic circuit of hardware in the processor 101 or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the application can be directly embodied as hardware processor execution completion, or executed by a combination of hardware and software modules in the processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102, and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0275] The program is executed by the processor to achieve Figure 4 All implementation manners of the terminal scheduling method in the wireless federated learning shown in the method, and the same technical effects can be achieved, to avoid repetition, which will not be described here.

[0276] In some embodiments of the application, a computer readable storage medium is also provided, and the program is stored on the computer readable storage medium. The program is executed by the processor to achieve the following steps:

[0277] In the current round of federated learning, the local partial model is updated, the value of the local loss function is obtained, and the convexity estimation value and the smoothness estimation value of the local loss function are estimated;

[0278] The terminal sends the updated local partial model, and the value, convexity estimation value and smoothness estimation value of the local loss function to the wireless access point.

[0279] The program is executed by the processor to achieve all implementation manners of the terminal scheduling method applied to the terminal side, and the same technical effects can be achieved, to avoid repetition, which will not be described here.

[0280] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0281] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0282] In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other ways. For example, the apparatus embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between each other can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0283] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present application.

[0284] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0285] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0286] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for terminal scheduling in wireless federated learning, the method comprising: The method comprises the following steps: The wireless access point receives the local partial model, the value of the local loss function, the convexity estimation value and the smoothness estimation value sent by each terminal scheduled in the current round after the completion of the federated learning in the current round; According to the local partial model sent by each terminal, the global model of the current round is updated; according to the value of the local loss function of all terminals scheduled in the current round, the value of the global loss function of the current round is calculated, and whether the optimal global model is updated is determined according to whether the value of the global loss function of the current round is better than the value of the global loss function corresponding to the optimal global model; According to the global model of the last round and the local partial model sent by each terminal, the gradient diversity estimation value of the local loss function of each terminal in the current round is calculated; According to the gradient estimation information of each terminal in the current round, the scheduled terminals of the next round of federated learning are generated, wherein the gradient estimation information comprises the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function; The step of generating the scheduled terminals of the next round of federated learning according to the gradient estimation information of each terminal in the current round comprises: According to the gradient estimation information of each terminal in the current round and the ratio of the local training data set of the terminal to the global training data set as the weight of the terminal, the gradient estimation information of all terminals in the current round is weighted and summed to obtain the global value of the gradient estimation information of all terminals in the current round, and the gradient estimation information comprises the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function; According to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round, the scheduled terminals of the next round of federated learning are generated; The step of scheduling the terminals of the next round of federated learning according to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round comprises: Initialize the first set as empty; If the number of terminals in the candidate terminal set is greater than 0, repeat the following steps until the calculated training cost C value no longer decreases, and the terminals in the first set are used as the scheduled terminals of the next round of federated learning: Traverse the terminals in the candidate terminal set, respectively estimate the time consumption of the federated learning in the current round with the terminal and the first set as the scheduled terminals, and determine the target terminal with the shortest time consumption; According to the total training time budget and the shortest time consumption, estimate the total number of rounds of federated learning; according to the total number of rounds, the global value of the convexity estimation value in the current round, the global value of the smoothness estimation value in the current round and the gradient diversity of the local loss function of each terminal in the current round, the value of the training cost C value of the federated learning with the target terminal and the first set as the scheduled terminals is calculated. when the value of the training cost C calculated in the current round decreases relative to the value of the C maintained locally, adding the target terminal to the first set, deleting the target terminal from the candidate terminal set, and updating the value of the C maintained locally to the value of the training cost C calculated in the current round; wherein the value of the training cost C is calculated according to the following formula: wherein η denotes a learning rate; is a preset system parameter; denotes an estimated value of the executable rounds of federated learning; τ denotes the number of updates of the local local model in each round of federated learning; ρ denotes a global value of the convexity estimation value of the local loss function of all terminals participating in federated learning; h(τ) denotes; M denotes the set of all terminals participating in federated learning the number of elements in the set; |Π| denotes the number of scheduled terminals in the current round; β denotes a global value of the smoothness estimation value of the local loss function; D i denotes the size of the local training data set; δ i denotes the gradient diversity estimation value of the local loss function of terminal i; δ denotes the global value of the gradient diversity of the local loss function of all terminals participating in federated learning; D denotes the size of the global training data set.

2. The method of claim 1, wherein, The step of calculating the gradient diversity of the local loss function of each terminal in the current round according to the global model of the last round and the local models sent by each terminal includes: According to the global model of the last round and the local models sent by each terminal, respectively estimate the gradient of the local loss function of each terminal in the current round; According to the gradient of the local loss function of all terminals scheduled in the current round, calculate the gradient of the global loss function in the current round; According to the gradient of the local loss function of each terminal in the current round and the gradient of the global loss function in the current round, calculate the gradient diversity estimation value of the local loss function of each terminal in the current round.

3. The method of claim 1, wherein, Before the step of calculating the gradient diversity of the local loss function of each terminal in the current round according to the global model of the last round and the local models sent by each terminal, the method further includes: determine whether the consumed time of the federated learning until the current round exceeds the preset total training time budget; In the case of exceeding the preset total training time budget, output the optimal global model as the training result; In the case of not exceeding the preset total training time budget, perform the step of calculating the gradient diversity of the local loss function of each terminal in the current round according to the global model of the last round and the local models sent by each terminal.

4. A wireless access point, comprising: including: The data receiving module is configured to receive the local models and the values, convexity estimation values and smoothness estimation values of the local loss functions of each terminal scheduled in the current round after the completion of the federated learning in the current round by the wireless access point; The model updating module is configured to update the global model in the current round according to the local models sent by each terminal, calculate the value of the global loss function in the current round according to the values of the local loss functions of all terminals scheduled in the current round, and determine whether to update the optimal global model according to whether the value of the global loss function in the current round is better than the value of the global loss function corresponding to the optimal global model; The diversity calculation module is configured to calculate the gradient diversity estimation value of the local loss function of each terminal in the current round according to the global model of the last round and the local models sent by each terminal; The scheduled terminal generation module is configured to generate the scheduled terminals for the next round of federated learning according to the gradient estimation information of each terminal in the current round, wherein the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function. The scheduled terminal generation module is further configured to: According to the gradient estimation information of each terminal in the current round and the ratio of the local training data set of the terminal in the global training data set as the weight of the terminal, the gradient estimation information of all terminals participating in the federated learning in the current round is weighted and summed to obtain the global value of the gradient estimation information of all terminals in the current round, and the gradient estimation information includes the convexity estimation value, the smoothness estimation value and the gradient diversity estimation value of the local loss function; According to the gradient estimation information of each terminal in the current round and the global value of the gradient estimation information in the current round, the scheduled terminals of the next round of federated learning are generated; The scheduling terminal generation module is further configured to: initialize a first set as empty; if the number of terminals in the candidate terminal set is greater than 0, repeat the following steps until the calculated training cost C value no longer decreases, and the terminals in the first set are scheduled terminals of the next round of federated learning: traverse the terminals in the candidate terminal set, respectively estimate the time consumption of the federated learning in the current round with the terminal and the first set as scheduled terminals, and determine the target terminal with the shortest time consumption; estimate the total number of rounds of federated learning according to the total preset training time budget and the shortest time consumption, and calculate the value of the training cost C of the federated learning with the target terminal and the first set as scheduled terminals according to the total number of rounds, the global value of the convexity estimation value in the current round, the global value of the smoothness estimation value in the current round, and the gradient diversity of the local loss function of each terminal in the current round; when the value of the training cost C calculated at present decreases relative to the locally maintained C value, add the target terminal to the first set, delete the target terminal from the candidate terminal set, and update the locally maintained C value to the value of the training cost C calculated at present; The scheduling terminal generation module is further configured to calculate the value of the training cost C according to the following formula: η denotes a learning rate; is a preset system parameter; denotes an estimated value of the executable rounds of federated learning; τ denotes the number of updates of the local local model in each round of federated learning; ρ denotes a global value of the convexity estimation value of the local loss function of all terminals participating in federated learning; h(τ) denotes; M denotes a set of all terminals participating in federated learning the number of elements in the set; |Π| denotes the number of scheduled terminals in the current round; β denotes a global value of the smoothness estimation value of the local loss function; D i denotes the size of the local training data set; δ i denotes the gradient diversity estimation value of the local loss function of terminal i; δ denotes the global value of the gradient diversity of the local loss function of all terminals participating in federated learning; D denotes the size of the global training data set.

5. The wireless access point of claim 4, wherein: The diversity calculation module is further configured to: estimate the gradient of the local loss function of each terminal in the current round according to the global model of the last round and the local partial model sent by each terminal; calculate the gradient of the global loss function in the current round according to the gradient of the local loss function of all terminals scheduled to the current round; calculate the gradient diversity estimation value of the local loss function of each terminal in the current round according to the gradient of the local loss function of each terminal in the current round and the gradient of the global loss function in the current round.

6. A terminal, characterized by comprising: comprising: a model updating module configured to update the local partial model in the current round of federated learning to obtain the value of the local loss function, and estimate the convexity estimation value and the smoothness estimation value of the local loss function; a data sending module configured to send the updated local partial model, and the value, the convexity estimation value and the smoothness estimation value of the local loss function to the wireless access point of claim 4 or 5.

7. The terminal of claim 6, wherein: The model updating module is further configured to: calculate, by using a local loss function, a first loss value of a global model received in a current round of federated learning and a second loss value of a local model updated in the current round of federated learning respectively, calculate a first norm of a difference between the first loss value and the second loss value, calculate a second norm of a difference between the global model received in the current round of federated learning and the local model updated in the current round of federated learning, calculate a ratio of the first norm to the second norm to obtain a convexity estimation value of the local loss function; calculate a third norm of a difference between a gradient of the first loss value and a gradient of the second loss value; and calculate a ratio of the third norm to the second norm to obtain a smoothness estimation value of the local loss function.