A federated learning device scheduling method based on model loss tolerance
Through a device scheduling method based on model loss tolerance, terminal devices whose channel bit error rate meets the threshold are selected to participate in federated learning training, which solves the problems of increased training time and reduced accuracy caused by data loss in wireless networks, and achieves faster model convergence and higher accuracy.
Patent Information
- Application Number
- CN202311133647.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-09-05
AI Technical Summary
In wireless networks, due to poor network conditions during federated learning, data loss occurs when terminal devices transmit model parameters, resulting in increased training rounds, reduced accuracy, and even failure of model convergence.
A device scheduling method based on model loss tolerance is adopted. The server-side judge selects the devices participating in the training according to the channel bit error rate of the terminal device, and repeats this process in each round of training to ensure that the data loss rate is within the threshold and improve the model accuracy.
When the network status is poor, the training accuracy and model convergence speed of federated learning are improved, device selection is optimized, and training time is reduced.
Smart Images

Figure CN117172333B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the fields of communication network technology and machine learning, and mainly designs a federated learning device scheduling method based on model loss tolerance. BACKGROUND
[0002] With the development of various emerging intelligent applications (such as augmented reality / virtual reality, autonomous driving and digital twin), the number of Internet of Things devices is growing explosively, and a large number of Internet of Things devices generate massive data. In order to utilize these data for traditional machine learning algorithms, a central controller needs to access all users' training data samples. However, due to privacy security issues, it is impractical for wireless users to transmit their training data samples to a central server for centralized machine learning.
[0003] Federated learning, as a paradigm of distributed machine learning, can train machine learning models without collecting all users' training data samples. It enables users to collaboratively learn shared machine learning models while keeping the collected data on user devices. However, due to limited bandwidth, only a subset of devices can participate in federated training in wireless networks. At the same time, the federated learning model parameters sent from user terminal devices to the server end will also be affected by errors and delays caused by network channels. For example, when performing federated learning algorithms in wireless networks, the convergence time depends not only on the number of training rounds, but also on the transmission time of machine learning model parameters at each training step. At the same time, the convergence speed of the global model also increases with the number of participating training devices in each training round. Therefore, it is necessary to optimize the scheduling problem of federated learning device selection to reduce the training time of federated learning and speed up the convergence of the model.
[0004] In addition, during each iteration of machine learning training, some errors in model parameters may not have a significant impact on model accuracy; even errors that occur in early iterations can be repaired in later iterations. Therefore, machine learning has a bounded loss tolerance feature, and the bounds for the same model on different data sets are similar. Moreover, in terms of model convergence, the descending gradient of the previous layer has a smaller impact than that of the later layer, so it has a larger tolerance bound. This is because in neural networks, different layers extract different levels of abstract features. Generally, the later layers contain cumulative information learned based on the information in the previous layers, so the later layers have higher importance and a relatively small bounded tolerance loss. SUMMARY
[0005] Inventive purpose: To solve the problem of increasing training rounds and reducing accuracy or even failing to converge of the model due to data loss of the terminal device in transmitting the model parameters in the federated learning process under poor network conditions (and low signal-to-noise ratio). The present application proposes a federated learning device scheduling method based on model loss tolerance, which solves the influence of data loss in the wireless transmission of model parameters on the accuracy of the federated learning model.
[0006] Technical scheme: To achieve the above-mentioned purpose, the technical scheme adopted by the present application is:
[0007] In the first aspect, the present application provides a federated learning device scheduling method based on model loss tolerance, comprising:
[0008] The server acquires the terminal device information uploaded by the terminal device, and calculates the bit error rate of the current channel of the corresponding terminal device according to the terminal device information; wherein the terminal device information includes transmission power, channel bandwidth, channel gain and noise power spectral density;
[0009] The bit error rate is compared with the tolerance threshold set in the decision maker, and when the bit error rate is less than the threshold set in the decision maker, the corresponding terminal device is selected to participate in training, and the decision maker gives the server the selection result of the terminal device participating in training;
[0010] The server sends the initial global model to the terminal device participating in training;
[0011] The terminal device uses the local training data set to perform local training on the initial global model to obtain a trained local model;
[0012] The following loop steps are iteratively executed with the convergence of the trained local model and the global model as the target:
[0013] The server acquires the local model parameters of all terminal devices participating in training, aggregates the local model parameters to obtain an updated global model, and transmits the updated global model to the terminal device participating in training;
[0014] Each terminal device updates the local model according to the received global model and performs a new round of training to update the trained local model.
[0015] In some embodiments, the server constructs a corresponding initial global model according to different training tasks; builds a decision maker, sets a tolerance threshold according to the initial global model, and divides the model parameters into front layer parameters, middle layer parameters and back layer parameters, and sets different tolerance thresholds for the front layer parameters, middle layer parameters and back layer parameters in sequence.
[0016] In some embodiments, the server obtains terminal device information uploaded by the terminal device, and calculates the bit error rate of the current channel of the corresponding terminal device based on the terminal device information, including:
[0017] Calculate the signal-to-noise ratio of the corresponding terminal device based on the transmission power, channel bandwidth, channel gain, and noise power spectral density of the terminal device;
[0018] The bit error rate of the current channel of the corresponding terminal device is calculated based on the signal-to-noise ratio of the terminal device.
[0019] Furthermore, the method for scheduling federated learning devices based on model loss tolerance is characterized in that the signal-to-noise ratio of the corresponding terminal device is calculated based on the transmission power, channel bandwidth, channel gain and noise power spectrum density of the terminal device. include:
[0020]
[0021] Among them, P i is the transmission power of terminal device i, h i is the channel gain, B is the channel bandwidth, and N0 is the noise power spectral density.
[0022] Furthermore, the bit error rate of the current channel of the corresponding terminal device is calculated based on the signal-to-noise ratio of the terminal device. include:
[0023]
[0024] Among them, the terminal device i adopts M-QAM modulation mode, which is expressed as Where u represents the time slot index and l represents the number of subchannels.
[0025] In some embodiments, the terminal device updates the local model based on the received global model and performs a new round of training, including:
[0026] The terminal device receives the training task issued by the server, updates the local model by receiving the global model broadcast by the server, and then uses the stochastic gradient descent algorithm to train and update the local model based on the local training data set, that is:
[0027]
[0028] where ω i,k (j) represents the local model parameters of the i-th terminal after training j times in the k-th round of local training, η represents the learning rate, τ represents the number of times the gradient is updated, and is determined by the number of data samples S i and a randomly sampled mini-batch D b,o Sample number d i Decide, According to Db,i The calculation result represents the direction in which the small-batch loss function decreases fastest.
[0029] In some embodiments, the server obtains the local model parameters of all terminal devices participating in training after training, aggregates the local model parameters to obtain an updated global model, including:
[0030] The server receives the local model parameters of all terminal devices participating in training after training, performs model aggregation using a FedAvg aggregation algorithm, and generates a new global model parameter;
[0031] The FedAvg aggregation formula is:
[0032] Where ω k+1 represents the global model parameter after the kth aggregation and is used as the initialization global model parameter for the (k+1)th training, S i is the number of data set samples held by the ith terminal device, M is the total number of terminal devices participating in training, and S total is the total number of samples held by the M terminal devices.
[0033] In a second aspect, the present application provides a device scheduling apparatus for federated learning based on model loss tolerance, comprising a processor and a storage medium.
[0034] The storage medium is used to store instructions.
[0035] The processor is used to operate according to the instructions to execute the method according to the first aspect.
[0036] In a third aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of the first aspect.
[0037] In a fourth aspect, the present application provides a device, comprising,
[0038] a memory;
[0039] a processor;
[0040] and
[0041] a computer program;
[0042] The computer program is stored in the memory and is configured to be executed by the processor to implement the method of the first aspect.
[0043] Beneficial effects: the present application proposes a federal learning device scheduling method based on model loss tolerance, which solves the problem that the optimal device cannot be selected to participate in training due to poor network channel in the federal learning process. The present application discloses a federal learning device scheduling method based on model loss tolerance, which adds a device scheduler before federal learning training. For the error and delay problems caused by poor network conditions in wireless networks, the server-side built-in judge is used for device selection, and the judgment method is that the data loss rate of the local model parameter in the wireless transmission process does not exceed the threshold set in the judge. And this process is repeated in each round of training, so that as many devices as possible are selected in each round of training, so as to improve the model accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is the federal learning training topology diagram of the judge device scheduling provided by the present application;
[0045] Figure 2 is the model convergence change diagram with the number of rounds under different layer data loss ratio of CNN;
[0046] Figure 3 is the federal learning training flow diagram of the device scheduling based on the judge;
[0047] Figure 4 is the accuracy comparison diagram of the method of the present application and the benchmark algorithm (without using the judge method). DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail in combination with the drawings and examples. It should be understood that these examples are only used to illustrate the present application and not to limit the scope of the present application. After reading the present application, various equivalent forms of the present application are all within the scope defined by the appended claims of the present application.
[0049] As shown in Figure 1 , a judge is added in the server to perform device scheduling. In this method, the server can know the network condition between the terminal device and the server in real time, which facilitates the selection of excellent terminal devices for training. And more devices can be selected for training to improve the model accuracy without changing the model accuracy. Finally, the simulation experiment verifies that the method of the present application can select the devices with the transmission parameter loss rate within the tolerance threshold to participate in training, thereby improving the model accuracy. The present application provides guidance for federal learning to quickly reach convergence and improve the training accuracy of federal learning in poor network state.
[0050] Example 1
[0051] In a first aspect, the embodiment provides a method for scheduling devices in federated learning based on model loss tolerance, comprising:
[0052] The server obtains terminal device information uploaded by the terminal device, and calculates a bit error rate of a current channel of the corresponding terminal device according to the terminal device information; wherein the terminal device information includes transmission power, channel bandwidth, channel gain, and noise power spectral density;
[0053] The bit error rate is compared with a tolerance threshold set in the decision maker; when the bit error rate is less than the threshold set in the decision maker, the corresponding terminal device is selected to participate in training, and the decision maker provides the server with a selection result of the terminal device participating in training;
[0054] The server sends an initial global model to the terminal device participating in training;
[0055] The terminal device performs local training on the initial global model by using a local training data set to obtain a trained local model;
[0056] The following loop steps are iteratively executed with the convergence of the trained local model and the global model as the target:
[0057] The server obtains the local model parameters of all the terminal devices participating in training, aggregates the local model parameters to obtain an updated global model, and transmits the updated global model to the terminal device participating in training;
[0058] Each terminal device updates the local model according to the received global model and performs a new round of training to update the trained local model.
[0059] In some embodiments, the server constructs a corresponding initial global model according to different training tasks; builds a decision maker, sets a tolerance threshold according to the initial global model, and divides the model parameters into front-layer parameters, middle-layer parameters, and back-layer parameters, and sets different tolerance thresholds for the front-layer parameters, the middle-layer parameters, and the back-layer parameters in sequence.
[0060] In some embodiments, the server obtains terminal device information uploaded by the terminal device, and calculates a bit error rate of a current channel of the corresponding terminal device according to the terminal device information, comprising:
[0061] According to the transmission power, channel bandwidth, channel gain, and noise power spectral density of the terminal device, the signal-to-noise ratio of the corresponding terminal device is calculated;
[0062] According to the signal-to-noise ratio of the terminal device, the bit error rate of the current channel of the corresponding terminal device is calculated.
[0063] Further, the model loss tolerance-based federated learning device scheduling method has the characteristics that the signal-to-noise ratio of the terminal device is calculated according to the transmission power, channel bandwidth, channel gain, and noise power spectral density of the terminal device Comprise:
[0064]
[0065] Wherein P i is the transmission power of the terminal device i, h i is the channel gain, B is the channel bandwidth, and N0 is the noise power spectral density.
[0066] Further, the bit error rate of the current channel of the corresponding terminal device is calculated according to the signal-to-noise ratio of the terminal device Comprise:
[0067]
[0068] Wherein, the terminal device i adopts M-QAM modulation mode and is represented as Wherein u represents the time slot index, and l represents the subchannel number.
[0069] In some embodiments, the terminal device updates the local model according to the received global model and performs a new round of training, comprising:
[0070] The terminal device receives the training task issued by the server, updates the local model by receiving the global model broadcast by the server, and then trains and updates the local model according to the local training data set using the stochastic gradient descent algorithm, that is:
[0071]
[0072] Wherein ω i,k (j) represents the local model parameter of the i-th terminal after training j times in the k-th round of local training, η represents the learning rate, and τ represents the number of update gradients, which is determined by the number of data samples S i and the small batch D b,i sampled randomly. i d According to the calculation of D b,i , the direction in which the small batch loss function decreases fastest is represented.
[0073] In some embodiments, the server obtains the local model parameters trained by all terminal devices participating in training, aggregates the local model parameters to obtain an updated global model, comprising:
[0074] The server receives the local model parameters trained by all terminal devices participating in training, executes model aggregation using the FedAvg aggregation algorithm, and generates a new global model parameter.
[0075] The FedAvg aggregation formula is:
[0076] where ω k+1 represents the global model parameters after the kth round of aggregation and serves as the initialization global model parameters for the k+1th round of training, S i is the number of data set samples held by the ith terminal device, M is the total number of terminal devices participating in training, S total is the total number of samples held by the M terminal devices.
[0077] In some embodiments, the federated learning device scheduling method based on model loss tolerance includes the following steps:
[0078] Information collection stage: First, the terminal device uses the locally stored data set as the data set for this training. Second, the terminal device obtains its own terminal device information (such as its own transmission power, channel bandwidth, and channel gain) and sends it to the server.
[0079] Model loss tolerance threshold setting stage: For different models, the degree of model parameter loss that can be tolerated in the aggregation stage is different. The loss tolerance threshold of commonly used models (such as CNN, XGBOOST) is set to the server's decision maker.
[0080] Decision maker device scheduling stage: The server receives the device information uploaded by the terminal device, calculates the current channel error rate based on this information, and selects terminal devices that meet the conditions to participate in federated training through the decision maker.
[0081] Federated learning training stage: The server receives the local model parameters sent by all participating training devices, uses the aggregation algorithm to weight and fuse the parameters, and transmits the global model to the terminal devices through broadcasting. Each device updates its own model and performs a new round of training. Repeat this process for multiple iterations to make the final model converge.
[0082] Wherein, the decision maker device scheduling and federated training specifically include the following steps:
[0083] Step S1: The terminal device establishes a connection with the server and collects its own relevant information such as transmission power, channel bandwidth, channel gain, and noise power spectral density, etc. and sends it to the server side.
[0084] Step S2: The server sets up a corresponding model according to different training tasks. A decision maker is set up to set a tolerance threshold according to the set-up model, and different tolerance thresholds can also be set for different layers of the model. The threshold is set according to the model tolerance loss, and the model parameters are divided into front layer parameters (model parameters front a proportion), middle layer parameters (model parameters middle b proportion) and back layer parameters (model parameters back g proportion), and different tolerance thresholds are set in order, and a+b+g=1.
[0085] Step S3: The terminal device receives the training task issued by the server, updates the local model by receiving the global model broadcast by the server, and then uses the stochastic gradient descent algorithm to perform a new round of model training according to the local training data set.
[0086] Step S4: The local model parameters obtained after training in step S3 are uploaded to the server end through wireless transmission.
[0087] Step S5: The server receives the local model parameters of all terminal devices, uses an aggregation algorithm to perform model aggregation, generates a new global model parameter, and broadcasts it to all terminal devices for model updating and a new round of training.
[0088] As a further design, according to the requirement of step S1 that the terminal device collects information, the specific steps are as follows:
[0089] (1) The terminal cluster participating in federated training establishes a connection with the server through a wireless network and waits for message transmission.
[0090] (2) The terminal device collects its own device and related information, including transmission power, channel gain, noise power spectral density and channel bandwidth, and sends them to the decision maker on the server end.
[0091] (3) The decision maker calculates the current channel error rate according to the parameter information sent by the terminal, compares it with the model tolerance threshold set in the decision maker, and selects the terminal device participating in this round of federated training.
[0092] As a further design, the device scheduler is set up according to step S2 as follows:
[0093] i. The server constructs a corresponding training model according to the federated learning training task, and initializes and sets the federated learning training parameters.
[0094] ii. According to the constructed training model, determine the data loss threshold that this model can accept. Further, determine the data loss threshold that each layer of neural network in the model can accept.
[0095] iii. A tolerance decision maker is constructed to select qualified terminal devices for federated learning training. According to the parameter information sent by the terminal, the error rate and the signal-to-noise ratio of the current channel are calculated, and the devices with an error rate less than a threshold are selected to participate in this round of training.
[0096] iv. The terminal device receives the initialization model and parameter information obtained from the server broadcast, and trains the model using the local training data set. The trained model parameters are uploaded to the server, and the global model is aggregated by the server. The terminal device updates the local model according to the global model to start a new round of training, and iterates until the model converges.
[0097] Application embodiment: In the scenario of wireless network federated learning, the present application proposes a federated learning device scheduling method based on model loss tolerance, including the following steps:
[0098] (1) Information collection stage: First, the terminal device uses the locally stored data as the training data set. Second, the terminal device obtains its own relevant information (such as its own transmission power, channel bandwidth, channel gain) and sends it to the server decision maker.
[0099] (2) Model tolerance loss threshold setting stage: The tolerance loss threshold of different model structures is different. For the constructed model structure, the tolerance threshold in the decision maker can be obtained through experiments, for example, Figure 2 The model loss tolerance change graph of each network layer is obtained. In the experiment, the MNIST data set is used to build a CNN model, including CONV1 (convolution 1 layer), CONV2
[0100] (convolution 2 layer), FC1 (full connection 1 layer), and FC2 (full connection 2 layer), a total of four layers. Under the premise of ensuring that the training reaches the same accuracy, the number of model training rounds changes with the loss of each layer model parameter. Therefore, the loss threshold of the CONV1 layer of the model is 7%, the loss threshold of the CONV2 layer is 5%, the loss threshold of the FC1 layer is 3%, and the loss threshold of the FC2 layer is 1%. Set the CONV1 layer and the CONV2 layer as the front layer parameters, the loss threshold is 5%, set the FC1 layer as the middle layer parameter, the loss threshold is 3%, and set the FC2 layer as the back layer parameter, the loss threshold is 1%.
[0101] (3) Decision maker device scheduling stage: The server receives the channel information uploaded by the terminal device, calculates the error rate of the current channel according to the information, and selects the terminal devices that meet the conditions to participate in federated training through the decision maker. The terminal device i uses M-QAM modulation and is represented as
[0102] where u represents the time slot index, l represents the number of sub-channels, and the signal-to-noise ratio is Therefore So the bit error rate is Where δ is the set tolerance threshold, And P i is the transmission power of device i, h i is the channel gain, B is the channel bandwidth, and N0 is the noise power spectrum density.
[0103] (4) Federal learning training phase: the server receives the local model parameters sent by all participating training devices, uses an aggregation algorithm to weight and fuse the parameters, and transmits the global model to the terminal devices through broadcasting. Each device updates its own model and performs a new round of training. This process is repeated continuously for multiple rounds of iterative training, so that the final model converges.
[0104] (5) The specific steps of the decision device scheduling and federal training are shown in FIG. 2B. Figure 3
[0105] Step S1: The terminal device establishes a connection with the server and collects its own network state information such as transmission power, channel gain, channel gain, and noise power spectrum density, and sends it to the server side.
[0106] Step S2: The server side builds a corresponding model according to different training tasks. Build a decision maker, set a tolerance threshold according to the selected model, set different tolerance thresholds according to different layers of the model, and divide the model parameters into front layer parameters (α proportion of model parameters), middle layer parameters (β proportion of model parameters), and rear layer parameters (γ proportion of model parameters) in order. Set different tolerance thresholds. Among them, α+β+γ=1. The decision maker calculates the data loss rate of the terminal device to select the specified device for training.
[0107] Step S3: The terminal device receives the training task issued by the server, updates the local model by receiving the global model broadcast by the server, and then uses the stochastic gradient descent algorithm to perform a new round of model training based on the local training data set.
[0108] Step S4: The local model parameters obtained after training in step S3 are uploaded to the server side through the wireless network.
[0109] Step S5: The server receives the local model of all terminal devices, uses an aggregation algorithm to perform model aggregation, generates a new global model parameter, and broadcasts it to all terminal devices for model updating and a new round of training. Figure 4 FIG. 3 is a comparison chart of using the method and the baseline method, where the baseline method is to select only the devices without data loss to participate in federal training. As can be seen from the figure, the accuracy rate of the training using the method is improved compared with the baseline method.
[0110] Example 2
[0111] In a second aspect, based on the embodiment 1, the embodiment provides a device for scheduling federated learning based on model loss tolerance, comprising a processor and a storage medium;
[0112] The storage medium is configured to store instructions;
[0113] The processor is configured to operate according to the instructions to perform the method according to the embodiment 1.
[0114] Embodiment 3
[0115] In a third aspect, based on the embodiment 1, the embodiment provides a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the method of the embodiment 1.
[0116] Embodiment 4
[0117] In a fourth aspect, based on the embodiment 1, the embodiment provides a device, comprising,
[0118] a memory;
[0119] a processor;
[0120] and
[0121] a computer program;
[0122] The computer program is stored in the memory and configured to be executed by the processor to implement the method of the embodiment 1.
[0123] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.
[0124] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0125] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0127] The above description is merely the preferred embodiment of the present application, it should be pointed out that for those skilled in the art, without departing from the principles of the present application, can make a number of improvements and refinements, these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A federated learning device scheduling method based on model loss tolerance, characterized in that, The method comprises the following steps: The server obtains terminal device information uploaded by the terminal device, and calculates the error rate of the current channel of the corresponding terminal device according to the terminal device information; The terminal device information includes transmission power, channel bandwidth, channel gain, and noise power spectral density; The error rate is compared with the tolerance threshold set in the decision maker, and when the error rate is less than the threshold set in the decision maker, the corresponding terminal device is selected to participate in training, and the decision maker provides the server with the selection result of the terminal device participating in training; The server sends an initial global model to the terminal device participating in training; The terminal device performs local training on the initial global model to obtain a trained local model; The server obtains the local model parameters of all terminal devices participating in training, aggregates the local model parameters to obtain an updated global model, and transmits the updated global model to the terminal devices participating in training; The server constructs a corresponding initial global model according to different training tasks; A decision maker is built, the tolerance threshold is set according to the initial global model, and the model parameters are divided into front layer parameters, middle layer parameters, and rear layer parameters, and different tolerance thresholds are set for the front layer parameters, middle layer parameters, and rear layer parameters in sequence; The server obtains terminal device information uploaded by the terminal device, and calculates the error rate of the current channel of the corresponding terminal device according to the terminal device information, which comprises: According to the transmission power, the channel bandwidth, the channel gain and the noise power spectral density of the terminal device, the signal-to-noise ratio corresponding to the terminal device is calculated ; , wherein is the transmission power of the terminal device i, is the channel gain, B is the channel bandwidth, is the noise power spectral density; According to the signal-to-noise ratio of the terminal device, the bit error rate of the current channel corresponding to the terminal device is calculated ; , Wherein, the terminal device i adopts M-QAM modulation mode represented as Wherein u represents the time slot index, and l represents the subchannel number.
2. The model loss tolerance based federated learning device scheduling method according to claim 1, wherein, The terminal device updates the local model according to the received global model and performs a new round of training, which comprises: The terminal device receives the training task issued by the server, updates the local model by receiving the global model broadcast by the server, and then trains the updated local model according to the local training data set using the stochastic gradient descent algorithm, that is: ; where denotes the ith terminal trains the local model parameters after the (k-1)th local model parameters, denotes the learning rate, denotes the number of times of updating gradient, which is determined by the number of data samples and the randomly sampled mini-batch number of samples determines, According to The calculation result indicates the direction in which the mini-batch loss function is fastest.
3. The model loss tolerance based federated learning device scheduling method of claim 1, wherein, The server obtains the local model parameters of all terminal devices participating in training, aggregates the local model parameters to obtain an updated global model, which comprises: The server receives the local model parameters of all terminal devices participating in training, uses the FedAvg aggregation algorithm to perform model aggregation, and generates a new global model parameter; The FedAvg aggregation formula is: ; wherein denotes the global model parameters after the kth round of aggregation and serves as the initialized global model parameters for the (k+1)th round of training, is the number of data set samples held by the ith terminal device, and M is the total number of terminal devices participating in training, is the total number of samples held by the M terminal devices.
4. A model loss tolerance based federated learning device scheduling system, characterized in that, The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the method according to any one of claims 1 to 3. The computer program is stored on the storage medium and is executed by the processor to realize the method according to any one of claims 1 to 3.
5. A computer readable storage medium, characterized in that, The method comprises the following steps:
6. A computer device, comprising: A memory; A processor; And A computer program; The computer program is stored in the memory and is configured to be executed by the processor to realize the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Artificial intelligence (AI) model training method and device in wireless network
CN116264684A
High-timeliness model compression and user scheduling method in wireless federated learning
CN116321255A