Federated learning method and system based on edge stateless network aggregation
Patent Information
- Application Number
- CN202410330668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-03-22
AI Technical Summary
然而,当前的研究要么集中在通信优化上,要么集中在数据隐私上,存在着的联邦学习性能不高的技术问题
[0024]上述基于边缘无状态网内聚合的联邦学习方法和系统,通过采用网内聚合的技术设计,在每一个轮次的全局模型更新训练中,由客户端由中心服务器获取相应的数据权重并且该数据权重可以预缓存在客户端所连接的聚合交换机上,然后由聚合交换机通过加法操作对自身连接的所有子节点的加权模型更新进行聚合,再将得到的聚合结果传输到网络中该聚合交换机所连接的其他后续节点,以便后续节点中的其他聚合交换机同理执行自身连接的所有子节点的加权模型更新聚合,直至中心服务器获取到来自这些聚合交换机传输过来的最终聚合结果,最终使得中心服务器只需根据自身存储的上一轮次的全局模型参数、计算的当前轮次未更新数据集大小的比例以及获取的最终聚合结果,计算得到当前轮次的全局模型参数,从而完成当前轮次的全局模型更新。
Smart Images

Figure CN118246576B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of model data processing technology, and relates to a federated learning method and system based on aggregation within an edge stateless network. Background Technology
[0002] Federated learning (FL) is a promising framework that enables collaborative training of a global model without sharing participants' personal data. Typically, a central server manages the training process and collects model updates, while multiple clients use their own data to perform local model training. Despite its wide applicability and high performance, this framework can be further improved by accelerating model aggregation and enhancing data privacy. On one hand, multiple clients sending their local models to the central server creates a "many-to-one" incast transmission over the network, which can clog the central server and slow down the entire training process. On the other hand, after collecting the local models, the central server performs stateful aggregation, which requires retaining each client's local updates in each round. Through such historical update data, the central server can infer sensitive attributes and even recover each client's original data. Therefore, the privacy-preserving advantages claimed in federated learning may be compromised. However, current research focuses either on communication optimization or data privacy, highlighting the technical challenges of low performance in federated learning. Summary of the Invention
[0003] To address the problems existing in the above-mentioned traditional methods, this invention proposes a federated learning method based on edge stateless network aggregation, a federated learning system based on edge stateless network aggregation, a computer device, and a computer-readable storage medium, which can effectively improve the performance of federated learning.
[0004] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0005] On the one hand, a federated learning method based on aggregation within an edge stateless network is provided, including the following steps:
[0006] During the current round of global model update, retrieve and pre-cachate the data weights passed from the central server to the selected clients; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients;
[0007] After obtaining the local model update data of all connected child nodes, the data is aggregated by addition. The child nodes include the selected clients, and the local model update data is the weighted model update uploaded by the client according to its corresponding data weight and the updated local model parameters.
[0008] The aggregation result is transmitted to subsequent nodes for data forwarding or addition operations on subsequent aggregation switches. The final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update for the current round. The asynchronous federated learning model update scheme is that the central server calculates the global model parameters for the current round based on the global model parameters stored in the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0009] On the other hand, a federated learning system based on aggregation within an edge stateless network is also provided, including:
[0010] The weight caching module is used to retrieve and pre-cache the data weights passed from the central server to the selected client during the current round of global model updates; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients;
[0011] The addition aggregation module is used to obtain the local model update data of all connected child nodes and then aggregate them through addition operations; where the child nodes include each selected client, and the local model update data is the weighted model update uploaded by the client according to its own corresponding data weight and the updated local model parameters;
[0012] The aggregation and transmission module is used to transmit the aggregation result to subsequent nodes for data forwarding or addition operations on the subsequent aggregation switch. The final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update of the current round. The asynchronous federated learning model update scheme is that the central server calculates the global model parameters of the current round based on the global model parameters of the previous round stored by itself, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0013] On the other hand, another federated learning method based on aggregation within edge stateless networks is also provided, including the following steps:
[0014] During the current round of global model updates, the data weights for each selected client are passed to all selected clients; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, n is the total size of the local datasets of all clients, and the data weight is used to instruct the client to upload the weighted model update to the connected aggregation switch according to its own corresponding data weight and the updated local model parameters.
[0015] Obtain the final aggregation result from all aggregation switches; the aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation result to subsequent nodes for data forwarding or to the subsequent aggregation switch to continue the aggregation; where child nodes include each selected client;
[0016] The model update scheme of asynchronous federated learning calculates the global model parameters for the current round based on the stored global model parameters from the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0017] Furthermore, another federated learning system based on aggregation within edge stateless networks is also provided, including:
[0018] The weight propagation module is used to propagate the data weights of each selected client to all selected clients during the current round of global model updates; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, n is the total size of the local datasets of all clients, and the data weight is used to instruct the client to upload the weighted model update to the connected aggregation switch according to its own corresponding data weight and the updated local model parameters.
[0019] The aggregation acquisition module is used to acquire the final aggregation results from all aggregation switches. The aggregation switches are used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation results to subsequent nodes for data forwarding or to subsequent aggregation switches to continue the aggregation. Among them, child nodes include each selected client.
[0020] The global update module is used to sample the model update scheme of asynchronous federated learning. It calculates the global model parameters of the current round based on the stored global model parameters of the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0021] On the other hand, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the federated learning method based on aggregation within an edge stateless network as described above.
[0022] Furthermore, a computer-readable storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the steps of the federated learning method based on aggregation within an edge stateless network as described above.
[0023] One of the above technical solutions has the following advantages and beneficial effects:
[0024] The aforementioned federated learning method and system based on edge stateless intra-network aggregation employs intra-network aggregation technology. In each round of global model update training, the client obtains the corresponding data weights from the central server, and these weights can be pre-cached on the aggregation switch connected to the client. Then, the aggregation switch aggregates the weighted model updates of all its connected child nodes through addition operations, and transmits the resulting aggregation to other subsequent nodes connected to the aggregation switch in the network. This allows other aggregation switches in the subsequent nodes to similarly perform weighted model update aggregation on all their connected child nodes until the central server obtains the final aggregation result transmitted from these aggregation switches. Ultimately, the central server only needs to calculate the global model parameters for the current round based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the obtained final aggregation result, thus completing the global model update for the current round.
[0025] Compared to traditional technologies, the above solution eliminates the need for clients to upload updated local model parameters. Instead, it necessitates uploading weighted model updates. Furthermore, the aggregation switch employs an additive operation for model updates, allowing the central server to store the global model parameters from the previous round and calculate the proportion of the current round's unupdated dataset. This eliminates the need to separately collect, store, and update the local model parameters of each client. The central server can then utilize the final aggregation result from the aggregation switch to complete the global model update for the current round. This design optimizes the model training process, enabling the aggregation switch to eliminate significant clock cycle overhead while achieving stateless intranet aggregation. This effectively improves data privacy protection and significantly reduces the computational burden on the switch and central server, ultimately enhancing federated learning performance. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a comparative diagram of the training process of federated learning in one embodiment, where (a) is the training process of federated learning in a conventional way, and (b) is the training process corresponding to GAIN.
[0028] Figure 2 This is a flowchart illustrating a federated learning method based on aggregation within an edge stateless network in one embodiment.
[0029] Figure 3 This is a flowchart illustrating another federated learning method based on edge stateless network aggregation in one embodiment.
[0030] Figure 4 This is a schematic diagram of the module structure of a federated learning system based on edge stateless network aggregation in one embodiment;
[0031] Figure 5 This is a schematic diagram of the module structure of another federated learning system based on edge stateless network aggregation in one embodiment;
[0032] Figure 6 This is a schematic diagram of the network topology for an experimental example in one embodiment;
[0033] Figure 7 This is a first schematic diagram showing the change of training accuracy over time in one embodiment, where (a) is the experimental result corresponding to the evaluation of the AlexNet model, and (b) is the experimental result corresponding to the evaluation of the ResNet34 model;
[0034] Figure 8 This is a second schematic diagram showing the change of training accuracy over time in one embodiment, where (c) is the experimental result corresponding to the evaluation of the MobileNetV3-S model, and (d) is the experimental result corresponding to the evaluation of the VGG11 model;
[0035] Figure 9 This is a schematic diagram of the experimental results of traffic and updates in one embodiment, where (a) is the traffic received by the central server (CS) when 70% accuracy is achieved, and (b) is the strategy for evaluating delayed global model updates.
[0036] Figure 10 This is a schematic diagram of the experimental results of updating and convergence in one embodiment, where (c) is the strategy of selecting a subset of clients for updating, and (d) is a comparison of model convergence when different numbers of clients are selected for global model updating in each round;
[0037] Figure 11 This is a schematic diagram comparing the training throughput of different models in one embodiment. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0040] It should be noted that, in this document, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The presentation of this phrase in various locations throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments.
[0041] Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments. The term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items, and all possible combinations thereof.
[0042] Federated learning is a privacy-preserving training method for collaboratively training a global model across multiple devices. In each training round, a central server updates the global model weights (i.e., model parameters) by aggregating local model updates from a large number of clients using federated averaging or its derivatives. The updated global model is then distributed back to these clients for the next round of training. However, model updates are typically ranging in size from megabytes to gigabytes, while there may be hundreds of clients. Therefore, the training process often incurs significant communication overhead and greatly impacts the training duration.
[0043] In traditional research, to reduce communication overhead, clients often quantize / compress model data (or perform more rounds of computation) before uploading, thereby reducing the volume and amount of data transmitted. However, these methods can hinder model convergence or require additional training iterations. Regarding data privacy, federated learning introduces methods such as homomorphic encryption and differential privacy to prevent data leakage from a central server. However, homomorphic encryption increases computational and communication overhead, while differential privacy can compromise the accuracy of the final model.
[0044] To improve training efficiency, many studies have shown that communication can be postponed until more rounds of local training are completed. Furthermore, the central server collects only a portion of the clients' local model updates each round, further reducing communication overhead. While these improvements effectively reduce communication frequency and enhance model convergence, they still cannot prevent excessive communication volume and duration per round. To address this, researchers have proposed techniques such as model update quantization and compression to alleviate communication overhead by reducing the amount of data transmitted. However, these techniques may introduce some information loss. Therefore, a trade-off must be struck between reducing communication overhead and maintaining the fidelity of model updates.
[0045] Regarding privacy in federated learning: Specifically, data privacy is another challenge facing federated learning. Many secure training schemes have been explored to enhance the privacy of local updates, such as homomorphic encryption, differential privacy-based methods, and secure multi-party computation. Homomorphic encryption allows a central server to compute on encrypted data without decryption, thus preventing the central server from accessing private data. However, this approach incurs significant computational overhead and increases the amount of communication data. Differential privacy-based methods hide data information from individual participants by adding noise to local updates; while computationally efficient, they significantly reduce the accuracy of the final model. Secure multi-party computation allows multiple parties to jointly compute a function while maintaining input privacy; however, it also introduces substantial communication and computational overhead, making the scalability of large federated learning systems challenging. Furthermore, many distributed training frameworks are being explored to reduce reliance on a central server, where clients communicate directly with each other to synchronize the global model. While these methods eliminate the need for a central server to collect data from individual participants (clients), they still pose security risks because model updates are exchanged directly between these clients.
[0046] In this invention, the traditional methods described above are considered limited because they do not address the most fundamental problem of federated learning frameworks: where and how to perform model aggregation. Ideally, aggregation should be completed as soon as local model data encounters each other in the network to reduce bandwidth consumption and achieve faster convergence. Furthermore, aggregation should be stateless and avoid caching any model parameters from clients. Thus, regardless of where aggregation is performed, the original data is unrecoverable. Based on the above research, this invention performs stateless aggregation of local model data on the ingress switch before the model data enters the central server. In this method, the switches involved must run a corresponding aggregation protocol (which can correspond to the software form of the proposed method).
[0047] Fortunately, the advent of programmable switches has enabled traditional network devices to offer greater flexibility and customization. Numerous studies advocate deploying programmable switches at the network edge to achieve network autonomy and adaptability, ultimately improving the service performance of edge networks. When traffic from multiple clients converges on the same switch, the switch can proactively perform aggregation and forward the aggregated traffic downstream, thereby reducing traffic and communication latency. This method is referred to as in-network aggregation in this invention. Furthermore, the switch can immediately aggregate received packets and only temporarily store a portion of the aggregation results, thus achieving stateless aggregation.
[0048] Despite the advantages of intranet aggregation, this approach still faces some challenges in practical applications. For example, model updates involve complex computational processing, especially time-consuming multiplication and division operations, which require a large number of clock cycles to be executed on the switch, potentially leading to network latency and reduced transmission throughput.
[0049] In summary, this invention proposes GAIN, a secure aggregation acceleration service designed for federated learning. Its design concept involves aggregating model updates (temporarily rather than permanently storing model parameters from clients) on an ingress programmable switch in a stateless manner before proceeding to the central server. To address the aforementioned challenges, this invention optimizes the model update workflow, enabling the switch to perform lightweight addition operations for data aggregation. To verify the efficiency and performance of this new method, a prototype GAIN system was implemented on an FPGA module. Analysis results further demonstrate that GAIN, while promoting privacy protection, can achieve significant performance gains even with a large number of clients.
[0050] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0051] First, a comparison between the conventional training process and GAIN can be made as follows: Figure 1 As shown, suppose there is a federated learning task in an edge network involving s clients. Each client has a local dataset of size n. i (1≤i≤s). The total size of these datasets is denoted as n. These clients collaborate with a central server to train a global model. The central server can be located in an edge network or somewhere else, such as a cloud data center. Each client and the central server is assumed to be a semi-trusted entity, belonging to a different organization or individual; they follow the training procedure (otherwise, federated learning tasks cannot be performed) but are curious about the data of others. The edge network belongs to one or more network providers and has full management control over its respective devices.
[0052] like Figure 1 As shown in (a), this illustrates the typical training process: at the beginning of each round, the central server randomly selects m clients and sets the current global model parameters w. t This is passed to them. Then, each selected client, based on its individual local dataset and model parameters w... t Perform local calculations and update the local model parameters. Send it back to the central server. After receiving these parameters, the central server will record the state of each client from... Updated to Then calculate a new global model parameter w.t+1 The update process can be viewed as an aggregation of these models through a weighted average update, i.e.:
[0053]
[0054] Because the central server maintains updates from each client in each round, this invention refers to this aggregation pattern as a stateful aggregation pattern, which may lead to privacy breaches. Furthermore, such a training process can result in high network traffic and poor communication performance, as the central server must frequently collect updates from numerous clients.
[0055] Please see Figure 2 In one embodiment, a federated learning method based on aggregation within an edge stateless network is provided. The following detailed explanation will be provided from the perspective of an aggregation switch. This method may include the following processing steps S12 to S16:
[0056] S12, during the current round of global model update, obtain and pre-cachate the data weights passed from the central server to the selected client; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients;
[0057] S14: After obtaining the local model update data of all connected child nodes, aggregate them through addition operation; where the child nodes include each selected client, and the local model update data is the weighted model update uploaded by the client according to its own corresponding data weight and the updated local model parameters;
[0058] S16, the aggregation result is transmitted to subsequent nodes to perform data forwarding or addition operations on the subsequent aggregation switch; the final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update of the current round. The asynchronous federated learning model update scheme is that the central server calculates the global model parameters of the current round based on the global model parameters of the previous round stored by itself, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0059] It is understood that this invention designs a general edge network architecture in which clients connect to the edge network via ingress switches. These ingress switches are interconnected with the backbone network through switches located at the edge aggregation or core layer. It is assumed that these ingress switches are programmable switches, because such deployment facilitates proactive identification, detection, classification, and other operations on incoming traffic.
[0060] To improve communication performance and data privacy, this invention provides a secure aggregation acceleration service (GAIN), which utilizes an ingress programmable switch to achieve stateless intra-network aggregation, such as... Figure 1 (b) shows the training process for GAIN. GAIN can be provided by network providers and can be used by users on a paid basis. It is worth noting that GAIN is still effective even if some ingress switches are traditional switches that do not have aggregation capabilities. In addition, GAIN is scalable and can be adapted to future deployments across more layers of programmable switches.
[0061] In each training round, GAIN utilizes ingress programmable switches to aggregate local model updates in a stateless manner. The aggregated model data is then transmitted to subsequent nodes. If a subsequent node is also a programmable switch, it can aggregate model data from its child clients as well as model data from upstream switches, further reducing traffic. Traditional switches along the path simply forward data according to routing rules. The aggregated data is ultimately sent to the central server via the core network. Because model updates from individual clients are already aggregated in the edge network, communication traffic on the backbone network is significantly reduced. The central server then updates the global model with this aggregated model data and selects a new set of clients for the next training round.
[0062] Despite its numerous advantages, GAIN's implementation still faces some challenges. For example, programmable switches, primarily employing custom network protocols, lack the ability to perform complex calculations. Therefore, in this embodiment, the training process requires optimization (e.g., workflow orchestration) to alleviate the computational burden on the switch. The design of GAIN will be described in detail below, which may include federated learning workflow orchestration, specifically:
[0063] Workflow orchestration: In traditional training, after each training round, the selected client uploads its local model parameters to the central server, which then updates the global model using a weighted average. However, this workflow is incompatible with GAIN because the switch is unaware of each client's weights. A simple and effective improvement is to pre-cache the weights on the switch. n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients; then the switch performs multiplication on the incoming data to perform a weighted average. However, multiplication consumes a large number of clock cycles, thereby increasing the latency of message processing and reducing throughput. To avoid this, this invention reorganizes the training process of GAIN, in which clients upload their weighted model updates. Instead of the updated local model parameters Right now:
[0064]
[0065] Weight It can be obtained from the central server and passed to each client when performing orchestration training tasks.
[0066] Suppose there is a programmable switch connected to d selected clients. When performing a global model update, the programmable switch aggregates the local model update data of all child nodes through an addition operation, i.e. Then the results The data is then transmitted to subsequent nodes. For ease of description, the programmable switch that needs to perform aggregation operations can be called an aggregation switch.
[0067] In some implementations, the child node also includes a non-aggregated switch connected to the current aggregation switch.
[0068] Understandably, in actual deployments, aggregation switches may also need to aggregate results from other switches, or help nearby switches aggregate data from their child nodes (e.g., these switches are legacy switches or lack the aggregation resources required for aggregation). Without loss of generality, these nodes can all be considered child nodes of the aggregation switch, and the aggregation operation on the aggregation switch can be represented as:
[0069]
[0070] in, d represents the data of the i-th child node of the aggregation switch. j This indicates the number of child nodes of aggregation switch j, in the data streams of different nodes. Possibly equal to It may also equal to Here, `v` is used to represent the data of the child nodes to distinguish it from the previous definition of `u`, because `u` refers to data from the client, while `v` may come from the client or from the aggregated data of the child node exchange. This adjustment allows local model updates to be aggregated through the exchange. However, a new challenge is that the central server may not be able to use these aggregation results to update the global model. As mentioned earlier, in each round, the central server can randomly select `m` clients from `s` clients for training. We can use the notation `C` to represent the set of clients involved in the federated learning task. In round `t+1`, the central server will randomly select `m` clients from set `C`, denoted as set Ct+1. t+1 Unselected clients can be represented as a set CC. t+1According to formula (1), the global model parameters for round t+1 can be expressed as:
[0071]
[0072] The above formula can be further written as:
[0073]
[0074] Among them, v t+1 It is the result of switch aggregation. Because of GAIN, the central server is unable to track local model updates for each client. Unable to obtain The value of w. Therefore, the central server cannot update the global model according to formula (1). To solve this problem, an asynchronous federated learning model update scheme is adopted, in which the new global model parameters are calculated based on the combination of the old global model parameters and the new partial updates. Specifically, if w t w represents the global model parameters in round t. t+1 If we represent the global model parameters to be calculated in the current round, then:
[0075]
[0076] In the equation above, This is the weighted average of the local model updates from the selected m clients in round t+1, which is equal to the aggregated result v from the switch. t+1 Therefore, formula (6) above can be rewritten as:
[0077] w t+1 =βw t +v t+1 (7)
[0078] in, This represents the proportion of the dataset size that has not been updated in round t+1 to the total dataset size. Thus, the central server only needs to store the global model parameters from the previous round and then calculate the proportion of the dataset size that has not been updated in the current round. Based on this, it can update the global model parameters using the aggregation results from the exchange; the entire process is as follows: Figure 1 As shown in (b), since the central server no longer needs to collect and store local model updates from each client, instead it only retains the updated global model parameters, this approach promotes privacy protection while optimizing the training process to reduce the computational burden on the switch and the central server.
[0079] The aforementioned federated learning method based on edge stateless intra-network aggregation employs intra-network aggregation technology. In each round of global model update training, the client obtains the corresponding data weights from the central server, and these weights can be pre-cached on the aggregation switch connected to the client. Then, the aggregation switch aggregates the weighted model updates of all its connected child nodes through addition operations, and transmits the resulting aggregation to other subsequent nodes connected to that aggregation switch in the network. This allows other aggregation switches in the subsequent nodes to similarly perform weighted model update aggregation on all their connected child nodes until the central server obtains the final aggregation result transmitted from these aggregation switches. Ultimately, the central server only needs to calculate the global model parameters for the current round based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the obtained final aggregation result, thus completing the global model update for the current round.
[0080] Compared to traditional technologies, the above solution eliminates the need for clients to upload updated local model parameters. Instead, it necessitates uploading weighted model updates. Furthermore, the aggregation switch employs an additive operation for model updates, allowing the central server to store the global model parameters from the previous round and calculate the proportion of the current round's unupdated dataset. This eliminates the need to separately collect, store, and update the local model parameters of each client. The central server can then utilize the final aggregation result from the aggregation switch to complete the global model update for the current round. This design optimizes the model training process, enabling the aggregation switch to eliminate significant clock cycle overhead while achieving stateless intranet aggregation. This effectively improves data privacy protection and significantly reduces the computational burden on the switch and central server, ultimately enhancing federated learning performance.
[0081] In one embodiment, Figure 3 As shown, another federated learning method based on aggregation within an edge stateless network is also provided, which includes the following processing steps S11 to S15:
[0082] S11, during the global model update in the current round, transmit the data weights corresponding to each selected client to all selected clients; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, n is the total size of the local datasets of all clients, and the data weight is used to instruct the client to upload the weighted model update to the connected aggregation switch according to its own corresponding data weight and the updated local model parameters.
[0083] S13, obtain the final aggregation result from all aggregation switches; the aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation result to subsequent nodes to perform data forwarding or to the subsequent aggregation switch to continue the aggregation; where child nodes include each selected client;
[0084] S15, the model update scheme of asynchronous federated learning is sampled. The global model parameters of the current round are calculated based on the stored global model parameters of the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0085] It is understood that the above-mentioned federated learning method based on aggregation within the stateless edge network is from the perspective of the central server. The explanation of each feature can be found in the explanation of the corresponding features in the above-mentioned method embodiment from the perspective of the aggregation switch. It will not be repeated below.
[0086] The aforementioned federated learning method based on edge-stateless intra-network aggregation employs intra-network aggregation technology. In each round of global model update training, the client obtains the corresponding data weights from the central server, and these weights can be pre-cached on the aggregation switch connected to the client. Then, the aggregation switch aggregates the weighted model updates of all its connected child nodes through addition operations, and transmits the resulting aggregation to other subsequent nodes connected to the aggregation switch in the network. This allows other aggregation switches in the subsequent nodes to similarly perform weighted model update aggregation on all their connected child nodes until the central server obtains the final aggregation result transmitted from these aggregation switches. Ultimately, the central server only needs to calculate the global model parameters for the current round based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the obtained final aggregation result, thus completing the global model update for the current round.
[0087] Compared to traditional technologies, the above solution eliminates the need for clients to upload updated local model parameters. Instead, it necessitates uploading weighted model updates. Furthermore, the aggregation switch employs an additive operation for model updates, allowing the central server to store the global model parameters from the previous round and calculate the proportion of the current round's unupdated dataset. This eliminates the need to separately collect, store, and update the local model parameters of each client. The central server can then utilize the final aggregation result from the aggregation switch to complete the global model update for the current round. This design optimizes the model training process, enabling the aggregation switch to eliminate significant clock cycle overhead while achieving stateless intranet aggregation. This effectively improves data privacy protection and significantly reduces the computational burden on the switch and central server, ultimately enhancing federated learning performance.
[0088] In one embodiment, the child nodes mentioned in the other federated learning method based on edge stateless intra-network aggregation described above may also include non-aggregation switches connected to the current aggregation switch. That is, the current aggregation switch can also perform stateless intra-network aggregation operations on data from connected clients and non-aggregation switches, thereby further reducing network traffic and more effectively alleviating the computational burden on subsequent switches and the central server.
[0089] In one embodiment, Figure 4 As shown, a federated learning system 100 based on edge stateless network aggregation is also provided, which may include a weight caching module 12, an addition aggregation module 14, and an aggregation transmission module 16. The weight caching module 12 is used to obtain and pre-cache the data weights transmitted by the central server to the selected client during the global model update in the current round; wherein the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients. The addition aggregation module 14 is used to aggregate the local model update data of all connected child nodes through an addition operation; where child nodes include the selected clients, and the local model update data is the weighted model update uploaded by the client based on its corresponding data weight and the updated local model parameters. The aggregation transmission module 16 is used to transmit the aggregation result to subsequent nodes to perform data forwarding or addition operations on the subsequent aggregation switch; where the final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update of the current round. The asynchronous federated learning model update scheme is calculated by the central server based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the final aggregation result to obtain the global model parameters for the current round.
[0090] The aforementioned federated learning system 100 based on edge stateless intra-network aggregation employs intra-network aggregation technology. In each round of global model update training, the client obtains the corresponding data weights from the central server, and these data weights can be pre-cached on the aggregation switch connected to the client. Then, the aggregation switch aggregates the weighted model updates of all its connected child nodes through addition operations, and transmits the obtained aggregation result to other subsequent nodes connected to the aggregation switch in the network. This allows other aggregation switches in the subsequent nodes to similarly perform weighted model update aggregation of all their connected child nodes until the central server obtains the final aggregation result transmitted from these aggregation switches. Ultimately, the central server only needs to calculate the global model parameters of the current round based on the global model parameters stored in the previous round, the proportion of the current round's unupdated dataset size, and the obtained final aggregation result, thereby completing the global model update for the current round.
[0091] Compared to traditional technologies, the above solution eliminates the need for clients to upload updated local model parameters. Instead, it necessitates uploading weighted model updates. Furthermore, the aggregation switch employs an additive operation for model updates, allowing the central server to store the global model parameters from the previous round and calculate the proportion of the current round's unupdated dataset. This eliminates the need to separately collect, store, and update the local model parameters of each client. The central server can then utilize the final aggregation result from the aggregation switch to complete the global model update for the current round. This design optimizes the model training process, enabling the aggregation switch to eliminate significant clock cycle overhead while achieving stateless intranet aggregation. This effectively improves data privacy protection and significantly reduces the computational burden on the switch and central server, ultimately enhancing federated learning performance.
[0092] In one embodiment, the child node mentioned in the federated learning system 100 based on edge stateless network aggregation may also include a non-aggregation switch connected to the current aggregation switch.
[0093] In one embodiment, Figure 5 As shown, another federated learning system 200 based on edge stateless network aggregation is also provided, including a weight transfer module 11, an aggregation acquisition module 13, and a global update module 15. The weight transfer module 11 is used to transfer the data weights corresponding to each client to all selected clients during the global model update in the current round; wherein the data weights are... n i(1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients. The data weights are used to instruct clients to upload weighted model updates to the connected aggregation switch according to their corresponding data weights and updated local model parameters. The aggregation acquisition module 13 is used to obtain the final aggregation results from all aggregation switches. The aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation results to subsequent nodes for data forwarding or to the subsequent aggregation switch to continue the aggregation. Among them, the child nodes include the selected clients. The global update module 15 is used to sample the model update scheme of asynchronous federated learning, and calculates the global model parameters of the current round according to the stored global model parameters of the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation results.
[0094] The aforementioned federated learning system 200 based on edge stateless intra-network aggregation employs intra-network aggregation technology. In each round of global model update training, the client obtains the corresponding data weights from the central server, and these data weights can be pre-cached on the aggregation switch connected to the client. Then, the aggregation switch aggregates the weighted model updates of all its connected child nodes through addition operations, and transmits the obtained aggregation result to other subsequent nodes connected to the aggregation switch in the network. This allows other aggregation switches in the subsequent nodes to similarly perform weighted model update aggregation of all their connected child nodes until the central server obtains the final aggregation result transmitted from these aggregation switches. Ultimately, the central server only needs to calculate the global model parameters of the current round based on the global model parameters stored in the previous round, the proportion of the current round's unupdated dataset size, and the obtained final aggregation result, thereby completing the global model update for the current round.
[0095] Compared to traditional technologies, the above solution eliminates the need for clients to upload updated local model parameters. Instead, it necessitates uploading weighted model updates. Furthermore, the aggregation switch employs an additive operation for model updates, allowing the central server to store the global model parameters from the previous round and calculate the proportion of the current round's unupdated dataset. This eliminates the need to separately collect, store, and update the local model parameters of each client. The central server can then utilize the final aggregation result from the aggregation switch to complete the global model update for the current round. This design optimizes the model training process, enabling the aggregation switch to eliminate significant clock cycle overhead while achieving stateless intranet aggregation. This effectively improves data privacy protection and significantly reduces the computational burden on the switch and central server, ultimately enhancing federated learning performance.
[0096] In one embodiment, the child node mentioned in the above-described federated learning system 200 based on edge stateless network aggregation may also include a non-aggregation switch connected to the current aggregation switch.
[0097] For specific limitations regarding the federated learning system 100 and 200 based on edge stateless network aggregation, please refer to the corresponding limitations of the federated learning method based on edge stateless network aggregation mentioned above, which will not be repeated here. Each module in the aforementioned federated learning system 100 and 200 based on edge stateless network aggregation can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of a device with data processing capabilities, or stored in software within the memory of the aforementioned device, so that the processor can call and execute the operations corresponding to each module. The aforementioned device can be, but is not limited to, various types of model training devices already existing in the art.
[0098] In one embodiment, to more intuitively illustrate the performance and effectiveness of the federated learning method based on aggregation within edge stateless networks, an experimental example is provided here. Those skilled in the art will understand that this experimental example is merely illustrative and not the sole limitation imposed on the federated learning method based on aggregation within edge stateless networks.
[0099] The experiments conducted on the aforementioned GAIN were performed on an FPGA-based test platform. Since GAIN can perform stateless aggregation without storing private data, data privacy can be guaranteed. Therefore, the evaluation primarily focused on testing the communication performance of GAIN.
[0100] Experimental Setup: A prototype of GAIN was implemented on an FPGA-based test platform. The server was equipped with 2 CPUs, 128GB of RAM, a 500GB SSD, 1 GPU, 2 network interface cards (NICs) with 4 ports each, and 3 FPGA devices with 4 ports each. Eight virtual hosts were created on the server, one acting as the central server and the others as federated learning clients. Each virtual host was bound to one port of a physical NIC. Notably, considering the computational resource limitations of edge clients, these virtual clients were configured by default to use only 4 CPU cores for model training.
[0101] The GAIN switch processing logic is implemented using an FPGA device, and these virtual hosts and the FPGA switch are connected using 1Gbps links. The experimental topology can be as follows: Figure 6As shown in the example, since current commercial programmable switches lack support for floating-point calculations, an existing scaling method is used here to enable the switch to aggregate floating-point numbers. Specifically, before aggregation, the floating-point number to be sent is first multiplied by a scaling factor, converting it to a 32-bit integer. Then, each receiver divides the aggregated data by the same scaling factor, restoring it to a floating-point type value. This method allows the switch to perform calculations specifically on integers for data aggregation. This example implements a prototype of GAIN based on the PyTorch framework, setting the GAIN message payload size to 1024B. On the test platform of this example, using 24 aggregators (consuming approximately 25KB of switch memory), GAIN can achieve an aggregation throughput of 1Gbps line rate.
[0102] Experiments were conducted using a variety of representative deep learning models, including existing models such as AlexNet, ResNet18, ResNet34, ReseNet50, MobileNetV3-S, MobileNetV3-L, VGG11, VGG13, and VGG16. These models ranged in size from approximately 11MB (MobileNetV3-S) to 528MB (VGG16). Model training was performed using the Cifar10 dataset, with the data pre-distributed to clients. These clients then performed federated learning tasks under the coordination of a central server. The ResNet34 model was used as the default model for the experiments. Evaluation metrics included training accuracy, bandwidth overhead, and training throughput over time.
[0103] Compare GAIN with the following methods:
[0104] A common model update method implemented using the existing Gloo communication library: In this method, a single client transmits its local model updates to a central server, which then aggregates these updates and returns the global model. By default, all clients update the global model after each training round.
[0105] The Conv-Quant method quantizes the updated data into a float16 type, thereby reducing the amount of communication data. This method is also implemented based on the Gloo communication library, and by default, all clients participate in model updates after each round of training.
[0106] The Defer method: Deferred update, meaning that the global model update is performed after multiple batches of computation. In the experiment, the default setting was a delay of 10 batches, referred to as Defer10.
[0107] The Select method selects a subset of clients for model updates. By default, 5 clients are selected for global model updates in each round, denoted as Select5.
[0108] Experimental results:
[0109] Training accuracy over time: The training accuracy of various methods over time was evaluated using four representative models: AlexNet, ResNet34, MobileNetV3-S, and VGG11. To ensure comparability, GAIN allowed all clients to participate in the global model update after each batch of computation, similar to the Conv and Conv-Quant methods. Furthermore, the Defer and Select methods were compared. Since these two methods can be combined with the three methods mentioned above, only Conv-Defer10 and Conv-Select5 (both of which utilize Conv for data transfer) are considered here. Experimental results are as follows... Figure 7 and Figure 8 As shown, where, Figure 7 (a) Evaluates the experimental results for the AlexNet model. Figure 7 (b) shows the experimental results for evaluating the ResNet34 model. Figure 8 (c) The experimental results for evaluating the MobileNetV3-S model. Figure 8 (d) shows the experimental results for evaluating the VGG11 model. In each set of experiments, different methods shared the same training settings, such as batch size and learning rate.
[0110] Among all the compared methods, GAIN converges the fastest, followed by Conv-Quant. In contrast, Conv takes longer to reach the same level of accuracy due to significant data transmission latency. For ease of comparison, 70% accuracy was used as the target, and the training time of these methods was evaluated. Due to its significant speedup in transmission speed, GAIN reaches the target accuracy faster than the other compared methods. Compared to Conv, GAIN reduces training time by 54.5%, 72.6%, 49.7%, and 78.7% on the four models in the figure, respectively. Compared to Conv-Quant, GAIN still reduces training time by 33.8%, 53.1%, 14.9%, and 62.3%, respectively. This is mainly attributed to GAIN's ability to aggregate local updates using switches on the path, effectively alleviating congestion and improving communication performance.
[0111] Furthermore, GAIN exhibits the most significant performance improvement in VGG11, as this model is communication-intensive. In experiments, GAIN reduced its training time from 11.33 hours on Conv to approximately 2.42 hours. For the lightweight MobileNetV3-S model, GAIN still demonstrates its advantage, even though this model requires less communication. GAIN reduced its training time from 147 minutes on Conv to approximately 74 minutes.
[0112] Communication overhead: In addition to shortening training time, GAIN offers another significant advantage: reduced network and central server (CS) traffic overhead. Figure 9 (a) shows the traffic received by the central server, with a target accuracy of 70%. Compared to Conv, GAIN can reduce the central server's traffic by 83.8%–86.5%. Compared to Conv-Quant, GAIN can reduce traffic by 70.1%–75.3%. It is worth noting that as the number of participating clients increases, the advantages of GAIN become more pronounced, as the switch can aggregate more client traffic, resulting in a larger input / output ratio.
[0113] Delayed communication and selection of some clients: Figure 9 (b) demonstrates the training throughput of ResNet34, where the client updates the global model after local computation on different batch sizes. All methods show improved training throughput as the batch size increases, since communication is the primary bottleneck in model training. Notably, Conv and Conv-Quant show significant throughput increases with increasing batch size because they typically face longer communication times. In contrast, GAIN's training throughput increases only slightly with increasing batch size, as GAIN effectively reduces communication time, leading to a decrease in the marginal utility gained from delaying more rounds of communication.
[0114] Figure 10 (c) Selecting a subset of clients in each round demonstrates the relationship between throughput and the number of clients selected in each round of global model update. The throughput of both Conv-Quant and Conv decreases significantly with increasing number of participating clients. This is because more participating clients lead to more severe network congestion and worse transmission performance. In contrast, GAIN utilizes switches to aggregate relevant traffic, effectively alleviating congestion on switch egress ports and thus improving communication performance. Specifically, when 7 clients participate in each round, GAIN achieves throughput improvements of 1.28x and 2.90x compared to Conv and Conv-Quant, respectively.
[0115] Figure 10(d) shows the convergence comparison, evaluating the effectiveness of GAIN's global model update scheme. Compared to the traditional update scheme (using Equation (1)), GAIN demonstrates the same or even better model convergence under the same experimental settings. For example, after 3000 training rounds, with two clients randomly selected for global model updates in each round, GAIN achieved an accuracy of 76.64% (GAIN-Select2), while the traditional method (Conv-Select2) only achieved 68.02% accuracy.
[0116] Training throughput under different models: Since the Defer and Select methods can be combined with the GAIN, Conv and Conv-Quant methods, the following experiments will focus on comparing the performance of the latter three methods. Figure 11 The training throughput of these three methods in different training models is demonstrated. GAIN shows a significant speedup effect in communication-intensive models, especially in VGG11, VGG13, and VGG16, achieving a throughput improvement of over 4.11 times compared to Conv and over 1.75 times compared to Conv-Quant. In lightweight models with lower communication requirements, such as MobileNetV3-S and MobileNetV3-L, GAIN achieves throughput improvements of 82.4% and 82.34% respectively compared to Conv, while also showing an improvement of approximately 10% compared to Conv-Quant.
[0117] In summary, this paper proposes a secure aggregation acceleration service, GAIN, for edge joint learning. GAIN utilizes a programmable switch to aggregate model updates and retrieve data from numerous clients in a stateless manner, thereby improving transmission speed while ensuring data privacy. An effective aggregation mechanism is designed to guarantee the security and robustness of GAIN. To evaluate its performance, a prototype of GAIN was implemented on an FPGA-based test platform. Experimental results show that GAIN can increase training throughput by up to 4.11 times and reduce communication by up to 86.5%. Furthermore, theoretical analysis indicates that as the number of clients increases, GAIN can achieve even greater performance improvements while maintaining data privacy.
[0118] It should be understood that, although Figure 2 and Figure 3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 2 and Figure 3At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0119] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following processing steps: during the global model update in the current round, acquiring and pre-caching the data weights passed to the selected client by the central server; wherein the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients. After obtaining the local model update data of all connected child nodes, aggregation is performed through addition. Among them, the child nodes include the selected clients, and the local model update data is the weighted model update uploaded by the client according to its own corresponding data weight and the updated local model parameters. The aggregation result is transmitted to the subsequent nodes to perform data forwarding or addition operation on the subsequent aggregation switch. The final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update of the current round. The asynchronous federated learning model update scheme is to calculate the global model parameters of the current round by the central server based on the global model parameters of the previous round stored by itself, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0120] When the processor executes a computer program, it may perform the following processing steps: During the global model update in the current round, it transmits the data weights corresponding to each selected client to all selected clients; where the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, n is the total size of the local datasets of all clients, and the data weight is used to instruct the client to upload the weighted model update to the connected aggregation switch according to its own corresponding data weight and the updated local model parameters; obtain the final aggregation result from all aggregation switches; the aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operation, and then transmit the aggregation result to the subsequent node to perform data forwarding or to the subsequent aggregation switch to continue to perform aggregation; where the child nodes include each selected client; sample the asynchronous federated learning model update scheme, and calculate the global model parameters of the current round according to the stored global model parameters of the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0121] It is understood that, in addition to the memory and processor mentioned above, the computer equipment may also include other hardware and software components not listed in this specification. The specific components may be determined according to the model of the specific training equipment in different application scenarios, and will not be listed and described in detail in this specification.
[0122] In one embodiment, when the processor executes the computer program, it can also implement the steps or sub-steps added in the various embodiments of the federated learning method based on aggregation within the edge stateless network described above.
[0123] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When executed by a processor, the computer program performs the following processing steps: during the global model update in the current round, acquiring and pre-caching the data weights passed to the selected client by the central server; wherein the data weights are... n i (1≤i≤s) is the size of the local dataset of the i-th client, and n is the total size of the local datasets of all clients. After obtaining the local model update data of all connected child nodes, aggregation is performed through addition. Among them, the child nodes include the selected clients, and the local model update data is the weighted model update uploaded by the client according to its own corresponding data weight and the updated local model parameters. The aggregation result is transmitted to the subsequent nodes to perform data forwarding or addition operation on the subsequent aggregation switch. The final aggregation result sent to the central server is used to instruct the central server to sample the asynchronous federated learning model update scheme to complete the global model update of the current round. The asynchronous federated learning model update scheme is to calculate the global model parameters of the current round by the central server based on the global model parameters of the previous round stored by itself, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0124] When a computer program is executed by a processor, it performs the following processing steps: During the global model update in the current round, it transmits the data weights corresponding to each selected client to all selected clients; where the data weights are... n i(1≤i≤s) is the size of the local dataset of the i-th client, n is the total size of the local datasets of all clients, and the data weight is used to instruct the client to upload the weighted model update to the connected aggregation switch according to its own corresponding data weight and the updated local model parameters; obtain the final aggregation result from all aggregation switches; the aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operation, and then transmit the aggregation result to the subsequent node to perform data forwarding or to the subsequent aggregation switch to continue to perform aggregation; where the child nodes include each selected client; sample the asynchronous federated learning model update scheme, and calculate the global model parameters of the current round according to the stored global model parameters of the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result.
[0125] In one embodiment, when the computer program is executed by a processor, it can also implement the steps or sub-steps added in the various embodiments of the federated learning method based on aggregation within an edge stateless network.
[0126] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus DRAM (RDRAM), and interface DRAM (DRDRAM), etc.
[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The above embodiments merely illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, all of which fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A federated learning method based on aggregation within an edge stateless network, characterized in that, Including the following steps: During the current round of global model updates, the data weights transmitted from the central server to the selected clients are retrieved and pre-cached; wherein, the Cifar10 dataset is used for model training and the data is pre-distributed to the clients, and the data weights are... , It is the first i The size of the local dataset for each client. n The total size of the local dataset for all clients; After obtaining the local model update data of all connected child nodes, the data is aggregated by addition; wherein, the child nodes include each selected client, and the local model update data is the weighted model update uploaded by the client according to its corresponding data weight and the updated local model parameters; The aggregation result is transmitted to subsequent nodes for data forwarding or addition operations on subsequent aggregation switches. The final aggregation result sent to the central server instructs the central server to use an asynchronous federated learning model update scheme to complete the global model update for the current round. This asynchronous federated learning model update scheme involves the central server calculating the global model parameters for the current round based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the final aggregation result. The global model parameters to be calculated in the current round are: in, Indicates the first t Global model parameters of the wheel, Indicates the first t The proportion of the total dataset size that has not been updated in round +1. It is the result of switch aggregation. In the first t In round +1, the central server will select from the client set involved in the federated learning task. C Random selection m A collection of clients n The total size of the local dataset for all clients.
2. The federated learning method based on edge stateless network aggregation according to claim 1, characterized in that, The sub-nodes also include non-aggregated switches connected to the current aggregation switch.
3. A federated learning system based on aggregation within an edge stateless network, characterized in that, include: The weight caching module is used to obtain and pre-cache the data weights transmitted by the central server to the selected clients during the current round of global model updates; wherein, the Cifar10 dataset is used for model training and the data is pre-distributed to the clients, and the data weights are... , It is the first i The size of the local dataset for each client. n The total size of the local dataset for all clients; The addition aggregation module is used to obtain the local model update data of all connected child nodes and then aggregate them through an addition operation; wherein, the child nodes include each selected client, and the local model update data is the weighted model update uploaded by the client according to its corresponding data weight and the updated local model parameters; The aggregation and transmission module is used to transmit the aggregation result to subsequent nodes for data forwarding or addition operations on the subsequent aggregation switch. The final aggregation result sent to the central server instructs the central server to use an asynchronous federated learning model update scheme to complete the global model update for the current round. This asynchronous federated learning model update scheme involves the central server calculating the global model parameters for the current round based on its stored global model parameters from the previous round, the calculated proportion of the current round's unupdated dataset size, and the final aggregation result. The global model parameters to be calculated in the current round are: in, Indicates the first t Global model parameters of the wheel, Indicates the first t The proportion of the total dataset size that has not been updated in round +1. It is the result of switch aggregation. In the first t In round +1, the central server will select from the client set involved in the federated learning task. C Random selection m A collection of clients n The total size of the local dataset for all clients.
4. The federated learning system based on edge stateless network aggregation according to claim 3, characterized in that, The sub-nodes also include non-aggregated switches connected to the current aggregation switch.
5. A federated learning method based on aggregation within an edge stateless network, characterized in that, Including the following steps: During the current round of global model updates, the data weights corresponding to each selected client are passed to all selected clients; wherein, the Cifar10 dataset is used for model training and the data is pre-distributed to the clients, and the data weights are... , It is the first i The size of the local dataset for each client. n The total size of the local datasets of all clients is given by the data weights, which are used to instruct the clients to upload weighted model updates to the connected aggregation switch based on their own corresponding data weights and updated local model parameters. Obtain the final aggregation result from all aggregation switches; the aggregation switch is used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation result to subsequent nodes to perform data forwarding or to the subsequent aggregation switch to continue the aggregation; wherein, the child nodes include each selected client; An asynchronous federated learning model update scheme is adopted. The global model parameters for the current round are calculated based on the stored global model parameters from the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result. The global model parameters to be calculated in the current round are: in, Indicates the first t Global model parameters of the wheel, Indicates the first t The proportion of the total dataset size that has not been updated in round +1. It is the result of switch aggregation. In the first t In round +1, the central server will select from the client set involved in the federated learning task. C Random selection m A collection of clients n The total size of the local dataset for all clients.
6. The federated learning method based on edge stateless network aggregation according to claim 5, characterized in that, The sub-nodes also include non-aggregated switches connected to the current aggregation switch.
7. A federated learning system based on edge stateless network aggregation, characterized in that, include: The weight passing module is used to pass the data weights corresponding to each selected client to all selected clients during the global model update in the current round; wherein the Cifar10 dataset is used for model training and the data is pre-distributed to the clients, and the data weights are... , It is the first i The size of the local dataset for each client. n The total size of the local datasets of all clients is given by the data weights, which are used to instruct the clients to upload weighted model updates to the connected aggregation switch based on their own corresponding data weights and updated local model parameters. An aggregation acquisition module is used to acquire the final aggregation result from all aggregation switches; the aggregation switches are used to aggregate the weighted model updates of all connected child nodes through addition operations, and then transmit the aggregation result to subsequent nodes for data forwarding or to subsequent aggregation switches for further aggregation; wherein, the child nodes include the selected clients; The global update module is used to update the model using an asynchronous federated learning scheme. It calculates the global model parameters for the current round based on the stored global model parameters from the previous round, the proportion of the current round's unupdated dataset size, and the final aggregation result. The global model parameters to be calculated in the current round are: in, Indicates the first t Global model parameters of the wheel, Indicates the first t The proportion of the total dataset size that has not been updated in round +1. It is the result of switch aggregation. In the first t In round +1, the central server will select from the client set involved in the federated learning task. C Random selection m A collection of clients n The total size of the local dataset for all clients.
8. The federated learning system based on edge stateless network aggregation according to claim 7, characterized in that, The sub-nodes also include non-aggregated switches connected to the current aggregation switch.
9. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the federated learning method based on aggregation within an edge stateless network as described in any one of claims 1 to 2 or 5 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the federated learning method based on edge stateless network aggregation as described in any one of claims 1 to 2 or 5 to 6.