A 6G computing network adaptive splitting federated learning method for distributed AI training business
By using an adaptive split federated learning method to optimize model segmentation and resource allocation in 6G computing networks, the problem of improper resource allocation in multi-base station scenarios is solved, the efficiency and accuracy of model training are improved, and the optimization process is simplified.
Patent Information
- Application Number
- CN202411249269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing technologies have failed to effectively solve the joint optimization problem of model segmentation and communication and computing multi-dimensional resource allocation in multi-base station scenarios in 6G computing networks, resulting in network congestion and improper resource allocation, and unable to meet actual application needs.
An adaptive split federated learning method is adopted to establish a 6G computing network model, define a wireless communication model, and use the shortest path search algorithm to optimize the model segmentation method, collaborative node selection and multi-domain resource scheduling. The optimization problem of minimizing the total service delay is constructed and converted into two sub-problems for optimization.
It effectively alleviates network congestion, improves the efficiency and generalization ability of model training, simplifies the optimization process, shortens the optimization time, and improves the accuracy and scalability of the model.
Smart Images

Figure CN119031415B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication network technology, and specifically relates to a 6G computing power network adaptive splitting federated learning method for distributed AI training services. Background Art
[0002] With the standardization and widespread deployment of 5G networks, 6G, targeting 2030 and beyond, will continue to expand upon 5G's three key scenarios: enhanced mobile broadband, low-latency, highly reliable connectivity, and massive machine-type communications. As one of the new key 6G scenarios, inclusive intelligent services leverage the network to provide integrated communications and AI computing power for intelligent services requiring efficient distributed intelligent learning or reasoning. This will serve not only specific applications but also the entire future communications system, improving overall network performance and efficiency. In this scenario, a wide variety of devices within the network will be enabled to participate in the development and use of AI, enabling fast and flexible intelligent services to reach all areas of society.
[0003] However, any single network element, regardless of location, faces challenges such as limited computing power, intelligence, and power consumption. Intelligent services such as AI model training and inference, holographic communications, and immersive cloud XR (eXtended Reality) demand extremely high communication requirements and massive computing power consumption, requiring efficient collaboration among ubiquitously distributed computing power, algorithms, data, and other resources and functions across network elements. In other words, to achieve universal access to intelligence and connected intelligence, and to ensure the quality of computing services like AI in future networks, 6G networks must evolve from traditional information transmission infrastructure to a new type of infrastructure that provides both connectivity and computing services—a computing network. This network can allocate and flexibly schedule computing, storage, and network resources across the cloud, edge, and end based on business needs, achieving deep convergence of computing. By connecting ubiquitous computing power and leveraging the advantages of computing clusters, it can build efficient, energy-efficient, secure, and flexible AI services and an open ecosystem.
[0004] When developing AI services in 6G computing networks, they are primarily implemented through distributed learning technologies such as federated learning (FL) and split learning (SL). FL's advantage lies in its parallel training approach across devices, fully considering data privacy. However, its training process incurs significant computational and communication overhead, as each device must train and transmit a complete model. In contrast, SL partitions the model and utilizes multiple nodes for collaborative training, which can reduce the computational overhead of smart terminals compared to FL. However, SL still has significant communication overhead. Therefore, some research has combined FL and SL, employing both parallel training and model partitioning and collaborative training, effectively improving training efficiency and accuracy to a certain extent. However, most current research focuses solely on the FL or SL framework, optimizing different variables to improve model training accuracy or efficiency. These optimization variables are limited, and resource allocation typically focuses solely on optimizing communication or computing resources. Of the few studies that have combined FL and SL, few consider multi-base station scenarios or the joint optimization of model partitioning with multi-dimensional communication and computing resource allocation in these scenarios, failing to fully meet practical application requirements.
[0005] Therefore, how to solve the problem of reasonably allocating communication and calculating multi-dimensional resources is the technical problem that the present invention aims to solve. Summary of the Invention
[0006] The purpose of the present invention is to provide a 6G computing power network adaptive splitting federated learning method for distributed AI training business, so as to solve the problems raised in the above background technology and the shortcomings of the existing technology.
[0007] The object of the present invention is to achieve this by providing a 6G computing network adaptive splitting federated learning method for distributed AI training services, characterized in that the method comprises the following steps:
[0008] Step S1: Establish a 6G computing network model and build an adaptive split federated learning model for distributed AI training services;
[0009] Step S2: Define a wireless communication model and analyze the delay of each smart terminal in the model training phase and the model aggregation phase;
[0010] Step S2-1: Analyze the latency of each smart terminal during the model training phase;
[0011] Step S2-2: Analyze the time delay of each smart terminal during the model aggregation phase;
[0012] Step S3: Construct an optimization problem for minimizing the total service delay. This problem is converted into two subproblems: Subproblem 1 and Subproblem 2. Subproblem 1 is to optimize the training delay of the model training phase in each training iteration, and Subproblem 2 is to optimize the transmission delay of the model aggregation phase.
[0013] Step S4: Use the shortest path search algorithm to jointly optimize the model segmentation method, collaborative node selection, and multi-domain resource scheduling method in the model training phase and the model aggregation phase.
[0014] Preferably, the 6G computing network model includes a central cloud server, N base stations and K smart terminals, and the base stations are used for collective computing. Indicates that each base station n is equipped with a mobile edge computing server, which has computing resources and storage resources. The computing resources are expressed as F n Indicates that storage resources are represented by M n express;
[0015] The intelligent terminal is set with a collection Indicates that the computing resources and storage resources owned by each intelligent terminal k are represented by F k and M k express;
[0016] Own local datasets Indicates that D k represents the number of samples, and Represent the corresponding sample input features and output labels, Q represents the dimension of the sample input features, and let Indicates the total dataset size of all smart terminals;
[0017] The relationship between the computing resources and storage resources of the intelligent terminal and the computing resources and storage resources of the base station is:
[0018] Preferably, in step S2-1, the delay of each smart terminal in the model training phase is analyzed, specifically:
[0019] Step S2-1-1: Determine the local loss function of the intelligent terminal k and the segmentation layer set of the DNN model during the model training phase;
[0020] The local loss function of each intelligent terminal k Among them, L(w;x i ,y i ) represents the sample loss function, x i Input features for the sample, y i is the sample output label; w is the model parameter;
[0021] use Represents the set of optional segmentation layers in the DNN model, using represents the model training split layer selection for terminal k;
[0022] Step S2-1-2: Divide the model training delay of each terminal k Divide the training modes and determine the update method for each training mode;
[0023] The training modes include training mode 1, training mode 2 and training mode 3. The training mode for performing model training completely locally is training mode 1, the training mode for performing model training through edge-end collaboration is training mode 2, and the training mode through edge-end collaboration and edge-edge collaboration is training mode 3.
[0024] The subset of intelligent terminals in training mode 1 is The local model parameters of smart terminal k in the tth iteration are expressed as Each intelligent terminal k updates the local model parameters by the stochastic gradient descent method:
[0025]
[0026] Among them, η l Indicates the learning rate of the model in local training, represents the local model gradient calculated by intelligent terminal k; is the partial derivative vector of the local loss function of smart terminal k with respect to the model parameters;
[0027] Training mode 1 only includes local model training delay, local model training delay
[0028] Among them, l FB Represents the computational effort of the forward and backward propagation processes for processing a data sample.
[0029] Preferably, the subset of intelligent terminals in training mode 2 is Local model parameters of smart terminal k in the tth iteration Expressed as in and Respectively represent the training mode 2 terminal side model and the training mode 2 base station side model;
[0030] In training mode 2, the terminal side model of training mode 2 needs to be trained. The terminal side model delay of training mode 2 in, Indicates the computational effort of the forward propagation process of the training mode 2 terminal-side model for processing one data sample;
[0031] Training mode 2: Segmentation layer output data of the terminal side model It is obtained by the following formula:
[0032]
[0033] Where f(x;w) represents the mapping function between input x and output s under given model parameters w;
[0034] Will and y i Transmission delay to base station n Among them, the binary variable Used to indicate whether terminal k selects base station n for access, if yes, it is 1, otherwise 0; Indicates the subset of access base stations, Indicates the data size of the segmentation layer of a data sample;
[0035] The terminal side model of training mode 2 uses SGD to update the terminal side model of training mode 2. The update formula is:
[0036]
[0037] Latency
[0038] in, Indicates the computational amount of the back propagation process of the training mode 2 terminal side model for processing a data sample; the intelligent terminal k updates the training mode 2 terminal side model and training mode 2 base station side model Stitch them together to get a new local model
[0039] The training mode 2 base station side model needs to be trained, and the training and update delay of the training mode 2 base station side model in It represents the computational amount of the forward propagation and back propagation process of the training mode 2 base station side model for processing one data sample, Indicates the computing resources allocated by base station n to smart terminal k;
[0040] Segmentation layer gradient and updated training mode 2 base station side model parameters are transmitted back to the smart terminal k together, and the delay of this part in Indicates the size of the segmentation layer gradient data of a data sample;
[0041] Prediction results on the base station side It is obtained by the following formula:
[0042]
[0043] According to the prediction results and the true value label y i , calculate the average gradient of the loss function The base station side model updates parameters through SGD, and the update formula is:
[0044]
[0045] Among them, η e Represents the learning rate of the model trained on the base station side; according to the chain rule of gradient calculation, the model parameters will be updated layer by layer from the output layer to the segmentation layer, and the segmentation layer gradient will be obtained
[0046] Preferably, the subset of intelligent terminals in training mode 3 is Local model parameters of smart terminal k in the tth iteration Expressed as in, and Respectively represent the terminal side model, the access base station side model and the cooperative base station side model;
[0047] The terminal side model of training mode 3 is trained, and its delay in Represents the computational amount of the forward propagation process of the terminal side model to process a data sample; the calculated terminal side model segmentation layer output data and y i Transmitted to access base station n, its delay in Represents a segmentation layer for a data sample Data size;
[0048] Train the access base station side model of training mode 3, delay in, Indicates the computational effort of the forward propagation process of the access base station side model to process one data sample;
[0049] The split layer output results of the access base station side model It is obtained by the following formula:
[0050]
[0051] Will and y i Transmission delay to cooperative base station n′ The binary variables Used to indicate whether terminal k selects base station n′ to collaborate with access base station n to train the model. If yes, it is 1, otherwise 0; represents the subset of cooperative base stations, Represents a segmentation layer for a data sample Data size;
[0052] Training and updating of the cooperative base station side model of training mode 3, delay in, represents the computational effort of the forward and backward propagation processes of the collaborative base station side model to process a data sample, represents the computing resources allocated by the cooperative base station n′ to the terminal k;
[0053] Segmentation layer gradient and updated cooperative base station side model parameters are transmitted back to the access base station n together, and the delay of this part in, Represents a segmentation layer for a data sample The amount of gradient data;
[0054] Prediction results on the collaborative base station side It is obtained by the following formula:
[0055]
[0056] According to the received segmentation layer gradient The access base station side model uses SGD to update parameters until the segmentation layer. The delay of this part in Indicates the computational effort of the back-propagation process of the access base station model to process one data sample;
[0057] Access base station n will split the layer gradient Updated access base station side model And the collaborative base station side model Transmitted together to the corresponding terminal k, the delay in, Represents a segmentation layer for a data sample The amount of gradient data;
[0058] The terminal side model is also updated using SGD, and its delay in Indicates the computational cost of the back propagation process of the terminal side model to process a data sample. Finally, terminal k updates the terminal side model Access base station side model and collaborative base station side model Stitch them together to get a new local model
[0059] Preferably, in step S2-2, the delay of each smart terminal in the model aggregation stage is analyzed, specifically:
[0060] In the model aggregation phase, each terminal k directly transmits the local model to the network through the D2D link relay or cell link. Transmission delay of uploading to selected base station n for aggregation Expressed as:
[0061]
[0062] Among them, the binary variable Used to indicate whether terminal k selects base station n for model upload, if yes, it is 1, otherwise 0; binary variable Used to indicate whether terminal k selects terminal k' as a relay to access base station n. If yes, it is 1, otherwise it is 0; terminal subset represents all directly connected terminals within the coverage area of base station n, M w Indicates the amount of data for the model parameters.
[0063] Preferably, the service total delay minimization optimization problem is:
[0064]
[0065] Among them, the decision variables include the model split method Collaborative node selection Multi-domain resource allocation method in the model training phase / model aggregation phase
[0066] C1 indicates that the total computing resources allocated by any base station to terminals selecting training modes 2 and 3 cannot exceed the base station upper limit; C2 indicates that the bandwidth resources allocated by any base station to the cell link cannot exceed the corresponding upper limit, and C3 and C4 represent the corresponding collaborative link and D2D link bandwidth resource constraints respectively; C5 indicates that the sum of the transmit power of terminals accessing any base station and the sum of the transmit power of all base stations have an upper limit, and the transmit power of any terminal or base station cannot exceed its maximum transmit power; C6 is a constraint on the model partitioning method of each terminal, C7 indicates that any terminal can only choose one base station to access; C8 indicates that in the model training phase, for any terminal, in addition to accessing the base station, only one collaborative base station can be selected; C9 indicates that in the model aggregation phase, for any terminal, if it needs to access the base station through a relay, only one terminal within the coverage area of the base station can be selected as a relay node;
[0067] The optimization model for subproblem 1 is:
[0068]
[0069] C1, C3, C6, C8;
[0070] Among them, C2′ indicates that the bandwidth resources allocated by any base station to the cell link during the model training phase cannot exceed the corresponding upper limit; C5′ is the sub-constraint of the sum of the terminal transmit power accessing any base station during the model training phase, the total base station transmit power, and the transmit power range of each terminal; C7′ indicates that during the model training phase, any terminal can only choose to access one of the accessible base stations;
[0071] The optimization model for subproblem 2 is:
[0072]
[0073] C4, C9;
[0074] Among them, C2″ indicates that the bandwidth resources allocated by any base station to the cell link during the model aggregation stage cannot exceed the corresponding upper limit; C5″ is the sum of the terminal transmission power accessing any base station during the model aggregation stage and the sub-constraint of the transmission power range of each terminal; C7″ indicates that during the model aggregation stage, any terminal can only select one base station for uploading.
[0075] Preferably, in step S4, the shortest path search algorithm is used to jointly optimize the model segmentation mode, collaborative node selection, and multi-domain resource scheduling mode in the model training phase and the model aggregation phase, specifically:
[0076] Step S4-1: allocating initial values of the multi-domain resource allocation method for the model training phase and the model aggregation phase;
[0077] Assign the same initial value of the multi-domain resource allocation method in the model training phase to each terminal k to eliminate the impact of differences in resource allocation;
[0078] Assign the same initial value of the multi-domain resource allocation method in the model aggregation phase to each terminal k
[0079] Step S4-2: Select the shortest path search algorithm to optimize the model segmentation method selection and collaborative node selection in sub-problem 1;
[0080] Specifically:
[0081] Construct a weighted directed graph G for each terminal k in subproblem 1 train =(O train ,E train );
[0082] Among them, O train is a node set, It is the first layer node, representing the first layer to the v0 layer of the terminal k training model; is a layer 2 node, representing base station n x Train the model from layer v1 to layer v2; It is a layer 3 node, representing base station n y Training model layers v3 to v; e train is the edge between nodes, e train ∈E train It represents the selection method of collaborative nodes, and its weight represents the transmission and computing delay;
[0083] Add a pair of virtual start / end vertices s k ,e k As the source and destination nodes in the graph, the weight of the edges connecting to other nodes in the graph is 0, and the optimization goal becomes searching for the nodes from s k to e k The shortest path, all vertices on this path form the corresponding optimal model segmentation method and collaborative node selection;
[0084] That is in They represent the optimal access base station selection, cooperative base station selection and model segmentation method for terminal k respectively;
[0085] The operation flow of the shortest path search algorithm for subproblem 1 is:
[0086] S4-2-1: Input terminal k transmits the output data of the model layer v to each base station n x Transmission delay Each base station n x Transmit the output data of the model layer v to other base stations n y Transmission delay Processing delay of layer v of the calculation model of terminal k And each base station n x Calculate the processing delay of layer v of the model
[0087] S4-2-2: Calculate each node in the third layer Segmentation overhead And let Indicates a layer 3 relay node The segmentation cost is 0;
[0088] S4-2-3: Layer 2 nodes According to the starting segmentation layer v1 and base station n x Divide into multiple subsets, and calculate the segmentation cost within each subset first
[0089] S4-2-4: Get the optimal partitioning cost in each subset Corresponding termination segmentation layer and corresponding Layer 3 base station And let Represents a layer 2 relay node The segmentation cost is 0, which selects any relay node in the third layer connect;
[0090] S4-2-5: Calculate each node in the first layer Segmentation overhead
[0091] S4-2-6: Select the termination segmentation layer that minimizes the segmentation overhead And get the corresponding second-layer base station Corresponding to the second layer termination split layer And the corresponding 3rd layer base station
[0092] S4-2-7: Output the shortest path to terminal k
[0093] Based on the optimal model segmentation method and collaborative node selection method Optimize multi-domain resource allocation during model training Transform subproblem 1 into a convex optimization problem P2′ as follows:
[0094]
[0095] stC1,C2′,C3,C5′;
[0096] in, and The optimizations between them do not affect each other;
[0097] Step S4-3: Select the shortest path search algorithm to optimize the model segmentation method selection and collaborative node selection in sub-problem 2.
[0098] Preferably, in step S4-3, the selection of the model segmentation method and the selection of the collaborative nodes in the optimization sub-problem 2 of the shortest path search algorithm are specifically:
[0099] Construct a weighted directed graph G for each terminal k aggr,tran =(O aggr,tran ,E aggr,tran ), node collection Among them k is the only layer 1 node, representing terminal k; is the second-layer node, representing all terminals; is the third layer node, representing all base stations;
[0100] The edge between nodes aggr,tran ∈E aggr,tran Indicates the selection method of the collaborative node, and its weight represents the transmission delay; add a pair of virtual start / end vertices s k ,e k As the source node and destination node in the graph, the weight of the edge connecting to other nodes in the graph is 0; k to e k All vertices on the shortest path form the corresponding optimal collaborative node selection method, that is, like but in, They represent the optimal terminal selection and base station selection for terminal k respectively;
[0101] The operation flow of selecting the shortest path search algorithm for sub-problem 1 is:
[0102] Step S4-3-1: Input terminal k transmits model parameters to each terminal k x Transmission delay Each terminal k x Transmit the model parameters to each base station n y Transmission delay
[0103] Step S4-3-2: Calculate each node in the third layer Transmission overhead
[0104] Step S4-3-3: Calculate each node in the second layer Transmission overhead And let That is, the delay of the terminal transmitting the model parameters to itself is 0;
[0105] Step S4-3-4: Layer 1 node o k Select the layer 2 node that minimizes the transmission overhead And further get the corresponding third-layer base station
[0106] Step S4-3-5: Output the shortest path to terminal k
[0107] Based on the optimal collaborative node selection method Optimize the multi-domain resource allocation method during the model aggregation phase Transform subproblem 2 into a convex optimization problem P3′ as follows:
[0108]
[0109] stC2″,C4,C5″;
[0110] in, and The optimizations do not affect each other.
[0111] Compared with the prior art, the present invention has the following improvements and advantages:
[0112] 1. By considering the joint optimization of model segmentation, node selection, and multi-dimensional resource allocation in multi-base station scenarios, the network congestion problem that may be caused by the aggregation of a large number of smart terminal models in a single base station learning framework can be effectively alleviated. At the same time, multi-dimensional resource allocation and flexible model segmentation and node selection can better adapt to the heterogeneous computing power of smart terminals and differentiated channel quality in actual networks, improving the efficiency and generalization ability of model training.
[0113] 2. Convert the optimization problem of minimizing the total service latency into two 2-subproblems, so that the latency of each training iteration can be minimized, simplifying the complexity of obtaining the optimal solution, shortening the optimization time, and improving the accuracy and scalability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Figure 1 1 is an overall flow chart of the method of the present invention.
[0115] Figure 2 This is the training flow chart for smart terminal training in training mode 2.
[0116] Figure 3 This is the training flow chart for smart terminal training in training mode 3.
[0117] Figure 4 Schematic diagram of the ResNet18 neural network model structure.
[0118] Figure 5 It is the optimal transmission topology during the model training phase.
[0119] Figure 6 This is the flow chart for optimal transmission topology training in the model aggregation phase.
[0120] Figure 7 This is a graph showing how the model accuracy changes with the number of iterations in the method of the present invention. DETAILED DESCRIPTION
[0121] The present invention is further summarized below with reference to the accompanying drawings.
[0122] like Figure 1 As shown, a 6G computing network adaptive splitting federated learning method for distributed AI training business includes the following steps:
[0123] Step S1: Establish a 6G computing network model and build an adaptive split federated learning model for distributed AI training services; the adaptive split federated learning model is applicable to DNN models, such as Figure 4 As shown, for example, LeNet, AlexNet, VGG16 and ResNet18, etc.
[0124] The 6G computing network model includes a central cloud server, N base stations and K smart terminals. Indicates that each base station n is equipped with a mobile edge computing server, which has computing resources and storage resources. The computing resources are expressed as F n Indicates that storage resources are represented by M n Indicates that the physical distance between the central cloud server and the smart terminal is far, and the computing and storage resources are sufficient, which are only used for edge model aggregation and global model distribution in the model aggregation stage.
[0125] Smart terminal collection Indicates that the computing resources and storage resources owned by each intelligent terminal k are represented by F k and M k express;
[0126] Own local datasets Indicates that D k represents the number of samples, and Represent the corresponding sample input features and output labels, Q represents the dimension of the sample input features, and let Indicates the total dataset size of all smart terminals;
[0127] The relationship between the computing resources and storage resources of the intelligent terminal and the computing resources and storage resources of the base station is:
[0128] The adaptive split federated learning model adopts a DNN model structure; any DNN model structure is acceptable; the parameters of the DNN model, such as input, output, number of hidden layers, and number of neurons, are known. The model parameters are represented as w, and the total number of model layers is represented as V.
[0129] S101. The central cloud server initializes the model parameter w0 and sends it to all smart terminals; initializes the training iteration round t=1 and the maximum training iteration round T; the maximum training iteration round T is related to the learning accuracy requirements of the distributed AI training business. After each iteration, the model accuracy θ(t) of each smart terminal can be calculated using the verification data set to obtain the average model accuracy. And T must satisfy where θ thIndicates the model accuracy threshold for distributed AI training services;
[0130] S102. If t>T, proceed to step S109; if t≤T, proceed to the model training phase, and solve the training mode and resource allocation mode for each intelligent terminal k according to the proposed algorithm; wherein, the training mode is divided into three types: some intelligent terminals with more computing resources and storage resources can use local data sets to independently complete model training (shown in training mode 1); another part of intelligent terminals with limited computing resources and storage resources need to complete model training through edge-end collaboration (shown in training mode 2); the remaining intelligent terminals with less computing resources and storage resources need to complete the model through edge-end collaboration and edge-edge collaboration (shown in training mode 3);
[0131] S103, each intelligent terminal k completes the local model independently or in collaboration with the base station according to the obtained training method and resource allocation method Update calculation of ;
[0132] S104: Enter the model aggregation phase, and solve the transmission mode and resource allocation mode for each smart terminal k according to the proposed algorithm. There are two transmission modes: each smart terminal transmits the updated local model to the neighboring smart terminal through the D2D link based on its own channel quality, and then relays it to the selected base station (transmission mode 1), or directly uploads it to the selected base station through the cell link (transmission mode 2).
[0133] Each smart terminal k directly transmits the local model through the D2D link relay The transmission mode for uploading to the selected base station n for aggregation is transmission mode 1. Each smart terminal k directly transmits the local model through the cell link. The transmission mode for uploading to the selected base station n for aggregation is transmission mode 2.
[0134] S105, each intelligent terminal k updates the local model according to the obtained transmission mode and resource allocation mode Transmit to selected base station;
[0135] S106. Each base station n aggregates the local model through the FedAvg algorithm to obtain the edge model And send it to all smart terminals that access this base station through the cell link or D2D link relay; represents the set of intelligent terminals connected to base station n, Indicates the total data set size of smart terminals that access base station n through cell links or D2D link relays;
[0136] S107, if t% T_GLOBAL (global aggregation round constant) == 0, then each base station n will edge model Upload to the central cloud server, the central cloud server aggregates the edge model through the FedAvg algorithm to obtain the global model And send it to all smart terminals; otherwise, go directly to step S108;
[0137] S108, set t=t+1, and return to step S102;
[0138] S109, output the final model parameter w T .
[0139] Step S2: Define a wireless communication model and analyze the delay of each smart terminal in the model training phase and the model aggregation phase;
[0140] Define the wireless communication model, specifically:
[0141] The total bandwidth used by the cell link, cooperative link and D2D link is represented as B Cellular ,B B2B and B D2D ,The frequency bands used by cell links, cooperative links and D2D links are different;
[0142] The orthogonal channel resources allocated to each base station n are expressed as b n express, satisfy
[0143] The signal-to-noise ratio threshold for maintaining communication between intelligent terminal k and base station n is expressed as When the uplink signal-to-noise ratio γ between the intelligent terminal k and the base station n k,n Greater than or equal to the threshold When , it is considered that the intelligent terminal k is within the coverage of the base station n, and the intelligent terminal k communicates directly with the base station n;
[0144] Introducing binary variables Indicator, uplink signal-to-noise ratio
[0145] Among them, p k represents the transmission power of intelligent terminal k, and its maximum value is h k,n represents the cell link channel gain from intelligent terminal k to base station n, and N0 represents the noise power;
[0146] Introducing binary variables Used to indicate whether base station n can communicate directly with another base station n′, Indicates the signal-to-noise ratio threshold for maintaining communication between base stations, the signal-to-noise ratio between base station n and another base station n′ p n represents the transmission power of base station n, and its maximum value is hn,n′ represents the cooperative link channel gain from base station n to another base station n′;
[0147] Downlink signal-to-noise ratio between base station n and smart terminal k The signal-to-noise ratio between intelligent terminal k and another intelligent terminal k′ where h k,k′ represents the D2D link channel gain from smart terminal k to another smart terminal k′;
[0148] According to Shannon's formula, the uplink rate of each intelligent terminal k in the cell link is R k,n , the cell link downlink rate R of each base station n n,k , the achievable rate R of the cooperative link of each base station n n,n′ and the D2D link achievable rate R of each smart terminal k k,k′ ;
[0149] R k,n =b k,n log2(1+γ k,n );
[0150] R n,k =b k,n log2(1+γ n,k );
[0151] R n,n′ =b n,n′ log2(1+γ n,n′ );
[0152] R k,k′ =b k,k′ log2(1+γ k,k′ );
[0153] Among them, b k,n represents the bandwidth resources allocated to the communication between the intelligent terminal k and the base station n, b n,n′ represents the bandwidth resources allocated to base station n for communication with another base station n′, b k,k′ It represents the bandwidth resources allocated to the intelligent terminal k for communication with another intelligent terminal k′.
[0154] All base stations are connected to the central cloud server via different high-bandwidth backhaul links. However, due to factors such as multi-user scheduling and complex routing algorithms, their transmission delay is difficult to model. Therefore, it is assumed that the backhaul link resource allocation strategy and routing algorithm of each base station are known, so that the achievable rate of its backhaul link is fixed.
[0155] Step S2-1: Analyze the latency of each smart terminal during the model training phase, specifically:
[0156] Step S2-1-1: Determine the local loss function of the intelligent terminal k and the segmentation layer set of the DNN model during the model training phase;
[0157] The local loss function of each intelligent terminal k Among them, L(w;x i ,y i ) represents the sample loss function, x i Input features for the sample, y i is the sample output label; w is the model parameter;
[0158] use Represents the set of optional segmentation layers in the DNN model, using represents the model training segmentation layer selection of intelligent terminal k;
[0159] Step S2-1-2: Divide the model training delay of each smart terminal k Divide the training modes and determine the update method for each training mode;
[0160] The training modes include training mode 1, training mode 2, and training mode 3. The training mode that performs model training completely locally is training mode 1, the training mode that performs model training through edge-end collaboration is training mode 2, and the training mode that performs model training through edge-end collaboration and edge-edge collaboration is training mode 3.
[0161] The subset of intelligent terminals in training mode 1 is The local model parameters of smart terminal k in the tth iteration are expressed as Each intelligent terminal k updates the local model parameters by the stochastic gradient descent method:
[0162]
[0163] Among them, η l Indicates the learning rate of the model in local training, represents the local model gradient calculated by intelligent terminal k; is the partial derivative vector of the local loss function of smart terminal k with respect to the model parameters;
[0164] Training mode 1 only includes local model training delay, local model training delay
[0165] Among them, l FB Represents the computational effort of the forward and backward propagation processes for processing a data sample.
[0166] The subset of intelligent terminals in training mode 2 is Local model parameters of smart terminal k in the tth iteration Expressed as in and Respectively represent the training mode 2 terminal side model and the training mode 2 base station side model;
[0167] In training mode 2, the terminal side model of training mode 2 needs to be trained, and the delay in, Indicates the computational effort of the forward propagation process of the training mode 2 terminal-side model for processing one data sample;
[0168] Training mode 2: Segmentation layer output data of the terminal side model It is obtained by the following formula:
[0169]
[0170] Where f(x;w) represents the mapping function between input x and output s under given model parameters w;
[0171] Will and y i Transmission delay to base station n Among them, the binary variable Used to indicate whether terminal k selects base station n for access, if yes, it is 1, otherwise 0; Indicates the access base station subset, Indicates the data size of the segmentation layer of a data sample;
[0172] The terminal side model of training mode 2 uses SGD to update the terminal side model of training mode 2. The update formula is:
[0173]
[0174] Latency
[0175] in, Indicates the computational amount of the back propagation process of the training mode 2 terminal side model for processing a data sample; the intelligent terminal k updates the training mode 2 terminal side model and training mode 2 base station side model Stitch them together to get a new local model
[0176] The training mode 2 base station side model needs to be trained, and the training and update delay of the training mode 2 base station side model in It represents the computational amount of the forward propagation and back propagation process of the training mode 2 base station side model for processing one data sample, Indicates the computing resources allocated by base station n to smart terminal k;
[0177] Segmentation layer gradient and updated training mode 2 base station side model parameters are transmitted back to the smart terminal k together, and the delay of this part in Indicates the size of the segmentation layer gradient data of a data sample;
[0178] Prediction results on the base station side It is obtained by the following formula:
[0179]
[0180] According to the prediction results and the true value label y i , calculate the average gradient of the loss function The base station side model updates parameters through SGD, and the update formula is:
[0181]
[0182] Among them, η e Represents the learning rate of the model trained on the base station side; according to the chain rule of gradient calculation, the model parameters will be updated layer by layer from the output layer to the segmentation layer, and the segmentation layer gradient will be obtained
[0183] The subset of intelligent terminals in training mode 3 is Local model parameters of smart terminal k in the tth iteration Expressed as in, and Respectively represent the terminal side model, the access base station side model and the cooperative base station side model;
[0184] Train the terminal side model of training mode 3, delay in Represents the computational amount of the forward propagation process of the terminal side model to process a data sample; the calculated terminal side model segmentation layer output data and y i Transmitted to access base station n, its delay in Represents a segmentation layer for a data sample Data size;
[0185] Train the access base station side model of training mode 3, delay in, Indicates the computational effort of the forward propagation process of the access base station side model to process one data sample;
[0186] The split layer output results of the access base station side model It is obtained by the following formula:
[0187]
[0188] Will and y i Transmission delay to cooperative base station n′ The binary variable Used to indicate whether terminal k selects base station n′ to collaborate with access base station n to train the model. If yes, it is 1, otherwise 0; represents the subset of cooperative base stations, Represents a segmentation layer for a data sample Data size;
[0189] Training and updating of the cooperative base station side model of training mode 3, delay in, represents the computational effort of the forward and backward propagation processes of the collaborative base station side model to process a data sample, represents the computing resources allocated by the cooperative base station n′ to the terminal k;
[0190] Segmentation layer gradient and updated cooperative base station side model parameters are transmitted back to the access base station n together, and the delay of this part in, Represents a segmentation layer for a data sample The amount of gradient data;
[0191] Prediction results on the collaborative base station side It is obtained by the following formula:
[0192]
[0193] According to the received segmentation layer gradient The access base station side model uses SGD to update parameters until the segmentation layer. The delay of this part in Indicates the computational effort of the back-propagation process of the access base station model to process one data sample;
[0194] Access base station n will split the layer gradient Updated access base station side model And the collaborative base station side model Transmitted together to the corresponding terminal k, the delay in, Represents a segmentation layer for a data sample The amount of gradient data;
[0195] The terminal side model is also updated using SGD, and its delay in Indicates the computational cost of the back propagation process of the terminal side model to process a data sample. Finally, terminal k updates the terminal side model Access base station side model and collaborative base station side model Stitch them together to get a new local model
[0196] In step S2-2, the delay of each smart terminal in the model aggregation stage is analyzed, specifically:
[0197] In the model aggregation stage, each smart terminal k directly transmits the local model to the network through the D2D link relay or cell link. Transmission delay of uploading to selected base station n for aggregation Expressed as:
[0198]
[0199] Among them, the binary variable Used to indicate whether the intelligent terminal k selects base station n for model upload, if yes, it is 1, otherwise 0; binary variable Used to indicate whether smart terminal k selects smart terminal k' as a relay to access base station n. If yes, it is 1, otherwise it is 0; smart terminal subset represents all directly connected smart terminals within the coverage area of base station n, M w Indicates the amount of data for the model parameters.
[0200] Step S3: Construct the optimization problem of minimizing the total service delay;
[0201] The optimization problem of minimizing the total service latency is transformed into two sub-problems: Sub-problem 1 and Sub-problem 2. Sub-problem 1 is to optimize the training latency of the model training phase in each training iteration, and Sub-problem 2 is to optimize the transmission latency of the model aggregation phase.
[0202] The optimization problem of minimizing the total service delay is:
[0203]
[0204]
[0205]
[0206]
[0207] Among them, the decision variables include the model split method Collaborative node selection Multi-domain resource allocation method in the model training phase / model aggregation phase
[0208] C1 indicates that the total computing resources allocated by any base station to smart terminals that select training modes 2 and 3 cannot exceed the base station upper limit; C2 indicates that the bandwidth resources allocated by any base station to the cell link cannot exceed the corresponding upper limit, and C3 and C4 represent the corresponding collaborative link and D2D link bandwidth resource constraints respectively; C5 indicates that the sum of the transmission power of smart terminals accessing any base station and the sum of the transmission power of all base stations have an upper limit, and the transmission power of any smart terminal or base station cannot exceed its maximum transmission power; C6 is a constraint on the model partitioning method of each smart terminal, C7 indicates that any smart terminal can only choose one base station to access; C8 indicates that in the model training stage, for any smart terminal, in addition to accessing the base station, only one collaborative base station can be selected; C9 indicates that in the model aggregation stage, for any smart terminal, if it needs to access the base station through a relay, only one smart terminal within the coverage of the base station can be selected as a relay node;
[0209] The optimization model for subproblem 1 is:
[0210]
[0211]
[0212] C1, C3, C6, C8;
[0213] Among them, C2′ indicates that the bandwidth resources allocated by any base station to the cell link during the model training phase cannot exceed the corresponding upper limit; C5′ is the sub-constraint of the sum of the terminal transmit power accessing any base station during the model training phase, the total base station transmit power, and the transmit power range of each terminal; C7′ indicates that during the model training phase, any terminal can only choose to access one of the accessible base stations;
[0214] The optimization model for subproblem 2 is:
[0215]
[0216] C4, C9;
[0217] Among them, C2″ indicates that the bandwidth resources allocated by any base station to the cell link during the model aggregation stage cannot exceed the corresponding upper limit; C5″ is the sum of the terminal transmission power accessing any base station during the model aggregation stage and the sub-constraint of the transmission power range of each terminal; C7″ indicates that during the model aggregation stage, any terminal can only select one base station for uploading.
[0218] Step S4: Use the shortest path search algorithm to jointly optimize the model segmentation method, collaborative node selection, and multi-domain resource scheduling method in the model training phase and the model aggregation phase. Specifically:
[0219] Step S4-1: allocating initial values of the multi-domain resource allocation method for the model training phase and the model aggregation phase;
[0220] Assign the same initial value of the multi-domain resource allocation method in the model training phase to each smart terminal k to eliminate the impact of differences in resource allocation;
[0221] Assign the same initial value of the multi-domain resource allocation method in the model aggregation phase to each smart terminal k
[0222] Step S4-2: Select the shortest path search algorithm to optimize the model segmentation method selection and collaborative node selection in sub-problem 1;
[0223] Specifically:
[0224] Construct a weighted directed graph G for each intelligent terminal k in subproblem 1 train =(O train ,E train );
[0225] Among them, O train is a node set, It is the first-layer node, representing the first to v0 layers of the intelligent terminal k training model; is a layer 2 node, representing base station n x Train the model from layer v1 to layer v2; It is a layer 3 node, representing base station n y Training model layers v3 to v; e train is the edge between nodes, e train ∈E train It represents the selection method of collaborative nodes, and its weight represents the transmission and computing delay;
[0226] Add a pair of virtual start / end vertices s k ,e k As the source and destination nodes in the graph, the weight of the edges connecting to other nodes in the graph is 0, and the optimization goal becomes searching for the nodes from s k to e k The shortest path, all vertices on this path form the corresponding optimal model segmentation method and collaborative node selection;
[0227] That is in They represent the optimal access base station selection, cooperative base station selection and model segmentation method for intelligent terminal k respectively;
[0228] like Figure 2 As shown, the operation flow of selecting the short path search algorithm for sub-problem 1 is:
[0229] S4-2-1: Input intelligent terminal k transmits the output data of the model layer v to each base station n x Transmission delay Each base station n x Transmit the output data of the model layer v to other base stations n y Transmission delay Processing delay of layer v of the computing model of intelligent terminal k And each base station n x Calculate the processing delay of layer v of the model
[0230] S4-2-2: Calculate each node in the third layer Segmentation overhead And let
[0231] Indicates a layer 3 relay node The segmentation cost is 0;
[0232] S4-2-3: Layer 2 nodes According to the starting segmentation layer v1 and base station n x Divide into multiple subsets, and calculate the segmentation cost within each subset first
[0233] S4-2-4: Get the optimal partitioning cost in each subset Corresponding termination segmentation layer and corresponding Layer 3 base station And let Represents a layer 2 relay node The segmentation cost is 0, which selects any relay node in the third layer connect;
[0234] S4-2-5: Calculate each node in the first layer Segmentation overhead
[0235] S4-2-6: Select the termination segmentation layer that minimizes the segmentation overhead And get the corresponding second-layer base station
[0236] Corresponding to the second layer termination split layer And the corresponding 3rd layer base station
[0237] S4-2-7: Output the shortest path of smart terminal k
[0238] Based on the optimal model segmentation method and collaborative node selection method Optimize multi-domain resource allocation during model training Transform subproblem 1 into a convex optimization problem P2′ as follows:
[0239]
[0240] stC1,C2′,C3,C5′;
[0241] in, and The optimizations between them do not affect each other;
[0242] Step S4-3: Select the shortest path search algorithm to optimize the model segmentation method and collaborative node selection in sub-problem 2, specifically:
[0243] Construct a weighted directed graph G for each intelligent terminal k aggr,tran =(O aggr,tran ,E aggr,tran ), node collection Among them k is the only first-layer node, representing smart terminal k; It is the second layer node, representing all intelligent terminals; is the third layer node, representing all base stations;
[0244] The edge between nodes aggr,tran ∈E aggr,tran Indicates the selection method of the collaborative node, and its weight represents the transmission delay; add a pair of virtual start / end vertices s k ,e k As the source node and destination node in the graph, the weight of the edge connecting to other nodes in the graph is 0; k to e k All vertices on the shortest path form the corresponding optimal collaborative node selection method, that is, like but in, They represent the optimal intelligent terminal selection and base station selection of intelligent terminal k respectively;
[0245] The operation flow of selecting the shortest path search algorithm for sub-problem 1 is:
[0246] like Figure 3As shown, step S4-3-1: input smart terminal k to transmit model parameters to each smart terminal k x Transmission delay Each intelligent terminal k x Transmit the model parameters to each base station n y Transmission delay
[0247] Step S4-3-2: Calculate each node in the third layer Transmission overhead
[0248] Step S4-3-3: Calculate each node in the second layer Transmission overhead And let That is, the delay of the intelligent terminal transmitting the model parameters to itself is 0;
[0249] Step S4-3-4: Layer 1 node o k Select the layer 2 node that minimizes the transmission overhead And further get the corresponding third-layer base station
[0250] Step S4-3-5: Output the shortest path of smart terminal k
[0251] Based on the optimal collaborative node selection method Optimize the multi-domain resource allocation method during the model aggregation phase Transform subproblem 2 into a convex optimization problem P3′ as follows:
[0252] stC2″,C4,C5″;
[0253] in, and The optimizations do not affect each other.
[0254] In order to verify the effectiveness of the adaptive split federated learning model of the present invention, according to the setting of relevant simulation parameters, in the model training stage and the model aggregation stage, in order to more prominently and clearly display the collaboration between the edge and the smart terminal; Figure 5As shown in the figure, during the model training phase, smart terminals 2 and 4, due to their sufficient computing power, chose to conduct only local training. Smart terminals 1, 3, 5, and 6 chose to collaborate with dual base stations. Since smart terminal 1 has a relatively high computing power, the segmentation layer of its smart terminal side model is selected as the 4th layer, while the segmentation layer of smart terminal side model of smart terminals 3, 5, and 6 is selected as the 1st layer. Taking into account their own computing power and the channel conditions between the base stations that can directly communicate, smart terminals 7, 8, and 9 chose to collaborate with a single base station. Figure 6 As shown, in the model aggregation stage, in order to speed up the transmission of model parameters, smart terminals 1, 3 and 9 select other smart terminals as relays for transmission.
[0255] Furthermore, the accuracy of the proposed learning framework is verified based on the optimal model segmentation method for each intelligent terminal, the selection of collaborative nodes, and the multi-domain resource allocation method in the model training phase and the aggregation phase. It is also compared with some benchmark algorithms. The simulation results are as follows: Figure 7 As shown, the algorithms compared include: centralized learning, which trains the entire ResNet18 neural network using the HAM10000 dataset using only one base station; split learning (SL), which performs serial collaborative training with one base station and nine smart terminals, where the split layer between the smart terminal-side model and the service-side model is fixed at layer 2; federated learning (FL), which performs parallel collaborative training with one base station and nine smart terminals, where each smart terminal trains the entire neural network on its local dataset, and the base station aggregates and updates the model; and split federated learning (SFL), which combines the two approaches: parallel collaborative training with one base station and nine smart terminals, where each smart terminal trains only up to layer 2, and the base station trains the rest in parallel, with both the smart terminal-side and base station-side models aggregated and updated after each iteration. The test accuracy is the average of the model accuracies calculated by all smart terminals on their respective test sets, and the batch size used during training is 256.
[0256] from Figure 7As can be seen in the figure, the proposed algorithm gradually converges over 100 iterations, achieving a final test accuracy that stabilizes at around 75%, similar to the convergence trends of several other algorithms. Notably, in the initial phase (iterations 0 to 20), the test accuracy of the proposed algorithm experiences a period of decline followed by an increase. This phenomenon is primarily attributed to differences in the model segmentation methods, model aggregation nodes, and data distribution used by different smart terminals. Therefore, after completing edge model aggregation and updating model parameters in the early stages of the iteration, these inadequately adjusted parameters are unable to adapt well to the dataset characteristics of certain smart terminals, resulting in an initial decrease in test accuracy. As iterations progress, through continuous optimization and adjustment, the algorithm gradually overcomes these initial challenges, allowing the test accuracy to recover and stabilize. In contrast, centralized learning exhibits higher test accuracy in the early stages of the iteration because it trains only on a single node, thus avoiding the issues associated with dataset variability and model aggregation. SL achieves high initial accuracy close to that of centralized learning because it trains on a smart terminal-by-device basis, similarly avoiding these issues. However, both approaches come at the expense of flexibility and result in longer training latency.
[0257] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A 6G computing network adaptive splitting federated learning method for distributed AI training services, characterized by: The method comprises the following steps: Step S1: Establish a 6G computing network model and build an adaptive split federated learning model for distributed AI training services; The 6G computing network model includes a central cloud server, base stations and Smart terminals, base stations use a collection of Indicates that each base station Equipped with a mobile edge computing server; Step S2: Define a wireless communication model and analyze the delay of each smart terminal in the model training phase and the model aggregation phase; The wireless communication model is to express the total bandwidth used by the cell link, the cooperative link and the D2D link as ,The frequency bands used by cell links, cooperative links and D2D links are different; Each base station The allocated orthogonal channel resources are used express, satisfy ; All base stations are connected to the central cloud server via different high-bandwidth backhaul links, and the reachable rate of the backhaul links is fixed; Step S2-1: Analyze the latency of each smart terminal during the model training phase; Step S2-2: Analyze the time delay of each smart terminal during the model aggregation phase; Step S3: Construct an optimization problem for minimizing the total service delay. This problem is converted into two subproblems: Subproblem 1 and Subproblem 2. Subproblem 1 is to optimize the training delay of the model training phase in each training iteration, and Subproblem 2 is to optimize the transmission delay of the model aggregation phase. Step S4: Use the shortest path search algorithm to jointly optimize the model segmentation method, collaborative node selection, and multi-domain resource scheduling method in the model training phase and the model aggregation phase.
2. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 1 is characterized by: The mobile edge computing server has computing resources and storage resources. Indicates that storage resources are used express; The smart terminal uses a collection Indicates that each smart terminal The computing and storage resources available and express; Own local datasets Indicates that represents the number of samples, and Represent the corresponding sample input features and output labels, respectively. represents the dimension of the sample input feature, and let Indicates the total dataset size of all smart terminals; The relationship between the computing resources and storage resources of the intelligent terminal and the computing resources and storage resources of the base station is: .
3. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 1 is characterized by: In step S2-1, the delay of each smart terminal in the model training phase is analyzed, specifically: Step S2-1-1: Determine the smart terminal in the model training phase The local loss function and the set of segmentation layers of the DNN model; Each smart terminal The local loss function ,in, represents the sample loss function, Input features for the sample, Output labels for samples; are model parameters; use Represents the set of optional segmentation layers in the DNN model, using Indicates terminal Model training split layer selection; Step S2-1-2: Divide each terminal Model training latency , divide the training modes and determine the update method of each training mode; The training modes include training mode 1, training mode 2 and training mode 3. The training mode for performing model training completely locally is training mode 1, the training mode for performing model training through edge-end collaboration is training mode 2, and the training mode through edge-end collaboration and edge-edge collaboration is training mode 3. The subset of intelligent terminals in training mode 1 is ; Smart terminal In the The local model parameters in the round iteration are expressed as , each smart terminal Update the local model parameters using the stochastic gradient descent method: ; in, Indicates the learning rate of the model in local training, Indicates smart terminal Computed local model gradients; For smart terminals The partial derivative vector of the local loss function with respect to the model parameters; Training mode 1 only includes local model training delay, local model training delay ; Among them, Represents the computational effort of the forward and backward propagation processes for processing a data sample.
4. The method for adaptively splitting federated learning of 6G computing power networks for distributed AI training services according to claim 3, characterized in that: The subset of intelligent terminals in training mode 2 is ; Smart terminal In the Local model parameters in round iteration Expressed as ,in and Respectively represent the training mode 2 terminal side model and the training mode 2 base station side model; In training mode 2, the terminal side model of training mode 2 needs to be trained. The terminal side model delay of training mode 2 ,in, Indicates the computational effort of the forward propagation process of the training mode 2 terminal-side model for processing one data sample; Training mode 2: Segmentation layer output data of the terminal side model It is obtained by the following formula: ; in, Indicates that given the model parameters Next Input With output The mapping function between Will and Transmit to base station Delay , where the binary variable To indicate the terminal Whether to select a base station Access is made, if yes, it is 1, otherwise it is 0; Indicates the subset of access base stations, Indicates the data size of the segmentation layer of a data sample; The terminal side model of training mode 2 uses SGD to update the terminal side model of training mode 2. The update formula is: ; Latency ; in, Indicates the computational cost of the back propagation process of the training mode 2 terminal side model for processing a data sample; The training mode 2 terminal side model will be updated and training mode 2 base station side model Stitch them together to get a new local model ; The training mode 2 base station side model needs to be trained, and the training and update delay of the training mode 2 base station side model ,in It represents the computational amount of the forward propagation and back propagation process of the training mode 2 base station side model for processing one data sample, Indicates base station Assigned to smart terminals The computing resources used; Segmentation layer gradient and updated training mode 2 base station side model parameters are transmitted back to the smart terminal together , the delay of this part ,in Indicates the size of the segmentation layer gradient data of a data sample; Prediction results on the base station side It is obtained by the following formula: ; According to the prediction results and the true value label , calculate the average gradient of the loss function , the base station side model updates parameters through SGD, and the update formula is: ; in, Represents the learning rate of the model trained on the base station side; according to the chain rule of gradient calculation, the model parameters will be updated layer by layer from the output layer to the segmentation layer, and the segmentation layer gradient will be obtained .
5. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 3 is characterized by: The subset of intelligent terminals in training mode 3 is ; Smart terminal In the Local model parameters in round iteration Expressed as ,in, Respectively represent the terminal side model, the access base station side model and the cooperative base station side model; The terminal side model of training mode 3 is trained, and its delay ,in Represents the computational amount of the forward propagation process of the terminal side model to process a data sample; the calculated terminal side model segmentation layer output data and Transmit to access base station , its delay ,in Represents a segmentation layer for a data sample Data size; Train the access base station side model of training mode 3, delay ,in, Indicates the computational effort of the forward propagation process of the access base station side model to process one data sample; The split layer output results of the access base station side model It is obtained by the following formula: ; Will and Transmit to cooperative base station Delay , where the binary variable To indicate the terminal Whether to select a base station Access base station Collaborative training model, if yes, then 1, otherwise 0; represents the subset of cooperative base stations, Represents a segmentation layer for a data sample Data size; Training and updating of the cooperative base station side model of training mode 3, delay ,in, represents the computational effort of the forward and backward propagation processes of the collaborative base station side model to process a data sample, Indicates cooperative base station Assign to terminal The computing resources used; Segmentation layer gradient and updated cooperative base station side model parameters are transmitted back to the access base station , the delay of this part ,in, Represents a segmentation layer for a data sample The amount of gradient data; Prediction results on the collaborative base station side It is obtained by the following formula: ; According to the received segmentation layer gradient , the access base station side model uses SGD to update parameters until the segmentation layer, and the delay of this part ,in Indicates the computational effort of the back-propagation process of the access base station model to process one data sample; Access base station Split layer gradient , Updated access base station side model And the collaborative base station side model Transmitted to the corresponding terminal together , its delay ,in, Represents a segmentation layer for a data sample The amount of gradient data; The terminal side model is also updated using SGD, and its delay ,in Indicates the computational cost of the back propagation process of the terminal side model to process a data sample; finally, the terminal The terminal side model will be updated , access base station side model and collaborative base station side model Stitch them together to get a new local model .
6. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 1 is characterized by: In step S2-2, the delay of each smart terminal in the model aggregation stage is analyzed, specifically: During the model aggregation phase, each terminal Directly transmit the local model through D2D link relay or cell link Upload to selected base station Aggregation transmission delay Expressed as: ; Among them, the binary variable To indicate the terminal Whether to select a base station Upload the model, if yes, it is 1, otherwise it is 0; binary variable To indicate the terminal Whether to select terminal Access base station as a relay , if yes, then 1, otherwise 0; terminal subset Indicates base station All directly connected terminals within the coverage area, Indicates the amount of data for the model parameters.
7. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 1 is characterized by: The optimization problem of minimizing the total service delay is: ; ; ; ; ; ; ; ; ; ; Among them, the decision variables include the model split method , collaborative node selection Multi-domain resource allocation method in the model training phase / model aggregation phase ; C1 indicates that the total computing resources allocated by any base station to terminals selecting training modes 2 and 3 cannot exceed the base station upper limit; C2 indicates that the bandwidth resources allocated by any base station to the cell link cannot exceed the corresponding upper limit, and C3 and C4 represent the corresponding collaborative link and D2D link bandwidth resource constraints respectively; C5 indicates that the sum of the transmit power of terminals accessing any base station and the sum of the transmit power of all base stations have an upper limit, and the transmit power of any terminal or base station cannot exceed its maximum transmit power; C6 is a constraint on the model partitioning method of each terminal, C7 indicates that any terminal can only choose one base station to access; C8 indicates that in the model training phase, for any terminal, in addition to accessing the base station, only one collaborative base station can be selected; C9 indicates that in the model aggregation phase, for any terminal, if it needs to access the base station through a relay, only one terminal within the coverage area of the base station can be selected as a relay node; The optimization model for subproblem 1 is: ; ; ; ; ; in, Indicates that the bandwidth resources allocated by any base station to the cell link during the model training phase cannot exceed the corresponding upper limit; Sub-constraints for the sum of the transmit power of terminals accessing any base station during the model training phase, the total transmit power of base stations, and the transmit power range of each terminal; This means that during the model training phase, any terminal can only select one of the accessible base stations for access; The optimization model for subproblem 2 is: ; ; ; ; ; in, Indicates that the bandwidth resources allocated by any base station to the cell link during the model aggregation phase cannot exceed the corresponding upper limit; The sum of the transmit power of terminals accessing any base station during the model aggregation phase and the sub-constraints of the transmit power range of each terminal; This means that during the model aggregation phase, any terminal can only select one base station for uploading.
8. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 1 is characterized by: In step S4, the shortest path search algorithm is used to jointly optimize the model segmentation method, collaborative node selection, and multi-domain resource scheduling method in the model training phase and the model aggregation phase, specifically: Step S4-1: allocating initial values of the multi-domain resource allocation method for the model training phase and the model aggregation phase; For each terminal Allocate the same initial value of the multi-domain resource allocation method during the model training phase , to eliminate the impact of differences in resource allocation; For each terminal Allocate the same model aggregation phase multi-domain resource allocation method initial value ; Step S4-2: Select the shortest path search algorithm to optimize the model segmentation method selection and collaborative node selection in sub-problem 1; Specifically: For each terminal in subproblem 1 Construct a weighted directed graph ; in, is a node set, ; It is a layer 1 node, representing the terminal Training model layers 1 to 2 layer; It is a layer 2 node, representing a base station The training model To layer; It is a layer 3 node, representing a base station The training model To layer; is the edge between nodes, It represents the selection method of collaborative nodes, and its weight represents the transmission and computing delay; Add a pair of virtual start / end vertices As the source and destination nodes in the graph, the weight of the edges connecting to other nodes in the graph is 0, and the optimization goal becomes to search for arrive The shortest path, all vertices on this path form the corresponding optimal model segmentation method and collaborative node selection; That is ,in Respectively represent terminals Optimal access base station selection, collaborative base station selection, and model segmentation methods; The operation flow of the shortest path search algorithm for subproblem 1 is: S4-2-1: Input Terminal The model Layer output data is transmitted to each base station Transmission delay , each base station The model Layer output data is transmitted to other base stations Transmission delay ,terminal Computational Model Layer processing delay , and each base station Computational Model Layer processing delay ; S4-2-2: Calculate each node in the third layer Segmentation overhead ; and make , representing a layer 3 relay node The segmentation cost is 0; S4-2-3: Layer 2 nodes According to the initial segmentation layer and base stations Divide into multiple subsets, and calculate the segmentation cost within each subset first ; S4-2-4: Get the optimal partitioning cost in each subset , corresponding to the termination segmentation layer and corresponding layer 3 base station ; and make , representing the second-layer relay node The segmentation cost is 0, which selects any relay node in the third layer connect; S4-2-5: Calculate each node in the first layer Segmentation overhead ; S4-2-6: Select the termination segmentation layer that minimizes the segmentation overhead , and get the corresponding second-layer base station , corresponding to the second layer termination segmentation layer And the corresponding 3rd layer base station ; S4-2-7: Output terminal The shortest path ; Based on the optimal model segmentation method and collaborative node selection method , optimize the multi-domain resource allocation method during the model training phase ; Transform subproblem 1 into a convex optimization problem as follows : ; ; in, , , , and The optimizations between them do not affect each other; Step S4-3: Select the shortest path search algorithm to optimize the model segmentation method selection and collaborative node selection in sub-problem 2.
9. The 6G computing network adaptive splitting federated learning method for distributed AI training services according to claim 8, characterized in that: In step S4-3, the model segmentation method selection and collaborative node selection in the shortest path search algorithm optimization sub-problem 2 are specifically: For each terminal Construct a weighted directed graph , node set ,in Is the only layer 1 node, representing the terminal ; is the second-layer node, representing all terminals; is the third layer node, representing all base stations; Edges between nodes Indicates the selection method of the collaborative node, and its weight represents the transmission delay; add a pair of virtual start / end vertices As the source node and destination node in the graph, the weight of the edge connecting to other nodes in the graph is 0; arrive All vertices on the shortest path form the corresponding optimal collaborative node selection method, that is, ,like ,but ,in, Respectively represent terminals Optimal terminal selection and base station selection; The operation flow of selecting the shortest path search algorithm for sub-problem 1 is: Step S4-3-1: Input terminal Transfer model parameters to each terminal Transmission delay , each terminal Transmit model parameters to each base station Transmission delay ; Step S4-3-2: Calculate each node in the third layer Transmission overhead ; Step S4-3-3: Calculate each node in the second layer Transmission overhead , and let , that is, the delay of the terminal transmitting the model parameters to itself is 0; Step S4-3-4: Layer 1 Node Select the layer 2 node that minimizes the transmission overhead , and further obtain the corresponding third-layer base station ; Step S4-3-5: Output terminal The shortest path ; Based on the optimal collaborative node selection method , optimize the multi-domain resource allocation method in the model aggregation stage ; Transform subproblem 2 into a convex optimization problem as follows : ; ; in, The optimizations do not affect each other.