Training methods, terminal devices, and network devices for machine learning models
Patent Information
- Application Number
- CN202380011754.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-09-25
AI Technical Summary
[0003]但是,联邦学习系统未能充分利用基站等网络设备的计算能力以进一步提高机器学习模型性能,且模型上传和聚合会造成较大的时延开销
Smart Images

Figure CN117546180B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning technology, and more specifically, to a method for training a machine learning model, a terminal device, and a network device. Background Technology
[0002] With the development of communication technology, the implementation of intelligent services requires the support of high-performance machine learning models. Machine learning models can be trained in a distributed manner through federated learning systems, obtaining high-performance machine learning models while protecting user privacy.
[0003] However, federated learning systems fail to fully utilize the computing power of network devices such as base stations to further improve the performance of machine learning models, and model uploading and aggregation incur significant latency overhead. Therefore, how to efficiently train machine learning models is an urgent problem to be solved. Summary of the Invention
[0004] This application provides a method for training a machine learning model, a terminal device, and a network device. The various aspects involved in the embodiments of this application are described below.
[0005] In a first aspect, a method for training a machine learning model is provided, comprising: a first terminal device receiving a first global model sent by a network device; the first terminal device dividing local data samples into a first data sample and a second data sample; wherein the first data sample is used by the first terminal device to perform a first training on the first global model in a first training period, and the second data sample is used by the network device to perform a second training on the first global model in the first training period.
[0006] Secondly, a method for training a machine learning model is provided, comprising: a network device sending a first global model to multiple terminal devices, including a first terminal device; the network device receiving multiple second data samples sent by the multiple terminal devices, the multiple second data samples being determined based on local data samples of the multiple terminal devices, the local data samples being divided into first data samples and second data samples; wherein the multiple first data samples of the multiple terminal devices are respectively used by the multiple terminal devices to perform first training on the first global model in a first training period, and the multiple second data samples are used by the network device to perform second training on the first global model in the first training period.
[0007] Thirdly, a terminal device is provided, the terminal device being a first terminal device for training a machine learning model, the terminal device comprising: a receiving unit, configured to receive a first global model sent by a network device; and a processing unit, configured to divide local data samples into a first data sample and a second data sample; wherein the first data sample is used by the first terminal device to perform a first training on the first global model within a first training period, and the second data sample is used by the network device to perform a second training on the first global model within the first training period.
[0008] Fourthly, a network device is provided for training a machine learning model. The network device includes: a transmitting unit for transmitting a first global model from multiple terminal devices, including a first terminal device; and a receiving unit for receiving multiple second data samples transmitted by the multiple terminal devices, wherein the multiple second data samples are determined based on local data samples of the multiple terminal devices, and the local data samples are divided into first data samples and second data samples; wherein the multiple first data samples of the multiple terminal devices are respectively used by the multiple terminal devices to perform first training on the first global model in a first training period, and the multiple second data samples are used by the network device to perform second training on the first global model in the first training period.
[0009] Fifthly, a communication device is provided, 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 the first or second aspect.
[0010] A sixth aspect provides an apparatus including a processor for calling a program from memory to perform the method as described in the first or second aspect.
[0011] A seventh aspect provides a chip including a processor for calling a program from memory, causing a device on which the chip is mounted to perform the method as described in the first or second aspect.
[0012] Eighthly, a computer-readable storage medium is provided having a program stored thereon that causes a computer to perform the method as described in the first or second aspect.
[0013] Ninth aspect, a computer program product is provided, including a program that causes a computer to perform the method as described in the first or second aspect.
[0014] In a tenth aspect, a computer program is provided that causes a computer to perform the method as described in the first or second aspect.
[0015] In this embodiment, after receiving the first global model, the terminal device divides its local data samples into a first data sample and a second data sample. The first data sample is used by the terminal device for first training of the first global model, and the second data sample is used by the network device for second training of the first global model. Therefore, the training method in this embodiment combines training performed separately by the terminal device and the network device, fully utilizing the powerful computing capabilities of the network device and the data privacy protection provided by local training on the terminal device, thus improving training efficiency. Attached Figure Description
[0016] Figure 1 This is the wireless communication system used in the embodiments of this application.
[0017] Figure 2 This is a flowchart illustrating a training method for a machine learning model provided in an embodiment of this application.
[0018] Figure 3 yes Figure 2 The diagram illustrates one possible implementation of the execution timing of the method shown.
[0019] Figure 4 yes Figure 2 The diagram illustrates another possible implementation of the execution timing of the method shown.
[0020] Figure 5 This is a flowchart illustrating the federated learning method based on retransmission over-the-air computation.
[0021] Figure 6 This is a flowchart illustrating the retransmission over-the-air calculation mechanism.
[0022] Figure 7 This is a schematic diagram of a federated learning system based on retransmission over-the-air computation provided in an embodiment of this application.
[0023] Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0024] Figure 9 yes Figure 8 The diagram shows a structural schematic of a control device for the terminal equipment shown.
[0025] Figure 10 This is a schematic diagram of the structure of a network device provided in an embodiment of this application.
[0026] Figure 11 yes Figure 10 The diagram shows a structural schematic of a control device for a network device.
[0027] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0028] Figure 13 This 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, the embodiments of this application 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), non-terrestrial network (NTN), 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. These future communication systems could be, for example, sixth-generation (6G) mobile communication systems or satellite communication systems.
[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. Base stations can broadly encompass various names listed below, or be replaced by names such as: NodeB, Evolved NodeB (eNB), Next Generation NodeB (gNB), Relay Station, Access Point, Transmitting and Receiving Point (TRP), Transmitting Point (TP), Master NodeB, Secondary NodeB (SeNB), Multimode Radio (MSR) Node, Home Base Station, Network Controller, Access Node, Wireless Node, Access Point (AP), Transmitting Node, Transceiver Node, Baseband Unit (BBU), Remote Radio Unit (RRU), Active Antenna Unit (AAU), Remote Radio Head (RRH), Central Unit (CU), Distributed Unit (CU) Base stations can be macro base stations, micro base stations, relay nodes, donor nodes, or similar entities, or combinations thereof. A base station can also refer to a communication module, modem, or chip installed within the aforementioned equipment or apparatus. A base station can also be a mobile switching center, equipment performing base station functions in D2D, V2X, and M2M communications, network-side equipment in 6G networks, or equipment performing base station functions in future communication systems. Base stations can support networks using the same or different access technologies. The embodiments of this application do not limit the specific technologies or equipment 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 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 1 As shown, 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 An exemplary diagram shows a 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 the scope of the embodiments.
[0046] In the embodiments of this application, Figure 1 The communication system shown 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 the embodiments of this 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. Figure 1Taking the communication system 100 shown as an example, the communication equipment may include a network device 110 and a terminal device 120 with communication functions. The network device 110 and the terminal device 120 may be the specific devices described above, which will not be repeated here. The communication equipment 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 technology, intelligent services are placing increasingly higher demands on the performance of machine learning models. For example, in future 6G edge networks, the implementation of edge intelligent services requires the support of high-performance machine learning models. Edge intelligent services include, for example, autonomous driving, intelligent traffic management, and security monitoring.
[0050] However, with data samples stored on different terminal devices in edge networks, efficiently utilizing these distributed data samples for training machine learning models is a pressing challenge. Currently, methods for training machine learning models in edge networks mainly include federated learning and centralized learning.
[0051] Federated Learning System
[0052] Federated learning systems enable distributed training of machine learning models for edge intelligence applications. Typically, a federated learning system in an edge network consists of a base station and multiple terminal devices, and the federated learning process is divided into several rounds. In a given round, the federated learning process includes the following steps:
[0053] S1: The base station broadcasts the global model to all terminal devices. This global model is the machine learning model determined in the previous round.
[0054] S2: Multiple terminal devices use local data samples to train a global model to obtain multiple local models, and then upload the local models to the base station via a wireless channel.
[0055] S3: The base station aggregates the local models uploaded by all terminal devices to obtain a new global model.
[0056] In a federated learning system, base stations and multiple terminal devices repeatedly go through the above S1 to S3 processes until the global model meets the preset convergence conditions, at which point the federated learning is complete.
[0057] However, in federated learning systems, the powerful computing capabilities of base stations are not fully utilized for training machine learning models. As mentioned above, the base stations in the federated learning system are only responsible for aggregating local models uploaded by terminal devices, and do not undertake the task of training machine learning models, which wastes the powerful computing capabilities of the base stations.
[0058] Furthermore, in federated learning systems, the uploading and aggregation processes of local models are separated, resulting in low aggregation efficiency. In the aforementioned federated learning systems, terminal devices typically upload local models using digital communication. For example, the terminal device first encodes the local model into a bitstream and then uploads it to the base station via a wireless channel. Therefore, the base station needs to decode all users' local models before aggregating them to obtain the global model. This transmission method separates the uploading and aggregation processes of local models, causing significant latency overhead and reducing aggregation efficiency.
[0059] Centralized learning system
[0060] A centralized learning system enables centralized training of machine learning models for edge intelligence services. In an edge network, a centralized learning system consists of a base station and multiple terminal devices, and the centralized learning process is divided into several rounds. In a given round, the centralized learning process includes the following steps:
[0061] S1: All terminal devices upload local data samples to the base station.
[0062] S2: The base station uses all received data samples to train a global model, and then obtains a new global model. The global model trained is the machine learning model determined in the previous round, and the new global model can be used in the next round.
[0063] In a centralized learning system, the base station and multiple terminal devices continuously repeat the processes S1 and S2 described above until the global model meets the preset convergence conditions, at which point centralized learning is completed.
[0064] However, in centralized learning systems, directly uploading locally stored data samples to terminal devices may expose data privacy. In the aforementioned centralized learning system, local data samples contain privacy information related to the terminal device. Directly uploading local data samples to the base station would expose this privacy information, posing a risk of privacy breach.
[0065] Aerial computing
[0066] Over-the-air computing is a novel non-orthogonal access method. Traditional orthogonal and non-orthogonal access methods only focus on how to transmit information from the sender to the receiver. Over-the-air computing, however, utilizes the superposition characteristics of wireless channels to enable multiple senders to transmit information on the same time-frequency resources. Thus, the receiver receives information from each sender after superposition or other processing. For example, multiple terminal devices transmit multiple transport blocks on the same time-frequency resources, and the base station can receive information from each terminal device after superposition of the multiple transport blocks.
[0067] Furthermore, over-the-air computing requires certain pre-processing and post-processing at both the transmitting and receiving ends. Through pre-processing and post-processing, over-the-air computing can implement various signal calculation methods during communication. Therefore, over-the-air computing can achieve the unification of communication and computation processes.
[0068] The preceding text discussed the problems associated with federated learning and centralized learning for training machine learning models. As discussed, while federated learning effectively protects user device privacy, it fails to fully utilize the powerful computing capabilities of base stations, and the uploading and aggregation of local models incurs significant latency overhead, resulting in low training efficiency.
[0069] Based on this, this application proposes a method for training a machine learning model. This method can fully utilize the powerful computing capabilities of the base station to undertake the training task of the machine learning model, and also improve the overall model performance. For ease of understanding, the following describes a method in conjunction with... Figure 2 The training method is described in detail.
[0070] Figure 2 This description is from the perspective of the interaction between the first terminal device and the network device. The first terminal device is a device with certain computing and communication capabilities, as mentioned above. In some embodiments, the first terminal device can train a machine learning model based on local data samples. In some embodiments, the first terminal device can send data samples and the machine learning model to the network device. In some embodiments, the first terminal device can receive a machine learning model sent by the network device via broadcast.
[0071] 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. The data samples stored by the first terminal device may include local data samples used to train a machine learning model.
[0072] The first terminal device is any one of multiple terminal devices participating in the machine learning model. These multiple terminal devices can work together with the network device to train the machine learning model. In some embodiments, each of the multiple terminal devices can provide data samples to the machine learning model.
[0073] The network device can be 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. The network device can be a base station that broadcasts a global model to multiple terminal devices based on federated learning, or it can be a base station that trains a global model based on centralized learning, as described above; no limitation is made here.
[0074] 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 local models sent by the multiple terminal devices. In some embodiments, the network device can send a global model for a certain round to the multiple terminal devices.
[0075] See Figure 2 In step S210, the first terminal device receives the first global model sent by the network device.
[0076] The first global model is a machine learning model that supports various intelligent services. In some embodiments, the first global model can be applied to the edge intelligent services described above.
[0077] The first global model can be any type of machine learning model, and this application does not limit it. The first global model includes, but is not limited to, convolutional neural network models, recurrent neural network models, generative adversarial networks, etc.
[0078] The first global model can be a machine learning model that is currently being trained. The training method for a machine learning model typically involves multiple rounds. A round can refer to a training process or learning process, also known as a learning round or training cycle. For example, in the federated learning described earlier, one training cycle is used to complete the process from S1 to S3. Similarly, in the centralized learning described earlier, one training cycle is used to complete the process from S1 to S2.
[0079] In some embodiments, during the training of a machine learning model, the first global model can be a global model applied to any training cycle. That is, the first global model can be the model trained within any training cycle. In some embodiments, the first global model can be the model determined in the previous training cycle preceding any training cycle. That is, except for the training cycle in which the model converges, the first global model can be the machine learning model determined in any other training cycle.
[0080] In some embodiments, the first global model may be determined by a network device. For example, the network device may integrate information related to the first global model in the current training cycle to determine the first global model for the next training cycle. For instance, the network device may determine the first global model based on the training results of the current training cycle.
[0081] The training of the first global model is jointly performed by the network device and multiple terminal devices, including the first terminal device. As mentioned earlier, the network device can broadcast the first global model to multiple terminal devices so that all terminal devices participating in the machine learning model training can receive the first global model determined in the previous training cycle.
[0082] In some embodiments, the process of a network device broadcasting a first global model to multiple terminal devices is a process included in the current training cycle. For example, this process can be used to determine the start time of the current training cycle. For instance, the network device broadcasting the first global model can indicate the start of the current training cycle. Alternatively, after the current training cycle begins, the network device broadcasts the first global model, and the first terminal device obtains the first global model by executing step S210.
[0083] In some embodiments, the process of the network device broadcasting the first global model to multiple terminal devices is not part of the current training cycle. For example, the current training cycle only begins after the first terminal device obtains the first global model by executing step S210.
[0084] In step S220, the first terminal device divides the local data sample into a first data sample and a second data sample.
[0085] Local data samples can be various data samples used by the first terminal device to train the first global model. For example, local data samples include, but are not limited to, images, audio, signals, etc., and this application embodiment does not limit them.
[0086] In some embodiments, a portion of the local data sample relates to the privacy information of the first terminal device. In some embodiments, a portion of the local data sample is information publicly disclosed by the first terminal device. In some embodiments, the local data sample contains information that the first terminal device does not wish to be disclosed.
[0087] The first terminal device can obtain local data samples in various ways. In some embodiments, the local data samples may be collected and determined by the first terminal device. In some embodiments, the local data samples may include data samples stored locally by the first terminal device and data samples collected by the first terminal device after receiving the first global model.
[0088] The division of local data samples into a first data sample and a second data sample can refer to the first terminal device dividing the local data samples based on a certain division scheme to determine the first data sample and the second data sample.
[0089] The first and second data samples can be data samples used to train a first global model. In some embodiments, local data samples can be selected first for training the model before being divided. That is, local data samples may include not only the first and second data samples used for training, but also other data samples. In some embodiments, all local data samples are divided to determine the first and second data samples. That is, local data samples consist of the first and second data samples. In some embodiments, when dividing local data samples, some data samples may be present in both the first and second data samples simultaneously.
[0090] The data samples in the first data sample and the second data sample can be completely different or partially the same, and no limitation is made here.
[0091] The local data samples are divided into first data samples and second data samples to train the first global model using different training methods, thus facilitating effective model training. Multiple terminal devices participating in the machine learning model can all divide the local data samples into first data samples and second data samples.
[0092] The first data sample is used by the first terminal device to perform first training on the first global model within the first training period, and the second data sample is used by the network device to perform second training on the first global model within the first training period. In other words, the first training is performed locally on multiple terminal devices, and the second training is performed on the network device. This training method utilizes multiple terminal devices and network devices respectively, thereby leveraging the powerful computing capabilities of network devices while protecting privacy as much as possible.
[0093] Multiple terminal devices participating in the machine learning model perform initial training on the initial global model based on the initial data samples. This initial training can be used by multiple terminal devices, including the initial terminal device, to obtain multiple local models.
[0094] In some embodiments, the first training is based on federated learning, and the second training is based on centralized learning. That is, the first training is distributed training performed by multiple terminal devices, including a first terminal device, based on a federated learning system; the second training is centralized training performed by a network device. In this application, the training method is a semi-federated learning system that combines federated and centralized learning. On one hand, the terminal device uses a portion of local data samples to train a global model to obtain a local model, and uploads the local model to the network device for aggregation, resulting in a federated learning aggregated model. On the other hand, the terminal uploads a portion of local data samples to the network device, and the network device uses its powerful computing capabilities to train a global model based on this data to obtain a centralized learning model. Finally, the network device combines the federated learning aggregated model and the centralized learning model to obtain the global model. For simplicity, the following text uses the term semi-federated learning to describe the embodiment where the first training is based on federated learning and the second training is based on centralized learning.
[0095] In the above embodiments, the first data sample is used for the first training, that is, the first data sample is used for federated learning. The first data sample can also be called the federated learning data sample. The second data sample is used for the second training, that is, the second data sample is used for centralized learning. The second data sample can also be called the centralized learning data sample. In this scenario, the local data sample is divided into federated learning data samples and centralized learning data samples.
[0096] There are multiple ways to determine the local data sample partitioning scheme. In some embodiments, the network device can determine a general partitioning strategy, and the first terminal device can determine the final partitioning scheme based on this strategy and its own capabilities. For example, the local data sample partitioning scheme can be decided by the base station first, and then broadcast to all terminal devices by the base station. Alternatively, the local data sample partitioning scheme can be determined by each terminal device itself.
[0097] For example, the classification scheme for local data samples can be determined based on the type of data sample. As an example, local data samples can be classified based on whether the data sample involves privacy. For instance, data samples involving the privacy of a first terminal device belong to the first data samples that are not directly uploaded, thereby avoiding the exposure of the first terminal device's privacy information by data samples sent to network devices. In this classification scheme, the second data samples are related to information publicly disclosed by the first terminal device. Therefore, information not publicly disclosed by the first terminal device cannot be classified as second data samples.
[0098] For example, the local data sample partitioning scheme can be determined based on the number of data samples. As an example, the number of samples used by multiple terminal devices to upload the second data sample to the network device can be equal. As an example, multiple terminal devices can partition the local data sample according to the same proportion.
[0099] For example, the partitioning scheme for local data samples can be determined based on the capabilities of each terminal device. The capabilities of the terminal device may include the computational power for training the first global model, and the communication capabilities for uploading data samples and the local model. As an example, the number of samples in the first data sample and the number of samples in the second data sample can be determined based on the communication capabilities and / or computational power of the first terminal device. For instance, if the computational power of the first terminal device is relatively weak, the number of samples in the second data sample can be greater than the number of samples in the first data sample. Alternatively, the number of samples in the second data sample can be positively correlated with the communication capabilities of the first terminal device.
[0100] The training methods for the first and second training can be gradient descent or related methods, and are not limited here. For example, the first terminal device can train a first global model using gradient descent based on the first data sample to obtain a local model. The network device can train a first global model using gradient descent based on multiple second data samples sent by multiple terminal devices to obtain a single model.
[0101] In some embodiments, the first training and the second training are executed in parallel within the first training cycle to improve the efficiency of model training. That is, within the first training cycle, multiple terminal devices and network devices can train the first global model in parallel. Taking federated learning and centralized learning as examples, within the training cycle, after receiving the first global model, multiple terminal devices can perform distributed training of the first global model using federated learning based on the first data samples; multiple terminal devices can also send multiple second data samples to the network device so that the network device can perform centralized training of the first global model based on the multiple second data samples within the training cycle.
[0102] As mentioned earlier, a training cycle refers to the time required to complete one training iteration when training a machine learning model. Taking the first global model as an example, completing one training iteration can refer to the process of training the first global model to obtain the second global model after determining the first global model. In the current training cycle, the second global model can be a new machine learning model determined based on the first global model. In the next training cycle, the second global model can be the first global model. By performing repeated training over multiple training cycles until the global model converges, the current training (learning) process ends. The first training cycle can be any one of these multiple training cycles.
[0103] Since the first and second training sessions are executed in parallel, the duration of the first training cycle needs to take into account the duration of both training methods to determine the duration of each learning round of the machine learning model. For example, the relevant cycle for the first training performed by multiple terminal devices can be called the first sub-cycle, and the relevant cycle for the second training performed by network devices can be called the second sub-cycle. Therefore, the first sub-cycle can also be called the terminal device cycle, and the second sub-cycle can also be called the network device cycle.
[0104] To complete all training, the first training cycle can be the maximum of the first and second sub-cycles. Since the first and second sub-cycles are parallel time cycles, the duration of the first training cycle is the maximum of the durations of the first and second sub-cycles.
[0105] In the first sub-period, multiple terminal devices perform first training based on a first data sample and send the trained local models to the network device. Therefore, the first sub-period can be determined based on multiple first durations for the first training by the multiple terminal devices and one or more second durations for sending the local models to the network device. For example, when there is one second duration, the duration of the first sub-period is the sum of the maximum value among the multiple first durations and the second duration. For example, when there are multiple second durations, the multiple first durations and multiple second durations are added to obtain multiple sums. The duration of the first sub-period is the maximum value among these sums.
[0106] For example, the first duration is the duration for the terminal device to perform the first training, that is, the duration for the terminal device to train the first global model. The time for each terminal device to perform the first training is not necessarily the same, so the first training period can have multiple first durations of different lengths.
[0107] As an example, when the first terminal device trains the first global model using gradient descent, the first duration can be determined based on the number of times the first terminal device uses gradient descent, the number of data samples used in each gradient descent, the number of central processing unit (CPU) cycles required to process one data sample, and the CPU frequency of the first terminal device.
[0108] For example, among K terminal devices (K is an integer greater than or equal to 1), the first duration of the k-th terminal device (k is an integer from 1 to K) can be expressed as: It can be determined as follows:
[0109]
[0110] in, Let be the number of times the gradient descent method is applied to the k-th terminal device. Let be the number of data samples used by the k-th terminal device in each gradient descent iteration. The number of CPU cycles required to process one data sample for the k-th terminal device. Let be the CPU frequency of the k-th terminal device.
[0111] For example, the second duration is the duration for which the terminal device sends the locally trained model obtained in the first training to the network device. As an example, the second duration may not be the same when each terminal device sends its local model separately, so there may be multiple second durations. As an example, when multiple terminal devices send multiple local models based on over-the-air computing mechanisms, they will send them using the same time-frequency resources, and the second durations corresponding to the multiple terminal devices may be the same.
[0112] As an example, when the parameters of a local model are divided into multiple transmission blocks for uploading, the second duration can be determined based on the total number of parameters contained in the local model, the total number of parameters contained in a model transmission block, the probability of successfully transmitting a model transmission block, and the duration occupied by a transmission block.
[0113] For example, the upload cycle (second duration) of a local model can be expressed as: It can be determined as follows:
[0114]
[0115] Among them, Q M M represents the total number of parameters contained in the local model, and M represents the total number of parameters contained in a transport block. The probability of successfully transmitting a model transport block, T s The length of time occupied by a model transport block. This is the floor function.
[0116] In the second sub-cycle, the network device needs to first receive multiple second data samples from multiple terminal devices, and then perform second training based on these multiple second data samples. Therefore, the second sub-cycle can be determined based on one or more third durations for which multiple terminal devices send multiple second data samples to the network device, and the fourth duration for which the network device performs the second training. For example, when there is one third duration, the duration of the second sub-cycle is the sum of the third duration and the fourth duration. For example, when there are multiple third durations, the multiple third durations and the fourth duration are added together to obtain multiple sums. The duration of the second sub-cycle is the maximum value among these multiple sums.
[0117] For example, the third duration is the duration during which multiple terminal devices send the second data sample to the network device. As an example, the third duration may not be the same when each terminal device sends the second data sample separately, thus there may be multiple third durations. As an example, when multiple terminal devices send multiple second data samples based on an over-the-air computing mechanism, they will send them using the same time-frequency resources, and the third duration corresponding to the multiple terminal devices may be the same.
[0118] As an example, when the parameters of the second data sample are divided into multiple data transmission blocks for uploading, the third duration can be determined based on the number of samples in the second data sample, the total number of parameters contained in a data sample, the total number of parameters contained in a data transmission block, the probability of successfully transmitting a data transmission block, and the duration occupied by a data transmission block.
[0119] For example, the upload period (third duration) of the second data sample can be expressed as: It can be determined as follows:
[0120]
[0121] in, Q represents the number of samples in the second data sample uploaded by the terminal device. D M represents the total number of parameters contained in a data sample, and M represents the total number of parameters contained in a transport block. The probability of successfully transmitting a data transfer block, T s The length of time occupied by a data transfer block. This is the floor function.
[0122] For example, the fourth duration is the duration for the network device to perform the second training. Since the network device trains the first global model after receiving multiple second data samples, the first training cycle only includes one fourth duration.
[0123] As an example, when a network device trains the first global model using gradient descent, the fourth duration can be determined based on the number of times the network device uses gradient descent, the number of mixed data samples used in each gradient descent, the number of CPU cycles required to process one mixed data sample, and the CPU frequency of the network device.
[0124] For example, the fourth duration of a network device can be expressed as It can be determined as follows:
[0125]
[0126] in, The number of times gradient descent is applied to the network device. This refers to the number of mixed data samples used by the network device in each gradient descent iteration. The number of CPU cycles required for a network device to process a mixed data sample. This refers to the CPU frequency of the network device.
[0127] For ease of understanding, this federated learning method will be used as an example. A learning round (training cycle) includes one terminal device federated learning cycle, one local model upload cycle, one centralized learning data sample upload cycle, and one network device centralized learning cycle. The length of each cycle depends on the communication and computing capabilities of the terminal and network devices, as well as the data sample partitioning scheme.
[0128] In this example, the terminal device federated learning cycle and the local model upload cycle are sequential, constituting one terminal device cycle; the centralized learning data sample upload cycle and the network device centralized learning cycle are sequential, constituting one network device cycle. Furthermore, the terminal device cycle and the network device cycle are parallel.
[0129] To facilitate understanding, the following example uses a training method based on aerial computing, hybrid federated learning, and centralized learning, combined with... Figure 3 and Figure 4 right Figure 2 The timing relationships in the method shown are illustrated by example. Figure 3 and Figure 4 The timing sequence is used to instruct the base station and K terminal devices to perform... Figure 2 The timing relationship of the method shown. Figure 3 The communication equipment includes base station 310 and terminal equipment 301, terminal equipment 302, ..., terminal equipment 30k, ..., terminal equipment 30K. Figure 4 The communication equipment includes base station 410 and terminal equipment 401, terminal equipment 402, ..., terminal equipment 40k, ..., terminal equipment 40K.
[0130] exist Figure 3 and Figure 4 In this context, T represents the duration of the first training cycle. 1,k T1 represents the first duration of the first training iteration of the k-th terminal device based on federated learning; T2 represents the second duration of uploading the local model via over-the-air computation and performing model aggregation; T3 represents the third duration of uploading the second data sample via over-the-air computation; and T4 represents the fourth duration of the first training iteration of the network device. For ease of explanation, it is assumed that the first duration of the k-th terminal device is the largest among the K terminal devices. Therefore, the duration of the first sub-cycle is T. 1,kThe sum of T2 and T4, the duration of the second sub-cycle is the sum of T3 and T4.
[0131] See Figure 3 The duration of the first sub-cycle is longer than the duration of the second sub-cycle. The first training cycle is the first sub-cycle, meaning the first training cycle T = max{T 1,k}+T2.
[0132] See Figure 4 The duration of the first sub-cycle is shorter than the duration of the second sub-cycle. The first training cycle is the second sub-cycle. In other words, the first training cycle T = T3 + T4.
[0133] Depend on Figures 2 to 4 As can be seen, in this embodiment of the application, the terminal device divides local data samples into a first data sample and a second data sample, which are then used by the terminal device and the network device respectively to train the first global model within the current training cycle. This training method can utilize the powerful computing capabilities of the network device. Furthermore, since the second data sample does not involve the terminal device's privacy information, this training method can also protect the terminal device's privacy while improving training efficiency.
[0134] As mentioned above, the first global model is trained during the first training cycle to obtain the second global model. For example, multiple models obtained by the terminal device and the network device training the first global model can be converged to the network device, which then determines the second global model.
[0135] In some embodiments, during a first training period, multiple terminal devices obtain multiple local models through a first training of a first global model, and a network device also obtains a model through a second training of the first global model. The multiple local models and the model obtained from the second training are used by the network device to determine a second global model.
[0136] The second global model can be determined through a variety of information. These include one or more of the following: a first global model; a first aggregated model; a second trained model; a first weight corresponding to the first aggregated model; and a second weight corresponding to the second trained model.
[0137] For example, the first aggregated model can be determined based on multiple local models. For instance, some or all of the local models can be used to determine the first aggregated model by referring to federated learning. Alternatively, the multiple local models can send the federated learning aggregated model to the network device based on an over-the-air computation mechanism.
[0138] For example, when the second training is based on centralized learning, the model obtained from the second training is a centralized learning model.
[0139] For example, the first weight corresponding to the first aggregation model is used to determine the share of the first aggregation model in the second global model. The first weight is a non-negative real number less than or equal to 1. When the first training is based on federated learning, the first aggregation model is a federated learning aggregation model, and the first weight can also be called the hybrid weight of the federated learning aggregation model.
[0140] As an example, the first weight can be determined based on the first data samples obtained by dividing the local data samples from multiple terminal devices and the mixed data samples used for the second training. For instance, the first weight can be determined based on the number of samples in the multiple first data samples obtained by dividing the local data samples from multiple terminal devices and the number of samples in the mixed data samples.
[0141] As an example, multiple terminal devices divide their local data samples to obtain multiple second data samples, which are then used to determine the mixed data samples for the second training. When multiple terminal devices upload multiple second data samples to the network device via an over-the-air mechanism, the network device receives the mixed data samples. However, the mixed data samples used for the second training of the first global model may only include a subset of these second data samples to improve training efficiency while reducing computational overhead.
[0142] For example, a network device can determine a mixed data sample for second training from multiple second data samples based on a forgetting mechanism. That is, the mixed data sample can include a subset of data samples from multiple second data samples, which are determined according to the forgetting mechanism.
[0143] For example, the second weights corresponding to the second trained model are used to determine the share of the second global model. The second weights are non-negative real numbers less than or equal to 1. When the second trained model is a centralized learning model, the second weights can also be called the hybrid weights of the centralized learning model.
[0144] As an example, the second weight can be determined based on the first data sample obtained by dividing the local data sample from multiple terminal devices and the mixed data sample used for the second training. For instance, the second weight can be determined based on the number of samples in the multiple first data samples obtained by dividing the local data sample from multiple terminal devices and the number of samples in the mixed data sample.
[0145] For example, the sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
[0146] In some embodiments, the second global model can be determined based on the first aggregation model, the first weights, the second trained model, and the second weights. For example, in a semi-federated learning system, the network device can mix the federated learning aggregation model and the centralized learning model according to the first weights and the second weights, respectively, to obtain the second global model.
[0147] In some embodiments, the second global model can be determined based on the first global model, the first aggregate model, the first weights, the second trained model, and the second weights.
[0148] For example, a network device can add the product of a first global model, a first aggregated model multiplied by a first weight, and a second trained model multiplied by a second weight to determine a second global model.
[0149] For example, the second global model uses w t+1 When indicating, w t+1 It can be determined as follows:
[0150]
[0151] Among them, w t As the first global model, This is the first aggregation model. This is the model obtained from the second training. As the first weight, It is the second weight.
[0152] Optionally, in a semi-federated learning method, the first weight Second weight They can be identified as follows:
[0153]
[0154]
[0155] in, Let k be the number of data samples for the k-th federated learning. This represents the number of mixed data samples for the base station.
[0156] After determining the second global model, the network device can determine whether convergence has been achieved. In other words, the second global model is used by the network device to determine whether the trained machine learning model has converged. In some embodiments, the network device can use specific rules to determine whether the second global model has converged.
[0157] As an example, the second global model uses w t+1 The convergence criterion can be determined as follows:
[0158] ||wt+1 -w t ||≤ε;
[0159] Where ||.|| represents the calculation of the vector L2 norm, and ε represents the preset convergence precision.
[0160] As another embodiment, the second global model uses w t+1 The convergence criterion can also be defined as:
[0161] |F(w t+1 )-F(w t |≤ε;
[0162] Here, F(w) represents the loss function calculated based on a certain global model w, which can be used to measure the training effect of the global model.
[0163] It should be understood that the above embodiments are merely 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 second global model has reached objective convergence can be applied to the embodiments of this application. Therefore, the embodiments of this application do not limit the scope of the application.
[0164] After determining that the global model meets the convergence criteria, the network device can broadcast the final global model and a termination training command to all terminal devices. All terminal devices can then stop collecting data samples and training their local models.
[0165] In some embodiments, network devices and all terminal devices may release time-frequency resources used for uploading local models and second data samples.
[0166] In some embodiments, the network device may delete received mixed data samples.
[0167] As can be seen from the above, the semi-federated learning system based on retransmission over-the-air computation provided in this application can fully utilize the powerful computing capabilities of base stations to undertake the training tasks of machine learning models, thereby improving the overall model performance. Simultaneously, by applying the local data sample upload and local model upload mechanism based on retransmission over-the-air computation provided in this application to orthogonal time-frequency resources, the upload and aggregation processes of local models can be combined, improving aggregation efficiency while protecting the privacy of uploaded data samples.
[0168] The previous sections mentioned over-the-air computation in the context of uploading the second data sample and the local model. Over-the-air computation allows for the combination of uploading the local model and the aggregation process, improving aggregation efficiency while protecting the privacy of the uploaded data samples. For over-the-air computation to be performed, multiple terminal devices need to use the same resources for uploading.
[0169] In some embodiments, the input signal for over-the-air computation is the signal sent by each device that requires over-the-air computation. Multiple terminal devices can directly transmit signals based on the over-the-air computation mechanism, which helps improve transmission efficiency. For example, when uploading a local model, the communication device does not need to encode and decode it multiple times, which can reduce latency overhead.
[0170] For example, in the process of uploading a second data sample based on an over-the-air computing mechanism, the terminal device can process the second data sample fragment into an over-the-air computing input signal.
[0171] For example, in a local model upload process based on an over-the-air computing mechanism, the terminal device can process local model fragments into over-the-air computing input signals.
[0172] In some embodiments, the output signal of over-the-air computation is a signal received by the network device and processed by over-the-air computation.
[0173] For example, in semi-federated learning, for the uploading process of a second data sample based on an over-the-air computation mechanism, the output signal of the over-the-air computation is a mixed data sample fragment.
[0174] For example, in semi-federated learning, for the uploading process of a local model based on an over-the-air computation mechanism, the output signal of the over-the-air computation is a federated learning aggregated model fragment.
[0175] In some embodiments, all terminal devices can be scheduled to upload a second data sample using the same time-frequency resources, and over-the-air computing technology can be used to mix local data samples during transmission. The model obtained by the network device directly receiving and using the mixed data sample to train the first global model can be called a centralized learning model. Since the network device only receives the mixed data sample rather than the uploaded original local data sample, the privacy of the uploaded data sample can be protected.
[0176] For example, the second data sample can be divided into multiple data transmission blocks based on the upload period (third duration). Each data transmission block carries a fragment of mixed data sample and occupies a fixed time length (e.g., T). s When a data transmission block is transmitted for the first time, all terminal devices participating in the machine learning model training simultaneously send the data transmission block to the base station on the same time-frequency resources.
[0177] As one embodiment, the second data sample may include one or more sample segments corresponding to one or more data transmission blocks. The one or more sample segments may include the first sample segment. The data transmission block corresponding to the first sample segment is the first data transmission block. During the first training period, multiple terminal devices, including the first terminal device, may send multiple sample segments corresponding to the first data transmission block to the network device on the first resource. That is, multiple terminal devices simultaneously send multiple sample segments through the same resource.
[0178] As an example, one sample segment from each terminal device can correspond to one data transmission block. Multiple sample segments from multiple terminal devices can be transmitted through one data transmission block. The first sample segment from the first terminal device is one of these multiple sample segments.
[0179] As an example, the first resource could be a time-frequency resource used to carry data transmission blocks, without limitation.
[0180] As an example, the first sample fragment, along with other sample fragments, is used as input for a first-space computation. The first-space computation can be used to perform computations on multiple sample fragments on a first resource.
[0181] In some embodiments, all terminal devices can be scheduled to upload local models using the same time-frequency resources. Multiple terminal devices can aggregate their local models during transmission based on over-the-air computing technology. When the first training is federated learning, network devices can directly receive the federated learning aggregated model, thereby improving aggregation efficiency.
[0182] For example, the local model can be divided into multiple model transport blocks based on the upload period (second duration). Each model transport block can carry a federated learning aggregated model fragment and occupies a fixed time length (e.g., T). s When a model transport block is transmitted for the first time, all terminal devices participating in the training of the machine learning model simultaneously send the model transport block to the network device on the same time-frequency resources.
[0183] As one embodiment, the first local model may include one or more model fragments corresponding to one or more model transport blocks. This model fragment may also be referred to as a model segment. The one or more model fragments may include a first model fragment. The model transport block corresponding to the first model fragment is the first model transport block. During a first training period, multiple terminal devices, including the first terminal device, may send multiple model fragments corresponding to the first model transport block to the network device on the second resource. That is, multiple terminal devices simultaneously send multiple model fragments through the same resource.
[0184] As an example, one model fragment from each terminal device can correspond to one model transport block. Multiple model fragments from multiple terminal devices can be transmitted through one model transport block. The first model fragment of the first terminal device is one of these multiple model fragments.
[0185] As an example, the second resource could be a time-frequency resource used to carry model transport blocks. It should be understood that the second resource is orthogonal to the first resource in time and frequency. That is, the time-frequency resources used by the terminal device during the local model upload cycle are orthogonal to the time-frequency resources used by the terminal device during the second data sample upload cycle.
[0186] The previous section introduced a method for multiple terminal devices to upload local models and second data samples based on over-the-air computing. However, wireless channels change rapidly, making it difficult for communication devices to adjust transceiver configurations in real time, leading to transmission errors. For example, during the upload of local models or second data samples, the transmitter configuration (including transmit power, transmit beamforming, etc.) of the terminal device and the receiver configuration (including receive beamforming, etc.) of the network device need to remain constant throughout the upload time. However, the actual wireless channel state changes rapidly and multiple times during the upload time, making it difficult for communication devices to adjust transceiver configurations in real time according to the wireless channel state. Mismatches between the wireless channel state and transceiver configurations will cause transmission errors, affecting the overall model quality.
[0187] To address this issue, this application proposes a retransmission over-the-air calculation mechanism. By retransmitting over-the-air calculation results with significant errors, it eliminates the need for real-time transceiver configuration during the upload process, thereby adapting to rapidly changing wireless channels. For example, in a semi-federated learning method, multiple terminal devices require federated learning aggregation model segments and mixed data sample segments. With this retransmission over-the-air calculation mechanism, for federated learning aggregation model segments with excessive errors, the network device can initiate retransmission commands to all terminal devices, continuing retransmission until the error of that segment is within a tolerable range. Similarly, for mixed data sample segments with excessive errors, the network device can initiate retransmission commands to all terminal devices, continuing retransmission until the error of that segment is within a tolerable range.
[0188] For example, the over-the-air computing mechanism described above supports the first terminal device in retransmitting sample fragments and / or model fragments that failed to transmit.
[0189] For example, based on the retransmission over-the-air computing mechanism, a network device can receive data transmission blocks or model transmission blocks with smaller errors, and initiate retransmissions for data transmission blocks or model transmission blocks with larger errors.
[0190] As an example, the third aerial computation can be any of the multiple aerial computations in the data sample and the local model upload. For example, the third aerial computation can be the first aerial computation, the second aerial computation, or any other aerial computation.
[0191] For example, when a network device receives a data transmission block from multiple terminal devices, it can evaluate the aggregation quality of the data transmission block. For data transmission blocks that pass the aggregation quality evaluation, the network device receives them and extracts the mixed data sample fragments carried by the transmission block. For data transmission blocks that fail the aggregation quality evaluation, the network device discards the data transmission block and broadcasts a retransmission instruction to all terminal devices. After receiving the retransmission instruction, all terminal devices simultaneously retransmit the data transmission block to the network device on the same time-frequency resource until the network device passes the aggregation quality evaluation for that block.
[0192] For example, when a network device receives a model transport block from multiple terminal devices, it can evaluate the aggregation quality of the model transport block. For model transport blocks that pass the aggregation quality evaluation, the network device receives them and extracts the aggregated model fragments carried by the transport block. For model transport blocks that fail the aggregation quality evaluation, the network device discards the model transport block and broadcasts a retransmission instruction to all terminal devices. After receiving the retransmission instruction, all terminal devices simultaneously retransmit the model transport block to the network device on the same time-frequency resource until the network device passes the aggregation quality evaluation for that block.
[0193] For example, the retransmission over-the-air computation mechanism can instruct multiple terminal devices to retransmit. During the first training cycle, if the output signal of the third over-the-air computation does not meet the first condition, the first terminal device can receive a retransmission instruction sent by the network device. This retransmission instruction can instruct multiple terminal devices to retransmit sample segments or model segments that participated in the third over-the-air computation.
[0194] The first condition can be a preset standard for the quality of the over-the-air computed output signal. In other words, after receiving the over-the-air computed output signal, the network device evaluates whether the quality of the output signal meets the preset standard.
[0195] In some embodiments, the quality of the over-the-air computed output signal can be represented using the mean-square error (MSE) of the signal. The preset evaluation criterion can be a threshold-based evaluation criterion.
[0196] For example, the first condition can be expressed as:
[0197]
[0198] in, Based on the preset threshold, MSE can be further determined as follows:
[0199]
[0200] in, For the normalized receive beamforming vector of the network device, satisfy ||b t ||=1,ζ t Let ζ be the normalization factor of the base station, satisfying ζ t ≥0, h t,k Let k be the channel coefficient vector from the k-th terminal device to the network device. This refers to the receiver noise intensity of the network device.
[0201] It should be understood that the above embodiments only provide an evaluation standard for air computing output signals. Other evaluation standards that can objectively evaluate the quality of air computing output signals can also be applied to the embodiments of this application. Therefore, the embodiments of this application do not limit this application.
[0202] Network devices can send retransmission commands to all terminal devices via broadcast, or they can send retransmission commands to multiple terminal devices participating in the training of machine learning models via signaling.
[0203] A retransmission command sent by a network device to all terminal devices can be indicated by one or more bits. In some embodiments, a retransmission command sent by a network device to all terminal devices via broadcast can be implemented using only a single "1" bit signal. When a terminal device receives a "1" bit, it retransmits the current over-the-air learning input signal; when it receives a "0" bit, it continues to transmit the next over-the-air learning input signal.
[0204] The foregoing described the method for transmitting models and data samples based on in-flight computing and retransmission in-flight computing mechanisms, as described in the embodiments of this application. In the semi-federated learning method, the training method provided in the embodiments of this application is a semi-federated learning system based on retransmission in-flight computing.
[0205] To facilitate understanding, the following example uses network equipment as a base station, combined with... Figure 5 and Figure 6 An example illustration is provided for semi-federated learning based on retransmission over-the-air computation. Figure 5 This is a schematic diagram of a semi-federated learning process based on retransmission over-the-air computation, provided for an embodiment of this application. Figure 6 This is a schematic diagram of a retransmission over-the-air calculation mechanism provided in an embodiment of this application.
[0206] See Figure 5In step S510, when entering the preset learning round, the base station broadcasts the global model of the previous round, and the terminal device divides the collected data samples into federated learning data samples and centralized learning data samples.
[0207] In step S510, the previous round refers to the previous training cycle, and the global model from the previous round is the first global model. The data samples collected by the terminal device are local data samples. The federated learning data samples are the first data samples, and the centralized learning data samples are the second data samples.
[0208] Steps S522 and S532 involve the first training and local model upload based on federated learning, while steps S524 and S534 involve the second data sample upload and second training based on centralized learning. Figure 5 As shown, steps S522 and S532 are in a serial relationship, and steps S524 and S534 are in a serial relationship; steps S522 and S524 are in a parallel relationship, and steps S532 and S534 are in a parallel relationship.
[0209] In step S522, the terminal device uses the federated learning data samples to train the global model from the previous round to obtain the local model. This training process occurs within the terminal device's federated learning cycle, which is the first time period mentioned above.
[0210] In step S524, the terminal device uploads centralized learning data samples to the base station using the same time-frequency resources based on the retransmission over-the-air computing mechanism. The base station receives and accumulates the mixed centralized learning data samples. The uploading process of these centralized learning data samples occurs within the centralized learning data sample uploading period, which is the third time period mentioned above.
[0211] In step S532, the terminal device uploads its local model to the base station using the same time-frequency resources based on the retransmission over-the-air computing mechanism, and the base station receives the federated learning aggregated model. This local model upload process occurs within the local model upload period, which is the second time period mentioned above.
[0212] In step S534, the base station uses the mixed centralized learning data samples to train the global model from the previous round to obtain a centralized learning model. This training process occurs within the base station's centralized learning cycle, which is the fourth time period mentioned above.
[0213] In step S540, the base station obtains a global model through a weighted hybrid federated learning aggregation model and a centralized learning model. The global model obtained by the base station is the second global model. After obtaining the federated learning aggregation model and the centralized learning model, the base station can multiply the federated learning aggregation model by a specific hybrid weight (first weight) and simultaneously multiply the centralized learning model by another specific hybrid weight (second weight), and then add the two results together.
[0214] In step S550, the base station determines whether convergence has been achieved. If convergence has been achieved, step S560 is executed; otherwise, step S510 is executed.
[0215] In step S560, the semi-federated learning based on retransmission over-the-air computation ends. The base station and terminal equipment can release the time-frequency resources for local model uploading and centralized data sample uploading based on retransmission over-the-air computation. Then, the base station can delete the received mixed data samples.
[0216] exist Figure 5 In the semi-federated learning system based on retransmission over-the-air computation shown, the centralized learning data sample upload process based on the retransmission over-the-air computation mechanism and the local model upload process based on the retransmission over-the-air computation mechanism can use two mutually orthogonal time-frequency resources.
[0217] See Figure 6 In step S610, all terminal devices simultaneously transmit over-the-air computation input signals on the same time-frequency resources. For the centralized learning data sample upload process based on the retransmission over-the-air computation mechanism, the over-the-air computation input signal is a segment of the centralized learning data sample from the terminal device; for the local model upload process based on the retransmission over-the-air computation mechanism, the over-the-air computation input signal is a segment of the local model from the terminal device.
[0218] In step S620, the base station receives the over-the-air computation output signal and evaluates the quality of the output signal. The over-the-air computation output signal is the signal received by the base station after over-the-air computation. For the centralized learning data sample upload process based on the retransmission over-the-air computation mechanism, the over-the-air computation output signal is a fragment of mixed data samples; for the local model upload process based on the retransmission over-the-air computation mechanism, the over-the-air computation output signal is a fragment of the federated learning aggregated model.
[0219] In step S630, it is determined whether the quality of the output signal meets the requirements. If it meets the requirements, step S650 is executed; otherwise, step S640 is executed.
[0220] In step S640, the base station sends a retransmission command to all terminal devices. After completing the quality assessment of the output signal calculated over the air, the base station discards the output signals that fail the assessment and sends a retransmission command to all terminal devices, then continues to execute step S610.
[0221] In step S650, it is determined whether the over-the-air computing task is completed. The base station counts the number of over-the-air computing output signals that pass the evaluation. If the number is less than the preset total number of over-the-air computing output signals, the task is not completed. If the task is not completed, step S610 is executed; if the task is completed, step S660 is executed.
[0222] In step S660, the retransmission over-the-air computation process ends. If the number of over-the-air computation output signals that pass the evaluation is equal to the preset total number of over-the-air computation task output signals, the base station sends a retransmission over-the-air computation completion command to all terminal devices, all terminal devices stop sending over-the-air computation input signals, and the base station and terminal devices release the time and frequency resources used for retransmission over-the-air computation.
[0223] Depend on Figure 6 It is evident that when applying the retransmission over-the-air computing mechanism on rapidly changing wireless channels, the base station does not need to optimize or modify the transceiver configuration of the terminal equipment and the base station in real time to adapt to the rapidly changing wireless channel conditions. Instead, the terminal equipment and the base station maintain a fixed transceiver configuration, and the base station only needs to determine whether the quality of the over-the-air computing output signal meets the preset evaluation criteria. The base station receives over-the-air computing output signals that pass the evaluation, and discards over-the-air computing output signals that fail the evaluation and initiates a retransmission until the signal meets the preset evaluation criteria.
[0224] The following examples illustrate this point. Figure 7 The embodiments of this application will be described in more detail below. It should be noted that... Figures 2 to 6 The examples provided are merely to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific numerical values or specific scenarios illustrated. Figures 2 to 6 The examples are obviously subject to various equivalent modifications or changes, and such modifications or changes also fall within the scope of the embodiments of this application.
[0225] Figure 7 This is a schematic diagram of a semi-federated learning system based on a retransmission over-the-air computing mechanism. For example... Figure 7 As shown, the semi-federated learning system based on the retransmission over-the-air computing mechanism consists of one base station (base station 710) and K terminal devices. The K terminal devices are terminal device 701, terminal device 702, ..., terminal device 70k, ..., terminal device 70K.
[0226] Figure 7The learning process shown is also divided into several training cycles. Upon entering the current t-th learning cycle (the first training cycle), K terminal devices receive the global model w broadcast by base station 710. t (First global model)
[0227] In step S71, the terminal device collects local data samples 71. The local data samples 71 collected by the K terminal devices are D t,1 D t,2 ... D t,k ... D t,K .
[0228] In step S72, the K terminal devices divide the local data sample 71 into federated learning data sample 73 (first data sample) and centralized learning data sample 72 (second data sample), respectively. For example, the kth terminal device divides D... t,k Data samples divided into federated learning and centralized learning data samples
[0229] In step S73, during the federated learning cycle of the terminal devices, K terminal devices use federated learning data sample 73 to train the global model w of the base station broadcast. t And obtain local model 74. For example, the k-th terminal device uses federated learning data samples. Training the global model w of base station 710 broadcast t Obtain the local model The local models obtained from the K terminal devices are as follows:
[0230] In step S74, during the local model upload period, K terminal devices upload their local models 74 to base station 710 on the same time-frequency resource (time-frequency resource 2) based on the retransmission over-the-air computing mechanism. Then, base station 710 receives the federated learning aggregated model segment with smaller error and initiates retransmission for the federated learning aggregated model segment with larger error. Finally, base station 710 obtains the federated learning aggregated model 75. The federated learning aggregated model 75 can be represented as... Depend on Figure 7 It can be seen that time-frequency resource 2 can be used to send local model aggregation based on retransmission over-the-air computation. Time-frequency resource 2 can carry the model fragments transmitted initially and / or retransmitted model fragments.
[0231] In step S75, during the centralized learning data sample upload period, K terminal devices upload their centralized learning data samples 72 to base station 710 respectively within the same time-frequency resources based on the retransmission over-the-air computing mechanism. The centralized learning data samples uploaded by the K terminal devices are as follows: Then, base station 710 receives mixed data sample segments with smaller errors and initiates retransmissions for mixed data sample segments with larger errors. Figure 7 It can be seen that time-frequency resource 1 can be used to transmit mixed data samples based on retransmission over-the-air computation. Time-frequency resource 1 can carry sample segments from the initial transmission and / or retransmitted sample segments.
[0232] In step S76, during the centralized learning cycle of base station 710, base station 710 trains the global model w using mixed data samples 76. t Obtain a centralized learning model Among them, the mixed data sample 76 can be represented as
[0233] In step S77, at the end of the current t-th learning round, base station 710 aggregates the federated learning model. and centralized learning models By weight and weight By mixing the components, we obtain the global model w for the next learning round. t+1 (Second global model). As mentioned above. and It can satisfy Two non-negative real numbers.
[0234] In step S78, base station 710 broadcasts the global model w to all terminal devices. t+1 .
[0235] This application also proposes a learning system for a machine learning 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.
[0236] The above text combined Figures 1 to 7 The method embodiments of this application are described in detail below. Figures 8 to 13 The present application provides a detailed description of the apparatus embodiments. 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 found in the foregoing method embodiments.
[0237] Figure 8 This is a schematic block diagram of a terminal device according to an embodiment of this application. The device 800 can be a first terminal device used for training machine learning models. The first terminal device can be any of the terminal devices described above. Figure 8 The terminal device 800 shown includes a receiving unit 810 and a processing unit 820.
[0238] The receiving unit 810 can be used to receive the first global model sent by the network device.
[0239] The processing unit 820 can be used to divide local data samples into a first data sample and a second data sample; wherein, the first data sample is used by the first terminal device to perform a first training on the first global model in a first training period, and the second data sample is used by the network device to perform a second training on the first global model in a first training period.
[0240] Optionally, the number of samples in the first data sample and the number of samples in the second data sample are determined based on the communication capability and / or computing capability of the first terminal device.
[0241] Optionally, the second data sample is related to information disclosed by the first terminal device.
[0242] Optionally, the second data sample includes the first sample segment, and the terminal device 800 further includes a first sending unit, which can be used to send the first sample segment to the network device on the first resource based on the over-the-air computing mechanism during the first training period; wherein, the first resource is also used for other terminal devices other than the first terminal device to send other sample segments to the network device, and the other sample segments and the first sample segment are used as input for the first over-the-air computing.
[0243] Optionally, the first training is used for the first terminal device to determine a first local model, the first local model including a first model fragment, and the terminal device 800 further includes a second sending unit, which can be used to send the first model fragment to the network device on a second resource based on an over-the-air computing mechanism during the first training period; wherein, the second resource is also used for other terminal devices other than the first terminal device to send other model fragments to the network device, and the other model fragments and the first model fragment are used as input for the second over-the-air computing.
[0244] Optionally, the over-the-air computing mechanism supports the first terminal device in retransmitting sample fragments and / or model fragments that failed to transmit.
[0245] Optionally, the receiving unit 810 is further configured to receive a retransmission instruction sent by the network device if the output signal of the third aerial computation does not meet the first condition during the first training period. The retransmission instruction is used to instruct multiple terminal devices to retransmit sample segments or model segments participating in the third aerial computation.
[0246] Optionally, the first training is used for multiple terminal devices, including the first terminal device, to determine multiple local models, the multiple local models and the second trained model are used by the network device to determine a second global model, and the second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
[0247] Optionally, during the first training period, multiple local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: the first global model; the first aggregated model; the second trained model; the first weight corresponding to the first aggregated model; and the second weight corresponding to the second trained model.
[0248] Optionally, the sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
[0249] Optionally, the first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples from multiple terminal devices and the number of samples of the mixed data samples used for the second training.
[0250] Optionally, the mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data sample by the terminal device, and the portion of the data sample is determined according to the forgetting mechanism.
[0251] Optionally, the first training and the second training can be performed in parallel within the first training cycle.
[0252] Optionally, the first training period is the maximum value between the first sub-period and the second sub-period, where the first sub-period is related to the first training and the second sub-period is related to the second training.
[0253] Optionally, the first training is used for multiple terminal devices, including the first terminal device, to determine multiple local models, and the first sub-period is determined based on multiple first durations of the first training performed by the multiple terminal devices and one or more second durations of the multiple local models being sent to the network device.
[0254] Optionally, the first terminal device is any one of the multiple terminal devices that receive the first global model, and the second sub-period is determined based on one or more third durations of multiple terminal devices sending multiple second data samples to the network device and a fourth duration of the network device performing the second training.
[0255] Optionally, the first training is based on federated learning, and the second training is based on centralized learning.
[0256] Figure 9 yes Figure 8 The diagram shows a structural schematic of a control device for a terminal device. This control device 900 can be used to implement semi-federated learning based on retransmission over-the-air computation. Figure 9 As shown, in a semi-federated learning system based on retransmission over-the-air computation, the control device 900 of the terminal equipment may include a data acquisition and partitioning module 910, a federated learning module 920, a retransmission instruction receiving module 930, and an over-the-air computation input signal sending module 940.
[0257] The data acquisition and partitioning module 910 can be used to control the terminal device to collect local data samples and to control the terminal device to partition the collected data samples into federated learning data samples and centralized learning data samples.
[0258] The Federated Learning Module 920 can be used to control terminal devices to train the global model from the previous round using federated learning data samples to obtain a local model.
[0259] The retransmission instruction receiving module 930 can be used to control the terminal device to receive the retransmission instruction sent by the base station, and to control whether the terminal device retransmits the current airborne computing input signal according to the content of the retransmission instruction.
[0260] The air computing input signal transmission module 940 can be used to control the terminal device to process the air computing task into an air computing input signal, and to control the terminal device to transmit the air computing input signal on the same time and frequency resources.
[0261] Figure 10 This is a schematic block diagram of a network device according to an embodiment of this application. The network device 1000 can be any of the network devices for training machine learning models described above. Figure 10 The network device 1000 shown includes a transmitting unit 1010 and a receiving unit 1020.
[0262] The sending unit 1010 can be used to send a first global model to multiple terminal devices, including the first terminal device.
[0263] The receiving unit 1020 can be used by the network device to receive multiple second data samples sent by multiple terminal devices. The multiple second data samples are determined based on the local data samples of the multiple terminal devices, and the local data samples are divided into first data samples and second data samples. The multiple first data samples of the multiple terminal devices are used by the multiple terminal devices to perform first training on the first global model in the first training period, and the multiple second data samples are used by the network device to perform second training on the first global model in the first training period.
[0264] Optionally, the second data sample of the first terminal device includes the first sample segment, and the receiving unit 1020 is further configured to receive the output signal of the first air computing based on the air computing mechanism during the first training period. The input signal of the first air computing corresponds to multiple sample segments sent by multiple terminal devices through the first resource, and the multiple sample segments include the first sample segment.
[0265] Optionally, the first training is used for the first terminal device to determine a first local model, the first local model including a first model fragment, and the receiving unit 1020 is further used to receive the output signal of the second air computing based on the air computing mechanism during the first training period, the input signal of the second air computing corresponding to multiple model fragments sent by multiple terminal devices through the second resource, the multiple model fragments including the first model fragment.
[0266] Optionally, the over-the-air computing mechanism supports multiple terminal devices to retransmit sample fragments and / or model fragments that failed to transmit.
[0267] Optionally, the sending unit 1010 is further configured to send a retransmission instruction to multiple terminal devices if the output signal of the third aerial computation does not meet the first condition during the first training period. The retransmission instruction is used to instruct the multiple terminal devices to retransmit the sample fragments or model fragments that participated in the third aerial computation.
[0268] Optionally, the first training is used by multiple terminal devices to determine multiple local models, the multiple local models and the model obtained by the second training are used by the network device to determine a second global model, and the second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
[0269] Optionally, during the first training period, multiple local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: the first global model; the first aggregated model; the second trained model; the first weight corresponding to the first aggregated model; and the second weight corresponding to the second trained model.
[0270] Optionally, the sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
[0271] Optionally, the first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples from multiple terminal devices and the number of samples of the mixed data samples used for the second training.
[0272] Optionally, the mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data sample by the terminal device, and the portion of the data sample is determined according to the forgetting mechanism.
[0273] Optionally, the first training and the second training can be performed in parallel within the first training cycle.
[0274] Optionally, the first training period is the maximum value between the first sub-period and the second sub-period, where the first sub-period is related to the first training and the second sub-period is related to the second training.
[0275] Optionally, the first training is used for multiple terminal devices to determine multiple local models, and the first sub-period is determined based on multiple first durations of the first training performed by the multiple terminal devices and one or more second durations of the multiple local models being sent to the network device.
[0276] Optionally, the second sub-period is determined based on one or more third durations during which multiple terminal devices send multiple second data samples to the network device and a fourth duration during which the network device performs second training.
[0277] Optionally, the first training is based on federated learning, and the second training is based on centralized learning.
[0278] Figure 11 yes Figure 10 The diagram shows a control device for a network device. This control device 1100 can be used to implement semi-federated learning based on retransmission over-the-air computation. Figure 11 As shown, in a semi-federated learning system based on retransmission over-the-air computation, the control device 1100 of the network device may include an over-the-air computation output signal receiving module 1110, an over-the-air computation output signal quality evaluation module 1120, a retransmission command sending module 1130, a centralized learning module 1140, and a global model generation module 1150.
[0279] The airborne computation output signal receiving module 1110 can be used to control the base station to receive the airborne computation output signal. Specifically, for the centralized learning data sample upload process based on the retransmission airborne computation mechanism, the airborne computation output signal is a mixed data sample fragment; for the local model upload process based on the retransmission airborne computation mechanism, the airborne computation output signal is a federated learning aggregated model fragment.
[0280] The over-the-air computing output signal quality assessment module 1120 can be used to control the base station to assess whether the quality of the over-the-air computing output signal meets the preset standards.
[0281] The retransmission command sending module 1130 can be used to control the base station to send retransmission commands to all terminal devices based on the quality assessment results of the output signal calculated in the air.
[0282] The centralized learning module 1140 can be used to control the base station to train the global model from the previous round using mixed centralized learning data samples to obtain a centralized learning model.
[0283] The global model generation module 1150 can be used to control the base station weighted hybrid federated learning aggregation model and centralized learning model to obtain the global model.
[0284] Figure 12This is a schematic diagram of an electronic device provided in an embodiment of this application. This electronic device is used to implement any step in a semi-federated learning process. Figure 12 As shown, the electronic device structure includes a processor 1210, a memory 1220, a communication interface 1230, and a communication bus 1240.
[0285] The processor 1210 can be used to execute the program stored in the memory 1220 to implement any step in the semi-federated learning process based on retransmission over-the-air computation provided in the embodiments of this application.
[0286] Memory 1220 can be used to store programs related to semi-federated learning based on retransmission over-the-air computation.
[0287] The communication interface 1230 can be used by external entities to modify the program stored in the memory 1220. These external entities include, but are not limited to, personnel maintaining semi-federated learning based on retransmission over-the-air computation, system management devices, etc., but this embodiment does not specifically limit their scope.
[0288] The communication bus 1240 can be used to complete communication between the processor 1210, the memory 1220 and the communication interface 1230.
[0289] Figure 13 The diagram shown is a schematic structural diagram of a communication device according to an embodiment of this application. Figure 13 The dashed lines indicate that the unit or module is optional. The device 1300 can be used to implement the methods described in the above method embodiments. The device 1300 can be a chip, a terminal device, or a network device.
[0290] Apparatus 1300 may include one or more processors 1310. The processor 1310 may support apparatus 1300 in implementing the methods described in the preceding method embodiments. The processor 1310 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (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.
[0291] The apparatus 1300 may further include one or more memories 1320. The memories 1320 store a program that can be executed by the processor 1310, causing the processor 1310 to perform the methods described in the preceding method embodiments. The memories 1320 may be independent of the processor 1310 or integrated within the processor 1310.
[0292] The device 1300 may also include a transceiver 1330. The processor 1310 can communicate with other devices or chips via the transceiver 1330. For example, the processor 1310 can send and receive data with other devices or chips via the transceiver 1330.
[0293] 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.
[0294] 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. As defined herein, computer-readable media does not include transient media, such as modulated data signals and carrier waves.
[0295] Computer-readable media include both permanent and non-permanent, removable and non-removable media, and can be used to store information by any method or technology. Computer-readable media can be used to store information that can be accessed by computing devices. The information can be computer-readable instructions, data structures, program modules, or other data.
[0296] This application also provides a readable storage medium storing a program or instructions thereon, which, when executed by a processor, can achieve the above-described functions. Figures 1 to 7 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0297] 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 this application embodiment, and the program causes a computer to execute the methods performed by the terminal or network device in various embodiments of this application.
[0298] 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.
[0299] 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.
[0300] 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.
[0301] 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.
[0302] 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.
[0303] 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.
[0304] 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.
[0305] 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.
[0306] 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.
[0307] 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.
[0308] 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.
[0309] 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.
[0310] 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.
[0311] 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.
[0312] 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
1. A method for training a machine learning model, characterized in that, include: The first terminal device receives the first global model sent by the network device; The first terminal device divides local data samples into a first data sample and a second data sample. The second data sample is related to information disclosed by the first terminal device. The number of samples in the first data sample and the number of samples in the second data sample are determined based on the communication capability and / or computing capability of the first terminal device. The first data sample is used by the first terminal device to perform a first training on the first global model in a first training period. The first training is used by the first terminal device to determine a first local model. The first local model includes a first model fragment. The second data sample is used by the network device to perform a second training on the first global model in the first training period. The second data sample includes a first sample fragment. During the first training period, the first terminal device sends the first sample fragment to the network device on the first resource based on the over-the-air computing mechanism; wherein, the first resource is also used for other terminal devices other than the first terminal device to send other sample fragments to the network device, and the other sample fragments and the first sample fragment are used as input for the first over-the-air computing; During the first training period, the first terminal device sends the first model fragment to the network device on the second resource based on the over-the-air computing mechanism. The second resource is also used for other terminal devices other than the first terminal device to send other model fragments to the network device. The other model fragments and the first model fragment are used as input for the second over-the-air computing. The over-the-air computing mechanism supports the first terminal device to retransmit sample fragments and / or model fragments that fail to transmit. The second resource and the first resource are orthogonal in time and frequency. During the first training period, if the output signal of the third aerial computation does not meet the first condition, the first terminal device receives a retransmission instruction sent by the network device. The retransmission instruction is used to instruct multiple terminal devices to retransmit the sample segments or model segments participating in the third aerial computation, and to simultaneously retransmit the sample segments or model segments participating in the third aerial computation with other terminal devices participating in the third aerial computation on the same time-frequency resources corresponding to the third aerial computation. Wherein, the first training and the second training are executed in parallel within the first training period, the first training period is the maximum value of the first sub-period and the second sub-period, the first sub-period is related to the first training, the second sub-period is related to the second training, the first training is used for multiple terminal devices including the first terminal device to determine multiple local models, the first sub-period is determined according to multiple first durations of the multiple terminal devices performing the first training and one or more second durations of the multiple local models being sent to the network device, the first terminal device is any one of the multiple terminal devices receiving the first global model, and the second sub-period is determined according to one or more third durations of the multiple terminal devices sending multiple second data samples to the network device and a fourth duration of the network device performing the second training; The first training is based on federated learning, and the second training is based on centralized learning.
2. The training method according to claim 1, characterized in that, The first training is used by multiple terminal devices, including the first terminal device, to determine multiple local models. The multiple local models and the model obtained by the second training are used by the network device to determine a second global model. The second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
3. The training method according to claim 2, characterized in that, During the first training period, the plurality of local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: The first global model; The first aggregation model; The model obtained from the second training; The first weight corresponding to the first aggregation model; The second weights corresponding to the model obtained from the second training.
4. The training method according to claim 3, characterized in that, The sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
5. The training method according to claim 3 or 4, characterized in that, The first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples of the multiple terminal devices and the number of samples of the mixed data samples used for the second training.
6. The training method according to claim 5, characterized in that, The mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data samples by the terminal device, and the portion of the data samples is determined according to the forgetting mechanism.
7. A method for training a machine learning model, characterized in that, include: The network device sends the first global model to multiple terminal devices, including the first terminal device; The network device receives multiple second data samples sent by the multiple terminal devices. The multiple second data samples are determined based on the local data samples of the multiple terminal devices. The local data samples are divided into first data samples and second data samples. The second data samples are related to information disclosed by the first terminal device. The number of samples of the first data samples and the number of samples of the second data samples are determined based on the communication capability and / or computing capability of the first terminal device. The multiple first data samples of the multiple terminal devices are used by the multiple terminal devices to perform first training on the first global model in a first training period. The first training is used by the first terminal device to determine a first local model, which includes a first model fragment. The multiple second data samples are used by the network device to perform second training on the first global model in the first training period. The second data samples include a first sample fragment. The network device receives multiple second data samples sent by the multiple terminal devices, including: during the first training period, the network device receives the output signal of the first air computing based on the air computing mechanism, the input signal of the first air computing corresponds to multiple sample segments sent by the multiple terminal devices through the first resource, and the multiple sample segments include the first sample segment; During the first training period, the network device receives the output signal of the second air computation based on the air computation mechanism. The input signal of the second air computation corresponds to multiple model fragments sent by the multiple terminal devices through the second resource. The multiple model fragments include the first model fragment. The air computation mechanism supports the multiple terminal devices to retransmit sample fragments and / or model fragments that fail to transmit. The second resource and the first resource are orthogonal in time and frequency. During the first training cycle, the network device evaluates the quality of the output signal of the third air computation. If the output signal of the third air computation does not meet the first condition, the network device discards the output signal of the third air computation and sends a retransmission instruction to multiple terminal devices participating in the third air computation, so that the multiple terminal devices simultaneously retransmit the sample fragments or model fragments participating in the third air computation on the same time-frequency resources corresponding to the third air computation. The network device re-receives the output signal of the third air computation obtained based on the retransmission and performs a quality evaluation until the output signal of the third air computation meets the first condition. The third air computation is either the first air computation or the second air computation, and the first condition is that the output signal of the third air computation meets a preset quality standard. Wherein, the first training and the second training are executed in parallel within the first training period, the first training period is the maximum value of the first sub-period and the second sub-period, the first sub-period is related to the first training, the second sub-period is related to the second training, the first training is used for multiple terminal devices including the first terminal device to determine multiple local models, the first sub-period is determined according to multiple first durations of the multiple terminal devices performing the first training and one or more second durations of the multiple local models being sent to the network device, the first terminal device is any one of the multiple terminal devices receiving the first global model, and the second sub-period is determined according to one or more third durations of the multiple terminal devices sending multiple second data samples to the network device and a fourth duration of the network device performing the second training; The first training is based on federated learning, and the second training is based on centralized learning.
8. The training method according to claim 7, characterized in that, The first training is used by the multiple terminal devices to determine multiple local models, and the multiple local models and the model obtained by the second training are used by the network device to determine a second global model. The second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
9. The training method according to claim 8, characterized in that, During the first training period, the plurality of local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: The first global model; The first aggregation model; The model obtained from the second training; The first weight corresponding to the first aggregation model; The second weights corresponding to the model obtained from the second training.
10. The training method according to claim 9, characterized in that, The sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
11. The training method according to claim 9 or 10, characterized in that, The first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples of the multiple terminal devices and the number of samples of the mixed data samples used for the second training.
12. The training method according to claim 11, characterized in that, The mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data samples by the terminal device, and the portion of the data samples is determined according to the forgetting mechanism.
13. A terminal device, characterized in that, The terminal device is a first terminal device used for training a machine learning model, and the terminal device includes: The receiving unit can be used to receive the first global model sent by the network device; The processing unit can be used to divide local data samples into a first data sample and a second data sample, wherein the second data sample is related to information disclosed by the first terminal device, and the sample size of the first data sample and the sample size of the second data sample are determined according to the communication capability and / or computing capability of the first terminal device. The first data sample is used by the first terminal device to perform a first training on the first global model within a first training period, and the first training is used by the first terminal device to determine a first local model, the first local model including a first model fragment. The second data sample is used by the network device to perform a second training on the first global model within the first training period, the second data sample including a first sample fragment. The first sending unit is configured to send the first sample fragment to the network device based on an over-the-air computing mechanism on a first resource during the first training period; wherein, the first resource is further configured to send other sample fragments from other terminal devices besides the first terminal device to the network device, and the other sample fragments and the first sample fragment are used as input for the first over-the-air computing. The second sending unit is used to send the first model fragment to the network device on a second resource based on an over-the-air computing mechanism during the first training period; wherein, the second resource is also used for other terminal devices besides the first terminal device to send other model fragments to the network device, the other model fragments and the first model fragment are used as input for the second over-the-air computing, the over-the-air computing mechanism supports the first terminal device to retransmit sample fragments and / or model fragments that fail to be transmitted, and the second resource and the first resource are orthogonal in time and frequency; The receiving unit is further configured to receive a retransmission instruction sent by the network device if the output signal of the third aerial computation does not meet the first condition during the first training period. The retransmission instruction is used to instruct multiple terminal devices to retransmit the sample fragments or model fragments participating in the third aerial computation, and to simultaneously retransmit the sample fragments or model fragments participating in the third aerial computation with other terminal devices participating in the third aerial computation on the same time-frequency resources corresponding to the third aerial computation. Wherein, the first training and the second training are executed in parallel within the first training period, the first training period is the maximum value of the first sub-period and the second sub-period, the first sub-period is related to the first training, the second sub-period is related to the second training, the first training is used for multiple terminal devices including the first terminal device to determine multiple local models, the first sub-period is determined according to multiple first durations of the multiple terminal devices performing the first training and one or more second durations of the multiple local models being sent to the network device, the first terminal device is any one of the multiple terminal devices receiving the first global model, and the second sub-period is determined according to one or more third durations of the multiple terminal devices sending multiple second data samples to the network device and a fourth duration of the network device performing the second training; The first training is based on federated learning, and the second training is based on centralized learning.
14. The terminal device according to claim 13, characterized in that, The first training is used by multiple terminal devices, including the first terminal device, to determine multiple local models. The multiple local models and the model obtained by the second training are used by the network device to determine a second global model. The second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
15. The terminal device according to claim 14, characterized in that, During the first training period, the plurality of local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: The first global model; The first aggregation model; The model obtained from the second training; The first weight corresponding to the first aggregation model; The second weights corresponding to the model obtained from the second training.
16. The terminal device according to claim 15, characterized in that, The sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
17. The terminal device according to claim 15 or 16, characterized in that, The first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples of the multiple terminal devices and the number of samples of the mixed data samples used for the second training.
18. The terminal device according to claim 17, characterized in that, The mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data samples by the terminal device, and the portion of the data samples is determined according to the forgetting mechanism.
19. A network device, characterized in that, The network device is used to train a machine learning model, and the network device includes: A sending unit is used to send a first global model to multiple terminal devices, including a first terminal device. A receiving unit is configured to receive multiple second data samples sent by the multiple terminal devices, wherein the multiple second data samples are determined based on local data samples of the multiple terminal devices, the local data samples are divided into first data samples and second data samples, the second data samples are related to information disclosed by the first terminal devices, and the sample counts of the first data samples and the second data samples are determined based on the communication capability and / or computing capability of the first terminal devices. The multiple first data samples of the multiple terminal devices are respectively used by the multiple terminal devices to perform first training on the first global model within a first training period, the first training being used by the first terminal devices to determine a first local model, the first local model including a first model fragment. The multiple second data samples are used by the network device to perform second training on the first global model within the first training period, the second data samples of the first terminal devices including first sample fragments. The receiving unit is further configured to receive the output signal of the first air computation based on the air computation mechanism during the first training period, wherein the input signal of the first air computation corresponds to multiple sample segments sent by the multiple terminal devices through the first resource, and the multiple sample segments include the first sample segment. The receiving unit is further configured to receive the output signal of the second air computation based on the air computation mechanism during the first training period. The input signal of the second air computation corresponds to multiple model fragments sent by the multiple terminal devices through the second resource. The multiple model fragments include the first model fragment. The air computation mechanism supports the multiple terminal devices to retransmit sample fragments and / or model fragments that fail to transmit. The second resource is orthogonal to the first resource in time and frequency. The sending unit is further configured to evaluate the quality of the output signal of the third air computation during the first training period. If the output signal of the third air computation does not meet the first condition, the network device discards the output signal of the third air computation and sends a retransmission instruction to multiple terminal devices participating in the third air computation, so that the multiple terminal devices simultaneously retransmit the sample fragments or model fragments participating in the third air computation on the same time-frequency resources corresponding to the third air computation. The network device re-receives the output signal of the third air computation obtained based on the retransmission and performs a quality evaluation until the output signal of the third air computation meets the first condition. The third air computation is either the first air computation or the second air computation, and the first condition is that the output signal of the third air computation meets a preset quality standard. Wherein, the first training and the second training are executed in parallel within the first training period, the first training period is the maximum value of the first sub-period and the second sub-period, the first sub-period is related to the first training, the second sub-period is related to the second training, the first training is used for multiple terminal devices including the first terminal device to determine multiple local models, the first sub-period is determined according to multiple first durations of the multiple terminal devices performing the first training and one or more second durations of the multiple local models being sent to the network device, the first terminal device is any one of the multiple terminal devices receiving the first global model, and the second sub-period is determined according to one or more third durations of the multiple terminal devices sending multiple second data samples to the network device and a fourth duration of the network device performing the second training; The first training is based on federated learning, and the second training is based on centralized learning.
20. The network device according to claim 19, characterized in that, The first training is used by the multiple terminal devices to determine multiple local models, and the multiple local models and the model obtained by the second training are used by the network device to determine a second global model. The second global model is used by the network device to determine whether the trained machine learning model has reached convergence.
21. The network device according to claim 20, characterized in that, During the first training period, the plurality of local models are used to determine the first aggregated model, and the second global model is determined based on one or more of the following information: The first global model; The first aggregation model; The model obtained from the second training; The first weight corresponding to the first aggregation model; The second weights corresponding to the model obtained from the second training.
22. The network device according to claim 21, characterized in that, The sum of the first weight and the second weight is 1, and the first weight and the second weight are non-negative real numbers.
23. The network device according to claim 21 or 22, characterized in that, The first weight and the second weight are determined based on the number of samples of the multiple first data samples obtained by dividing the local data samples of the multiple terminal devices and the number of samples of the mixed data samples used for the second training.
24. The network device according to claim 23, characterized in that, The mixed data sample is a portion of the data samples among multiple second data samples obtained by dividing the local data samples by the terminal device, and the portion of the data samples is determined according to the forgetting mechanism.
25. 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-12.
26. 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-12.
27. 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-12.
28. 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-12.
Citation Information
Patent Citations
Edge intelligence method for hybrid distributed learning and centralized learning
CN115936109A
