A federated learning optimization method for internet of things device heterogeneity

By employing data augmentation and participant selection methods, and utilizing adaptive learning and momentum gradient descent algorithms to optimize federated learning for IoT devices, the problem of device heterogeneity is addressed, training efficiency and accuracy are improved, and resource waste is reduced.

CN115496224BActive Publication Date: 2026-01-20HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211153768.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-01-20
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

IoT devices face data heterogeneity and system heterogeneity issues in federated learning, leading to decreased model training efficiency and convergence accuracy. Existing technologies have failed to effectively address the complex situation of multiple heterogeneous combinations.

Method used

By employing data augmentation and participant selection methods, we can screen for high-performance devices to participate in training. We can also optimize the federated learning process by using adaptive learning to adjust thresholds and momentum gradient descent algorithms, thereby reducing the impact of device heterogeneity.

Benefits of technology

While protecting user privacy, it improves the training efficiency and model convergence accuracy of federated learning, reduces resource waste, and optimizes the device selection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496224B_ABST
    Figure CN115496224B_ABST
Patent Text Reader

Abstract

The application discloses a kind of federal learning optimization methods for the heterogeneity of Internet of Things equipment, the method includes the following steps: step one, federal learning participant data enhancement method design;Step two, federal learning participant selection method design;Step three, federal learning participant equipment heterogeneity optimization method design.The application collects part of user data and user model training related information under the premise of not infringing on user privacy.Using the collected information, enhance the equipment data to meet the independent and identically distributed, alleviate the influence brought by data heterogeneity.At the same time, this part of information is also used to screen participants in each round of training, speeds up the completion time of each round of training, effectively alleviates the influence brought by data heterogeneity.Through the above two kinds of optimization, the efficiency and accuracy of federal learning joint modeling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an optimization method of a federated learning joint modeling process, in particular to a federated learning optimization method for Internet of Things device heterogeneity. BACKGROUND

[0002] An Internet of Things environment is a complex heterogeneous computing environment, and the heterogeneity factors contained therein have an adverse effect on the efficiency of federated learning model training. For example, the data on participating devices is independently generated by the owner, the data characteristics are not controlled by the outside world, the data in federated learning may be heterogeneous in statistics, and the data sizes of the participating devices are also not balanced, which is collectively referred to as data heterogeneity of participating devices. The data heterogeneity factor can cause problems such as divergence of local model parameters, resulting in a decrease in the convergence accuracy of the global model. In addition, the computing, storage and communication capabilities of different participating devices also differ, which is referred to as system heterogeneity of participating devices. The heterogeneity between participating devices leads to a situation where high-computing-capability nodes "compromise" low-computing-capability nodes, causing waste of resources. In order to balance the performance differences between participating devices, the existing federated learning system selects some participating devices to block and wait, which brings losses to the overall training efficiency. The current research solves the problem of federated learning participating device heterogeneity to some extent, however, most of the research only considers a certain aspect of heterogeneity, ignoring the complex situation of mixed multiple heterogeneities in actual application scenarios, and there is still room for improvement. SUMMARY

[0003] In order to overcome the problems of model training efficiency and model convergence accuracy caused by the differences in communication capability and computing capability of edge devices in the federated learning environment and the fact that the data stored locally by the edge devices do not conform to the independent and identically distributed assumption, the application comprehensively considers the data heterogeneity and system heterogeneity factors in the federated learning environment, and provides a federated learning optimization method for Internet of Things device heterogeneity. The method screens the original device set according to the data quality and computing capability of the devices to reduce the heterogeneity factors existing in the participant set and as much as possible improve the training efficiency and convergence accuracy of federated learning.

[0004] The purpose of the application is achieved by the following technical solutions:

[0005] A federated learning optimization method for Internet of Things device heterogeneity, comprising the following steps:

[0006] Step one, federated learning participating device data enhancement method design

[0007] Step one, randomly initialize the initial value of the threshold value, in order to make as many devices as possible participate in the training, the initial threshold value should be as small as possible, and the initial threshold value can be set to 0.1, and the local data is subjected to data enhancement according to the initial threshold value.

[0008] Step two, using the enhanced data in step one, the local training is carried out, and the trained model parameters and momentum parameters are uploaded to the intermediary, and the intermediary aggregates a global model and new momentum according to the received parameters, and the calculation process is as follows:

[0009]

[0010] Wherein, d(t) is the momentum parameter aggregated by the server, and the client carries out a new round of training, is the momentum parameter of the edge device i; w(t) is the global model parameter;

[0011] Step three, the server recalculates the threshold value according to the performance of the aggregated global model, and sends the generated global model, momentum and calculated new threshold value to the client, and the threshold value calculation formula is as follows:

[0012]

[0013] Wherein, θ is the threshold value, Loss t Loss t Loss t+1 Loss

[0014] Step three, repeat step three until the condition of the termination mechanism is reached, that is, when the value change of the loss function starts to be 0 or negative.

[0015] Step two, federated learning participant selection method design

[0016] Step two, the statistical utility of the edge device i is associated with the system utility, and the user utility of the edge device i is formulated as:

[0017]

[0018] Wherein, the local training sample data set of the edge device i is D i , Loss(j) is the training loss of sample data j; the statistical utility is to represent the data value of the edge device under the premise of protecting user privacy; T i is the time taken by the participants in the federated learning to complete model updating and uploading; the weight dispersion degree is is the model parameter of the edge device i at the tth round, and W0(t) is the model parameter trained using the public data set at the tth round, which is used to represent the imbalance degree of the edge device i data;

[0019] Step two two, sort the edge devices in descending order of user utility value, and select the top ((1-ε)×K) participants in the edge device set for training, where ε∈[0,1] is an exploration factor, and K is the size of the participant set. Initially, ε is set to 1, and in the subsequent training process, ε will change according to the user utility value.

[0020] Step three, federal learning participant device heterogeneity optimization method design

[0021] Step three one, enhance the local data of the participant device through the federal learning participant device data enhancement method;

[0022] Step three two, calculate the user utility of each participant according to the enhanced data in step three one, and select the participants for training according to the utility value;

[0023] Step three three, calculate the global model according to the participants in step three two and update the user utility value;

[0024] Step three four, repeat step three two and step three three until the set training round is reached, and the training is completed.

[0025] Compared with the prior art, the present application has the following advantages:

[0026] The present application collects part of the user data and user model training related information without infringing on the user's privacy. By using the collected information, the device data is enhanced to meet the independent and identically distributed condition, and the influence of data heterogeneity is alleviated. At the same time, this part of information is also used to select participants for each round of training, which speeds up the completion time of each round of training and effectively alleviates the influence of data heterogeneity. Through the above two optimizations, the efficiency and accuracy of federal learning joint modeling are improved. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 The framework of the federal learning device heterogeneity optimization method;

[0028] Figure 2 The flowchart of the federal learning participant device heterogeneity optimization method. DETAILED DESCRIPTION

[0029] The technical solutions of the present application are further described below in conjunction with the drawings, but are not limited thereto. Any modifications or equivalent replacements to the technical solutions of the present application without departing from the spirit and scope of the present application shall be covered in the protection scope of the present application.

[0030] The application provides a federated learning optimization method for Internet of Things device heterogeneity, as shown in the accompanying drawings Figure 1 The edge device trains a machine learning model using local data and accepts scheduling of a federated learning server without uploading private local data to the federated learning server, thereby effectively protecting the security of private data. The formal definition of federated learning is as follows: an existing set of N edge devices connected through a network C={c1, c2,..., c N}, ||C||=N, which respectively store data D i , i∈[1,N], and the total data set D can be regarded as the sum of data on all edge devices, that is, D={D1,D2,...,D N}. Model training in the federated learning system needs to communicate between edge devices and the federated learning server for multiple rounds, and only model parameters are transmitted in the communication process. Each edge device uses local data D i to train local model parameters , then exchanges model parameters with the federated learning server, and finally obtains global model parameters w fl trained by all edge devices. The specific steps are as follows:

[0031] (1) Federated learning participant device data enhancement method design

[0032] The data of the edge device under non-independent and identically distributed conditions may be missing some label categories, for example, users are always inclined to generate data of some label categories due to personal preferences or use habits, and basically no data of other label categories is generated. The local data set only generates data of a certain category label, which makes the model trained locally more inclined to distinguish the data of this category and has a lower recognition rate for data of other category labels. By enhancing the data of the edge device locally, the missing data of the device can be expanded, so that the data categories of the device locally become balanced.

[0033] The scheme considers the following additional assumptions: a limited number of edge devices allow uploading their data to the federated learning server. The degree of data enhancement is different between different edge devices, and when the data of a certain category is below a given threshold, the data of that category is enhanced. In order to reduce the complexity of the data enhancement operation, the data enhancement threshold is only related to the label category with the most local data of the edge device, and the threshold coefficient is β. The coefficient β represents the ratio of the data amount of a certain label category to the data amount of the most local label category. If the coefficient β calculated from the data of a certain category is lower than the threshold, it indicates that the data of that category is too small and the data distribution of the edge device is skewed. Since the value of the threshold will affect the acceleration effect of the data enhancement operation, a too large threshold will lead to too much expansion of false data, thereby masking the real data generated by the user; a too small threshold will still affect the federated learning algorithm with non-independent and identically distributed data, so a suitable threshold plays a very important role in the present application. The present application uses an adaptive learning method to determine the value of the threshold, and through the characteristics of the nonlinear function, the value of the threshold is adaptively adjusted in combination with the change of the loss function, as shown in equations (1) and (2):

[0034]

[0035] Where θ is the threshold, Loss t represents the value of the loss function at the tth round of training, Loss t -Loss t+1 represents the change value of the loss function between the tth round and the next round, and μ is a hyperparameter.

[0036] The traditional gradient descent method is based on the current position each time the update is performed, so training the model using the gradient descent method often requires many iterations to converge. In order to converge in a shorter time, the momentum gradient descent algorithm is used instead of the traditional gradient descent algorithm in the present application. The momentum gradient descent method corrects the current gradient by combining the previous historical gradient, which can accelerate the convergence speed. The update formula using the momentum gradient descent method is shown in equations (3) and (4).

[0037]

[0038] Where, is the momentum parameter of edge device i. γ is the momentum coefficient, usually set to 0.9. i is the loss function of participating device i. represents the model parameters of the ith participating device at the tth training, and the dimensions of the momentum parameters and the model parameters are the same. η is the learning rate, and the initial learning rate is set to 0.01 in the experiment.

[0039] The data augmentation phase is treated as a separate learning and training process. To avoid additional communication costs caused by parameter transfer between the server and the client during training, the concept of a mediator is introduced. The mediator is virtual and can be placed locally to simulate the aggregation of the server. First, the initial value of the threshold is randomly initialized. In order to involve as many edge devices as possible in training, the initial threshold should be as small as possible. Let the initial threshold be 0.1. Data augmentation is performed on the local data according to this threshold. Then, the augmented data is used for local training. The trained model parameters and momentum parameters are uploaded to the mediator. The mediator aggregates a global model and a new momentum according to the received parameters. The calculation process is shown in formulas (5) and (6). The threshold is recalculated through (1). The generated global model, momentum and the calculated new threshold are sent to the client. The above process is repeated until the termination mechanism is reached.

[0040]

[0041] Where d(t) is the momentum parameter aggregated by the server, which the client uses during a new round of training. t is the momentum parameter of edge device i; w(t) is the global model parameter.

[0042] Since the range of the tanh function is (-1, 1), it ensures that θ will not fluctuate significantly during training due to large changes in the loss function. Initially, the difference between loss functions is large, and tanh(Loss) t -Loss t+1 Since the value of θ is greater than 0, θ can be adjusted using the tanh function, and θ will increase adaptively. To avoid θ reaching 0 during training and affecting subsequent training results, we introduce a hyperparameter μ, which is a very small value, such as 0.001. After training reaches a stable stage, the change in the loss function is small, and the value of tanh tends to 0. Therefore, we add a termination mechanism: when the value of the loss function starts to change to 0 or a negative number, we consider data augmentation to be complete. We consider the current threshold value θ to be the appropriate threshold we need.

[0043] The data augmentation operation proposed in this invention is performed on data of each label category separately. The data augmentation operation for a single label category only needs to amplify the data of that category to a quantity whose coefficient is close to the threshold θ. During the data augmentation process, the edge device traverses all local data label categories and performs data augmentation on the data categories that need to be augmented. There are two sources of the original data for augmentation: for augmenting missing category data, the original data comes from the federated learning server; for augmenting imbalanced category data, the original data comes from the edge device's local dataset. During the data augmentation process, the data augmentation algorithm selects a sample and performs data augmentation based on that sample, including random shifting, random rotation, random shearing, and random scaling.

[0044] (2) Design of methods for selecting participants in federated learning

[0045] The data stored on edge devices and the speed at which they train models determine their utility in terms of statistical and system efficiency; these two efficiencies are referred to as statistical utility and system utility, respectively. The imbalance of local data on edge devices determines their contribution to the global model during training, and this contribution is represented by weight dispersion. The method of this invention uses two utility values ​​and weight dispersion to measure the user utility of edge devices. The probability of a device being selected for training is proportional to its utility value, prioritizing users with high utility values ​​for inclusion in training. This method can accelerate the completion time of each training round while improving the quality of participant data.

[0046] By correlating the statistical utility of edge device i with the system utility, the user utility of edge device i is defined as follows: Wherein, the local training sample data set of edge device i is D i Loss(j) is the training loss for sample data j. The statistical utility is... It is used to characterize the ability to effectively capture the data value of edge devices while protecting user privacy; T represents system utility. i This refers to the time taken for participants to complete model updates and uploads in federated learning; the weight dispersion is... Let Wi be the model parameters for client i in round t, and W0(t) be the model parameters obtained by training on the public dataset in round t, representing the degree of data imbalance for client i. This calculation method allows for a trade-off between system utility, data imbalance, and statistical utility.

[0047] The complete participant selection algorithm flow is shown in Algorithm 1.

[0048] Table 1

[0049]

[0050] (3) Design of Federated Learning Participation in Equipment Heterogeneity Optimization Method

[0051] This method incorporates data augmentation techniques for participating devices and participant selection methods into the basic training process of federated learning. It proactively improves the quality of participating device data by constructing a public dataset, mitigating statistical heterogeneity. Simultaneously, it calculates user utility to measure the importance of users to the training task, further mitigating system heterogeneity. This method effectively alleviates the impact of participating device heterogeneity on training in heterogeneous federated learning environments, improving the efficiency of federated learning. The complete process of the federated learning participating device heterogeneity optimization method is as follows: Figure 2 As shown, the local data of participants is first augmented using a data augmentation method to address the imbalance of local data. Then, a participant selection method is used to calculate the utility value of users based on the augmented data, and a subset of users are selected to participate in training. Finally, the target model is trained through continuous iteration.

Claims

1. A federated learning optimization method for the heterogeneity of IoT devices, characterized in that... The method includes the following steps: Step 1: Design of Federated Learning Participation Device Data Augmentation Methods Step 1: Randomly initialize the initial value of the threshold. If the ratio of the amount of data of a certain label category in the local edge device to the amount of data of the local label category with the most data is lower than the initial threshold, perform data augmentation on the local data according to the initial threshold. Step 12: Use the data enhanced in Step 11 for local training, and upload the trained model parameters and momentum parameters to the intermediary. The intermediary aggregates a global model and a new momentum based on the received parameters. Step 13: The server recalculates the threshold based on the performance of the aggregated global model, and sends the generated global model, momentum, and the newly calculated threshold to the client. The threshold calculation formula is as follows: in, It is a threshold. Representative at the The value of the loss function during each training round. Indicates the first The change in the loss function between rounds, It is a hyperparameter; To achieve faster convergence, momentum gradient descent is used instead of the traditional gradient descent algorithm. Momentum gradient descent corrects the current gradient by incorporating previous historical gradients. The update formula for momentum gradient descent is as follows: in, It is an edge device momentum parameters, The momentum coefficient, It is the equipment involved loss function, Indicates the first The participating device in the first Model parameters during training. It is the learning rate; Step 14: Repeat Step 13 until the conditions for termination are met; Step 2: Design of Methods for Selecting Participants in Federated Learning Step 21: Edge device The statistical utility is related to the system utility, and the edge device is formulated. User utility: ; Among them, edge devices The local training sample data set is , It is sample data The training loss; statistical utility is This is used to characterize the ability to effectively capture the data value of edge devices while protecting user privacy; Represents system utility. This refers to the time taken for participants to complete model updates and uploads in federated learning; the weight dispersion is... , It is an edge device In the Model parameters during the cycle, It is in the The model parameters, obtained by training on a public dataset, are used to represent edge devices. The degree of imbalance in the data; Step 22: Sort the edge devices according to their user utility values ​​from largest to smallest, and select the top edge devices from the set. One participant was trained, among whom It is an exploratory factor. It is the size of the participant set; Step 3: Design of Federated Learning Participation Equipment Heterogeneity Optimization Method Step 3:

1. Enhance the local data of participating devices using federated learning-based device data augmentation methods; Step 32: Calculate the user utility of each participant based on the enhanced data from Step 31, and select participants to participate in training based on the utility values; Step 33: Calculate the global model based on the participants from Step 32 and update the user utility values; Steps 3 and 4: Repeat steps 3 and 3 until the set number of training rounds is reached, at which point the training ends.

2. The federated learning optimization method for heterogeneity of IoT devices according to claim 1, characterized in that... In steps one and two, the process of the intermediary aggregating a global model and calculating the new momentum based on the received parameters is as follows: Where d(t) is the momentum parameter aggregated by the server, which the client uses during a new round of training. =d(t), It is an edge device The momentum parameter is w(t); w(t) is the global model parameter.

3. The federated learning optimization method for heterogeneity of IoT devices according to claim 1, characterized in that... In step one of the four steps, the termination mechanism is triggered when the value of the loss function starts to change to 0 or a negative number.

Citation Information

Patent Citations

  • Federal learning training and prediction method and system based on heterogeneous resources

    CN114219097A

  • User bidding method and device under federated learning based on multi-agent reinforcement learning algorithm

    CN114971819A