Model training method, resource management method for model training, and related apparatus
By dynamically segmenting the global model in the edge network according to the differences in terminal device capabilities and wireless resource status, and using the computing power of the base station for collaborative training, the problems of wasted computing power and latency overhead in the edge network are solved, and efficient artificial intelligence model training is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2026-03-05
AI Technical Summary
Existing technologies for training artificial intelligence models in edge networks suffer from wasted computing power and latency overhead, especially in resource-constrained wireless networks where differences in computing power among terminal devices and variations in wireless channels lead to low training efficiency.
By dividing the global model into multiple sub-models and dynamically adjusting the segmentation layers according to the differences in terminal device capabilities and wireless resource status, the powerful computing capabilities of the base station are utilized for collaborative training, thereby optimizing the management of training rounds and resource allocation.
This improved the efficiency of model training, made full use of the base station's computing power, reduced latency caused by device heterogeneity, and achieved efficient model training.
Smart Images

Figure CN2024115161_05032026_PF_FP_ABST
Abstract
Description
Model training methods, resource management methods for model training, and related devices Technical Field
[0001] This application relates to the field of wireless communication technology, and more specifically, to a model training method, a resource management method for model training, and related apparatus. Background Technology
[0002] With the development of communication technology, the integration of edge computing and artificial intelligence helps to utilize edge resources in distributed intelligent services. In edge networks, high-performance intelligent models can be obtained by training artificial intelligence models through various learning methods.
[0003] However, related training methods may waste the powerful computing capabilities of base stations or cause significant latency overhead. Therefore, how to efficiently train artificial intelligence models is an urgent problem to be solved.
[0004] Summary of the Invention
[0005] This application provides a model training method, a resource management method for model training, and related apparatus. The various aspects involved in the embodiments of this application are described below.
[0006] In a first aspect, a model training method is provided, comprising: a first terminal device receiving a first sub-model in a global model, the first sub-model being determined according to a first segmentation layer; the first terminal device training the first sub-model; wherein the global model further includes a second sub-model, and the training of the first sub-model and the second sub-model is used together to determine a first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0007] Secondly, a model training method is provided, comprising: a network device sending a first sub-model in a global model to a first terminal device, the first sub-model being determined according to a first segmentation layer; the network device training a second sub-model in the global model; wherein the training of the first sub-model and the second sub-model is used together to determine a first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0008] Thirdly, a resource management method for model training is provided, comprising: decoupling the model training process into a single training round; determining a first constraint for the single training round; wherein the first constraint is used to determine a first management scheme, the first management scheme comprising multiple segmentation layers corresponding to multiple terminal devices performing the model training, the multiple terminal devices including a first terminal device, the multiple segmentation layers including a first segmentation layer corresponding to the first terminal device, and the first segmentation layer being related to the capabilities of the first terminal device.
[0009] Fourthly, a model training apparatus is provided, the model training apparatus being a first terminal device, the first terminal device comprising: a receiving unit for receiving a first sub-model in a global model, the first sub-model being determined according to a first segmentation layer; and a processing unit for training the first sub-model; wherein the global model further comprises a second sub-model, the training of the first sub-model and the second sub-model being jointly used to determine a first local model; the first segmentation layer being determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model being used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0010] Fifthly, a model training apparatus is provided, the model training apparatus being a network device, the network device comprising: a sending unit for sending a first sub-model in a global model to a first terminal device, the first sub-model being determined according to a first segmentation layer; and a processing unit for training a second sub-model in the global model; wherein the training of the first sub-model and the second sub-model is used together to determine a first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0011] In a sixth aspect, a resource management device for model training is provided, the resource management device comprising: a first processing unit for decoupling the model training process into a single training epoch; and a second processing unit for determining a first constraint for the single training epoch; wherein the first constraint is used to determine a first management scheme, the first management scheme comprising multiple segmentation layers corresponding to multiple terminal devices performing the model training, the multiple terminal devices including a first terminal device, the multiple segmentation layers including a first segmentation layer corresponding to the first terminal device, and the first segmentation layer being related to the capabilities of the first terminal device.
[0012] A seventh aspect provides a communication device including a memory and a processor, the memory for storing a program and the processor for calling the program in the memory to perform the method as described in any one of the first to third aspects.
[0013] Eighth aspect, an apparatus is provided, including a processor for calling a program from memory to perform the method as described in any one of the first to third aspects.
[0014] A ninth aspect provides a chip including a processor for calling a program from memory, causing a device having the chip mounted to perform the method as described in any one of the first to third aspects.
[0015] A tenth aspect provides a computer-readable storage medium having a program stored thereon that causes a computer to perform the method described in any one of the first to third aspects.
[0016] Eleventh aspect: A computer program product is provided, including a program that causes a computer to perform the method as described in any one of the first to third aspects.
[0017] In a twelfth aspect, a computer program is provided that causes a computer to perform the method described in any one of the first to third aspects.
[0018] In this embodiment, the first terminal device trains a first sub-model in the global model. The training result of this sub-model, together with the training result of the second sub-model in the global model, determines the first local model corresponding to the first terminal device. The first segmentation layer of the first sub-model is determined based on the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the first local model participates in the model aggregation of the current training round. In the current training round of the global model, the association between the segmentation layer and the capabilities of the terminal device, as well as the possibility that the training result corresponding to the terminal device may not participate in the model aggregation, both take into account the differences in model training performed by different terminal devices, thereby improving training efficiency. Attached Figure Description
[0019] Figure 1 shows the wireless communication system used in an embodiment of this application.
[0020] Figure 2 is a flowchart illustrating a model training method provided in an embodiment of this application.
[0021] Figure 3 is a schematic diagram of one possible implementation of the method shown in Figure 2.
[0022] Figure 4 is a flowchart illustrating one possible implementation of the method shown in Figure 2.
[0023] Figure 5 is a flowchart illustrating a resource management method for model training provided in an embodiment of this application.
[0024] Figure 6 is a flowchart illustrating one possible implementation of the method shown in Figure 5.
[0025] Figure 7 is a schematic diagram of the structure of a model training device provided in an embodiment of this application.
[0026] Figure 8 is a schematic diagram of another model training device provided in an embodiment of this application.
[0027] Figure 9 is a schematic diagram of the structure of a resource management device for model training provided in an embodiment of this application.
[0028] Figure 10 is a schematic block diagram of a communication device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art without creative effort regarding the embodiments of this application are within the scope of protection of this application.
[0030] The embodiments of this application can be applied to various communication systems. For example, they can be applied to Global System for Mobile Communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), General Packet Radio Service (GPRS), Long Term Evolution (LTE), Advanced Long Term Evolution (LTE-A), New Radio (NR), evolution systems of NR, LTE-based access to unlicensed spectrum (LTE-U), NR-based access to unlicensed spectrum (NR-U), NTN systems, Universal Mobile Telecommunications System (UMTS), Wireless Local Area Networks (WLAN), Wireless Fidelity (WiFi), and 5th-generation (5G) systems. The embodiments of this application can also be applied to other communication systems, such as future communication systems. The future communication system could be, for example, a 6th-generation (6G) mobile communication system or a satellite communication system.
[0031] Traditional communication systems support a limited number of connections and are easy to implement. However, with the development of communication technology, communication systems can support not only traditional cellular communication but also one or more other types of communication. For example, a communication system can support one or more of the following communication methods: device-to-device (D2D) communication, machine-to-machine (M2M) communication, machine-type communication (MTC), enhanced machine-type communication (eMTC), vehicle-to-vehicle (V2V) communication, and vehicle-to-everything (V2X) communication. The embodiments of this application can also be applied to communication systems that support the above-mentioned communication methods.
[0032] The communication system in this application embodiment can be applied to carrier aggregation (CA) scenarios, dual connectivity (DC) scenarios, and standalone (SA) network deployment scenarios.
[0033] The communication system in this application embodiment can be applied to unlicensed spectrum. This unlicensed spectrum can also be considered a shared spectrum. Alternatively, the communication system in this application embodiment can also be applied to licensed spectrum. This licensed spectrum can also be considered a dedicated spectrum.
[0034] The embodiments of this application can be applied to NTN systems. As an example, the NTN system may include a 4G-based NTN system, an NR-based NTN system, an Internet of Things (IoT)-based NTN system, and a narrowband Internet of Things (NB-IoT)-based NTN system.
[0035] A communication system may include one or more terminal devices. The terminal devices mentioned in the embodiments of this application may also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station (MS), mobile terminal (MT), remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0036] In some embodiments, the terminal device may be a station (ST) in a WLAN. In some embodiments, the terminal device may be a cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA) device, handheld device with wireless communication capabilities, computing device or other processing device connected to a wireless modem, in-vehicle device, wearable device, terminal device in a next-generation communication system (e.g., NR system), or terminal device in a future evolved public land mobile network (PLMN) network, etc.
[0037] In some embodiments, the terminal device may be a device that provides voice and / or data connectivity to a user. For example, the terminal device may be a handheld device, an in-vehicle device, etc., with wireless connectivity. As some specific examples, the terminal device may be a mobile phone, tablet, laptop, PDA, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc.
[0038] In some embodiments, the terminal device may be deployed on land. For example, the terminal device may be deployed indoors or outdoors. In some embodiments, the terminal device may be deployed on water, such as on a ship. In some embodiments, the terminal device may be deployed in the air, such as on an airplane, balloon, or satellite.
[0039] In addition to terminal devices, the communication system may also include one or more network devices. In this embodiment, the network device can be a device for communicating with the terminal device; this network device may also be referred to as an access network device or a radio access network device. For example, the network device may be a base station. In this embodiment, the network device may refer to a radio access network (RAN) node (or device) that connects the terminal device to the wireless network. A base station can broadly encompass, or be replaced by, various names including: NodeB, evolved NodeB (eNB), next-generation NodeB (gNB), relay station, transmitting and receiving point (TRP), transmitting point (TP), master station (MeNB), secondary station (SeNB), multi-mode radio (MSR) node, home base station, network controller, access node, wireless node, access point (AP), transmission node, transceiver node, baseband unit (BBU), remote radio unit (RRU), active antenna unit (AAU), remote radio head (RRH), central unit (CU), distributed unit (DU), positioning node, etc. A base station can be a macro base station, micro base station, relay node, donor node, or similar, or a combination thereof. A base station can also refer to a communication module, modem, or chip installed within the aforementioned equipment or apparatus. Base stations can also be mobile switching centers, devices that perform base station functions in D2D, V2X, and M2M communications, network-side devices in 6G networks, and devices that perform base station functions in future communication systems. Base stations can support networks with the same or different access technologies. The embodiments of this application do not limit the specific technologies or device forms used in the network equipment.
[0040] Base stations can be fixed or mobile. For example, a helicopter or drone can be configured to act as a mobile base station, and one or more cells can move depending on the location of the mobile base station. In other examples, a helicopter or drone can be configured as a device to communicate with another base station.
[0041] In some deployments, the network device in this application embodiment may refer to a CU or a DU, or the network device may include both a CU and a DU. The gNB may also include an AAU.
[0042] By way of example and not limitation, in the embodiments of this application, the network device may have mobility characteristics; for example, the network device may be a mobile device. In some embodiments of this application, the network device may be a satellite or a balloon station. In some embodiments of this application, the network device may also be a base station located on land, water, or other similar locations.
[0043] In this embodiment, the network device can provide services to a cell. The terminal device communicates with the network device through the transmission resources (e.g., frequency domain resources, or spectrum resources) used by the cell. The cell can be the cell corresponding to the network device (e.g., a base station). The cell can belong to a macro base station or to a base station corresponding to a small cell. The small cell can include: metro cell, micro cell, pico cell, femto cell, etc. These small cells have the characteristics of small coverage area and low transmission power, and are suitable for providing high-speed data transmission services.
[0044] For example, Figure 1 is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. As shown in Figure 1, the communication system 100 may include a network device 110, which may be a device that communicates with a terminal device 120 (or a communication terminal, terminal). The network device 110 can provide communication coverage for a specific geographical area and can communicate with terminal devices located within that coverage area.
[0045] Figure 1 illustrates an exemplary network device and two terminal devices. In some embodiments of this application, the communication system 100 may include multiple network devices and each network device may include other numbers of terminal devices within its coverage area. This application does not limit this aspect.
[0046] In this embodiment of the application, the communication system shown in FIG1 also includes other network entities such as a mobility management entity (MME) and an access and mobility management function (AMF), which are not limited in this embodiment of the application.
[0047] It should be understood that devices with communication functions in the network / system of this application embodiment can be referred to as communication devices. Taking the communication system 100 shown in FIG1 as an example, the communication device may include a network device 110 and a terminal device 120 with communication functions. The network device 110 and the terminal device 120 can be the specific devices described above, which will not be repeated here. The communication device may also include other devices in the communication system 100, such as network controllers, mobility management entities, and other network entities. This application embodiment does not limit this.
[0048] To facilitate a detailed explanation of the innovative aspects of the technical solution, some relevant technical knowledge involved in the embodiments of this application is first introduced. The following related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0049] With the continuous development of communication technologies, intelligent services are placing increasingly higher demands on the performance of artificial intelligence (AI) models. For example, driven by the vision of ubiquitous intelligence in 6G networks, the integration of edge computing and artificial intelligence has rapidly developed by fully utilizing edge resources for distributed intelligent services. Examples of distributed intelligent services include autonomous driving, smart transportation, and object detection. Edge resources used to provide distributed intelligent services include edge computing, communication, and storage.
[0050] Edge computing enables edge devices in a network to train artificial intelligence models to obtain high-performance intelligent models. However, efficiently obtaining high-performance intelligent models is a challenge that urgently needs to be addressed, especially for resource-constrained wireless networks. Resource constraints can be due to limitations in the computing and storage capabilities of edge devices, or limitations in wireless resources themselves.
[0051] Currently, the main methods for training artificial intelligence models in edge networks include federated learning, segmentation learning, and federated segmentation learning. The following section uses the training of deep neural networks in artificial intelligence models on base stations and terminal devices as examples to illustrate these three learning methods.
[0052] Federated learning, as a distributed intelligence paradigm, can train artificial intelligence models to achieve intelligent services. Typically, a federated learning paradigm in an edge network consists of a base station and multiple terminal devices. The federated learning process is divided into multiple training rounds. In a certain training round, the federated learning process includes the following steps S11-S13.
[0053] S11: The base station broadcasts a global model to all terminal devices. This global model is a deep neural network.
[0054] S12: All terminal devices use local datasets to train the global model in parallel to obtain local models, and then transmit their local models to the base station via wireless channels.
[0055] S13: The base station aggregates the local models of all terminal device transmissions to obtain a new global model.
[0056] The base station and terminal equipment repeat the process described in S11-S13 until the global model meets the preset convergence conditions, at which point federated learning is completed.
[0057] As shown in process S11-13, in federated learning, terminal devices need to train a complete artificial intelligence model. However, terminal devices with limited resources (such as computing and storage) cannot handle the training of large-scale artificial intelligence models. Furthermore, the base station is only responsible for aggregating the local models uploaded by the terminal devices, and the powerful computing capabilities of the base station are not fully utilized, thus wasting its powerful computing capabilities.
[0058] Segmentation learning, as another distributed intelligence paradigm, is primarily used for training artificial intelligence models in resource-constrained wireless networks to achieve intelligent services. The segmentation learning paradigm in edge networks also consists of a base station and multiple terminal devices. Additionally, the base station is equipped with a powerful edge server. Typically, the segmentation learning process is divided into multiple training rounds. In a given training round, the terminal devices, base station, and edge server execute processes S21-S27.
[0059] S21: The edge server divides the global model (deep neural network) into a device-side global model and a server-side global model. The device-side global model is the global model located on the terminal device side. The splitting point used to divide the global model can be called a cut layer.
[0060] S22: The base station transmits the global model from the equipment side to a terminal device. The server-side global model is placed in an edge server to assist the terminal device in training the global model.
[0061] S23: The terminal device receiving the global model performs forward propagation (FP) of the device-side global model using the local dataset to obtain the output activation of the neural network. This output activation is, for example, the output feature vector (smashed data, SD). The terminal device can transmit the output activation of the neural network and the corresponding data tag to the base station via a wireless channel.
[0062] S24: The edge server continues to execute the forward and backward propagation (BP) of the server-side global model to obtain the output activation gradient of the neural network.
[0063] S25: The base station transmits the output activation gradient of the neural network to the terminal device, while the edge server performs the update of the global model on the server side to obtain the local server side model.
[0064] S26: The terminal device performs backpropagation of the device-side global model and updates the device-side global model to obtain a local device-side model.
[0065] S27: The terminal device transmits the local device-side model to the base station via a wireless channel. The base station acts as a relay to send the local device-side model to the next terminal device. When all terminal devices have completed one training cycle, a training round is completed.
[0066] The model training device repeats the process described in S21-S27 until the global model meets the preset convergence condition, at which point the segmentation learning is complete.
[0067] As shown in processes S21-27, in segmentation learning, the base station and terminal devices perform collaborative training of the global model in a serial manner. However, this approach means that only one terminal device interacts with the base station at any given time, while the remaining terminal devices remain idle. This results in a large amount of distributed idle resources going unused and also leads to significant latency overhead.
[0068] Federated segmentation learning, as a hybrid distributed intelligence paradigm, enables efficient training of artificial intelligence models in resource-constrained wireless networks to achieve intelligent services. The federated segmentation learning paradigm in edge networks also consists of a base station and multiple terminal devices. To implement segmentation learning, the base station is equipped with a powerful edge server. The federated segmentation learning process is typically divided into multiple training rounds. In a given training round, the terminal devices, base station, and edge server execute processes S31-S37.
[0069] S31: The edge server divides the global model (deep neural network) into a device-side global model and a server-side global model.
[0070] S32: The base station broadcasts the global model from the equipment side to all terminal devices. Simultaneously, the server-side global model is copied to a number of terminal devices to assist each terminal device in training the global model.
[0071] S33: All terminal devices use local datasets to perform forward propagation of their device-side global models in parallel to obtain the output activation of the neural network. All terminal devices then transmit the output activation of the neural network and the corresponding data tags to the base station via a wireless channel.
[0072] S34: The edge server continues to perform forward and backward propagation of the server-side global model for each terminal device to obtain the output activation gradient of the neural network.
[0073] S35: The base station transmits the output activation gradient of the neural network to each terminal device, while the edge server updates the server-side global model for each terminal device to obtain a local server-side model.
[0074] S36: All terminal devices perform backpropagation of the device-side global model in parallel and update the device-side global model to obtain a local device-side model. All terminal devices transmit their local device-side models to the base station via a wireless channel.
[0075] S37: The edge server combines the local device-side model and the local server-side model into a local model for each terminal device, and performs aggregation of the local models to obtain the global model.
[0076] The model training device repeats the above S31-S37 process until the global model meets the preset convergence condition, at which point the federated segmentation learning is completed.
[0077] As shown in processes S31-37, in federated segmentation learning, all terminal devices perform training of the same-sized device-side model. Due to the differences in terminal device resources, terminal devices with powerful computing capabilities are not fully utilized for training the artificial intelligence model. Furthermore, in each training round, the edge server needs to wait for all terminal devices to complete their local training before it can perform global model aggregation. This means that the latency in each round depends on the slowest terminal device, resulting in significant latency overhead.
[0078] Furthermore, in wireless communication, the time-varying allocation of wireless channels and resources also affects the training quality of the global model. This allocation includes, for example, the allocation of bandwidth and computing frequency. Due to the rapid changes in wireless channels, wireless resources may not be allocated efficiently, thus compromising the long-term effectiveness of AI model training. This is especially true in resource-constrained and heterogeneous wireless networks, where model training quality is more easily affected. For example, while the allocation of wireless channels and resources may remain temporarily constant within each training epoch, it is difficult to maintain this consistency across multiple epochs, thus failing to guarantee long-term efficient training.
[0079] To address the problems of the aforementioned various model training methods, this application proposes a method for training models. This method considers the differences in terminal device resources and fully utilizes the powerful computing capabilities of base stations to undertake the model training task, thereby improving training efficiency while ensuring the overall model training performance. For ease of understanding, the method for training models is described in detail below with reference to Figure 2.
[0080] Figure 2 illustrates the interaction between the first terminal device and the network device. The first terminal device is one of the terminal devices mentioned above that possesses certain computing and communication capabilities. In some embodiments, the first terminal device can train a model based on local data samples. This model can be an artificial intelligence / machine learning model. In some embodiments, the first terminal device can send data samples and / or the computational model to the network device. In some embodiments, the first terminal device can receive the computational model sent by the network device.
[0081] As an example, a network device can broadcast an artificial intelligence model to a first terminal device.
[0082] In some embodiments, the first terminal device can be any terminal device in an edge network. The first terminal device can store various data samples. For example, the data samples stored by the first terminal device may include local data samples used for training a model.
[0083] The first terminal device is any one of multiple terminal devices participating in model training. For example, multiple terminal devices can work together with a network device to train the artificial intelligence model. For example, multiple terminal devices can all provide data samples for model training.
[0084] The network device refers to any of the communication devices described above that provide services to multiple terminal devices. In some embodiments, the network device is a communication device with powerful computing capabilities. For example, the network device could be a base station that broadcasts a global model to multiple terminal devices based on federated learning, or it could be a base station that assists multiple terminal devices in training a global model based on segmentation learning, as described above; no limitation is made here.
[0085] In some embodiments, the network device is equipped with a powerful edge server to participate in model training. As an example, the edge server can be used to determine at least one of the following information under a first constraint: the communication bandwidth of each terminal device performing model training; the allocation method of the edge server's computing frequency; the selection of multiple terminal devices for determining the first aggregation period; and multiple segmentation layers including a first segmentation layer. The first constraint and various pieces of information will be explained below with reference to Figure 5.
[0086] The network device can communicate with multiple terminal devices, including the first terminal device. In some embodiments, the network device can receive data samples or intermediate data for model training sent by the multiple terminal devices. In some embodiments, the network device can send a global model, segmented sub-models, and / or intermediate data for model training in a certain training epoch to the multiple terminal devices.
[0087] Referring to Figure 2, in step S210, the first terminal device receives a first sub-model from the global model. In some embodiments, the first sub-model received by the first terminal device may come from a network device, as shown in Figure 2. In some embodiments, the first sub-model received by the first terminal device may come from a third-party device that assists the network device in model training.
[0088] As an example, a third-party device could be a server deployed outside a base station that can communicate with the first terminal device.
[0089] The global model can be any artificial intelligence / machine learning model that supports intelligent business, and this application embodiment does not limit it. The types of global models include, but are not limited to: convolutional neural network models, recurrent neural network models, long short-term memory networks, etc.
[0090] In some embodiments, the global model may be determined by the network device. For example, when performing federated segmentation learning on the global model, the network device needs to aggregate the distributed learning results from multiple terminal devices to determine the global model for the current training epoch.
[0091] A global model can be the model trained in the previous training epoch. Training a global model typically involves multiple training epochs. A training epoch can refer to a single training or learning process, also known as a learning round. For example, in the federated learning described earlier, one training epoch is used to complete steps S11-S13. Similarly, in the segmentation learning described earlier, one training epoch is used to complete steps S21-S27. And again, in the federated segmentation learning described earlier, one training epoch is used to complete steps S31-S37.
[0092] As an example, the training process of the global model can be decoupled according to Lyapunov optimization theory to optimize training results. Any training epoch in the global model training can be any single training epoch obtained based on this decoupling.
[0093] In some embodiments, the global model can be segmented for training based on segmentation learning or federated segmentation learning. The global model can be segmented into at least one sub-model. In other words, the global model can consist of multiple segmented sub-models.
[0094] As an example, after splitting the global model, multiple sub-models can be trained on different devices to improve training efficiency. When a sub-model is trained on a terminal device, it can be called a device-side global model. When a sub-model is trained on a server, it can be called a server-side global model.
[0095] It should be understood that training the global model requires local data from the terminal device; therefore, the device-side global model typically includes an input terminal for data samples. The terminal device can input local data into the device-side global model through the input terminal and perform forward propagation. Furthermore, the terminal device can also obtain a trained local model, or local model, from the device-side global model through backpropagation.
[0096] In some embodiments, for segmentation learning or federated segmentation learning, the training epochs of the global model can be set primarily based on the training cycle of the terminal device or the server. For example, a training epoch mainly includes the communication duration and training duration on the terminal device side.
[0097] As an example, from the perspective of the terminal device, the training epochs can disregard the time spent on server-side model aggregation. This is because the server-side computing power is relatively strong, and the time spent on model aggregation can be ignored.
[0098] In some embodiments, a training round can be divided into multiple training cycles and communication cycles. That is, the training duration and communication duration need to be considered within a training round. For the terminal device, the communication cycle can refer to the upload cycle and / or download cycle.
[0099] As an example, in federated segmentation learning, the base station and terminal device collaboratively train for T training epochs, where T is a positive integer. A training epoch can include one device-side global model download cycle, H terminal device-base station collaborative training cycles, and one device-side local model upload cycle, where H is a positive integer. These cycles are sequential. Taking neural network training as an example, each terminal device-base station collaborative training cycle includes a terminal device forward propagation mini-cycle, a neural network output activation upload mini-cycle, an edge server-side forward and backward propagation mini-cycle, a neural network output activation gradient download mini-cycle, and a terminal device backward propagation mini-cycle. These mini-cycles are sequential; Figure 4 will be used as an example to illustrate these cycles and mini-cycles later.
[0100] Optionally, the length of each period in each training round depends on the resources of the terminal device, the wireless channel state, the communication and computing capabilities of the base station, the adaptive partitioning scheme of the global model, and the semi-asynchronous aggregation strategy of the local model.
[0101] In some embodiments, during the training of the model, the global model in step S210 can be a global model applied to any training epoch. That is, the global model can be the model trained within any training epoch. In some embodiments, the global model can be the model determined in the previous training epoch before any training epoch. That is, except for the training epoch where the model converges, the global model can be the model determined after training is completed in any other training epoch.
[0102] The training of the global model is jointly performed by a network device and multiple terminal devices, including the first terminal device. In this embodiment, the network device can broadcast the sub-models after segmenting the global model to multiple terminal devices, so that all terminal devices participating in the model training can receive the sub-models being trained in the current training round.
[0103] The sub-model received by the first terminal device is the first sub-model in the global model. The first sub-model is a sub-model obtained by segmenting the global model for the first terminal device. The first sub-model can also be called the device-side global model corresponding to the first terminal device.
[0104] The first sub-model is determined based on the first segmentation layer. In other words, for the first terminal device, the global model is segmented at the first segmentation layer. The segmented portion used for training on the first terminal device is the first sub-model.
[0105] As an example, when the first terminal device is the nth terminal device among N terminal devices performing model training, the first segmentation layer can be ln. Here, N is an integer greater than or equal to 1, i.e., a positive integer; 1 ≤ n ≤ N.
[0106] In some embodiments, at least two of the terminal devices participating in the training have different segmentation layers. That is, at least two of the terminal devices participating in the training receive different sub-models. This demonstrates that different terminal devices require different sub-models to be trained, which helps to address the differences in training time caused by variations in computing / storage capabilities among multiple terminal devices, thereby reducing training latency caused by the heterogeneity of different terminal devices.
[0107] In some embodiments, the first terminal device is one of a plurality of terminal devices performing model training. The plurality of sub-models received by the plurality of terminal devices are determined based on a global model and a plurality of different segmentation layers. Therefore, the plurality of sub-models includes the first sub-model, and the plurality of segmentation layers includes the first segmentation layer. As an example, the plurality of segmentation layers and the plurality of terminal devices have a one-to-one correspondence. As an example, the plurality of segmentation layers and the plurality of terminal devices have a one-to-many relationship.
[0108] As an example, different sub-models can refer to different sub-model sizes. For instance, the number of computation layers in the sub-models corresponding to two different terminal devices might be different. Another example is that the bit size after quantization of the sub-models corresponding to two different terminal devices might be different.
[0109] The first sub-model can be determined based on one or more factors. These factors may include one or more of the following: the capabilities of the first terminal device, the number of data samples of the first terminal device, and the radio resource status between the first terminal device and the network device.
[0110] In some embodiments, the first segmentation layer can be determined based on the capabilities of the first terminal device, thereby dividing the global model for multiple terminal devices according to their capability differences. For example, the first segmentation layer can be determined based on the capability level corresponding to the first terminal device. For instance, if the second terminal device performing model training corresponds to the third sub-model, and the capability level of the first terminal device is higher than that of the second terminal device, then the first sub-model is considered greater than the third sub-model.
[0111] As an example, all terminal devices performing model training can be divided into multiple sets of terminal devices based on their capability levels. Terminal devices in each set correspond to the same capability level. For instance, the first terminal device belongs to the first set of terminal devices, and all terminal devices in the first set correspond to the same capability level.
[0112] In some embodiments, the first segmentation layer can be determined based on the number of data samples on the first terminal device, thereby reducing the difference in training time caused by differences in the number of data samples. The number of data samples is the number of dataset samples. For example, the first segmentation layer can be determined based on the range of the number of dataset samples corresponding to the first terminal device. For instance, the number of dataset samples on the first terminal device is within a first range, and the number of dataset samples on the second terminal device performing model training is within a second range. When the lower limit of the first range is greater than or equal to the upper limit of the second range, the first sub-model is smaller than the third sub-model corresponding to the second terminal device.
[0113] In some embodiments, the first segmentation layer can be based on the radio resource status between the first terminal device and the network device. This radio resource status may include one or more parameters such as communication bandwidth, channel environment, and channel quality. For example, the edge server can adaptively determine the first segmentation layer for the first terminal device based on its radio resource status, thereby performing global model partitioning.
[0114] In some embodiments, the first segmentation layer may be determined by comprehensively considering the various information described above to balance the influence of multiple factors. It should be understood that the process by which the network device determines the segmentation layer based on one or more of the above factors can be dynamically adjusted, also known as an adaptive process.
[0115] After the global model is segmented in the first segmentation layer, the portion used for training on the network device side is the second sub-model. The network side can train the second sub-model via a server; therefore, the second sub-model can also be called the server-side global model corresponding to the first terminal device. The first and second sub-models can constitute the global model. In other words, the global model includes both the first and second sub-models.
[0116] In some embodiments, the execution of step S210 by the first terminal device may indicate the start of the current training round. That is, after the start of each training round, the network device sends the first sub-model in the global model to the first terminal device.
[0117] In step S220, the first terminal device trains the first sub-model. Correspondingly, the second sub-model corresponding to the first sub-model in the global model is trained on the network device side. As an example, the first terminal device and the network device train the two sub-models in the global model respectively and exchange intermediate parameters to achieve collaborative training of the global model.
[0118] As an example, the first terminal device can use stochastic gradient descent to train the global model in conjunction with the base station.
[0119] In some embodiments, the first terminal device may train the first sub-model based on some or all of the data samples in the dataset. The dataset may be a dataset composed of local data, or it may include other data, which is not limited here.
[0120] The dataset samples of the first terminal device may include, but are not limited to, images, audio, and signals. This application does not impose any limitations.
[0121] In some embodiments, the network device trains the second sub-model based on intermediate data uploaded by the first terminal device, and sends the training parameters of the second sub-model to the first terminal device so that the first terminal device can update the first sub-model.
[0122] As an example, the intermediate data uploaded by the first terminal device can be used to activate the output of a neural network, such as the SD mentioned above.
[0123] As an example, the intermediate data uploaded by the first terminal device also includes sample tags or device identifiers to facilitate identification by network devices.
[0124] As an example, the training parameters sent by the network device to the first terminal device can be the gradient of the neural network output activation.
[0125] As an example, step S220 may include the process of interaction between the first terminal device and the network device. Exemplarily, the first terminal device performs forward propagation on the first sub-model, obtains the output activation before or after the segmentation layer, and uploads it. The network device performs forward and backward propagation on the second sub-model based on the output activation to obtain the gradient of the output activation. The network device sends the gradient of the output activation to the first terminal device and updates the second sub-model to the server-side local model. The first terminal device performs backward propagation on the first sub-model based on the gradient of the output activation, thereby updating the first sub-model to the device-side local model.
[0126] In some embodiments, the training of the first sub-model and the second sub-model is used together to determine the first local model. The first local model is a local model corresponding to the first terminal device obtained after the first terminal device and the network device jointly train the global model. The first local model can be used by the network device to perform model aggregation to obtain an updated global model.
[0127] As an example, when the first terminal device is the nth terminal device, the first local model in the t-th training epoch (1≤t≤T) is:
[0128] in, This is a concatenation symbol.
[0129] In some embodiments, the training duration of the first sub-model is used to determine whether the training epoch in which the first local model participates in model aggregation is the current training epoch, so as to avoid the overall training duration being affected by the longer training duration of a certain terminal device. That is, the terminal device performing model training can determine whether to use the current training results for model aggregation based on the actual situation. Alternatively, the network device can determine whether the terminal devices participating in model aggregation include the first terminal device based on the actual situation.
[0130] The training time of the first sub-model can be replaced by the training time of the global model corresponding to the first terminal device, that is, the time for the first terminal device and the network device to collaboratively train the global model. The training time of the first sub-model may change dynamically with changes in state parameters.
[0131] In some embodiments, the training duration of the first sub-model is determined based on one or more of the following information: the position of the first segmentation layer in the global model; the capability / number of data samples of the first terminal device; the wireless resource status between the first terminal device and the network device; and the computing frequency allocated by the network device to the first terminal device.
[0132] In some embodiments, the current training epoch can be the single training epoch currently in progress. As mentioned above, if the training epoch in which the first local model participates in model aggregation is the current training epoch, then the first terminal device is the terminal device participating in this model aggregation. If the training epoch in which the first local model participates in model aggregation is not the current training epoch, the first terminal device continues to train the first sub-model in one or more training epochs following the current training epoch. Therefore, the first terminal device does not need to suspend the current training. Only after the first sub-model has been trained and the state of the first local model meets the requirements will it participate in model aggregation.
[0133] As an example, the state of the first local model in the current training epoch can be represented by parameters to indicate whether it can participate in model aggregation. For instance, when the state of the first local model is 1, the first local model participates in model aggregation in the current training epoch; when the state of the first local model is 0, the first local model does not participate in model aggregation in the current training epoch. The reverse is also true.
[0134] In some embodiments, the relationship between the training duration of the first sub-model and the first aggregation period is used to determine whether the parameters of the first local model are aggregated with the model in the current training epoch. The first aggregation period is a parameter preset for the current training epoch to determine the model aggregation time.
[0135] As an example, when the training duration of the first sub-model is longer than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round; when the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round. In other words, after the training duration of the first sub-model exceeds the set first aggregation period, the first local model determined by the first terminal device in the current training round will be used for model aggregation in subsequent training rounds.
[0136] In some embodiments, the length of each aggregation period in each training epoch depends on the terminal devices participating in the local model aggregation. As an example, the first aggregation period can be determined based on the states of N local models on N terminal devices performing model training and a first threshold. The first threshold can be the minimum number of local models participating in model aggregation, such as N... min .
[0137] For example, the judgment rule for local model aggregation can be determined as follows:
[0138] Where, m n,t This represents the state of the local model of the nth terminal device. n,t =1 indicates that the nth terminal device has obtained a local model and can participate in local model aggregation, and vice versa. N min The number of terminal devices participating in local model aggregation.
[0139] In some embodiments, after the network device aggregates the local models corresponding to some or all terminal devices in the current training round, it can obtain the global model for the next training round. The global model for the next training round can be determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation; that is, the network device performs model aggregation based on weights. The weighting coefficients can also be called weight coefficients.
[0140] In some embodiments, the multiple weighting coefficients are determined based on the aggregation interval of multiple terminal devices participating in model aggregation and / or the bias parameters controlling model aggregation. The aggregation interval can indicate whether a terminal device participates in model aggregation in each training epoch. The bias parameters controlling model aggregation can indicate the direction or target of model aggregation.
[0141] As an example, when the aggregation interval is 1, the terminal device participates in model aggregation in every training epoch. When the aggregation interval is greater than 1, the terminal device will participate in model aggregation only after training for multiple epochs.
[0142] As an example, when the bias parameter is greater than 1, model aggregation can reduce the risk of global model training being geared towards computationally powerful terminal devices. When the bias coefficient is less than 1, model aggregation accelerates the convergence of the global model at the cost of global model training being geared towards computationally powerful terminal devices. When the bias coefficient is equal to 1, the weighting coefficients are only related to the dataset samples of the terminal devices and are not affected by the heterogeneity of the terminal devices.
[0143] For example, when the current training epoch is the t-th training epoch out of T training epochs, the global model w in the (t+1)-th training epoch... t+1 for:
[0144] Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the tth training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round.
[0145] When the nth terminal device is part of the terminal device set S participating in model aggregation t One of them, the weighting coefficient ρ n,t for:
[0146] Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device.
[0147] As shown in Figure 2, this application proposes an adaptive federated segmentation learning paradigm. This method fully considers the differences in terminal device capabilities, data sample quantity, and wireless resources. For example, this method allows terminal devices with weaker computing power to perform fewer training tasks on the device-side global model, while terminal devices with stronger computing power can undertake more training tasks on the device-side global model.
[0148] Furthermore, in this method, in addition to the device-side global model, the remaining server-side global model is trained with the assistance of network devices. All terminal devices and network devices train in parallel, thereby improving the efficiency of global model training. Therefore, the model training method in this embodiment not only fully utilizes the powerful computing capabilities of network devices such as base stations, but also overcomes the limited resources of terminal devices in wireless networks, while improving training efficiency while ensuring the performance of global model training.
[0149] To facilitate understanding, the adaptive federated segmentation learning method proposed in this application embodiment is illustrated below with reference to Figures 3 and 4. Figure 3 is a structural schematic diagram of an adaptive federated segmentation learning paradigm provided by an embodiment of this application. Figure 4 is a flowchart of an adaptive federated segmentation learning paradigm based on semi-asynchronous local model aggregation provided by an embodiment of this application.
[0150] Referring to Figure 3, the federated segmentation learning system may include one network device (base station 310) and N terminal devices. Base station 310 is equipped with a powerful edge server 320. The N terminal devices are terminal devices 301, ..., 30n to 30N. The three terminal devices shown in Figure 3 correspond to different capabilities and data sample numbers. Specifically, the dataset D1 of terminal device 301 is smaller than the dataset D of terminal device 30n. n Dataset D n Data set D smaller than 30N for terminal devicesN N terminal devices and base stations can perform local collaborative training, which can be conducted in T training rounds.
[0151] As shown in Figure 3, during collaborative training, the terminal device performs the following steps: downloading the device-side global model (first sub-model), uploading the neural network output activation, downloading the gradient of the neural network output activation, and uploading the device-side local model.
[0152] Referring again to Figure 3, when entering the t-th training round, the base station 310 or the edge server 320 can have a global model 330, which is w t During the global model download cycle on the device side, the edge server adaptively partitions the global model w for the nth terminal device based on the wireless resource status and capabilities of the terminal device. t For device-side global model (First Sub-model 333) and Server-Side Global Model (Second sub-model 334). For example, the first sub-model 331 of the terminal device 301 is... The second sub-model 332 is The first sub-model 335 of the terminal device 30N is The second sub-model 336 is
[0153] Furthermore, the base station transmits the device-side global model to the nth terminal device. Server-side global model It is then placed in the base station.
[0154] During the τ-th (1≤τ≤H)-th terminal device and base station collaborative training cycle, the n-th terminal device utilizes dataset D n The sample execution device-side global model The forward propagation yields the output activation of the neural network, which, along with the corresponding sample label, is transmitted to the base station. Then, the edge server at the base station executes the server-side global model. The forward and backward propagation yields the gradient of the neural network's output activation.
[0155] The base station transmits the gradient of the neural network's output activation to the nth terminal device and updates the global model on the server side. Obtain the local model on the server side The nth terminal device then executes the device-side global model. Update the device-side global model after backpropagation Obtain the local model of the device. The above process is repeated H times to obtain a local model of the device. Local model on the server side
[0156] During the device-side local model upload cycle, the nth terminal device will upload the device-side local model. The data is transmitted to the base station, and the edge server will... Its server-side local model Combined into a local model Then, the edge server models the local models of the N terminal devices according to the weight coefficients (weighting coefficients) of the N common terminal devices to obtain the global model w for the next training round. t+1 .
[0157] The weighting coefficient for the nth terminal device can be expressed as ρ. n,t When the local models of all N terminal devices participate in model aggregation, ρ n,t To meet ρ is a non-negative real number. When only local models from some terminal devices participate in model aggregation, ρ n,t Only the terminal devices participating in model aggregation are considered.
[0158] Referring to Figure 4, in step S410, when entering the preset training round, the edge server adaptively divides the global model for each terminal device into a device-side global model and a server-side global model (the second sub-model), and transmits the device-side global model to each terminal device. The device-side global model is also the first sub-model, and the server-side global model is also the second sub-model.
[0159] The training process in step S410 occurs within the device-side global model download cycle. For example, in the t-th training round, when the terminal device and the base station use Frequency-Division Multiple Access (FDMA) transmission, the n-th terminal device's device-side global model download cycle... It can be determined as follows:
[0160] in, For the nth terminal device, use a segmentation layer l n The size of the global model on the device side is divided. Let be the downlink (DL) transmission rate of the nth terminal device. Optionally, It can be represented as:
[0161] Among them, B n,t The communication bandwidth allocated to the nth terminal device. h is the transmission power from the base station to the nth terminal device. n,t Let N be the wireless channel attenuation coefficient between the nth terminal device and the base station, and N0 be the additive white Gaussian noise power.
[0162] In step S420, the terminal device uses the local dataset to collaboratively train the global model from the previous round with the base station. This training process occurs within H collaborative training cycles between the terminal device and the base station. As mentioned earlier, each collaborative training cycle between the terminal device and the base station may include a short forward propagation cycle for the terminal device, a short cycle for uploading neural network output activations, a short cycle for forward and backward propagation on the edge server, a short cycle for downloading gradients of neural network output activations, and a short cycle for backward propagation on the terminal device. The following provides illustrative examples of these multiple short cycles.
[0163] The nth terminal device uses stochastic gradient descent to train the global model in collaboration with the base station, and the terminal device performs forward propagation in short cycles. for:
[0164] Where b is the number of samples that the nth terminal device performs in one terminal device-base station collaborative training cycle. When training a data sample based on the device-side global model for the nth terminal device and performing forward propagation, the number of floating-point operations (FLOPs) that need to be considered is f. n Let q be the frequency of the central processing unit (CPU) of the nth terminal device. n Let represent the number of FLOPs for the nth terminal device in each cycle.
[0165] After the nth terminal device completes training, the neural network outputs an activation upload cycle. It can be determined as follows:
[0166] Among them, for the nth terminal device, the segmentation layer l n The partitioned device-side global model, The size of the activation value of the neural network output for a single sample. Let be the uplink (UL) transmission rate of the nth terminal device. Optionally, It can be represented as:
[0167] in, Let be the transmission power of the nth terminal device to the base station.
[0168] After the base station receives and outputs, the edge server performs forward and backward propagation short cycles. It can be determined as follows:
[0169] In this context, the edge server is used when the nth terminal device performs its server-side global model training. The number of floating-point units required to perform forward and backward propagation for a single data sample. The CPU frequency q is allocated to the nth terminal device by the edge server. s This represents the number of FLOPs per cycle for the edge server.
[0170] After the edge server determines the gradient of the output activation, the gradient of the neural network output activation is downloaded in a small cycle. It can be determined as follows:
[0171] For the nth terminal device, the segmentation layer l is used. n The partitioned device-side global model, This represents the gradient magnitude of the neural network output activation corresponding to a single sample.
[0172] After receiving the gradient of the output activation, the terminal device backpropagates a small period. It can be determined as follows:
[0173] When the nth terminal device trains a data sample for its global model on its device side, The number of FLOPs required to perform backpropagation for the terminal device.
[0174] It is important to note that the forward propagation cycle of the terminal device, the uploading cycle of neural network output activation, the forward and backward propagation cycles of the edge server, the gradient download cycle of neural network output activation, and the backward propagation cycle of the terminal device are sequentially related. The collaborative training cycle between multiple terminal devices and the base station includes H such sequential processes.
[0175] After the nth terminal device completes the collaborative training cycle with the base station for H terminal devices, the nth terminal device and the edge server can obtain the device-side local model and the server-side local model respectively, which can be used to determine the first local model.
[0176] As an example, device-side local model It can be determined as follows:
[0177] in, For the initial device-side global model (first sub-model) of the nth terminal device, η t For learning rate, Let be the device-side gradient formed by the nth terminal device during the collaborative training period between the τth terminal device and the base station.
[0178] As an example, server-side local model It can be determined as follows:
[0179] in, This is the initial server-side global model (second sub-model) provided by the edge server to the nth terminal device. The gradient generated by the edge server for the nth terminal device during the collaborative training period between the τth terminal device and the base station.
[0180] In step S430, the terminal device transmits its local device model to the base station. This local device model upload process occurs within the local device model upload cycle. As an example, the local device model upload cycle for the nth terminal device... It can be determined as follows:
[0181] In step S440, it is determined whether local models can be aggregated. If yes, step S450 is executed; otherwise, step S420 is executed. Optionally, the base station can use specific rules to determine whether local model aggregation can be performed.
[0182] In step S450, the base station obtains the global model by weighted aggregation of local models. For example, after obtaining the device-side local model of the nth terminal device, the base station combines it with the corresponding server-side local model to obtain a local model (first local model), and then performs weighted aggregation of the local models to obtain the global model.
[0183] In step S460, it is determined whether convergence has been achieved. If yes, proceed to step S470; otherwise, proceed to step S410. The base station can use specific rules to determine whether the global model has converged. In some embodiments, the global model w t+1 The convergence criterion can be determined as follows:
[0184] |F(w t+1 )―F(w t |≤ε;
[0185] Where F(w) is the loss function calculated based on the global model w, which can be used to measure the training effect of the global model, and ε is the preset convergence accuracy.
[0186] It should be understood that the above embodiments are only for illustrating how to determine whether the global model has converged. In addition to the convergence judgment rules mentioned above, any rule that can determine whether the global model has reached objective convergence can be applied to the embodiments of this application. The embodiments of this application are not limited.
[0187] In step S470, the adaptive federated segmentation learning based on semi-asynchronous local model aggregation is terminated.
[0188] After determining that the global model meets the convergence condition, the base station broadcasts the device-side global model and a termination training command to all terminal devices. The terminal devices and the edge server then stop training the device-side global model and the server-side global model, respectively. Subsequently, the base station and terminal devices can release the communication and computing resources used for collaborative training.
[0189] As shown in Figures 3 and 4, this application proposes a semi-asynchronous local model aggregation strategy to address the differences in device resources and the heterogeneity of wireless channels. This strategy can reduce the waiting latency in each training round and further improve the global model training efficiency. On the one hand, all terminal devices can perform local collaborative training in parallel with the base station to obtain local models. On the other hand, once the preset aggregation period arrives, the edge server on the base station side does not need to wait for all terminal devices to complete local collaborative training, and directly performs aggregation on the local models of the terminal devices that have completed local collaborative training. Terminal devices that have not completed collaborative training can continue training in the next training round without being terminated or interrupted. By implementing the semi-asynchronous local model aggregation strategy, the training latency overhead is significantly reduced.
[0190] The adaptive federated segmentation learning paradigm based on semi-asynchronous local model aggregation provided in this application can fully utilize the powerful computing capabilities of network devices to assist resource-constrained terminal devices in completing the training task of artificial intelligence models, and maximize the utilization of the terminal device's computing resources. Therefore, it accelerates the training efficiency of the global model while ensuring the performance of the global model. In addition, the semi-asynchronous local model aggregation strategy can also reduce the latency overhead caused by the global model training process, thereby improving aggregation efficiency.
[0191] This application also proposes a learning system for an artificial intelligence model. The learning system includes a network device and multiple terminal devices. Any one of the terminal devices executes the method described above for terminal device execution, and the network device executes the method described above for network device execution.
[0192] The preceding text, with reference to Figures 2 to 4, introduced methods for model training based on terminal device capabilities or training duration. As discussed earlier, time-varying wireless channels and the allocation of wireless resources also affect the training quality and efficiency of the global model. For example, due to the rapid changes in wireless channels, base stations may be unable to make optimal global resource allocation decisions for executing artificial intelligence model training tasks.
[0193] Based on this, embodiments of this application also propose a resource management method for model training. This resource management may include the management of wireless resources, or the management of training resources for terminal devices. For example, in time-varying wireless channels, this resource management method can ensure efficient training of the global model through an online management scheme for wireless resources.
[0194] For ease of understanding, the resource management method proposed in this application embodiment will be described in detail below with reference to Figure 5. The resource management method shown in Figure 5 can be executed by network devices such as base stations, or by edge servers deployed outside the base station. This resource management method helps the model training device execute the model training method shown in Figure 2. For simplicity, the terms already explained in Figure 2 will not be repeated.
[0195] Referring to Figure 5, in step S510, the model training process is decoupled into a single training round. That is, the task of model training is decoupled into the task of a single training round to improve training efficiency.
[0196] In some embodiments, the decoupling of model training can be performed according to Lyapunov optimization theory. Lyapunov optimization theory is widely used in stochastic networks. This theory analyzes, controls, and optimizes networks with random events, time variations, and uncertainties, proving that time-averaged constrained optimization can be achieved in general stochastic networks.
[0197] As an example, an optimal decision can be approximated by using a simple Lyapunov drift plus penalty framework to optimize the latency average of wireless network throughput, power, and distortion.
[0198] Optionally, Lyapunov optimization can decouple multi-level stochastic optimization problems into progressively deterministic subproblems, while providing a theoretical guarantee for the long-term stability of the network. As an example, based on Lyapunov optimization theory, a base station can decouple the training task of an artificial intelligence model into a single training round.
[0199] In some embodiments, the decoupling of model training can be determined according to Lyapunov optimization theory and the second constraint, that is, the model training process is decoupled into a single training round according to Lyapunov optimization theory and the second constraint.
[0200] As an example, the second constraint can be related to system energy consumption. For instance, a base station can utilize Lyapunov optimization theory to decouple the global model training task into a single training round of global model training task under the constraint of system energy consumption.
[0201] In step S520, a first constraint is determined for a single training round.
[0202] In some embodiments, the first constraint may be related to at least one of the following: the duration of model training; and the energy consumption of multiple terminal devices and network devices. The duration of model training is used to limit the application duration of the constraint. The energy consumption of multiple terminal devices and network devices is used to constrain the energy consumption of the training device during model training. Exemplarily, the first constraint may be a long-term low-energy-consumption condition. An online management scheme determined based on the first constraint is used for long-term, low-energy-consumption, adaptive, and stable segmentation and collaborative training of the global model.
[0203] The first constraint is used to determine the first management scheme. The first management scheme can optimize the resources of the wireless network for performing the global model training task in a single training round, thereby ensuring the optimal execution of the global model training task in a single training round.
[0204] In some embodiments, the first management scheme may include a scheme in which multiple terminal devices perform model training, or an online management scheme for wireless resources. For example, the base station may make an optimal online resource management scheme based on the first constraint.
[0205] In some embodiments, the first management scheme can also be determined based on the wireless network status of a single training round. Optionally, the wireless network status of a single training round may include information such as channel status, terminal device status, and edge server status.
[0206] The first management scheme includes multiple segmentation layers corresponding to multiple terminal devices performing model training. The multiple terminal devices include a first terminal device, and the multiple segmentation layers include a first segmentation layer corresponding to the first terminal device.
[0207] In some embodiments, the first management scheme may further include one or more of the following information: the communication bandwidth of each terminal device performing model training; the computing frequency allocation method of the edge server; and the selection of multiple terminal devices for determining the first aggregation cycle. For example, the online resource management scheme may include the allocation of communication bandwidth and edge server computing frequency, the selection of terminal devices participating in local model aggregation, and the selection of segmentation layers for the global model.
[0208] As an example, the allocation of communication bandwidth and edge server computing frequency can be constructed as a convex optimization problem in a single training round, based on maintaining low power consumption of the wireless network over a long period. Furthermore, the processing units of the base station or server can also use the Lagrange duality method to iteratively solve the problem and obtain an asymptotically optimal allocation scheme for communication bandwidth and edge server computing frequency.
[0209] Alternatively, the communication bandwidth and edge server computing frequency allocation scheme can also be obtained by other methods, and this application embodiment does not impose any limitations.
[0210] As an example, the selection of terminal devices participating in local model aggregation can be constructed as an integer linear programming problem with a single training round, based on maintaining the long-term low power consumption of the wireless network. Furthermore, the processing unit of the base station or server can use a branch-and-bound algorithm to iteratively solve the problem and obtain an asymptotically optimal selection scheme for terminal devices participating in local model aggregation.
[0211] Optionally, the selection of terminal devices participating in local model aggregation can also be obtained by other methods, and this application embodiment does not impose any restrictions.
[0212] As an example, the selection of the global model's segmentation layer can be constructed as an integer optimization problem in a single training epoch, based on maintaining the long-term low power consumption of the wireless network. Furthermore, the processing unit of the base station or server can use an exhaustive search algorithm to iteratively solve the problem and obtain the optimal global model segmentation layer selection scheme.
[0213] Alternatively, the segmentation layer selection scheme for the global model can also be obtained by other methods, and this application embodiment does not impose any restrictions.
[0214] In some embodiments, the first management scheme can be distributed to all terminal devices performing model training, so that multiple edge devices can collaboratively train and complete the training task of the global model in the current training round. For example, after determining the multiple segmentation layers corresponding to multiple terminal devices, the network device can send the corresponding multiple device-side global models to the multiple terminal devices respectively.
[0215] As an example, in a single training epoch, the terminal device and the base station perform one device-side global model download cycle, H terminal device and base station collaborative training cycles, and one device-side local model upload cycle. As mentioned above, each terminal device and base station collaborative training cycle includes a terminal device forward propagation mini-cycle, a neural network output activation upload mini-cycle, an edge server-side forward and backward propagation mini-cycle, a neural network output activation gradient download mini-cycle, and a terminal device backward propagation mini-cycle.
[0216] For ease of understanding, the following example uses the resource management method for model training executed by the base station, and illustrates the process of the online management scheme for time-varying wireless channels and ensuring efficient training of global models proposed in this application with reference to Figure 6.
[0217] Referring to Figure 6, in step S610, the training task of the base station decouples the artificial intelligence model into a single training round.
[0218] In step S620, the base station makes an optimal online resource management plan, specifically including steps S621 to S623. In step S621, the terminal devices participating in local model aggregation are selected. In step S622, communication bandwidth and edge server computing frequency are allocated. In step S623, the global model segmentation layer is selected.
[0219] In step S630, the terminal device and the base station perform a single training round of the global model.
[0220] In step S640, it is determined whether the global model has converged. If so, step S650 is executed; otherwise, step S610 is executed. Optionally, the base station can use specific rules to determine whether the global model has converged. Global model w t+1 The convergence judgment rules are as described above.
[0221] In step S650, the online management process for radio resources ends. After determining that the global model meets the convergence condition, the base station broadcasts a termination training command to all terminal devices. The terminal devices and the edge server respectively stop training the device-side global model and the server-side global model. Then, the base station and the terminal devices release the radio resources used for collaborative training.
[0222] As shown in Figures 5 and 6, the online wireless resource management scheme provided in this application embodiment can ensure efficient training of the global model in environments with rapidly changing wireless channels. This resource management method not only achieves optimal utilization of computing and communication resources but also accelerates the training efficiency of the global model. Simultaneously, by maintaining long-term low energy consumption of the wireless network, it meets the energy efficiency requirements for the network to perform artificial intelligence model tasks.
[0223] The method embodiments of this application have been described in detail above with reference to Figures 1 to 6. The apparatus embodiments of this application will now be described in detail below with reference to Figures 7 to 10. It should be understood that the descriptions of the apparatus embodiments correspond to the descriptions of the method embodiments; therefore, any parts not described in detail can be referred to the preceding method embodiments.
[0224] Figure 7 is a schematic block diagram of a model training device according to an embodiment of this application. The model training device 700 can be a first terminal device for model training. The first terminal device can be any of the terminal devices described above. The model training device 700 shown in Figure 7 includes a receiving unit 710 and a processing unit 720.
[0225] The receiving unit 710 can be used to receive the first sub-model in the global model, which is determined according to the first segmentation layer.
[0226] The processing unit 720 can be used to train the first sub-model; wherein the global model further includes a second sub-model, and the training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0227] Optionally, the first terminal device is one of multiple terminal devices, and the multiple sub-models received by the multiple terminal devices are determined according to the global model and multiple different segmentation layers, the multiple sub-models include the first sub-model, and the multiple segmentation layers include the first segmentation layer.
[0228] Optionally, the first segmentation layer is determined according to the capability level of the first terminal device, and the second terminal device that performs model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model.
[0229] Optionally, the first terminal device belongs to a set of first terminal devices, and all terminal devices in the set of first terminal devices correspond to the same capability level.
[0230] Optionally, the first segmentation layer may also be determined based on the number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device.
[0231] Optionally, the training duration of the first sub-model is determined based on one or more of the following information: the position of the first segmentation layer in the global model; the capability / number of data samples of the first terminal device; the wireless resource status between the first terminal device and the network device; and the computing frequency allocated by the network device to the first terminal device.
[0232] Optionally, when the training epoch in which the first local model participates in model aggregation is not the current training epoch, the processing unit is also used to train the first sub-model in one or more training epochs after the current training epoch.
[0233] Optionally, the current training round corresponds to the first aggregation period. When the training duration of the first sub-model is longer than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round; when the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round.
[0234] Optionally, the first aggregation period is determined based on the state of N local models of N terminal devices trained by the execution model and a first threshold, where N is a positive integer.
[0235] Optionally, when the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round.
[0236] Optionally, the model aggregation of the current training round is used to determine the global model for the next training round, and the global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation.
[0237] Optionally, the multiple weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation.
[0238] Optionally, the current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model w is the (t+1)-th training epoch. t+1 for:
[0239] Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the tth training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round.
[0240] Optionally, the nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for:
[0241] Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device.
[0242] Optionally, the network device sending the first sub-model includes an edge server, which is used to determine at least one of the following information under the first constraint: the communication bandwidth of each terminal device performing model training; the computing frequency allocation method of the edge server; the selection of multiple terminal devices for determining the first aggregation period; and multiple segmentation layers including the first segmentation layer.
[0243] Figure 8 is a schematic block diagram of a model training apparatus provided in an embodiment of this application. The model training apparatus 800 can be any of the network devices for model training described above. The model training apparatus 800 shown in Figure 8 includes a transmitting unit 810 and a processing unit 820.
[0244] The sending unit 810 can be used to send the first sub-model in the global model to the first terminal device. The first sub-model is determined according to the first segmentation layer.
[0245] The processing unit 820 can be used to train a second sub-model in the global model; wherein the training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round.
[0246] Optionally, the first terminal device is one of multiple terminal devices, and the multiple sub-models received by the multiple terminal devices are determined according to the global model and multiple different segmentation layers, the multiple sub-models include the first sub-model, and the multiple segmentation layers include the first segmentation layer.
[0247] Optionally, the first segmentation layer is determined according to the capability level of the first terminal device, and the second terminal device that performs model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model.
[0248] Optionally, the first terminal device belongs to a set of first terminal devices, and all terminal devices in the set of first terminal devices correspond to the same capability level.
[0249] Optionally, the first segmentation layer may also be determined based on the number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device.
[0250] Optionally, the training duration of the first sub-model is determined based on one or more of the following information: the position of the first segmentation layer in the global model; the capability / number of data samples of the first terminal device; the wireless resource status between the first terminal device and the network device; and the computing frequency allocated by the network device to the first terminal device.
[0251] Optionally, when the training epoch in which the first local model participates in model aggregation is not the current training epoch, the processing unit is also used to train the second sub-model in one or more training epochs after the current training epoch.
[0252] Optionally, the current training round corresponds to the first aggregation period. When the training duration of the first sub-model is longer than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round; when the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round.
[0253] Optionally, the first aggregation period is determined based on the state of N local models of N terminal devices trained by the execution model and a first threshold, where N is a positive integer.
[0254] Optionally, when the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round.
[0255] Optionally, the model aggregation of the current training round is used to determine the global model for the next training round, and the global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation.
[0256] Optionally, the multiple weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation.
[0257] Optionally, the current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model w is the (t+1)-th training epoch. t+1 for:
[0258] Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the tth training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round.
[0259] Optionally, the nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for:
[0260] Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents tThe number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device.
[0261] Optionally, the network device includes an edge server, which is used to determine at least one of the following information under the first constraint: the communication bandwidth of each terminal device performing model training; the computing frequency allocation method of the edge server; the selection of multiple terminal devices for determining the first aggregation period; and multiple segmentation layers including a first segmentation layer.
[0262] Figure 9 is a schematic block diagram of a resource management device for model training provided in an embodiment of this application. The resource management device 900 can be any of the network devices or edge servers for model training described above. The resource management device 900 shown in Figure 9 includes a first processing unit 910 and a second processing unit 920.
[0263] The first processing unit 910 can be used to decouple the model training process into a single training round.
[0264] The second processing unit 920 can be used to determine a first constraint for a single training round; wherein the first constraint is used to determine a first management scheme, the first management scheme includes multiple segmentation layers corresponding to multiple terminal devices performing model training, the multiple terminal devices include a first terminal device, the multiple segmentation layers include a first segmentation layer corresponding to the first terminal device, and the first segmentation layer is related to the capabilities of the first terminal device.
[0265] Optionally, the first processing unit 910 is used to decouple the model training process into a single training round based on Lyapunov optimization theory and the second constraint.
[0266] Optionally, the first management scheme may also include one or more of the following information: the communication bandwidth of each terminal device performing model training; the computing frequency allocation method of the edge server; and the selection of multiple terminal devices for determining the first aggregation cycle.
[0267] Optionally, the first constraint is related to at least one of the following: the duration of model training; and the energy consumption of multiple terminal devices and network devices.
[0268] Figure 10 is a schematic structural diagram of a communication device according to an embodiment of this application. The dashed lines in Figure 10 indicate that the unit or module is optional. This device 1000 can be used to implement the methods described in the above method embodiments. The device 1000 can be a chip, a terminal device, or a network device.
[0269] Apparatus 1000 may include one or more processors 1010. The processor 1010 may support apparatus 1000 in implementing the methods described in the preceding method embodiments. The processor 1010 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a CPU. Alternatively, the processor may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0270] The apparatus 1000 may further include one or more memories 1020. The memories 1020 store a program that can be executed by the processor 1010, causing the processor 1010 to perform the methods described in the preceding method embodiments. The memories 1020 may be independent of the processor 1010 or integrated within the processor 1010.
[0271] The device 1000 may also include a transceiver 1030. The processor 1010 can communicate with other devices or chips via the transceiver 1030. For example, the processor 1010 can send and receive data with other devices or chips via the transceiver 1030.
[0272] This application also provides a computer-readable storage medium for storing a program. This computer-readable storage medium can be applied to a terminal device or network device provided in this application embodiment, and the program causes a computer to execute the methods performed by the terminal device or network device in the various embodiments of this application.
[0273] The computer-readable storage medium can be any usable medium that a computer can read, or a data storage device such as a server or data center that integrates one or more usable media. The usable medium can be magnetic, optical, or semiconductor media, etc. Examples of computer storage media include, but are not limited to: phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc-read-only memory (CD-ROM), solid-state disk (SSD), digital video disc (DVD) or other optical storage, magnetic tape, magnetic tape / disk storage or other magnetic storage devices, or any other non-transfer medium.
[0274] This application also provides a computer program product. The computer program product includes a program. This computer program product can be applied to a terminal device or network device provided in the embodiments of this application, and the program causes a computer to execute the methods performed by the terminal device or network device in the various embodiments of this application.
[0275] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0276] This application also provides a computer program. This computer program can be applied to a terminal device or network device provided in this application, and the computer program causes the computer to execute the methods performed by the terminal or network device in various embodiments of this application.
[0277] In this application, the terms "system" and "network" are used interchangeably. Furthermore, the terminology used in this application is only for explaining specific embodiments of the application and is not intended to limit the application. The terms "first," "second," "third," and "fourth," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order.
[0278] It should be noted that the terms "comprising," "including," and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0279] In the embodiments of this application, the term "instruction" can be a direct instruction, an indirect instruction, or an indication of a relationship. For example, A instructing B can mean that A directly instructs B, such as B being able to obtain information through A; it can also mean that A indirectly instructs B, such as A instructing C, so B can obtain information through C; or it can mean that there is a relationship between A and B.
[0280] In the embodiments of this application, the term "correspondence" may indicate a direct or indirect correspondence between two things, or an association between two things, or a relationship such as instruction and being instructed, configuration and being configured.
[0281] In the embodiments of this application, "predefined" or "preconfigured" can be implemented by pre-storing corresponding codes, tables, or other means that can be used to indicate relevant information in the device (e.g., including terminal devices and network devices). This application does not limit the specific implementation method. For example, predefined can refer to what is defined in the protocol.
[0282] In the embodiments of this application, the term "protocol" may refer to standard protocols in the field of communications, such as LTE protocols, NR protocols, and related protocols applied in future communication systems. This application does not limit the scope of these protocols.
[0283] In the embodiments of this application, determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0284] In the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0285] In the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0286] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0287] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0288] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0289] Through the above description of the embodiments, those skilled in the art can clearly understand that the above method embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a service classification device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application. It should be noted that the sequence numbers of the various embodiments are only for description and do not represent the superiority or inferiority of the embodiments.
[0290] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
A model training method, characterized in that, include: The first terminal device receives the first sub-model in the global model, and the first sub-model is determined according to the first segmentation layer; The first terminal device trains the first sub-model; The global model further includes a second sub-model, and the training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round. The model training method according to claim 1 is characterized in that, The first terminal device is one of a plurality of terminal devices. The plurality of sub-models received by the plurality of terminal devices are determined according to the global model and a plurality of different segmentation layers. The plurality of sub-models include the first sub-model, and the plurality of segmentation layers include the first segmentation layer. The model training method according to claim 1 or 2 is characterized in that, The first segmentation layer is determined based on the capability level of the first terminal device. The second terminal device that performs the model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model. The model training method according to any one of claims 1-3 is characterized in that, The first terminal device belongs to the first set of terminal devices, and all terminal devices in the first set of terminal devices correspond to the same capability level. The model training method according to any one of claims 1-4 is characterized in that, The first segmentation layer is further determined based on the number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device. The model training method according to any one of claims 1-5 is characterized in that, The training duration of the first sub-model is determined based on one or more of the following information: The position of the first segmentation layer in the global model; The capabilities of the first terminal device / the number of data samples; The wireless resource status between the first terminal device and the network device; The network device allocates a computing frequency to the first terminal device. The model training method according to any one of claims 1-6 is characterized in that, When the training epoch in which the first local model participates in model aggregation is not the current training epoch, the model training method further includes: In one or more training epochs following the current training epoch, the first terminal device trains the first sub-model. The model training method according to any one of claims 1-7 is characterized in that, The current training round corresponds to the first aggregation period. When the training duration of the first sub-model is greater than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round. When the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round. The model training method according to claim 8 is characterized in that, The first aggregation period is determined based on the state of N local models of N terminal devices that are performing the model training and a first threshold, where N is a positive integer. The model training method according to any one of claims 1-9 is characterized in that, When the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round. The model training method according to any one of claims 1-10 is characterized in that, The model aggregation of the current training round is used to determine the global model for the next training round. The global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation. The model training method according to claim 11 is characterized in that, The weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation. The model training method according to claim 11 or 12 is characterized in that, The current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model w is the (t+1)-th training epoch. t+1 for: Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the t-th training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round. The model training method according to claim 13 is characterized in that, The nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for: Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t Indicates what The aggregation interval of the nth terminal device, D k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device. The model training method according to any one of claims 1-14 is characterized in that, The network device transmitting the first sub-model includes an edge server, which is used to determine at least one of the following information under a first constraint: The communication bandwidth of each terminal device performing the model training; The computing frequency allocation method of the edge server; The selection of multiple terminal devices is used to determine the first aggregation cycle; Multiple segmentation layers, including the first segmentation layer. A model training method, characterized in that, include: The network device sends the first sub-model in the global model to the first terminal device. The first sub-model is determined according to the first segmentation layer. The network device trains the second sub-model in the global model; The training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device; and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round. The model training method according to claim 16 is characterized in that, The first terminal device is one of a plurality of terminal devices. The plurality of sub-models received by the plurality of terminal devices are determined according to the global model and a plurality of different segmentation layers. The plurality of sub-models include the first sub-model, and the plurality of segmentation layers include the first segmentation layer. The model training method according to claim 16 or 17 is characterized in that, The first segmentation layer is determined based on the capability level of the first terminal device. The second terminal device that performs the model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model. The model training method according to any one of claims 16-18 is characterized in that, The first terminal device belongs to the first set of terminal devices, and all terminal devices in the first set of terminal devices correspond to the same capability level. The model training method according to any one of claims 16-19 is characterized in that, The first segmentation layer is further determined based on the number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device. The model training method according to any one of claims 16-20 is characterized in that, The training duration of the first sub-model is determined based on one or more of the following information: The position of the first segmentation layer in the global model; The capabilities of the first terminal device / the number of data samples; The wireless resource status between the first terminal device and the network device; The network device allocates a computing frequency to the first terminal device. The model training method according to any one of claims 16-21 is characterized in that, When the training epoch in which the first local model participates in model aggregation is not the current training epoch, the model training method further includes: In one or more training epochs following the current training epoch, the network device trains the second sub-model. The model training method according to any one of claims 16-22 is characterized in that, The current training round corresponds to the first aggregation period. When the training duration of the first sub-model is greater than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round. When the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round. The model training method according to claim 23 is characterized in that, The first aggregation period is determined based on the state of N local models of N terminal devices that are performing the model training and a first threshold, where N is a positive integer. The model training method according to any one of claims 16-24 is characterized in that, When the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round. The model training method according to any one of claims 16-25 is characterized in that, The model aggregation of the current training round is used to determine the global model for the next training round. The global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation. The model training method according to claim 26 is characterized in that, The weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation. The model training method according to claim 26 or 27 is characterized in that, The current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model wt is the (t+1)-th training epoch. +1 for: Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the t-th training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This indicates that the nth terminal device is in the Describe the local model in the t-th training round. The model training method according to claim 28 is characterized in that, The nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for: Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device. The model training method according to any one of claims 16-29 is characterized in that, The network device includes an edge server, which is used to determine at least one of the following information under a first constraint: The communication bandwidth of each terminal device performing the model training; The computing frequency allocation method of the edge server; The selection of multiple terminal devices is used to determine the first aggregation cycle; Multiple segmentation layers, including the first segmentation layer. A resource management method for model training, characterized in that, include: The model training process is decoupled into a single training round; A first constraint is determined for the single training round; Wherein, the first constraint is used to determine the first management scheme, the first management scheme includes multiple segmentation layers corresponding to multiple terminal devices that perform the model training, the multiple terminal devices include a first terminal device, the multiple segmentation layers include a first segmentation layer corresponding to the first terminal device, and the first segmentation layer is related to the capabilities of the first terminal device. The resource management method according to claim 31 is characterized in that, The process of decoupling the model training into a single training round includes: Based on Lyapunov optimization theory and the second constraint, the model training process is decoupled into a single training round. The resource management method according to claim 31 or 32 is characterized in that, The first management scheme also includes one or more of the following information: The communication bandwidth of each terminal device performing the model training; The method of allocating computing frequency for edge servers; The selection of multiple terminal devices is used to determine the first aggregation cycle. The resource management method according to any one of claims 31-33 is characterized in that, The first constraint is related to at least one of the following: The training duration of the model; Energy consumption of the multiple terminal devices and network devices. A model training device, characterized in that, The model training device is a first terminal device, which includes: A receiving unit is used to receive the first sub-model in the global model, wherein the first sub-model is determined according to the first segmentation layer; A processing unit is used to train the first sub-model; The global model further includes a second sub-model, and the training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device, and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round. The model training apparatus according to claim 35 is characterized in that, The first terminal device is one of a plurality of terminal devices. The plurality of sub-models received by the plurality of terminal devices are determined according to the global model and a plurality of different segmentation layers. The plurality of sub-models include the first sub-model, and the plurality of segmentation layers include the first segmentation layer. The model training apparatus according to claim 35 or 36 is characterized in that, The first segmentation layer is determined based on the capability level of the first terminal device. The second terminal device that performs the model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model. The model training apparatus according to any one of claims 35-37 is characterized in that, The first terminal device belongs to the first set of terminal devices, and all terminal devices in the first set of terminal devices correspond to the same capability level. The model training apparatus according to any one of claims 35-38 is characterized in that, The first segmentation layer is further determined based on the number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device. The model training apparatus according to any one of claims 35-39 is characterized in that, The training duration of the first sub-model is determined based on one or more of the following information: The position of the first segmentation layer in the global model; The capabilities of the first terminal device / the number of data samples; The wireless resource status between the first terminal device and the network device; The network device allocates a computing frequency to the first terminal device. The model training apparatus according to any one of claims 35-40 is characterized in that, When the training round in which the first local model participates in model aggregation is not the current training round, the processing unit is further configured to train the first sub-model in one or more training rounds after the current training round. The model training apparatus according to any one of claims 35-41 is characterized in that, The current training round corresponds to the first aggregation period. When the training duration of the first sub-model is greater than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round. When the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round. The model training apparatus according to claim 42 is characterized in that, The first aggregation period is determined based on the state of N local models of N terminal devices that are performing the model training and a first threshold, where N is a positive integer. The model training apparatus according to any one of claims 35-43 is characterized in that, When the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round. The model training apparatus according to any one of claims 35-44 is characterized in that, The model aggregation of the current training round is used to determine the global model for the next training round. The global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation. The model training apparatus according to claim 45 is characterized in that, The weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation. The model training apparatus according to claim 45 or 46 is characterized in that, The current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model w is the (t+1)-th training epoch. t+1 for: Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the t-th training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round. The model training apparatus according to claim 47 is characterized in that, The nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for: Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device. The model training apparatus according to any one of claims 35-48 is characterized in that, The network device transmitting the first sub-model includes an edge server, which is used to determine at least one of the following information under a first constraint: The communication bandwidth of each terminal device performing the model training; The computing frequency allocation method of the edge server; The selection of multiple terminal devices is used to determine the first aggregation cycle; Multiple segmentation layers, including the first segmentation layer. A model training device, characterized in that, The model training device is a network device, which includes: The sending unit is used to send the first sub-model in the global model to the first terminal device, wherein the first sub-model is determined according to the first segmentation layer; A processing unit is used to train the second sub-model in the global model; The training of the first sub-model and the second sub-model is used together to determine the first local model; the first segmentation layer is determined according to the capabilities of the first terminal device; and / or, the training duration of the first sub-model is used to determine whether the training round in which the first local model participates in model aggregation is the current training round. The model training apparatus according to claim 50 is characterized in that, The first terminal device is one of a plurality of terminal devices. The plurality of sub-models received by the plurality of terminal devices are determined according to the global model and a plurality of different segmentation layers. The plurality of sub-models include the first sub-model, and the plurality of segmentation layers include the first segmentation layer. The model training apparatus according to claim 50 or 51 is characterized in that, The first segmentation layer is determined based on the capability level of the first terminal device. The second terminal device that performs the model training corresponds to the third sub-model. When the capability level of the first terminal device is higher than that of the second terminal device, the first sub-model is greater than the third sub-model. The model training apparatus according to any one of claims 50-52 is characterized in that, The first terminal device belongs to the first set of terminal devices, and all terminal devices in the first set of terminal devices correspond to the same capability level. The model training apparatus according to any one of claims 50-53 is characterized in that, The first segmentation layer also according to the The number of data samples of the first terminal device and / or the wireless resource status between the first terminal device and the network device are determined. The model training apparatus according to any one of claims 50-54 is characterized in that, The training duration of the first sub-model is determined based on one or more of the following information: The position of the first segmentation layer in the global model; The capabilities of the first terminal device / the number of data samples; The wireless resource status between the first terminal device and the network device; The network device allocates a computing frequency to the first terminal device. The model training apparatus according to any one of claims 50-55 is characterized in that, When the training round in which the first local model participates in model aggregation is not the current training round, the processing unit is further configured to train the second sub-model in one or more training rounds after the current training round. The model training apparatus according to any one of claims 50-56 is characterized in that, The current training round corresponds to the first aggregation period. When the training duration of the first sub-model is greater than the duration of the first aggregation period, the first local model does not participate in the model aggregation of the current training round. When the training duration of the first sub-model is less than or equal to the duration of the first aggregation period, the first local model participates in the model aggregation of the current training round. The model training apparatus according to claim 57 is characterized in that, The first aggregation period is determined based on the state of N local models of N terminal devices that are performing the model training and a first threshold, where N is a positive integer. The model training apparatus according to any one of claims 50-58 is characterized in that, When the state of the first local model is 1 in the current training round, the first local model participates in the model aggregation of the current training round; when the state of the first local model is 0 in the current training round, the first local model does not participate in the model aggregation of the current training round. The model training apparatus according to any one of claims 50-59 is characterized in that, The model aggregation of the current training round is used to determine the global model for the next training round. The global model for the next training round is determined based on multiple weighting coefficients corresponding to the multiple terminal devices participating in the model aggregation. The model training apparatus according to claim 60 is characterized in that, The weighting coefficients are determined based on the aggregation interval of the multiple terminal devices participating in the model aggregation and / or the bias parameters controlling the model aggregation. The model training apparatus according to claim 60 or 61 is characterized in that, The current training epoch is the t-th training epoch out of T training epochs, where T is a positive integer, 1≤t≤T, and the global model w is the (t+1)-th training epoch. t+1 for: Where 1≤n≤N, m n,t ρ represents the local model state of the nth terminal device out of N terminal devices in the t-th training round. n,t This represents the weighting coefficient of the nth terminal device in the tth training round. This represents the local model of the nth terminal device in the tth training round. The model training apparatus according to claim 62 is characterized in that, The nth terminal device is the set S of terminal devices participating in model aggregation. t One of them, the weighting coefficient ρ of the nth terminal device in the tth training round. n,t for: Among them, D n γ represents the number of data samples from the nth terminal device, γ represents the bias parameter for the control model aggregation, and α represents the number of data samples from the nth terminal device. n,t D represents the aggregation interval of the nth terminal device. k S represents t The number of data samples of the k-th terminal device, α k,t This represents the aggregation interval of the k-th terminal device. The model training apparatus according to any one of claims 50-63 is characterized in that, The network device includes an edge server, which is used to determine at least one of the following information under a first constraint: The communication bandwidth of each terminal device performing the model training; The computing frequency allocation method of the edge server; The selection of multiple terminal devices is used to determine the first aggregation cycle; Multiple segmentation layers, including the first segmentation layer. A resource management device for model training, characterized in that, The resource management device includes: The first processing unit is used to decouple the model training process into a single training round; The second processing unit is used to determine the first constraint for the single training round; Wherein, the first constraint is used to determine the first management scheme, the first management scheme includes multiple segmentation layers corresponding to multiple terminal devices that perform the model training, the multiple terminal devices include a first terminal device, the multiple segmentation layers include a first segmentation layer corresponding to the first terminal device, and the first segmentation layer is related to the capabilities of the first terminal device. The resource management device according to claim 65 is characterized in that, The first processing unit is also used to decouple the model training process into a single training round based on Lyapunov optimization theory and the second constraint. The resource management device according to claim 65 or 66 is characterized in that, The first management scheme also includes one or more of the following information: The communication bandwidth of each terminal device performing the model training; The method of allocating computing frequency for edge servers; The selection of multiple terminal devices is used to determine the first aggregation cycle. The resource management device according to any one of claims 65-67 is characterized in that, The first constraint is related to at least one of the following: The training duration of the model; Energy consumption of the multiple terminal devices and network devices. A communication device, characterized in that, It includes a memory and a processor, the memory being used to store a program, and the processor being used to invoke the program in the memory to perform the method as described in any one of claims 1-15, 16-30, or 31-34. An apparatus characterized in that, Includes a processor for calling a program from memory to perform the method as described in any one of claims 1-15, 16-30, or 31-34. A chip characterized in that, Includes a processor for calling a program from memory, causing a device on which the chip is mounted to perform the method as described in any one of claims 1-15, 16-30, or 31-34. A computer-readable storage medium, characterized in that, It contains a program that causes a computer to perform the method as described in any one of claims 1-15, 16-30, or 31-34. A computer program product, characterized in that, Includes a program that causes a computer to perform the method as described in any one of claims 1-15, 16-30, or 31-34. A computer program, characterized in that, The computer program causes the computer to perform the method as described in any one of claims 1-15, 16-30, or 31-34.
Citation Information
Patent Citations
Federal learning-based model training method, electronic equipment and storage medium
CN115280338A
Neural network model training method and device, electronic equipment and storage medium
CN116681127A
Machine learning model training method, terminal device and network device
CN117546180A
Federated-learning operation method, system and apparatus having robustness
WO2024164783A1