Federal learning client resource heterogeneous method and system for edge intelligence
By optimizing the client division and training mechanism of edge intelligent terminal devices, efficient federated learning in a heterogeneous resource environment is achieved, the impact of resource heterogeneity on training efficiency and performance is solved, and the training efficiency and generalization of the model are improved. ization ability.
Patent Information
- Application Number
- CN202410716419.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-24
AI Technical Summary
In edge computing scenarios, differences in computing capabilities, storage capabilities, and communication capabilities of heterogeneous intelligent terminal devices affect the training efficiency and performance of the federated learning model. The traditional random client selection method is not efficient enough and may prolong the entire federated learning cycle and affect the performance of the federated learning model. Affects the training efficiency, accuracy and generalization ability of the model.
Adopt a client division strategy to select clients with better resource conditions for local self-training or edge-end collaborative training. Candidate clients use edge-end collaborative training, and the edge server performs model semi-asynchronous aggregation to optimize client selection and training mechanisms. Improve training efficiency and resource utilization.
Through reasonable allocation of resources and flexible training mechanism, the training efficiency, accuracy and generalization ability of federated learning are improved, avoiding the extension of the training cycle caused by limited resources of a single client, and ensuring efficient update and overall performance of the model.
Smart Images

Figure CN118690873A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field related to resource heterogeneity, and more specifically, to a method and system for resource heterogeneity of a federated learning client for edge intelligence. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Smart edge terminal devices are equipped with a variety of applications, embedded sensors, and certain computing, storage, and communication capabilities. They can easily and quickly collect various types of data and expect to apply machine learning models for reasoning and decision-making. This trend has led to an increasing demand for machine learning capabilities in smart edge networks. From the perspective of service providers, how to make full use of the huge amount of data generated by these massive smart terminal devices to provide users with high-quality edge artificial intelligence services has become an urgent problem to be solved.
[0004] Traditional machine learning models rely on cloud servers for centralized data processing and training. Collecting and processing the massive data generated by network edge devices is costly, inefficient, and poses a serious threat to data privacy. Edge computing, as a distributed computing paradigm, sinks computing, storage, and network resources from the cloud to the network edge, which is closer to the source of data generation. It aims to make full use of the computing, storage, and communication resources of edge devices and comprehensively improve data processing capabilities. As an effective supplement to traditional centralized cloud computing, edge computing reduces the core network traffic load, alleviates the computing and communication pressure of cloud servers, shortens the end-to-end operation response delay, and improves data privacy and security. However, edge servers that centrally collect raw data from smart terminals also face the risk of user privacy leakage. In addition, the quality and quantity of data in a single edge network may not be sufficient to support complex artificial intelligence algorithms, thus affecting service quality.
[0005] As a distributed learning paradigm suitable for heterogeneous edge computing scenarios, federated learning is unique in that it can unite different data owners to jointly train global models. In this process, each participant only interacts with the intermediate parameters of the model, and the data of each party is retained locally, effectively avoiding the risk of data leakage. When federated learning is applied to edge computing scenarios, each smart terminal device can use its own data set as well as computing, storage and communication capabilities to collaborate with edge servers and cloud servers to train machine learning models, thereby achieving secure and efficient edge intelligence.
[0006] The inventors found in their research that there are many challenges in deploying federated learning in edge computing scenarios, especially the differences in computing power, storage capacity, and communication capabilities of heterogeneous smart terminal devices, which will have a significant impact on the training efficiency and performance of the federated learning model. Traditional federated learning mechanisms usually use a random method to select clients to participate in training. This method is simple but not efficient enough. When the resources of the selected client are limited, it may not only extend the entire federated learning cycle, but may even fail to complete local training tasks, thereby affecting the training efficiency, accuracy, and generalization ability of the federated model. Edge intelligent federated learning faces serious challenges of resource heterogeneity. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a method and system for heterogeneous client resources of federated learning for edge intelligence, optimizes the client selection strategy, designs a suitable client model training mechanism, and improves the model aggregation mechanism, which can realize efficient and stable edge intelligent federated learning and alleviate the problem of heterogeneous client resources.
[0008] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0009] One or more embodiments provide a method for heterogeneous resources of federated learning clients for edge intelligence, comprising the following steps:
[0010] According to the local resource information of the client and the parameters of the machine model to be trained, the clients are divided into selected clients that meet the requirements of the current model training task, and the remaining clients are candidate clients;
[0011] Configure a training mechanism for the divided clients. Configure the selected clients to participate in federated learning by local self-training or edge collaborative training. The candidate clients participate in federated learning by edge collaborative training.
[0012] After each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
[0013] One or more embodiments provide a federated learning client resource heterogeneous system for edge intelligence, including:
[0014] Client division module: configured to divide clients according to the local resource information of the clients and the parameters of the machine model to be trained. The clients that meet the requirements of the current model training task are selected clients, and the remaining clients are candidate clients.
[0015] Training mechanism determination module: configured to configure a training mechanism for the divided clients, configure the selected clients to participate in federated learning by local self-training or edge collaborative training, and the candidate clients to participate in federated learning by edge collaborative training;
[0016] Aggregation module: After each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
[0017] An electronic device includes a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps in the above-mentioned method of heterogeneous client resources of federated learning for edge intelligence are completed.
[0018] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the steps in the above-mentioned method of heterogeneous client resources of federated learning for edge intelligence are completed.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] In this disclosure, the clients are first divided to allocate resources reasonably. The selected clients have better resource conditions and can participate in training autonomously or collaboratively, thereby accelerating the training process. The candidate clients participate in federated learning through collaborative training, effectively utilizing edge computing resources;
[0021] In addition, there is no need to wait for other clients that have not completed training under the current edge federated learning round. When the model update parameters reach a certain number, the model parameters are aggregated to obtain the edge local model of the edge server; the semi-asynchronous model aggregation mechanism does not affect the overall federated learning process, and can use the models trained by all clients. After the edge server completes the edge local model aggregation, a round of edge federated learning is completed and the next round of edge federated learning begins. The next step is performed according to the number of updated parameters, so that the entire federated learning cycle will not be extended due to the resource limitations of a single client, thereby improving the training efficiency, accuracy and generalization ability of the federated model.
[0022] The advantages of the present disclosure and the advantages of additional aspects will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and the description thereof are used to explain the present disclosure but do not constitute a limitation of the present disclosure.
[0024] Figure 1 It is a flowchart of a method for heterogeneous resources of a federated learning client facing edge intelligence in Embodiment 1 of the present disclosure;
[0025] Figure 2 This is a schematic diagram of client division in Embodiment 1 of the present disclosure;
[0026] Figure 3 Schematic diagram of edge-end collaborative training in Embodiment 1 of the present disclosure;
[0027] Figure 4 is a schematic diagram of semi-asynchronous edge local model aggregation in Example 1 of the present disclosure;
[0028] Figure 5 is a hierarchical federated learning architecture diagram of Embodiment 1 of the present disclosure;
[0029] Figure 6 This is a diagram of the experimental evaluation results of scenario 1 in the experimental verification of embodiment 1 of the present disclosure;
[0030] Figure 7 This is a diagram of the experimental evaluation results of scenario 2 in the experimental verification of embodiment 1 of the present disclosure; DETAILED DESCRIPTION
[0031] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0032] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0033] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the various embodiments in the present disclosure and the features in the embodiments can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.
[0034] Example 1
[0035] In the technical solutions disclosed in one or more embodiments, Figures 1 to 7 As shown, a method for heterogeneous client resources of federated learning for edge intelligence includes the following steps:
[0036] Step S1: According to the local resource information of the client and the parameters of the machine model to be trained, the clients are divided, and the clients that meet the requirements of the current model training task are selected clients, and the remaining clients are candidate clients;
[0037] Step S2: configure a training mechanism for the divided clients, configure the selected clients to participate in federated learning by local self-training or edge collaborative training, and configure the candidate clients to participate in federated learning by edge collaborative training;
[0038] Step S3: After each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
[0039] After the edge server completes the edge local model aggregation, one round of edge federated learning is completed and the next round of edge federated learning begins.
[0040] In this embodiment, there is no need to wait for other clients that have not completed training under the current edge federated learning round. When the model update parameters reach a certain number, the model parameters are aggregated to obtain the edge local model of the edge server; after the edge server completes the edge local model aggregation, a round of edge federated learning is completed and the next round of edge federated learning begins. The next step is performed according to the number of updated parameters, so that the entire federated learning cycle will not be extended due to the limited resources of a single client, thereby improving the training efficiency, accuracy and generalization ability of the federated model. In the model training process of joint learning, the resources of the client are heterogeneous.
[0041] In the above scheme, the clients are first divided through step S1 to reasonably allocate resources. The selected clients have better resource conditions and can participate in training autonomously or collaboratively, thereby accelerating the training process. Candidate clients participate in federated learning through collaborative training and effectively utilize edge computing resources. In step S3, the edge server aggregates the model update parameters submitted by each client to ensure the efficiency of training and the update speed of the model. When the number of model update parameters reaches the set threshold, they are aggregated to obtain an edge local model, further improving the overall performance of the model.
[0042] This method can flexibly divide training tasks according to the client's resource status, improving training efficiency and resource utilization. The combination of edge collaborative training and local self-training ensures the flexibility and efficiency of federated learning. At the same time, the edge server performs semi-asynchronous aggregation of model update parameters, which improves the reliability and consistency of model training, and ultimately obtains a high-quality edge local model.
[0043] In alternative or modified implementations, the criteria for dividing the selected client and the candidate client can be adjusted according to actual conditions. For example, the criteria can be adjusted according to factors such as the network status of the client and the remaining power of the device. In addition, different aggregation strategies, such as weighted average, can be used to further optimize the model aggregation process.
[0044] In some embodiments, the local self-training method: the computing and storage resources of the client are selected to meet the training requirements of the current model to be trained, that is, the client can complete the training of the complete model to be trained by only using the resources of its own device;
[0045] In some embodiments, in the edge collaborative training mode, the local resources of the candidate client cannot meet the training requirements of the current model to be trained, that is, the client cannot train the complete model to be trained using only the resources of its own device. Therefore, the edge collaborative training divides the model to be trained, and the client uses the resources of its own device to train part of the model to be trained, and the remaining part of the model to be trained is handed over to the edge server to complete the training. The client and the edge server can complete the training of the complete model to be trained by exchanging model intermediate parameters;
[0046] For the selected client, you can develop a local self-training training mechanism or an edge-end collaborative training mechanism for it. Compared with client devices, edge servers have better computing and storage resources. When communication resources are normal, the efficiency of edge-end collaborative training is usually higher than that of local self-training. Therefore, when the amount of data on the selected client is large, using edge-end collaborative training can enable the client to participate in each round of federated learning more efficiently and contribute more data features.
[0047] For candidate clients, the edge collaborative training mechanism can ensure that the client can still participate in each round of federated learning when local resources are limited;
[0048] Since the resources of edge servers are limited, it is necessary to consider the actual conditions of different clients and develop a suitable training mechanism so that all users can participate in federated learning.
[0049] At the beginning of each round of global federated learning, the cloud server sends the global model to each edge server, which is the model to be trained for each edge server;
[0050] A feasible technical solution, in step S1, the edge server interacts with the client to determine the local resource information of the client, each edge server sends a resource request message to the client within the range, and the client that receives the message sends interaction information to the edge server based on the current device status, including the device's real-time CPU, GPU, memory, communication bandwidth, local data volume and other local resource-related information. Through these interactions, the edge server can fully understand the resource status of the client, provide a basis for subsequent client division and task allocation, and ensure the rationality and efficiency of model training.
[0051] This method enables the edge server to dynamically grasp the resource status of the client, so as to more accurately divide the client and allocate tasks, improving resource utilization efficiency and training effect. Through real-time resource interaction, it can flexibly respond to changes in client resources and ensure the stable progress of training tasks.
[0052] In alternative or modified implementations, more resource evaluation indicators can be introduced, such as the power status of the device, the current workload, etc., to further refine the client resource information acquisition process. In addition, different communication protocols or encryption technologies can be used to ensure the security and accuracy of resource interaction information.
[0053] In step S1, a comprehensive evaluation is performed from four aspects, namely computing resources, storage resources, communication resources and data resources, in combination with the current model parameters, to divide the clients; based on the evaluation and analysis results, the edge server adopts local self-training or edge-end collaborative training to participate in federated learning for the clients that meet the current model training task requirements, and these clients are recorded as selected clients; for other clients that cannot meet the current model training task requirements, these clients are adopted to participate in federated learning by edge-end collaborative training, and these clients are recorded as candidate clients; after each client completes the local model training under the current edge federated learning round number, it immediately submits the model update parameters to the edge server;
[0054] Specifically, a client that meets the requirements of the current model training task is one where the available memory and computing power of the client meet the model training requirements at the same time;
[0055] As a further technical solution, clients that have not completed training in each round of edge federated learning can submit model update parameters at any time after completing training. The edge server uses the staleness coefficient to dynamically adjust the old local model parameters and the new local model parameters for semi-asynchronous aggregation based on the staleness of the model parameters.
[0056] In the above scheme, clients that have not completed training in each round of edge federated learning can submit model update parameters at any time after completing training. The edge server dynamically adjusts the old local model parameters and the new local model parameters for asynchronous aggregation based on the obsolescence of the model parameters. The above asynchronous aggregation method is neither completely synchronous nor completely asynchronous, and is called a semi-asynchronous method. In this way, the coherence and consistency of model updates are ensured to avoid affecting the overall training progress due to delays in individual clients. Through the asynchronous aggregation mechanism, problems caused by inconsistent client training progress can be effectively handled, improving the efficiency and flexibility of model updates.
[0057] When each edge server completes the edge local aggregation for more than the threshold number of times, it uploads the latest edge local model parameters to the cloud server. The cloud server performs semi-asynchronous aggregation on the received edge local model parameters to obtain a new global model, thus completing a round of global federated learning. Figure 5 As shown in the figure, a hierarchical federated learning architecture is composed of a client, an edge server, and a cloud server.
[0058] In step S2, the steps for formulating a training mechanism are as follows:
[0059] Step S21: for the selected client, when the number of local data samples exceeds the set multiple of the average number of data samples of all clients, a method of edge collaborative training is formulated for the client to participate in federated learning, and the collaborative training of this part of clients is given priority; otherwise, a method of local self-training is formulated for the client to participate in federated learning;
[0060] Step S22: For candidate clients, formulate an edge-to-edge collaborative training method for the client to participate in federated learning. If the number of local data samples of the current client exceeds the set multiple of the average number of data samples of all clients, this part of the clients will be given priority for collaborative training after the edge-to-edge collaborative training of the selected clients is completed; the remaining candidate clients will wait for the completion of the previous collaborative training before performing edge-to-edge collaborative training to participate in federated learning.
[0061] Optionally, the models to be trained include but are not limited to: neural network models, decision tree models, random forest models, support vector machine models and other machine models;
[0062] In the above scheme, steps S21 and S22 specify in detail the training methods for the selected client and the candidate client. By setting a multiple threshold of the number of data samples, it is dynamically determined whether the client performs edge collaborative training or local self-training. This flexible training method can effectively utilize the local resources of the client and ensure the efficient completion of the training task.
[0063] This method can flexibly formulate training strategies based on the amount of data and resource conditions of the client, improving training efficiency and model performance. The reasonable allocation and priority setting of selected clients and candidate clients ensures the efficient implementation of federated learning and the rational use of resources.
[0064] The following is a detailed description:
[0065] It mainly includes three roles: client C participating in federated learning, edge server Cloud Server cloud The specific steps of the program are as follows:
[0066] 1. The cloud server sends global model parameters and the threshold of local aggregation times of each edge server to the edge server;
[0067] 2. The edge server randomly selects some clients from the online clients within the communication range and obtains the local resource information of the selected clients.
[0068] 3. The edge server conducts a comprehensive evaluation of the client based on the real-time status of the client and the global model parameters. Based on the evaluation and analysis results, the client is classified into two categories: selected clients and candidate clients.
[0069] 4. The edge server formulates a training mechanism for each client. The training mechanism includes: local self-training and edge collaborative training.
[0070] 5. The edge server broadcasts the entire edge local model or part of the edge local model to the client.
[0071] The edge local model refers to the complete model on the edge server. The cloud server model is the global model. The cloud server sends the global model to the edge server, which is the edge local model. The edge local model is to distinguish it from the cloud server model.
[0072] Edge-side collaborative training will split the edge local model to be trained, and the edge server may send part of the edge local model to the client using edge-side collaborative training.
[0073] 6. Each client trains the model according to its own training mechanism and uploads the model update to the edge server.
[0074] 7. After the edge server receives a number of model parameters exceeding a certain threshold, it performs model aggregation based on the staleness of the model parameters and generates a new edge local model.
[0075] 8. After the edge server completes the edge local aggregation for more than a certain threshold number of times, it uploads the latest edge local model parameters to the cloud server. The cloud server aggregates the received edge local model parameters to generate a new global model.
[0076] 9. During the training process of the global federated learning model, steps 1-8 are iteratively executed; during the training process of the edge federated learning model, steps 2-7 are iteratively executed.
[0077] The detailed description of the above steps is as follows:
[0078] In step 1, the cloud server S cloud To edge server Send global model parameters (t global represents the current round number of global federated learning), the threshold value of the number of local aggregations of each edge server δ j ,J∈[1,M];
[0079] Among them, the threshold of local aggregation times of each edge server is j , by the cloud server S cloud Dynamic adjustment;
[0080] In step 2, the edge server Randomly select some clients from N online clients within the range and record them as
[0081] Edge Server To the client Broadcast resource request message, and the client receives the message Based on the current device status, interactive information will be returned to the edge server, including the device's real-time CPU, GPU, memory, communication bandwidth, and local data volume information.
[0082] In step 3, the edge server According to each client The real-time status of the system is combined with the current global model parameters to conduct a comprehensive evaluation from four aspects: computing resources, storage resources, communication resources, and data resources.
[0083] Given a given number of training data samples, It is used to represent the amount of computation required for the forward propagation of the model layer l. Used to represent the amount of computation required for the back propagation of the Lth layer of the model, unit: FLOPs; and They are used to represent the output data size of the model's layer l forward propagation and layer l reverse propagation, respectively. lUsed to represent the memory requirements for storing the first layer model parameters and input or output intermediate data, unit: bit; and Used to represent the client and edge servers Computing power, unit: FLOPs / s; and Used to represent the client and edge servers of available memory, To represent the client Number of local data samples (unit: MByte). Used to represent edge servers With the client Q is used to represent the size of the model parameter data uploaded by the client, and E is used to represent the size of the model parameter data downloaded by the client from the edge server (unit: bit).
[0084] Each layer of the model is on the client side The calculation time required is calculated as follows:
[0085]
[0086] Each layer of the model is on the edge server The calculation time required is calculated as follows:
[0087]
[0088] Intermediate parameters at the edge server With the client The time required for transmission between the two is calculated as:
[0089]
[0090] Edge Server Consider the client first Current available memory like That is, the current available memory does not meet the requirements of the overall model training, so the client The available memory is insufficient, so it is added to the candidate client queue and recorded as
[0091] like That is, the current available memory meets the needs of the overall model training, while taking into account the client Computing resources like That is, the current computing power is lower than the average computing power of all clients, then the client Because the current computing power is weak, it is added to the candidate client queue and recorded as
[0092]
[0093] like That is, the current computing power is higher than the average computing power of all clients, then the client Join the selected client queue, recorded as
[0094] In step 4, for the selected client, consider the client Number of local data samples like That is, the current number of local data samples exceeds the average number of data samples of all clients by τ times, and τ is determined by the edge server Dynamic adjustment, then the client Formulate a method for edge collaborative training to participate in federated learning, and give priority to the collaborative training of this part of the client; otherwise, the client Develop a local self-training method to participate in federated learning.
[0095] For candidate clients, Formulate a way for edge collaborative training to participate in federated learning, while taking into account the client Number of local data samples like That is, the current number of local data samples exceeds τ times the average number of data samples of all clients, and τ is dynamically adjusted by the edge server S. Then, after the edge collaborative training of the selected clients is completed, the collaborative training of these clients will be given priority; the remaining candidate clients will wait for the completion of the previous collaborative training before performing edge collaborative training to participate in federated learning.
[0096] After completing the training mechanism, the edge server Using the CoopFL solution, each layer of the model is used on the client side The computation time required Each layer of the model is on the edge server The computation time required Intermediate parameters at the edge server With the client The time required for transmission between cm,l And the memory requirement E for storing the training L-th layer model parameters and input or output intermediate data l , to formulate a computation offloading strategy for each client that requires edge collaborative training.
[0097] Specifically, the computation offloading strategy adopts the existing offloading strategy;
[0098] In step 5, the edge server The whole model parameters or part of the model parameters are adjusted according to the training mechanism established for the selected client and the candidate client. (t edge Indicates the current round number of edge federated learning) is distributed to the corresponding client.
[0099] In step 6, the client Received from the edge server The overall model parameters or partial model parameters According to its own training mechanism, based on the current local data set For the objective function Optimize to obtain updated local model parameters And send the model parameters to the edge server
[0100] In step 7, the edge server Collect client t edge Model parameters updated locally When n reaches the threshold σ, the threshold σ is set by the edge server Dynamic adjustment, i.e. edge server After receiving more than a certain number of model update parameters, the aggregation algorithm is used to collect the tth edge The local model update parameters and the tth edge The old local model update parameters before the round are aggregated to obtain the new edge local model parameters as follows:
[0101]
[0102] in, a i Used to represent the staleness coefficient (by the edge server Dynamic adjustment). is the edge local model parameter for the next iteration.
[0103] In step 8, the edge server Completion exceeds a certain threshold δ j ,j∈[1,M], after edge local aggregation, the latest edge local model parameters (t globa; represents the current round number of global federated training) uploaded to the cloud server S c;oud , Cloud Server S cloudThe received edge local model parameters are aggregated using the FedAvg algorithm to generate new global model parameters as follows:
[0104]
[0105] in, is the global model parameter for the next iteration.
[0106] In step 9, in the semi-asynchronous hierarchical federated learning training scenario, each client Need to communicate with edge server The parameter communication process of multiple rounds of iterations, the edge server Need to connect to the cloud server S cloud The parameter communication process is repeated for multiple rounds until the federated model converges.
[0107] In this embodiment, a semi-asynchronous hierarchical federated learning framework based on client partitioning strategy and edge-end collaborative training for edge intelligence is proposed. This framework can alleviate the problem that the entire federated learning process may be prolonged and the local training task cannot be completed when the client's computing, storage and communication resources are limited. The previous method of selecting federated learning clients by random selection or directly screening according to the real-time CPU, GPU, memory, communication bandwidth and other resource parameters of the client device is optimized. The scheme of this embodiment can ensure that all clients can participate in federated learning and can improve the final generalization performance of the federated learning model. It alleviates the problem that some clients may not be able to complete local training tasks due to limited computing and storage resources, and at the same time, it can accelerate model training for clients with a large amount of local data to ensure that such clients can contribute more rounds to federated learning. It can ensure that the edge server will not suspend edge model aggregation due to some resource-constrained clients, and ensure efficient multi-round iteration of edge federated learning.
[0108] In order to illustrate the effect of the solution of this embodiment, an experimental verification was carried out.
[0109] The above schemes are evaluated using the VGG16 convolutional neural network on the public dataset Cifar10. To address the phenomenon of non-independent and identically distributed data, two scenarios are assumed: (1) 10 clients are randomly assigned data samples of 4 categories, with the same number of samples. (2) 10 clients are randomly assigned data samples of 5 categories, with the same number of samples. The experimental results of scenario 1 are shown in Figure 2. Figure 1 The experimental results of scenario 2 are shown in Figure 2The experimental evaluation results show that when the degree of non-independent and identically distributed data between the clients participating in federated learning is too high, compared with the situation where some clients are unable to participate in each round of federated model training due to resource constraints, the use of this solution can ensure that all clients can participate in each round of federated model training, which can significantly accelerate the convergence and stability of the federated model, and can significantly improve the generalization ability and accuracy of the federated model.
[0110] Example 2
[0111] Based on Example 1, this embodiment provides a federated learning client resource heterogeneous system for edge intelligence, including:
[0112] Client division module: configured to divide clients according to the local resource information of the clients and the parameters of the machine model to be trained. The clients that meet the requirements of the current model training task are selected clients, and the remaining clients are candidate clients.
[0113] Training mechanism determination module: configured to configure a training mechanism for the divided clients, configure the selected clients to participate in federated learning by local self-training or edge collaborative training, and the candidate clients to participate in federated learning by edge collaborative training;
[0114] Aggregation module: After each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
[0115] It should be noted here that the various modules in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation process is the same, which will not be repeated here.
[0116] Example 3
[0117] Based on Example 1, this embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, the steps in a federated learning client resource heterogeneity method for edge intelligence described in Example 1 are completed.
[0118] Example 4
[0119] Based on Example 1, this embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps in the above-mentioned method of heterogeneous client resources for federated learning for edge intelligence are completed.
[0120] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
[0121] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A method for heterogeneous client resources of federated learning for edge intelligence, characterized in that: The steps include: According to the local resource information of the client and the parameters of the machine model to be trained, the clients are divided into selected clients that meet the requirements of the current model training task, and the remaining clients are candidate clients; Configure a training mechanism for the divided clients. Configure the selected clients to participate in federated learning by local self-training or edge collaborative training. The candidate clients participate in federated learning by edge collaborative training. After each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
2. The method for heterogeneous client resources of federated learning for edge intelligence according to claim 1, characterized in that: The edge server interacts with the client to determine the client's local resource information. Each edge server sends a resource request message to the clients within the range. The client that receives the message sends interaction information to the edge server based on the current device status. The interaction information includes the device's real-time CPU, GPU, memory, communication bandwidth, and local data volume. Related information related to local resources.
3. The method for heterogeneous client resources of federated learning for edge intelligence as claimed in claim 2, characterized in that: For the selected client, if the number of local data samples of the current client exceeds the set multiple of the average number of data samples of all clients, the client is given the option of edge collaborative training to participate in federated learning, and collaborative training is given priority; otherwise, the client is given the option of local self-training to participate in federated learning; For candidate clients, an edge-side collaborative training method is formulated for the current client to participate in federated learning, and the candidate client whose local data sample number exceeds the set multiple of the average data sample number of all clients is selected as the first candidate client; after completing the edge-side collaborative training of the selected client, the first preferred client is prioritized for collaborative training; the candidate clients except the first candidate client are finally trained at the edge to participate in federated learning.
4. A method for heterogeneous resource management of federated learning clients for edge intelligence as claimed in claim 1 or 3, characterized in that: In the edge collaborative training method, the model to be trained is divided. The client uses the resources of its own device to train part of the model to be trained, and the remaining part of the model to be trained is handed over to the edge server to complete the training. The client and the edge server complete the training of the model to be trained by exchanging model intermediate parameters.
5. The method for heterogeneous client resources of federated learning for edge intelligence according to claim 1, characterized in that: In each round of edge federated learning, clients that have not completed training can submit model update parameters at any time after completing training. The edge server uses the staleness coefficient to dynamically adjust the old local model parameters and the new local model parameters for asynchronous aggregation based on the staleness of the model parameters.
6. The method for heterogeneous client resources of federated learning for edge intelligence according to claim 1, characterized in that: At the beginning of each round of global federated learning, the cloud server sends the global model to each edge server as the model to be trained for each edge server; When each edge server completes edge local aggregation more than the threshold number of times, it uploads the latest edge local model parameters to the cloud server. The cloud server performs semi-asynchronous aggregation on the received edge local model parameters to obtain a new global model, thus completing a round of global federated learning.
7. The method for heterogeneous client resources of federated learning for edge intelligence according to claim 1, characterized in that: A client that meets the requirements of the current model training task, specifically: the client's available memory and computing power meet the model training requirements at the same time.
8. A federated learning client resource heterogeneous system for edge intelligence, characterized in that: include: Client division module: It is configured to divide the clients according to the local resource information of the clients and the parameters of the machine model to be trained. The clients that meet the requirements of the current model training task are selected clients, and the remaining clients are candidate clients. Training mechanism determination module: configured to configure a training mechanism for the divided clients, configure the selected clients to participate in federated learning by adopting local self-training or edge collaborative training, and the candidate clients to participate in federated learning by adopting edge collaborative training; Aggregation module: It is configured that after each client completes the local model training under the current edge federated learning round, the edge server obtains the model update parameters submitted by each client. If the number of obtained model update parameters exceeds the set threshold, the model is semi-asynchronously aggregated to obtain the edge local model.
9. An electronic device, characterized in that: The invention comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the method for heterogeneous resources of a federated learning client for edge intelligence described in any one of claims 1 to 7 are completed.
10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of a method for heterogeneous resources of federated learning clients for edge intelligence as described in any one of claims 1 to 7.
Citation Information
Cited By
Federal learning method for edge heterogeneous environment
CN118917441A
A federated learning approach for edge heterogeneous environments
CN118917441B
Distributed scheduling method based on split federated learning
CN118939404A
Segmentation federal learning model training method based on heterogeneous system
CN119312947A
Large language model training method based on efficient fine tuning of parameters
CN119578545A
