Low-delay splitting learning method based on dynamic clustering
By using dynamic clustering and MAPPO reinforcement learning algorithms in the split learning method, the problem of insufficient training efficiency and adaptability in the existing technology is solved, and an efficient and highly adaptable low-delay split learning method is realized.
Patent Information
- Application Number
- CN202510267649.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-27
AI Technical Summary
The existing split learning methods have shortcomings in training efficiency and adaptability, especially in dynamically changing networks and computing environments, resulting in large training delays.
Using a low-delay split learning method based on dynamic clustering, by building a low-delay split learning system model, deploying the front section of the neural network on the client and the back section on the server, and using the MAPPO multi-agent reinforcement learning algorithm to train the split point selection policy network, dynamic clustering client to improve parallel training efficiency.
While maintaining training accuracy, it significantly improves the training efficiency of split learning, and enables it to adapt to dynamically changing networks and computing environments, reducing training delays.
Smart Images

Figure CN120218185A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence, and particularly relates to a low-latency split learning method based on dynamic clustering. Background Art
[0002] The distributed machine learning paradigm with data residing locally is a promising model training mechanism for realizing ubiquitous intelligence in the Internet of Things. A common distributed model training method with data residing locally is Federated Learning (FL). It realizes knowledge sharing under the condition that data does not leave the local by model training on each terminal device and model aggregation on the server, which puts forward relatively high requirements for the computing and storage capabilities of the client. Although there have been many works focusing on model lightweighting, such as quantization, pruning, and knowledge distillation, to meet the requirements of resource-constrained devices, problems such as a significant reduction in model training accuracy will inevitably be introduced. Therefore, this method is not applicable to resource-constrained devices represented by a wide range of Internet of Things terminals.
[0003] Split Learning (SL) is another distributed model training method with data residing locally. It divides the neural network model into two parts, the front part and the back part, along its various layers, and places the back part of the neural network on the server for storage and calculation. The client inputs the original data into the front part of the neural network located locally and sends the features output by the intermediate layer to the server. After receiving the intermediate features, the server inputs them into the back part of the neural network for calculation to obtain the output of the model and the loss function. Then, the server performs backpropagation, sends the intermediate gradients back to the client, and updates the parameters of each model layer in the back part of the neural network. After receiving the intermediate gradients, the client continues to perform backpropagation and completes the parameter update of each model layer in the front part of the neural network. After the client completes a local round of model training, the parameters of the updated front part of the neural network are sent to the next client through the server. Split Learning greatly reduces the requirements for the client's computing power and storage space, and can achieve the same training accuracy in theory as centralized learning without additional data preprocessing. However, at the same time, it also has the problem of large time overhead. In traditional split learning, only one device in the system can perform calculations at the same time, and when the system is in the data communication stage, the computing resources of all devices are idle. Even for the split learning method with client computing parallelization, there is still a strict sequence relationship between the client and the server, as well as between computing and communication, and there is still a large waiting delay. Therefore, in order to improve the training efficiency of split learning and adapt to the dynamically changing network and computing environment, it is crucial to innovatively optimize the training latency of split learning. Summary of the Invention
[0004] The object of the present invention is to overcome the defects existing in the prior art, and provide a low-latency split learning method based on dynamic clustering, which can significantly improve the training efficiency of split learning while maintaining the training accuracy of the neural network, and enable it to adapt to dynamic network and computing environments.
[0005] To achieve the above object, the technical solution of the present invention is: a low-latency split learning method based on dynamic clustering, including:
[0006] Step S1, construct a low-latency split learning system model, including a server and several clients; each client has an independent local dataset and deploys the front segment of the neural network from the input layer to the deepest split layer; the server deploys multiple neural network back segments from each split layer to the output layer and a complete neural network model;
[0007] Step S2, simulate the edge-side collaborative environment with dynamic changes in network transmission rate and computing speed, and sample reinforcement learning samples from the environment; train the split point selection policy network of each client based on the MAPPO multi-agent reinforcement learning algorithm;
[0008] Step S3, each client collects the server-side environment state and the local environment state, and calculates the split point optimized for the current environment using the local policy network; the system divides the clients into several clusters according to different split points; the split points are the same among the clients within each cluster; each cluster is associated with the server-side model with the same split point on the server;
[0009] Step S4, in the low-latency split learning system, organize all clients based on the model splitting and client clustering strategy to perform a set of forward and backward propagation processes with the server in a parallel form of intra-cluster synchronization and inter-cluster asynchrony on the associated server-side model;
[0010] Step S5, the server collects the model layer gradients of all local models layer by layer, performs gradient aggregation and global parameter update, and distributes the global model layer parameters to all clients, and each client and the server-side model load the global model parameters; start from step S3 again.
[0011] In this embodiment, step S1 specifically includes the following steps:
[0012] Step S11, according to the model layer structure of the given neural network to be trained, calculate the transmission cost and computing cost of splitting at different model layers. Combining privacy requirements, transmission cost and computing cost, select several intermediate model layers that can meet the data privacy requirements and have lower costs to form a split layer set. Generally speaking, splitting after the pooling layer can achieve lower costs.
[0013] Step S12: Each client deploys the neural network front-end model from the input layer to the deepest split layer of the neural network to be trained. The server deploys multiple neural network back-end models from each split layer to the output layer, and establishes a collaborative relationship with the client models of different split layers respectively. The server deploys a gradient aggregation-stochastic gradient descent (GM-SGD) module containing the global neural network model, which is responsible for collecting and aggregating model gradients, and updating the global model parameters. The server randomly initializes the global neural network model parameters and distributes them to each client model and the server-side model. Each model loads the initialized parameters.
[0014] Step S13: Set an appropriate global batch size according to the size of the local data volume of each client. Specifically, make the single batch data scale of each client small to meet the client resource limitations. Each client divides the local data according to the unified global batch size.
[0015] In this embodiment, step S2 specifically includes the following steps:
[0016] Step S21: Considering the edge environment with dynamic changes in the network and computing environment, define environmental observations, which are divided into client observations and server observations. The content of the client observations is the local network and computing environment measurement values, the local batch size, and the split layer position at the previous iteration at the beginning of each iteration. The server observations consist of the comprehensive computing efficiency during the training of each server-side model.
[0017] Step S22: According to the low-latency split learning system model in step S1, model the latency optimization problem. The goal is to find a set of client clustering strategies to minimize the long-term training latency. Convert this long-term optimization problem into an optimization problem on a small time scale, that is, find a client clustering strategy to minimize the latency of the current iteration process. According to the working mode of the same split for the same cluster, convert the original goal into finding a client split layer selection strategy.
[0018] Step S23: Design the elements of the partially observable Markov decision process, where the action is the selection of the split point for each client, the observation set consists of the client computing frequency, the client computing resource occupancy rate, the client data upload rate, the client data download rate, the comprehensive computing efficiency during the training of each server-side model, the client local batch size, and the split layer position at the previous iteration, and the reward function for each client is set to the opposite of the system latency of this iteration.
[0019] Step S24: Solve the latency optimization problem based on the MAPPO algorithm and the elements of the designed POMDP. Generate dynamic simulation data for environmental observations, and calculate the system latency of the iterative process by using the method of simulating the workflow of the low-latency split learning system model in Step S1. Define the input of the policy network as the observation set containing only the local client and the server to accelerate the training process of multi-agent reinforcement learning. After the server completes the training of the policy network and the value network, distribute the policy network to each client.
[0020] In this embodiment, Step S3 specifically includes the following steps:
[0021] Step S31: The server collects server-side environmental observations and distributes them to each client. Each client collects local environmental observations and receives server-side environmental observations.
[0022] Step S32: Each client combines the local and server-side environmental observations into a local observation set and then inputs it into the local policy network to calculate the optimized split layer selection policy in the current environment. Each client takes the optimized split layer position calculated locally as the actual split position in this iterative process.
[0023] Step S33: The clusterer performs logical clustering on all clients, so that each client with the same split layer position is in the same cluster, and clients with different optimized split layer positions are in different clusters.
[0024] Step S34: Each cluster establishes a collaboration relationship with the server-side model with the same split point on the server. Only the clients within each cluster and the server-side model with which the cluster has established a collaboration relationship exchange shredded data or their gradients with each other.
[0025] In this embodiment, Step S4 specifically includes the following steps:
[0026] Step S41: All clients input the local mini-batch samples of the current iteration into the local client model. After performing forward propagation to their respective current split layer positions, send the shredded data output from their split layers to the server.
[0027] Step S42: Perform forward propagation on each server-side model in parallel in an asynchronous manner. The forward propagation processes on different server-side models are independent of each other. Specifically, when the server receives all the shredded data of a certain cluster, it combines them into a tensor, inputs it into the model corresponding to the cluster, performs the forward propagation of the model, and calculates the loss value. The loss function of each server-side model is the average of the loss functions corresponding to the input samples of the clients within the associated cluster.
[0028] Step S43: After the server finishes calculating the loss function of a certain server-side model, without waiting for the calculation of other server-side models, it directly starts the backpropagation process for this model to obtain the gradient of the input features of the server-side model.
[0029] Step S44: Decompose the gradient of the input features of the server-side model according to the order and size of the shredded data during merging. According to the chain rule of gradient calculation and the characteristics of loss calculation in batch processing, weight each decomposed gradient according to the proportion of its corresponding sample quantity in the total number of samples in the cluster where it is located to obtain the gradient of the shredded data of each client in the corresponding cluster. Send the obtained gradient of the shredded data to the corresponding client.
[0030] Step S45: After the client receives the gradient of its shredded data, it starts to perform the backpropagation of the client model until the input layer of the model.
[0031] In this embodiment, step S5 specifically includes the following steps:
[0032] Step S51: Each client sends the gradient of each model layer to the server every time it finishes calculating the backpropagation gradient of a model layer.
[0033] Step S52: The GM-SGD module in the server collects the gradients from all server-side models and client models. When all the gradients of the deepest split layer are collected, the module performs weighted gradient aggregation on each model layer from the output layer to the deepest split layer and updates the parameters on the global neural network model. When all the gradients of any other model layer within the range from the deepest split layer to the input layer are collected, the module performs weighted gradient aggregation on this model layer and updates the parameters on the global neural network model. The parameter update uses the stochastic gradient descent method.
[0034] Step S53: When a global model layer between the highest split layer and the input layer finishes parameter update, the server broadcasts its parameters to all clients.
[0035] Step S54: After the client and the server wait for the distribution of the latest parameters of all model layers to be completed, they load the latest parameters into the local neural network local model. If all the iterations of this training round are not completed, or all training rounds are not completed, repeat steps S3, S4, and S5, otherwise end the training.
[0036] The present invention also provides a low-latency split learning system based on dynamic clustering, including a memory, a processor, and computer program instructions stored on the memory and capable of being run by the processor. When the processor runs the computer program instructions, it can implement the method steps as described in any of the above.
[0037] The present invention also provides a computer-readable storage medium, on which computer program instructions capable of being run by a processor are stored. When the processor runs the computer program instructions, the method steps described in any of the above can be implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects: By constructing a low-latency split learning system model, the method of the present invention deploys the front segment of the neural network on each client, and deploys multiple back segments of the neural network with different numbers of layers and a complete neural network on the server; through the MAPPO multi-agent reinforcement learning algorithm and the simulation environment, train the split point selection policy network of each client; execute the client clustering process, each client collects local observation information, and uses the local policy network to calculate the optimized split point. According to the different split points, the system divides the clients into several clusters and establishes an association with the server-side model; all clients perform a set of forward and backward propagations with the server on the associated server-side model in a parallel form of in-cluster synchronization and inter-cluster asynchrony; the server collects the model layer gradients layer by layer, performs gradient aggregation, global parameter update and parameter distribution. After each client and the server-side model load the global model parameters, re-execute the client clustering and start the next neural network iteration process until the training ends. The present invention can effectively improve the split learning training efficiency while keeping the data locally resident and having high training accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flowchart of the present invention;
[0040] Figure 2 is a system architecture diagram of the present invention;
[0041] Figure 3 is a system workflow diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] The technical solution of the present invention will be specifically described below with reference to the accompanying drawings.
[0043] The present invention provides a low-latency split learning method based on dynamic clustering, including:
[0044] Step S1, construct a low-latency split learning system model, including a server and several clients; each client has an independent local data set and deploys the front segment of the neural network from the input layer to the deepest split layer; the server deploys multiple back segments of the neural network from each split layer to the output layer and a complete neural network model;
[0045] Step S2: Simulate an edge-cloud collaborative environment with dynamically changing network transmission rates and computing speeds, and sample reinforcement learning samples from the environment; train a splitting point selection policy network for each client based on the MAPPO multi-agent reinforcement learning algorithm.
[0046] Step S3: Each client collects the server-side environment state and the local environment state, and uses the local policy network to calculate the optimized splitting point for the current environment; the system divides the clients into several clusters according to different splitting points; the splitting points are the same among the clients within each cluster; each cluster is associated with the server-side model on the server with the same splitting point.
[0047] Step S4: In the low-latency split learning system, organize all clients in a parallel form of intra-cluster synchronization and inter-cluster asynchrony to perform a set of forward and backward propagation processes with the server on the associated server-side model based on the model splitting and client clustering strategy.
[0048] Step S5: The server collects the model layer gradients of all local models layer by layer, performs gradient aggregation and global parameter update, and distributes the global model layer parameters to all clients. Each client and the server-side model load the global model parameters; start over from Step S3.
[0049] The following is the specific implementation process of the present invention.
[0050] As Figures 1-3 shown, this embodiment provides a low-latency split learning method based on dynamic clustering, and the detailed steps are as follows:
[0051] Step 1: First, build a low-latency split learning system model in a collaborative environment of one server and several clients. The client set is represented as Deploy the client local neural network and divide the local data batches on the client, and deploy the server-side local neural networks of multiple scales and the global neural network on the server, and perform unified initialization on all neural networks. The specific steps are as follows:
[0052] Step 11: According to the model layer structure of the given neural network to be trained, the network uplink and downlink transmission rates, and the client computing power, estimate the transmission cost and computing cost of splitting at different model layers. The selection range of the split layer position is limited to where represents the set of model layer positions. It consists of the positions of the pooling layers after each convolutional layer, and some convolutional layers with low transmission cost and computing cost that do not have pooling afterwards.
[0053] Step 12: Deploy the first layer to the last possible split layer of the model on each client, and deploy the number of Server-side models with different numbers of layers where m is used to label the server-side model and satisfies Each server-side model takes the next layer of the different split layers as the input layer and the last layer of the complete neural network model as the output layer. A global neural network model is deployed in the GM-SGD module responsible for gradient aggregation and parameter update on the server. The model parameters are randomly initialized as w0 and distributed and loaded into each client model and server-side model.
[0054] Step 13: According to the size of the dataset held by each client, different batch sizes p are set for different clients n n , calculated by formula (1), where D n is the size of the local dataset, k is a hyperparameter used to control the client batch size, and its meaning is the number of batches on any client. Each sample is restricted to participate in the calculation only once in each round. Therefore, when the number of samples that have not participated in training in this round is less than p n , the actual batch size of client n in the t-th iteration is equal to this number. Any iteration t satisfies
[0055]
[0056] Step 2: Simulate the edge collaboration environment with dynamic changes in network transmission rate and computing speed, and sample reinforcement learning samples from this environment. Based on the MAPPO multi-agent reinforcement learning algorithm, the split point selection policy network of each client is trained. The trained policy network is deployed on each client. Specifically, it includes the following steps:
[0057] Step 21: Considering the edge environment with dynamic changes in network and computing environment, define the environmental observations, which are divided into client observations and server observations obtained by formula (2) and formula (3) respectively. Where is the computing frequency of the client device, is the computing resource occupancy rate of the client device, is the client data upload rate, is the client data download rate, is the local batch size, represents the split layer position at the previous iteration, and etc. are the comprehensive computing efficiencies of the server when training each server-side model, defined as the ratio of the computing speed of the model training task under the current load to the no-load situation. The above vectors all use the measured values at the beginning of each iteration.
[0058]
[0059] Step 22: According to the low-latency split learning system model in Step 1, its long-term latency optimization problem is defined as
[0060]
[0061] where represents the total system latency at the t-th iteration, represents the set of in-cluster clients that establish a collaboration relationship with the server-side model in the t-th iteration. The goal of this problem is to find a set of client clustering strategies to minimize the long-term training latency. This long-term latency optimization problem is transformed into an optimization problem on a small time scale represented by formula (5), that is, to find a client clustering strategy to minimize the latency of the current iteration process. According to the working mode of the same split for the same cluster, the original goal is transformed into finding a client split layer selection strategy.
[0062]
[0063] Step 23: Design the elements of the partially observable Markov decision process, where the action is the selection of the split point for each client, obtained from formula (6). The observation set of client n in the t-th iteration is obtained from formula (7), which consists of the client's computing frequency, the client's computing resource occupancy rate, the client's data upload rate, the client's data download rate, the comprehensive computing efficiency during the training of each server-side model, the client's local batch size, and the split layer position in the previous iteration. The reward value of each client is approximately obtained from formula (8), where represents the system latency at the t-th iteration under the clustering decision .
[0064]
[0065] Step 24: Solve the latency optimization problem based on the MAPPO algorithm and the elements of the designed POMDP. Generate dynamic simulation data for environmental observations, and calculate the system latency of the iteration process by using the method of simulating the workflow of the low-latency split learning system model in Step 1. Define the input of the policy network as the observation set containing only local clients and the server-side obtained from formula (9), and define the input of the value network as the observation set containing all clients and the server-side obtained from formula (10). Accelerate the training process of multi-agent reinforcement learning. After the server completes the training of the policy network and the value network, distribute the policy network to each client.
[0066]
[0067] Step 3: Each client collects the server - side environment status and the local environment status, and uses the local policy network to calculate the splitting point for current environment optimization. The system divides the clients into several clusters according to different splitting points. The splitting points within each cluster are the same. Each cluster is associated with the server - side model on the server that has the same splitting point. Specifically, it includes the following steps:
[0068] Step 31: The server collects server - side environment observations and distributes them to each client. Each client collects local environment observations and receives the server - side environment observations.
[0069] Step 32: Each client combines the local and server - side environment observations into a local observation set Input the local observation set o n,t into the local policy network to calculate the splitting layer selection strategy for optimization in the current environment, expressed as formula (11). Each client uses the optimized splitting layer position calculated locally as the actual splitting position in this iteration process.
[0070]
[0071] Step 33: The clusterer performs logical clustering on all clients, so that each client with the same splitting layer position is in the same cluster, and clients with different optimized splitting layer positions are in different clusters. The clustering logic is summarized as formula (12), and each cluster satisfies Any two clusters and satisfy
[0072]
[0073] Step 34: Each cluster establishes a cooperation relationship with the server - side model on the server that has the same splitting point. Only the clients within each cluster and the server - side model that has established a cooperation relationship with the cluster where they are located exchange shredded data or their gradients with each other. For any client n, the partial model from the input layer to the splitting layer and the server - side model that has established a cooperation relationship with the cluster where it is located constitute a complete neural network model w t , expressed as formula (13).
[0074]
[0075] Step 4: In the low-latency split learning system, based on the model splitting and client clustering strategy, all clients are organized to perform a set of forward and backward propagation processes on the associated server-side model in a parallel form of intra-cluster synchronization and inter-cluster asynchronous with the server. Specifically, the following steps are included:
[0076] Step 41: All clients send the local mini-batch samples X of the current iteration n,t Input to the local client model, and perform forward propagation to each current split layer position according to formula (13) to obtain the crushed data A n,t , and send the crushed data output by each split layer to the server.
[0077]
[0078] Step 42: Perform forward propagation on each server-side model in parallel in an asynchronous manner. The forward propagation processes on different server-side models are independent of each other. Specifically, when the server receives all the crushed data of a cluster, it merges them into a tensor according to formula (14), inputs them to the model corresponding to the cluster, performs forward propagation of the model and calculates the loss value, where the symbol Represents the concatenation calculation between tensors. The loss function of each server-side model is the average of the loss functions corresponding to the client input samples in the associated cluster, obtained by formula (15). Represents the loss function corresponding to the i-th sample in the batch data of client n in the t-th iteration.
[0079]
[0080] Step 43: After the server completes the loss function calculation of a server-side model, it starts the back propagation process for the model directly without waiting for the calculation of other server-side models to obtain the gradient of the input features of the server-side model.
[0081] Step 44: Gradients of the input features to the server-side model according to the order and size of the shredded data when merging According to the chain rule of gradient calculation and the characteristics of loss calculation in batch processing, each decomposed gradient is weighted according to the proportion of its corresponding sample number to the total number of cluster samples, and the gradient G of the crushed data of each client in the corresponding cluster is obtained. n,t , satisfying formula (16). The obtained crushed data gradient is sent to the corresponding client.
[0082]
[0083] Step 45: After the client receives the gradient of its shattered data, it starts to perform backpropagation of the client model until the model input layer.
[0084] Step 5: The server layer by layer collects the model layer gradients of all local models, performs gradient aggregation and global parameter update, and distributes the global model layer parameters to all clients. Each client and the server-side model load the global model parameters. If the system has not completed all the iteration processes of this training round or has not completed all the training rounds, restart from Step 3. Otherwise, the training ends. Specifically, it includes the following steps:
[0085] Step 51: Each time a client completes the backpropagation gradient calculation of a model layer, it sends the gradient of this model layer to the server.
[0086] Step 52: The GM-SGD module in the server collects the gradients from all server-side model layers and the gradients from client model layers When all the gradients of the deepest split layer are collected, the module performs weighted gradient aggregation and parameter update on the global neural network model for each model layer from the output layer to the deepest split layer. When all the gradients of any other model layer within the range from the deepest split layer to the input layer are collected, the module performs weighted gradient aggregation and parameter update on this model layer. The aggregated gradient is calculated by formula (17), where represents the position of the split layer corresponding to the server-side model The batch sizes of the server-side model and the system global are respectively calculated by and The parameter update process of the l-th layer is expressed as formula (18), where η t is the learning rate at the t-th iteration. The learning rate is uniformly adjusted using an equally spaced exponential decay strategy, expressed as where γ is the learning rate decay coefficient and α represents the interval period in terms of training rounds.
[0087]
[0088] Step 53: When a global model layer l between the highest split layer and the input layer completes parameter update, the server broadcasts its latest parameter w l,t+1 to all clients.
[0089] Step 54: After the client and the server wait for the distribution of the latest parameters of all model layers to be completed, they load the latest parameters into the local neural network local model. If all the iteration processes of this training round have not been completed or all the training rounds have not been completed, repeat Steps 3, 4, and 5. Otherwise, end the training.
[0090] The present invention also provides a low-latency split learning system based on dynamic clustering, including a memory, a processor, and computer program instructions stored on the memory and executable by the processor. When the processor runs the computer program instructions, the method steps described in any of the above can be implemented.
[0091] The present invention also provides a computer-readable storage medium, on which computer program instructions executable by the processor are stored. When the processor runs the computer program instructions, the method steps described in any of the above can be implemented.
[0092] The above are the preferred embodiments of the present invention. All changes made according to the technical solution of the present invention and whose functional effects do not exceed the scope of the technical solution of the present invention belong to the protection scope of the present invention.
Claims
1. A low-latency split learning method based on dynamic clustering, characterized in that: include: Step S1: construct a low-latency split learning system model, including a server and several clients; Each client has an independent local data set and deploys the neural network front-end from the input layer to the deepest split layer; the server deploys multiple neural network back-ends from each split layer to the output layer and a complete neural network model; Step S2, simulating an edge collaborative environment with dynamic changes in network transmission rate and computing speed, sampling reinforcement learning samples from the environment; training based on the MAPPO multi-agent reinforcement learning algorithm to obtain a split point selection strategy network for each client; Step S3: Each client collects the server-side environment status and the local environment status, and uses the local policy network to calculate the split point optimized for the current environment; the system divides the clients into several clusters according to the different split points; the split points between the clients in each cluster are the same; each cluster is associated with the server-side model with the same split point on the server; Step S4: In the low-latency split learning system, all clients are organized to perform a set of forward and backward propagation processes on the associated server-side model in a parallel form of intra-cluster synchronization and inter-cluster asynchronous with the server based on the model splitting and client clustering strategy; Step S5: The server collects the model layer gradients of all local models layer by layer, performs gradient aggregation and global parameter update, and sends the global model layer parameters to all clients. Each client and server model loads the global model parameters; and starts again from step S3.
2. According to claim 1, a low-latency split learning method based on dynamic clustering is characterized in that: In step S1, the construction of the low-latency split learning system model includes the following steps: 2.1) According to the structure of the given neural network to be trained, several intermediate layers are selected to form a set of split layers according to privacy requirements, transmission costs, and computational costs; The transmission and computation costs of the selected intermediate layers are low; 2.2) Each client deploys the neural network front-end from the input layer to the deepest split layer of the neural network to be trained; the server deploys multiple neural network back-ends from each split layer to the output layer, and a GM-SGD module containing a global neural network model, which is used for gradient aggregation and parameter update; the global neural network model parameters are randomly initialized, distributed and loaded into each client model and server model; 2.3) According to the size of local data of each client, set the number of global batches; each client divides the local data according to the unified global batch number.
3. According to claim 2, a low-latency split learning method based on dynamic clustering is characterized in that: The selection range for split layer position is in Represents a collection of model layer locations, It consists of the location of the pooling layer after each convolutional layer, and some low transmission cost and computation cost convolutional layers that are not pooled.
4. According to claim 1, a low-latency split learning method based on dynamic clustering is characterized in that: In step S2, the split point selection strategy network training includes the following steps: 3.1) Define observations based on the dynamic changes in the actual environment, including observations of each client and server, which include the local network and computing environment measurements at the beginning of each iteration, the current batch size, and the split layer position at the previous iteration; 3.2) Based on the low-latency split learning system model constructed in step S1, a latency optimization problem is modeled, the goal of which is to find the optimal solution for client clustering, and the goal of this problem is converted into split point selection; 3.3) The design part can observe various elements of the Markov decision process, where the action is the split point selection of each client, and the observation set consists of the client calculation frequency, client computing resource occupancy, client data upload rate, client data download rate, the comprehensive computing efficiency of each server model training, the client local batch size, and the split layer position in the previous iteration. The reward function of each client is set to the opposite of the system delay of this iteration; 3.4) Solve the delay optimization problem based on the MAPPO algorithm and the designed POMDP elements; generate dynamic simulation data for environmental observations, and calculate the system delay of the iterative process by simulating the workflow of the low-latency split learning system model constructed in step S1; define the input of the policy network as a set of observations that only include the local client and server to accelerate the training process of multi-agent reinforcement learning; After the server completes the training of the policy network and the value network, it distributes the policy network to each client.
5. According to claim 4, a low-latency split learning method based on dynamic clustering is characterized in that: The latency optimization problem of the low-latency split learning system model is defined as follows: in represents the total system delay at the tth iteration, Indicates the server-side model in the tth iteration The goal of the delay optimization problem of the split learning system model is to find a set of client clustering strategies to minimize the long-term training delay. The delay optimization problem is transformed into an optimization problem on a small time scale as expressed by the following formula, that is, to find a client clustering strategy to minimize the delay of the current iteration process. According to the working mode of the same clustering and the same splitting, the original goal is converted to finding a client splitting layer selection strategy:
6. A low-latency split learning method based on dynamic clustering according to claim 1, characterized in that: In step S3, client clustering includes the following steps: 4.1) The server collects server-side environmental observations; each client collects local environmental observations and receives server-side environmental observations; 4.2) Each client combines the local and server-side environmental observations and inputs them into the local strategy network to calculate the optimal split point selection strategy in the current environment; 4.3) The clusterer clusters all clients so that each client with the same optimized split layer position is located in the same cluster, and clients with different optimized split layer positions are located in different clusters; 4.4) Each cluster establishes a cooperative relationship with the server-side model with the same split point on the server, and the clients in each cluster only transmit the crushing data or its gradient to the server-side model that has established a cooperative relationship with the cluster.
7. The low-latency split learning method based on dynamic clustering according to claim 1, characterized in that: In step S4, the low-latency split learning forward back propagation process includes the following steps: 5.1) All clients input local small batch samples into the local client model, perform forward propagation to their current split layer positions, and send the crushed data output by the split layer to the server; 5.2) Perform forward propagation on each server-side model in parallel in an asynchronous manner; specifically, when the server receives all the crushed data of a cluster, it merges them into a tensor, inputs it to the model corresponding to the cluster, and performs forward propagation on the corresponding model; 5.3) After the server completes the loss function calculation of a server-side model, it directly starts the back propagation process for the model; 5.4) According to the chain rule of gradient calculation and the characteristics of loss calculation in batch processing, the gradient of the input feature of the server-side model is decomposed to obtain the gradient of the crushed data of each client in the corresponding cluster, and the gradient of the crushed data is sent to the corresponding client; 5.5) After the client receives the gradient of its shredded data, it starts to perform backpropagation of the client model until the model input layer.
8. The low-latency split learning method based on dynamic clustering according to claim 1, characterized in that: In step S5, the gradient aggregation and global parameter update process includes the following steps: 6.1) After the client completes the gradient calculation of a model layer, it sends the gradient of the model layer to the server; 6.2) The GM-SGD module in the server that contains the global neural network model collects the gradients from all server-side models and client-side models; when all the highest split layer gradients are collected, the GM-SGD module performs weighted gradient aggregation on each model layer from the output layer to the highest split layer and updates the parameters on the global neural network model; when all the gradients from the highest split layer to any other model layer within the range of the input layer are collected, the GM-SGD module performs weighted gradient aggregation on the model layer and updates the parameters on the global neural network model; 6.3) When a global model layer located between the highest split layer and the input layer completes parameter update, the server broadcasts it to all clients; 6.4) After the client and server wait for the latest parameters of all model layers to be distributed, they load the latest parameters into the local model; if all iterations of this training round have not been completed, or if all training rounds have not been completed, repeat steps S3, S4, and S5, otherwise terminate the training.
9. A low-latency split learning system based on dynamic clustering, characterized in that: The method comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps as claimed in any one of claims 1 to 8 can be implemented.
10. A computer-readable storage medium having stored thereon computer program instructions that can be executed by a processor, and when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 8 can be implemented.
Citation Information
Cited By
Personalized federal model training method based on meta-learning and multi-level segmentation
CN120409743A