WO2022268027A1 - 一种gan的训练方法、机器学习系统及通信装置 - Google Patents

一种gan的训练方法、机器学习系统及通信装置 Download PDF

Info

Publication number
WO2022268027A1
WO2022268027A1 PCT/CN2022/099839 CN2022099839W WO2022268027A1 WO 2022268027 A1 WO2022268027 A1 WO 2022268027A1 CN 2022099839 W CN2022099839 W CN 2022099839W WO 2022268027 A1 WO2022268027 A1 WO 2022268027A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameters
random number
discriminator
generator
sample set
Prior art date
Application number
PCT/CN2022/099839
Other languages
English (en)
French (fr)
Inventor
任金科
余官定
刘翀赫
王坚
李榕
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110831248.2A external-priority patent/CN115577743A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22827520.2A priority Critical patent/EP4345699A1/en
Publication of WO2022268027A1 publication Critical patent/WO2022268027A1/zh
Priority to US18/544,940 priority patent/US20240127065A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/088Non-supervised learning, e.g. competitive learning

Definitions

  • the embodiments of the present application relate to the field of communication technology and artificial intelligence (AI), and in particular to a training method of a generative adversarial network (GAN), a machine learning system, and a communication device.
  • AI artificial intelligence
  • GAN generative adversarial network
  • Generative models is a rapidly developing research direction in the field of computer vision in recent years.
  • Ian Goodfellow proposed a generation model based on probability distribution for generating realistic data, named GAN. Due to their ability to approximate complex probability density functions, GANs have proven useful in a variety of machine learning tasks including image generation, video generation, and natural language processing.
  • GAN-based centralized learning will report a large amount of data during data transmission. Due to the limited bandwidth of the wireless channel and the unreliability of transmission, there will be channel errors when the terminal uploads gradient updates, which will affect the convergence of global model training. , the training efficiency of GAN is low.
  • the present application provides a GAN training method, machine learning system and communication device, so as to reduce the reporting of information between devices and improve the training efficiency of GAN.
  • the present application provides a training method for generating a GAN, which can be applied in a machine learning system
  • the machine learning system includes a first device and a second device
  • the first device operates with the first GAN
  • the second device operates There is a second GAN
  • the first GAN includes a first generator and a first discriminator
  • the second GAN includes a second generator and a second discriminator.
  • the first device may be a terminal device, such as: user equipment (user equipment, UE), vehicle-mounted device, etc., and may also be understood as a module (for example, a chip) in the terminal device
  • the second device may be a network device, such as: Transmission reception point (transmission reception point, TRP), fifth generation mobile communication technology (5th generation mobile communication technology, 5G) base station (gnodeB, gNB), etc., can also be understood as modules (such as chips) in network equipment.
  • TRP Transmission reception point
  • 5G fifth generation mobile communication technology
  • 5G base station gnodeB, gNB
  • modules such as chips
  • the method includes: the first device transmits parameters of a first discriminator of the first device to the second device, where the parameters of the first discriminator are determined by the first device based on local data and parameters of a first generator of the first device; receiving parameters of a second discriminator from the second device and parameters of the second generator, where the parameters of the second discriminator are determined by the second device performing parameter aggregation on the parameters of the first discriminator from at least one first device,
  • the parameters of the second generator are determined by the second device based on the parameters of the second discriminator; the parameters of the first discriminator and the parameters of the first generator are updated through the parameters of the second discriminator and the parameters of the second generator.
  • the training of GAN is realized through the interaction between the first device and the second device.
  • the first device transmits the parameters of the first discriminator to the second device so that the second device performs parameter aggregation to determine the parameters of the second discriminator.
  • this method can ensure the privacy of the user data of the first device, and compared with the transmission of local original data, the data volume of the parameters of the first discriminator is significantly reduced.
  • the update of the parameters of the first discriminator and the parameters of the first generator is determined by the parameters of the second discriminator and the parameters of the second generator of the second device.
  • the data processing pressure of a device improves the training efficiency of GAN.
  • the parameters of the first discriminator can be determined by the first device based on the local data, the parameters of the first generator, and the first set of random number samples; the parameters of the second generator can be determined by the second The device is determined based on the parameters of the second discriminator and the second random number sample set; wherein, the second random number sample set is the same as the union of the first random number sample sets of the X first devices, and the X first devices are all The parameters of the first discriminator are transmitted to the second device, and X is a positive integer greater than or equal to 1.
  • the first random number sample can be input into the first generator that takes the parameters of the first generator as parameters to obtain "false” data, and then the "false" data and the real data are also That is, the local data is input into the first discriminator, and the first discriminator is trained to obtain the parameters of the first discriminator.
  • the second random number sample and the parameters of the second discriminator are input into the second generator, and the second generator is trained to obtain the parameters of the second generator.
  • the second device since the second device may be communicatively connected with a plurality of first devices, the second set of random number samples includes the first random number samples of all first devices to which the parameters of the first discriminator are transmitted, the first random number samples It may be actively sent by the first device, or may be generated by the second device using the same random number generation method as that of the first device, which is not specifically limited in this application.
  • the second random number sample set is the same as the union set of the first random number sample sets of the X first devices, which can ensure that the training of the GAN can be performed.
  • the parameters of the first discriminator may be updated M times, where M is a positive integer greater than or equal to 1, wherein the i+1th update of the parameters of the first discriminator may be based on determined by the local data, the parameters of the first generator after the i-th update, and the first set of random number samples, i takes any integer from 1 to (M-1).
  • the "alternate update” training mechanism proposed in this embodiment uses the first discriminator of the first device and the second generator of the second device to "fight" each other for training, which can effectively improve the performance of each training cycle.
  • the performance gain of the internal model thereby reducing the total number of training cycles required to achieve model convergence, and reducing the communication overhead between the first device and the second device.
  • using an "alternating update” training mechanism can effectively speed up the training process.
  • the parameters of the first discriminator may be updated M times, where M is a positive integer greater than or equal to 1, and the i-th update of the parameters of the first discriminator may be performed by the first device based on local data, Determined by the parameters of the first generator after the i-th update and the first random number sample set, i takes any integer from 1 to M.
  • the "simultaneous update" training mechanism proposed in this embodiment adopts the method that the first device and the second device simultaneously perform training based on the same set of model parameters before updating, which can effectively realize the first discriminator and the first discriminator of the first device.
  • the parallelization of the model update of the second generator of the second device can effectively reduce the time delay of each round of training.
  • using a "synchronous update” training mechanism can effectively speed up the training process.
  • the first random number sample set and the second random number sample set are determined based on the same pseudo-random number algorithm.
  • the first random number sample set can be determined in the following manner:
  • the first device can select a random number seed; determine the number of elements in the first preset random number sample set; input the random number seed and the number of elements in the first preset random number sample set to the pseudo-random number generation The first random number sample set is determined in the device.
  • the first set of random number samples and the second set of random number samples are determined based on the same random number book.
  • the first device can select the initial position of the codebook; determine the number of elements in the second preset random number sample set; query based on the initial position of the codebook and the number of elements in the second preset random number sample set
  • the random number book determines a first set of random number samples.
  • the first device may also receive random number sample set synchronization information from the second device.
  • the first device may also transmit random number sample set synchronization information to the second device.
  • the present application provides a GAN training method, which is applied to a machine learning system.
  • the machine learning system includes a first device and a second device.
  • the first device operates with the first GAN
  • the second device operates with the second GAN.
  • the first GAN includes a first generator and a first discriminator
  • the second GAN includes a second generator and a second discriminator.
  • the first device may be a terminal device, such as: UE, vehicle-mounted device, etc., and may also be understood as a module (for example, a chip) in the terminal device
  • the second device may be a network device, such as: TRP, gNB, etc., or It is understood as a module (for example, a chip) in a network device, which is not specifically limited in this application.
  • the method includes: the second device receives parameters of first discriminators from N first devices, and the parameters of the first discriminators are determined by the first device based on local data and parameters of the first generator of the first device; N is an integer greater than or equal to 1; perform parameter aggregation on the parameters of the first discriminators of N first devices to determine the parameters of the second discriminator, and determine the parameters of the second generator based on the parameters of the second discriminator; transmit the second The parameters of the discriminator and the parameters of the second generator are sent to L first devices, where L is a positive integer.
  • the training of GAN is realized through the interaction between the first device and the second device.
  • the first device transmits the parameters of the first discriminator to the second device so that the second device performs parameter aggregation to determine the parameters of the second discriminator.
  • this method ensures the privacy of the user data of the first device, and compared with the transmission of local original data, the data volume of the parameters of the first discriminator is significantly reduced.
  • the update of the parameters of the first discriminator and the parameters of the first generator is determined by the parameters of the second discriminator and the parameters of the second generator of the second device.
  • the data processing pressure of a device improves the training efficiency of GAN.
  • the location of the first device is flexible. After the first device reports the parameters of the first discriminator to the second device, it may move to a range that the second device cannot cover. , so the second device may not deliver the parameters of the second discriminator and the parameters of the second generator to the first devices.
  • the range covered by the second device may include multiple first devices. After some first devices upload the parameters of the first discriminator of the first device, the second device can combine the parameters of the second discriminator and the parameters of the second generator. The parameters are delivered to all the first devices, which can improve the training efficiency of the first GAN of the first device and accelerate the convergence of the GAN. Therefore, the above-mentioned value of L may be greater than N, equal to N, or less than N, and may be set according to actual service requirements, and this application does not make specific limitations here.
  • the parameters of the second generator can also be determined based on the parameters of the first discriminators of the N first devices. This mode can respectively consider the information of the parameters of each first discriminator, and determine based on this The parameters of the second generator, the information considered is more comprehensive, and the reliability of the determined parameters of the second generator is higher.
  • the parameters of the first discriminator are determined by the first device based on the local data, the parameters of the first generator, and the first set of random number samples; the parameters of the second generator are determined by the second device based on The parameters of the second discriminator and the second random number sample set are determined; wherein, the second random number sample set is the same as the union set of the first random number sample sets of the X first devices, and the X first devices all transmit the first random number sample set A discriminator parameter is sent to the second device, X is a positive integer greater than or equal to 1.
  • the first random number sample set and the second random number sample set may be determined based on the same pseudo-random number algorithm.
  • the process of determining the first random number sample set may be as follows: the second device may receive the synchronization information of the random number sample set from the first device, and select a random number seed; determine the elements in the first preset random number sample set number: input the random number seed and the number of elements in the first preset random number sample set into the pseudo-random number generator to determine the second random number sample set.
  • the first set of random number samples and the second set of random number samples may be determined based on the same random number book.
  • the process of determining the second random number sample set may be as follows: the second device can receive the synchronization information of the random number sample set from the first device, and select a random number seed; the second device can select the initial position of the codebook; determine the second The number of elements in the preset random number sample set; based on the initial position of the codebook and the number of elements in the second preset random number sample set, query the random codebook to determine the second random number sample set.
  • the second device may transmit random number sample synchronization information, so that the first device determines the first random number sample set according to the random number sample synchronization information.
  • the present application provides a machine learning system
  • the machine learning system includes a first device and a second device, the first device runs a first GAN, the second device runs a second GAN, and the first GAN includes a first generated A device and a first discriminator, the second GAN includes a second generator and a second discriminator;
  • the first device can be used to transmit the parameters of the first discriminator of the first device to the second device, the parameters of the first discriminator are determined by the first device based on the local data and the parameters of the first generator of the first device;
  • the parameters of the second discriminator of the second device and the parameters of the second generator, the parameters of the second discriminator are determined by the second device through parameter aggregation of the parameters of the first discriminator from at least one first device, and the second
  • the parameters of the generator are determined by the second device based on the parameters of the second discriminator; the parameters of the first discriminator and the parameters of the first generator are updated through the parameters of the second discriminator and the parameters of the second generator.
  • the second device can be used to receive the parameters of the first discriminators from N first devices, the parameters of the first discriminators are determined by the first device based on the local data and the parameters of the first generator of the first device; N is greater than An integer equal to 1; perform parameter aggregation on the parameters of the first discriminators of N first devices to determine the parameters of the second discriminator, and determine the parameters of the second generator based on the parameters of the second discriminator; transmit the second discriminator
  • the parameters and the parameters of the second generator are sent to L first devices, where L is a positive integer.
  • the parameters of the first discriminator can be determined by the first device based on the local data, the parameters of the first generator, and the first set of random number samples; the parameters of the second generator can be determined by the second device Determined based on the parameters of the second discriminator and the second random number sample set; wherein, the second random number sample set is the same as the union of the first random number sample sets of the X first devices, and the X first devices all transmit The parameters of the first discriminator are sent to the second device, and X is a positive integer greater than or equal to 1.
  • the parameters of the first discriminator can be updated M times, M is a positive integer greater than or equal to 1, and the i+1th update of the parameters of the first discriminator can be based on the local Data, the parameters of the first generator after the i-th update, and the first random number sample set, i takes any integer from 1 to (M-1).
  • the parameters of the first discriminator may be updated M times, where M is a positive integer greater than or equal to 1, and the i-th update of the parameters of the first discriminator may be based on local data, Determined by the parameters of the first generator after the i-th update and the first random number sample set, i takes any integer from 1 to M.
  • the first random number sample set and the second random number sample set may be determined based on the same pseudo-random number algorithm.
  • the first device can also select a random number seed; determine the number of elements in the first preset random number sample set; input the random number seed and the number of elements in the first preset random number sample set to A first set of random number samples is determined in the pseudo-random number generator.
  • the first set of random number samples and the second set of random number samples may be determined based on the same random number book.
  • the first device can also select the initial position of the codebook; determine the number of elements in the second preset random number sample set; based on the initial position of the codebook and the number of elements in the second preset random number sample set Query the random number book to determine the first random number sample set.
  • the first device before transmitting the parameters of the first discriminator to the second device, is further configured to: receive synchronization information of a random number sample set from the second device.
  • the first device before transmitting the parameters of the first discriminator to the second device, the first device is further configured to: transmit random number sample set synchronization information to the second device.
  • the present application provides a communication device, including at least one processor and a memory; the memory is used to store computer programs or instructions, and when the device is running, the at least one processor executes the computer programs or instructions, so that The communication device executes the method of the above first aspect or each embodiment of the first aspect or the method of the above second aspect or each embodiment of the second aspect.
  • the present application provides another communication device, including: an interface circuit and a logic circuit; where the interface circuit can be understood as an input-output interface, and the logic circuit can be used to run code instructions to execute the above-mentioned first aspect or the first aspect The method of each embodiment or the above second aspect or the method of each embodiment of the second aspect.
  • the present application also provides a computer-readable storage medium, in which computer-readable instructions are stored.
  • the computer can execute the computer-readable storage medium according to the first aspect or the first aspect.
  • the present application provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the above-mentioned first aspect or the method of each embodiment of the first aspect or the above-mentioned second aspect or second aspect The method of each embodiment.
  • the present application provides a chip system, the chip system includes a processor, and may also include a memory, for implementing the method described in the above-mentioned first aspect or any possible design of the first aspect or such as The method in the second aspect or any of the possible designs of the second aspect.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • the present application provides a communication system, the system includes a first device and a second device, and the communication system is used to implement the above-mentioned first aspect or any possible design of the first aspect.
  • the method or the method in any possible design of the second aspect or the second aspect.
  • FIG. 1 shows a schematic diagram of a communication system provided by an embodiment of the present application
  • Fig. 2 shows a schematic structural diagram of a federated learning system
  • Fig. 3 shows a schematic structural diagram of a GAN model
  • FIG. 4A shows a schematic structural diagram of a central GAN training system
  • Fig. 4B shows a schematic structural diagram of a federated learning GAN training system
  • FIG. 5 shows a schematic structural diagram of a machine learning system provided by an embodiment of the present application
  • FIG. 6 shows a schematic flow chart of a GAN training method provided by an embodiment of the present application
  • Fig. 7 shows a schematic diagram of a random sample generation method provided by the embodiment of the present application.
  • FIG. 8 shows a schematic diagram of another random sample generation method provided by the embodiment of the present application.
  • FIG. 9A shows a schematic flowchart of a synchronous update method provided by an embodiment of the present application.
  • FIG. 9B shows a schematic flowchart of a synchronous update method provided by an embodiment of the present application.
  • FIG. 10A shows a schematic flowchart of an alternate updating method provided by an embodiment of the present application.
  • FIG. 10B shows a schematic flowchart of an alternate update method provided by an embodiment of the present application.
  • Figure 11 shows a schematic diagram of the simulation results provided by the embodiment of the present application.
  • Figure 12 shows a schematic diagram of the simulation results provided by the embodiment of the present application.
  • FIG. 13 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • FIG. 14 shows a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the GAN training method provided in the embodiment of this application can be applied to a 5G communication system or various future communication systems.
  • the most typical three communication scenarios of the 5G communication system are enhanced mobile broadband (eMBB), massive machine type communication (mMTC) and ultra reliable low latency communication. , URLLC).
  • eMBB enhanced mobile broadband
  • mMTC massive machine type communication
  • URLLC ultra reliable low latency communication
  • the first device in the communication system can be a terminal device, a vehicle-mounted device, and an Internet of Things device, etc.
  • the second device can be a network device, a relay node, and a TRP, etc.
  • the present application does not specifically limit at this time.
  • FIG. 1 illustrates a communication system 100 suitable for use in the present application.
  • the communication system 100 includes a network device 110 , a terminal device 120 , a terminal device 130 , and a terminal device 140 .
  • Data can be exchanged between the network device 110 and the terminal device 120 or the terminal device 130 or the terminal device 140 .
  • the present application does not limit the number of terminal devices here, and here only the terminal device 120 , the terminal device 130 and the terminal device 140 are taken as examples for illustration.
  • the above-mentioned network device is a device deployed in a wireless access network to provide a wireless communication function for a terminal device.
  • the access network device is a device with wireless transceiver function or a chip that can be set on the device, including but not limited to: evolved node B (evolved node B, eNB), radio network controller (radio network controller, RNC), Node B (node B, NB), base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved nodeB, or home node B, HNB), baseband unit (baseband unit, BBU), wireless fidelity (wireless fidelity, WIFI) system access point (access point, AP), wireless relay node, wireless backhaul node, transmission point (transmission and reception point, TRP or transmission point, TP), etc., can also be a gNB in a 5G (such as NR) system, or, a transmission point (T
  • a gNB may include a centralized unit (CU) and a DU.
  • the gNB may also include a radio unit (radio unit, RU).
  • CU implements some functions of gNB
  • DU implements some functions of gNB, for example, CU implements RRC, packet data convergence protocol (packet data convergence protocol, PDCP) layer functions, DU implements radio link control (radio link control, RLC) , Media access control (media access control, MAC) and physical (physical, PHY) layer functions.
  • the access network device may be a CU node, or a DU node, or a device including a CU node and a DU node.
  • CUs can be divided into network devices in the access network RAN, or CUs can be divided into network devices in the core network CN, which is not limited here.
  • the terminal equipment involved in the embodiments of the present application is an entity on the user side for receiving or transmitting signals, and is used for sending uplink signals to network equipment or receiving downlink signals from network equipment.
  • Including devices that provide voice and/or data connectivity to a user may include, for example, a handheld device with wireless connectivity, or a processing device connected to a wireless modem.
  • the terminal device can communicate with the core network via a radio access network (radio access network, RAN), and exchange voice and/or data with the RAN.
  • radio access network radio access network
  • the terminal equipment may include UE, V2X terminal equipment, wireless terminal equipment, mobile terminal equipment, device-to-device communication (device-to-device, D2D) terminal equipment, machine-to-machine/machine-type communication (machine-to-machine/machine -type communications, M2M/MTC) terminal equipment, internet of things (IoT) terminal equipment, subscriber unit, subscriber station, mobile station, remote station , access point (access point, AP), remote terminal (remote terminal), access terminal (access terminal), user terminal (user terminal), user agent (user agent), or user equipment (user device), wearable equipment, on-board equipment, drones, etc.
  • IoT internet of things
  • the terminal device may also be a wearable device.
  • Wearable devices can also be called wearable smart devices or smart wearable devices, etc., which is a general term for the application of wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes Wait.
  • a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction.
  • Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to cooperate with other devices such as smart phones Use, such as various smart bracelets, smart helmets, smart jewelry, etc. for physical sign monitoring.
  • the various terminal devices described above if they are located on the vehicle (for example, placed in the vehicle or installed in the vehicle), can be considered as vehicle-mounted terminal devices. ).
  • Edge devices are widely distributed in various regions and corners of the world, and these devices will continuously generate and accumulate huge amounts of raw data at a rapid rate. If the center needs to collect raw data from all edge devices, it will inevitably bring huge communication loss and computing power requirements.
  • federated learning requires each terminal device to use local data to train a local machine learning model to obtain local machine learning model parameters or Gradient, upload the parameters or gradients of the local machine learning model to the central server, and integrate the parameters or gradients of the local machine learning model uploaded by each terminal device through the central server to obtain the parameters of the global machine learning model
  • the parameters of the machine learning model are broadcast to the terminal device, and the terminal device updates the machine learning model on the terminal device side according to the parameters of the global machine learning model, and performs the next round of training of the local machine learning model.
  • FIG. 3 shows a GAN model, and GAN usually consists of a generator (Generator) and a discriminator (Discriminator).
  • the generator randomly samples from a latent space as input, outputs fake samples after processing, and requires the output fake samples to be as realistic as possible to the real sample data in the training set.
  • the input of the discriminator is the real sample data or the fake sample of the generator, and outputs a probability value that the input sample belongs to the real sample.
  • the discriminator aims to distinguish the fake samples generated by the generator from the real samples, and the generator tries to deceive the discriminator as much as possible so that it cannot distinguish the real and fake input samples.
  • the generator and the discriminator are constantly confronting each other to adjust their respective model parameters (that is, the parameters of the generator and the parameters of the discriminator), and finally the discriminator cannot judge whether the output samples of the generator belong to real samples.
  • Figure 4A shows a system for central training of GAN, which includes K terminal devices and a central server, each terminal device has a certain number of real data samples, and the deployment of GAN generator and discriminator on the server side. All terminals directly transmit local data samples, that is, the original data shown in the figure, to the central server. After the server collects the data to obtain the global data set, run the stochastic gradient descent method for training until the generator and the discriminator converge. Finally, the server feeds back the trained global generator and discriminator parameters to all terminals through the broadcast channel, realizing model sharing between all terminals and the server.
  • this solution requires all terminals to directly transmit the original data samples to the central server for centralized training.
  • Figure 4B shows a system for GAN federated training, which includes K terminal devices and a central server, in which each terminal is equipped with a GAN generator and a discriminator, each terminal's After the training of the generator and the discriminator is completed, the parameters of the generator and the discriminator or the corresponding gradients are uploaded to the central server, and the central server aggregates and averages these parameters and sends them to each terminal. Since the training of the generator and discriminator is completed at the terminal, the computing power of the terminal is relatively high. In addition, in a system with limited bandwidth resources, uploading all parameters or gradients of the generator and discriminator may also cause uplink road blockage. In addition, the gradient compression algorithm used in gradient averaging has high algorithm complexity and is difficult to deploy in the actual system, and the quantization process also causes a certain degree of loss of gradient information, which also slows down the convergence rate of the model.
  • the present application provides a new machine learning system, as shown in Figure 5, the machine learning system includes one or more first devices and second devices, the first device runs the first GAN, the second device A second GAN is run, the first GAN includes a first generator and a first discriminator, and the second GAN includes a second generator and a second discriminator.
  • the first device may be a terminal device, such as: UE, vehicle-mounted device, etc., and may also be understood as a module (for example, a chip) in the terminal device
  • the second device may be a network device, such as: TRP, gNB, etc., or It is understood as a module (for example, a chip) in a network device, which is not specifically limited in this application.
  • Fig. 5 is illustrated by taking the first device as terminal 1 to terminal k, wherein k is a positive integer greater than or equal to 1, and the second device is a central server as an example, but in actual application, the first device and the second The specific type of device.
  • the terminal can collect real samples and train the first discriminator
  • the central server can collect the parameters of the first discriminator from the terminal, and aggregate based on the parameters of the first discriminator, and obtain the parameters of the second discriminator for the second discriminator.
  • the generator is trained.
  • the training of GAN is realized through the interaction between the first device and the second device.
  • the first device transmits the parameters of the first discriminator to the second device so that the second device performs parameter aggregation to determine the parameters of the second discriminator, instead of
  • the local original data is transmitted to the second device, which ensures the privacy of the user data of the first device, and compared with the transmission of local original data, the data volume of the parameters of the first discriminator is significantly reduced.
  • the update of the parameters of the first discriminator and the parameters of the first generator is determined by the parameters of the second discriminator and the parameters of the second generator of the second device.
  • the data processing pressure of a device improves the training efficiency of GAN.
  • the above-mentioned first generator or second generator can be realized by a neural network model.
  • the input is a random number sample z
  • the output is a fake data samples
  • is the parameter of the generator.
  • random number samples can also be understood as sample noise, and can also be understood as random variables.
  • the above-mentioned first discriminator or second discriminator can also be realized by a neural network model, usually the discriminator model Among them, the input d is a real data sample or a fake data sample generated by the generator, and the output is the probability of judging that the input data sample is a real data sample, is the discriminator parameter.
  • Generator-Oriented Gradient Function is a partial derivative operator. Gradient function for discriminator x is a real data sample, and the application of related functions will not be repeated below.
  • FIG. 6 shows a schematic flowchart of a GAN training method provided by an embodiment of the present application, and the method can be applied to the machine learning system shown in FIG. 5 .
  • the first device is terminal 1 and terminal k
  • the second device is the central server for a schematic description.
  • Step 601A terminal 1 transmits the parameters of the first discriminator of terminal 1 to the central server, wherein the parameters of the first discriminator are determined by terminal 1 based on the local data and the parameters of the first generator of terminal 1.
  • Step 601B terminal k transmits the parameters of the first discriminator of terminal k to the central server, wherein the parameters of the first discriminator are determined by terminal k based on the local data and the parameters of the first generator of terminal k.
  • Step 601A can be executed first and then step 601B can be executed, or step 601B can be executed first and then step 601A can be executed, or step 601A and step 601B can be executed at the same time. limited.
  • the central server will receive the parameters of the first discriminator of terminal 1 and the parameters of the first discriminator of terminal k.
  • step 601A and step 601B the current parameter ⁇ of the second generator and the parameter of the second discriminator need to be obtained from the central server And take ⁇ as the initial value of the parameter of the first generator, set As the initial value of the parameter of the first discriminator, the first discriminator of each terminal determines the parameter of the first discriminator based on the local data (that is, the real data sample) and the parameter of the first generator.
  • the parameters of the first discriminator may be determined by the first device based on the local data, the parameters of the first generator, and the first set of random number samples, that is, the terminal may input the first random number samples to the first generator
  • the "false” data is obtained from the first generator whose parameter is the parameter, and then the "false” data and real data, that is, local data, are input into the first discriminator, and the first discriminator is trained to obtain the first discriminator parameters.
  • the terminal can select a part of the data from the local data set as a sample, and randomly select the same number of random number samples from the random number sample space, and maintain the same noise samples as the server side by interacting with the server side , and then the terminal updates the model of the first discriminator by running the stochastic gradient descent algorithm, and outputs the updated parameters of the first discriminator.
  • the following algorithm can be referred to, but it is not limited to only adopt the following algorithm 1 to determine the parameters of the first discriminator.
  • the following takes the parameter update of the first discriminator of terminal k as an example for illustration.
  • the parameters of the first discriminator for terminal k are determined as follows:
  • x k,j,i is the i-th real data sample used in the j-th round of training of the discriminator on terminal k
  • z k,j,i is the i-th real data sample used in the j-th round of training of the discriminator on terminal k.
  • Step 602 the central server aggregates the parameters of the first discriminator of terminal 1 and the parameters of the first discriminator of terminal k to determine the parameters of the second discriminator, and determines the parameters of the second generator based on the parameters of the second discriminator parameter.
  • the parameters of the second generator are determined by the second device based on the parameters of the second discriminator and the second random number sample set; wherein, the second random number sample set is the same as the X first device
  • the union of the first random number sample sets is the same, X first devices all transmit the parameters of the first discriminator to the second device, and X is a positive integer greater than or equal to 1.
  • the second random number sample set is the same as the union set of the first random number sample sets of the X first devices, which can improve the training efficiency of the GAN.
  • the central server may communicate with multiple terminals, and the central server may pre-set scheduling rules, select the parameters of the first discriminator of some terminals for aggregation, and then conduct the current training of the second generator.
  • the scheduling rule can be round-robin scheduling, such as grouping multiple terminals, first receiving the parameters of the first discriminator of the first group of terminals to train the second generator, and then receiving the first discriminator of the second group of terminals The parameters of the second generator are trained until all groups of terminals are scheduled. It can also be global scheduling, and all the parameters of the first discriminator of all terminals are used for the training of the second generator.
  • the central server collects and aggregates parameters from the first discriminators of the dispatched terminals to obtain a model of the second discriminator.
  • the training of GAN needs to be realized through multiple training rounds.
  • the following uses a training round to schedule
  • Input the parameters of the first discriminator of the terminal and the number of training samples m k , where k ⁇ S, where S is the set of scheduled terminals.
  • Output is the parameter of the second discriminator obtained after aggregation by the central server based on the parameters of the first discriminator of each terminal and the training samples corresponding to each terminal.
  • the central server interacts with the scheduled terminal, keeps the same set of random number samples as the scheduled terminal, runs the stochastic gradient descent algorithm, updates the second generator model, and outputs the updated parameters of the second generator .
  • the update algorithm 3 of the generator is as follows, but in actual application, the execution algorithm is not specifically limited:
  • the second generator parameter ⁇ j-1 of the central server after the j-1 round of training is the second generator parameter ⁇ j-1 of the central server after the j-1 round of training, and the second discriminator parameter of the central server and the i-th gradient of the second generator calculated with the i-th noise sequence z j,i .
  • Averaging all M gradients, ie The average gradient of the second generator can be obtained.
  • the second generator parameters are updated from ⁇ j-1 to ⁇ j .
  • Output is the parameter of the second generator obtained by the central server after n g iterations.
  • step 5 the average gradient of the second generator is determined based on the aggregated parameters of the second discriminator, so the method is simpler and faster, and the data calculation efficiency is higher.
  • the initial parameters of the above-mentioned second discriminator are the aggregated discriminator parameters determined in Algorithm 2 in the current training round, that is, When Algorithm 3 is executed before Algorithm 2, the initial parameters of the above-mentioned second discriminator are the aggregated discriminator parameters determined in Algorithm 2 in the previous training round.
  • the method for determining the parameters of the second generator is not limited to Algorithm 3. After the central server obtains the parameters of the first discriminators of each terminal, it can also be based on the parameters of the unaggregated first discriminators Determine the parameters of the second generator. Algorithm 4 can be referred to as follows:
  • G( ⁇ j-1 ,z j,i ) is based on the second generator parameter ⁇ j-1 of the central server after the j-1th round of training and the i-th generator generated by the i-th noise sequence z j,i data. is the first discriminator parameter based on the kth terminal The k-th discrimination result obtained by discriminating the i-th generated data.
  • the second generator parameters are updated from ⁇ j-1 to ⁇ j .
  • Output is the parameter of the second generator obtained by the central server after n g iterations.
  • step 5 the integrated gradient of the second generator is determined based on the information of each first discriminator parameter, so this method can separately consider the information of each first discriminator parameter, the considered information is more comprehensive, and the determined second generator The reliability of the parameters is higher.
  • Step 603A the central server transmits the second discrimination parameter and the parameter of the second generator to the terminal 1 .
  • Step 603B the central server transmits the second discrimination parameter and the parameter of the second generator to the terminal k.
  • steps 603A and 603B are performed in no particular order. Step 603A can be performed first and then step 603B can be performed, or step 603B can be performed first and then step 603A can be performed, or steps 603A and 603B can be performed at the same time, and this application does not make specific limitations here .
  • terminal 1 will receive the parameters of the second discriminator and the second generator of the central server
  • terminal k will receive the parameters of the second discriminator and the second generator of the central server.
  • Step 604A Terminal 1 updates the parameters of the first discriminator of Terminal 1 and the parameters of the first generator of Terminal 1 through the parameters of the second discriminator and the parameters of the second generator.
  • step 604B terminal k updates the parameters of the first discriminator of terminal k and the parameters of the first generator of terminal k through the parameters of the second discriminator and the parameters of the second generator.
  • steps 604A and 604B are performed in no particular order. Step 604A can be performed first and then step 604B can be performed, or step 604B can be performed first and then step 604A can be performed, or steps 604A and 604B can be performed at the same time.
  • This application does not make specific limitations here .
  • the location of the terminal is flexible. After the terminal reports the parameters of the first discriminator to the central server, it may move to a range that the central server cannot cover. Therefore, the central server may not Send the parameters of the second discriminator and the parameters of the second generator to these terminals.
  • the area covered by the central server may include multiple terminals. After some terminals upload the parameters of the first discriminator of the terminal, the central server can send the parameters of the second discriminator and the parameters of the second generator to all terminals. This can improve the training efficiency of the terminal's first GAN and accelerate the convergence of the GAN.
  • the central server can also send the parameters of the second discriminator and the parameters of the second generator to other terminals except terminal 1 and terminal k , so that other terminals can speed up the training of the first GAN.
  • the terminal in order to ensure that the first random number sample set of the terminal is synchronized with the second random number sample set of the central server, the terminal may transmit random number sample synchronization information to the central server, or the central server may transmit random The number of samples is synchronized to the terminal.
  • the terminal In order to ensure the synchronization of the random number samples between the terminal and the central server, it can be realized through the following methods, but in practical applications, it is not limited to only use the following methods to synchronize the random number samples.
  • Figure 7 shows a schematic diagram of generating a random number sample based on a pseudo-random generator. After inputting the random number seed and the number of elements in the first preset random number sample set in the pseudo-random generator, the random number sample set can be output , where the pseudo-random generator can be implemented by a neural network model.
  • the following takes the terminal to transmit random number sample synchronization information as an example to illustrate, and it can be executed as follows:
  • Step 1 Deploy the same pseudo-random number generator on all terminals and the central server (it can be given by the communication standard or agreed in advance).
  • Step 2 Terminal k randomly selects a random number seed, and determines the number m k of elements in the required random number sample set.
  • Step 3 Terminal k inputs the random number seed and the number m k of elements in the desired random number sample set into the local pseudo-random number generator to obtain m k noise samples, that is, the first random number sample set.
  • Step 4 The terminal uploads the random number sample synchronization information to the central server.
  • the random number sample synchronization information includes the random number seed and the required number of random number samples m k .
  • step 4 can be performed after step 2, that is, before step 3 or simultaneously with step 3.
  • Step 1 Deploy the same pseudo-random number generator on all terminals and the central server (it can be given by the communication standard or agreed in advance).
  • Step 2 The central server randomly selects a random number seed that is the same as the number of scheduled terminals, and determines the number of random number samples m k required by each scheduled terminal, k ⁇ S, where S is the set of scheduled terminals.
  • Step 4 The central server sends the synchronization information of the kth random number sample to the terminal k, and the synchronization information of the kth random number sample includes the kth random number seed and the required number of random number samples m k .
  • Step 5 Terminal k inputs the received random number seed and the required number of noise samples m k into its pseudo-random number generator to obtain the same random number samples as the server.
  • step 4 can be performed after step 2, that is, before step 3 or simultaneously with step 3.
  • a pseudo-random generator is deployed in both the terminal and the central server to perform the same data calculation to determine the random number sample set, and the data storage capacity of this method is small.
  • Figure 8 shows a schematic diagram of generating a random number sample based on a random number book. After determining the initial position of the random codebook and the number of elements in the second preset random number sample set, the random number book can be queried to determine the random number sample gather. The following takes the terminal to transmit random number sample synchronization information as an example to illustrate, and it can be executed as follows:
  • Step 1 Deploy the same random codebook on all terminals and the central server (it can be given by the communication standard, or it can be agreed in advance), and a codeword query rule is given (it can be given by the standard, or it can be agreed in advance).
  • Step 2 Terminal k randomly selects an initial position of a codebook, and specifies the number m k of elements in the required random number sample set.
  • Step 3 Terminal k obtains m k random number samples, that is, the first random number sample set, by querying the local random codebook according to the starting position of the codebook and the number m k of elements in the random number sample set.
  • Step 4 Terminal k uploads random number sample synchronization information to the central server.
  • the random number sample synchronization information includes the initial position of the codebook selected by it and the required number m k of elements in the random number sample set.
  • step 4 can be performed after step 2, that is, before step 3 or simultaneously with step 3.
  • Step 1 Deploy the same random codebook on all terminals and servers (it can be given by the communication standard, or it can be agreed in advance), and a codeword query rule is given (it can be given by the standard, or it can be agreed in advance).
  • Step 2 The central server randomly selects the same number of codebook initial positions as the number of scheduled terminals, and determines the number of elements m k ,k ⁇ S in the random number sample set required by each scheduled terminal, where S is The set of scheduled terminals.
  • the random number samples are also the second random number sample set.
  • Step 4 The central server sends the synchronization information of the kth random number sample to the terminal k, and the synchronization information of the kth random number sample includes the initial position of the kth codebook and the number of elements in the required random number sample set m k .
  • Step 5 Terminal k inputs the received initial position of the codebook and the number m k of elements in the required random number sample set into its local random codebook, and obtains the same random number samples as the central server.
  • step 4 can be performed after step 2, that is, before step 3 or simultaneously with step 3.
  • the central server and the terminal only need to store the random number book, and query the random number book set synchronously in the random number sample. This method is easy to operate and fast in execution speed.
  • the parameters of the second generator on the central server side can be updated synchronously with the parameters of the first discriminator on the terminal side, or can be updated alternately, and the application does not specifically limit the update order here.
  • the i-th update of the parameters of the first discriminator is based on the terminal's local data. Determined by the parameters of the first generator and the first random number sample set, i takes any integer from 1 to M.
  • Figure 9A shows a schematic diagram of the central server transmitting random sample synchronization information during synchronization update, which can be executed as follows:
  • Step 1 The discriminator and the generator model are initialized, and the terminal and the central server obtain the same initialization model (the terminal can obtain it from the central server, or from a third party, which is not specifically limited here).
  • the above-mentioned initialization of the discriminator model and the generator model includes initialization of the first discriminator model, initialization of the first generator model, initialization of the second discriminator model, and initialization of the second generator model.
  • Step 2 The central server performs terminal scheduling based on a given scheduling algorithm (a currently widely used scheduling algorithm can be used, such as round-robin scheduling, global scheduling, etc.), and selects the terminal to be scheduled in this round.
  • a scheduling algorithm a currently widely used scheduling algorithm can be used, such as round-robin scheduling, global scheduling, etc.
  • the random number sample synchronization information is determined, including the initial position of the random number seed/codebook and the number of random number samples.
  • Step 3 The central server sends scheduling and random number synchronization information, instructs the scheduled terminals to participate in this round of training, and informs each scheduled terminal of the random number seed/codebook initial position and the number of random number samples used by each scheduled terminal .
  • Step 4 The scheduled terminal generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the first discriminator according to the local real data samples, random number samples and the first generator to obtain a new The parameters of the first discriminator; at the same time, the central server generates random number samples based on the random number seed/codebook initial position and the number of random number samples, and trains the second generator according to the parameters of the second discriminator and random number samples , to get the parameters of the new second generator.
  • Step 5 The scheduled terminal uploads the parameters of the first discriminator obtained in this round of training to the central server.
  • Step 6 The central server receives the parameters of the first discriminator uploaded by the scheduled terminal, aggregates the parameters of the first discriminator, and obtains new parameters of the second discriminator.
  • Step 7 The central server sends the updated parameters of the second generator and the parameters of the second discriminator to all terminals.
  • the preferred solution of this step is to send the parameters of the second generator and the parameters of the second discriminator to all terminals.
  • Another feasible solution is to send the parameters of the second generator and the parameters of the second discriminator to only sent to the scheduled terminal, but the performance will be damaged).
  • Step 8 each terminal receives the parameters of the second generator and the parameters of the second discriminator, and updates the parameters of the first generator and the parameters of the first discriminator.
  • Step 9 Repeat steps 2-8 until the convergence condition is reached (the maximum number of training rounds is reached, or the model performance reaches the preset threshold).
  • Figure 9B shows a schematic diagram of the terminal transmitting random sample synchronization information during synchronization update, which can be executed as follows:
  • Step 1 The discriminator and the generator model are initialized, and the terminal and the central server obtain the same initialization model (the terminal can obtain it from the central server or a third party, which is not specifically limited here).
  • the above-mentioned initialization of the discriminator model and the generator model includes initialization of the first discriminator model, initialization of the first generator model, initialization of the second discriminator model, and initialization of the second generator model.
  • Step 2 The central server performs terminal scheduling based on a given scheduling algorithm (a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.), and selects the terminal to be scheduled in this round.
  • a scheduling algorithm a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.
  • Step 3 The central server issues a scheduling signaling to instruct the scheduled terminal to participate in the current round of training.
  • Step 4 The scheduled terminal determines the initial position of the random number seed/codebook and the number of random number samples, and reports it to the central server.
  • Step 5 The scheduled terminal generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the first discriminator according to the local real data samples, random number samples and parameters of the first generator, Obtain the parameters of the new first discriminator; at the same time, the central server generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and uses the second discriminator, random number samples and the second generator to generate random number samples. The second generator is trained to obtain the parameters of the new second generator.
  • Step 6 The scheduled terminal uploads the parameters of the first discriminator obtained in this round of training to the central server.
  • Step 7 The central server receives the parameters of the first discriminator uploaded by the scheduled terminal, aggregates the parameters of the first discriminator, and obtains the parameters of the second discriminator.
  • Step 8 The central server sends the updated parameters of the second generator and the parameters of the second discriminator to all terminals.
  • the preferred solution of this step is to send the parameters of the second generator and the parameters of the second discriminator to all terminals.
  • Another feasible solution is to send the parameters of the second generator and the parameters of the second discriminator to only sent to the scheduled terminal, but the performance will be damaged).
  • Step 9 Each terminal receives the parameters of the second generator and the parameters of the second discriminator, and updates the parameters of the first generator and the parameters of the first discriminator.
  • Step 10 Repeat steps 2-9 until the convergence condition is reached (the maximum number of training rounds is reached, or the model performance reaches the preset threshold).
  • the "simultaneous update” training mechanism proposed in this embodiment adopts the method that the first device and the second device perform training based on the same set of model parameters before updating at the same time, which can realize the first discriminator of the first device and the second discriminator of the second device.
  • the parallelization of generator model updates can effectively reduce the latency of each round of training.
  • using a "synchronous update” training mechanism can effectively speed up the training process.
  • the update of the parameters of the i+1th first discriminator is the first It is determined by the device based on local data, the parameters of the first generator after the i-th update, and the first random number sample set, where i takes any integer from 1 to (M-1).
  • Figure 10A shows a schematic diagram of the central server transmitting random sample synchronization information during alternate updates, which can be executed as follows:
  • Step 1 The discriminator and the generator model are initialized, and the terminal and the central server obtain the same initialization model (the terminal can obtain it from the central server, or from a third party, which is not specifically limited here).
  • the above-mentioned initialization of the discriminator model and the generator model includes initialization of the first discriminator model, initialization of the first generator model, initialization of the second discriminator model, and initialization of the second generator model.
  • Step 2 The central server performs terminal scheduling based on a given scheduling algorithm (a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.), and selects the terminal to be scheduled in this round.
  • a scheduling algorithm a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.
  • the random number sample synchronization information is determined, including the initial position of the random number seed/codebook and the number of random number samples.
  • Step 3 The central server sends scheduling and random number sample synchronization information, instructs the scheduled terminals to participate in this round of training, and informs each scheduled terminal of the random number seed/codebook initial position and the number of random number samples used by each scheduled terminal terminal.
  • Step 4 The scheduled terminal generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the first discriminator according to the local real data samples, random number samples and the first generator to obtain a new The parameters of the first discriminator.
  • Step 5 The scheduled terminal uploads the updated parameters of the first discriminator to the central server.
  • Step 6 The central server aggregates the parameters of the first discriminator to obtain updated parameters of the second discriminator.
  • Step 7 The central server generates noise samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the second generator according to the updated parameters and random number samples of the second discriminator to obtain a new first discriminator Two generator parameters.
  • Step 8 The central server sends the updated parameters of the second generator and the parameters of the second discriminator to all terminals.
  • the preferred solution of this step is to send the parameters of the second generator and the parameters of the second discriminator to all terminals.
  • Another feasible solution is to send the parameters of the second generator and the parameters of the second discriminator to only sent to the scheduled terminal, but the performance will be damaged).
  • Step 9 Each terminal receives the parameters of the second generator and the parameters of the second discriminator, and updates the parameters of the first generator and the parameters of the first discriminator.
  • Step 10 Repeat steps 2-9 until the convergence condition is reached (the maximum number of training rounds is reached, or the model performance reaches the preset threshold).
  • Fig. 10B shows a schematic diagram of the terminal transmitting random sample synchronization information during disclosure update, which can be executed as follows:
  • Step 1 The discriminator and the generator model are initialized, and the terminal and the central server obtain the same initialization model (the terminal can obtain it from the central server or a third party, which is not specifically limited here).
  • the above-mentioned initialization of the discriminator model and the generator model includes initialization of the first discriminator model, initialization of the first generator model, initialization of the second discriminator model, and initialization of the second generator model.
  • Step 2 The central server performs terminal scheduling based on a given scheduling algorithm (a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.), and selects the terminal to be scheduled in this round.
  • a scheduling algorithm a currently widely used scheduling algorithm can be used, such as round-robin scheduling, proportional fair scheduling, etc.
  • Step 3 The central server issues a scheduling signaling to instruct the scheduled terminal to participate in the current round of training.
  • Step 4 The scheduled terminal determines the initial position of the random number seed/codebook and the number of random number samples, and reports it to the central server.
  • Step 5 The scheduled terminal generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the first discriminator according to the local real data samples, random number samples and parameters of the first generator, Get the parameters of the new first discriminator.
  • Step 6 The scheduled terminal uploads the parameters of the first discriminator obtained in this round of training to the central server.
  • Step 7 The central server receives the parameters of the first discriminator uploaded by the scheduled terminal, aggregates the parameters of the first discriminator, and obtains the parameters of the second discriminator.
  • Step 8 The central server generates random number samples based on the initial position of the random number seed/codebook and the number of random number samples, and trains the second generator according to the second discriminator, random number samples and the second generator to obtain a new Parameters for the second generator.
  • Step 9 The central server sends the updated parameters of the second generator and the parameters of the second discriminator to all terminals.
  • the preferred solution of this step is to send the parameters of the second generator and the parameters of the second discriminator to all terminals.
  • Another feasible solution is to send the parameters of the second generator and the parameters of the second discriminator to only sent to the scheduled terminal, but the performance will be damaged).
  • Step 10 each terminal receives the parameters of the second generator and the parameters of the second discriminator, and updates the parameters of the first generator and the parameters of the first discriminator.
  • Step 11 Repeat steps 2-10 until the convergence condition is reached (the maximum number of training rounds is reached, or the model performance reaches the preset threshold).
  • the "alternate update” training mechanism proposed in this embodiment adopts the training mode of the first discriminator of the first device and the second generator of the second device "against" each other, which can effectively improve the performance gain of the model in each training cycle, thereby The total number of training cycles required to achieve model convergence is reduced, and the communication overhead between the first device and the second device is greatly reduced.
  • using an "alternating update" training mechanism can effectively speed up the training process.
  • this application uses a central server and 10 terminals to jointly train the GAN to conduct simulation experiments, and obtain the simulation results shown in Figure 11.
  • the data set is the classic face data set, and all the data are randomly divided into 10 parts and distributed to all terminals.
  • the system performance index is indicated by Frechet inception distance (FID), which reflects the gap between the fake samples generated by the trained generator and the real data samples through FID. The smaller the value of FID, the better the model performance.
  • FID Frechet inception distance
  • the system bandwidth of the terminal and the server reaches 1 GHz, the synchronous update mechanism has a faster convergence speed than the alternate update mechanism.
  • the system bandwidth of the terminal and the server is 10MHz, since the alternate update mechanism requires fewer training cycles, it has a faster convergence speed than the synchronous update mechanism.
  • the model convergence speed similar to that of the federated training architecture can be achieved, but this application only needs to train the first discriminator on the terminal side without training the first generator, and the computing energy consumption of the terminal is much lower than that of the federated training architecture.
  • the calculation energy consumption of the lower terminal is much lower than that of the federated training architecture.
  • the training of GAN is realized through the interaction between the first device and the second device.
  • the first device transmits the parameters of the first discriminator to the second device so that the second device performs parameter aggregation to determine the parameters of the second discriminator.
  • this method ensures the privacy of the user data of the first device, and compared with the transmission of local original data, the data volume of the parameters of the first discriminator is significantly reduced.
  • the update of the parameters of the first discriminator and the parameters of the first generator is determined by the parameters of the second discriminator and the parameters of the second generator of the second device.
  • the data processing pressure of a device improves the training efficiency of GAN.
  • the communication device 1300 may be a chip or a chip system.
  • the system-on-a-chip may be composed of chips, or may include chips and other discrete devices.
  • the communication device 1300 may include at least one processor 1310, and the communication device 1300 may further include at least one memory 1320 for storing computer programs, program instructions and/or data.
  • the memory 1320 is coupled to the processor 1310 .
  • the coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 1310 may operate in cooperation with the memory 1320 .
  • Processor 1310 may execute computer programs stored in memory 1320 .
  • the at least one memory 1320 may also be integrated with the processor 1310.
  • the communication device 1300 may or may not include the transceiver 1330 , which is indicated by a dashed box in the figure, and the communication device 1300 may perform information exchange with other devices through the transceiver 1330 .
  • the transceiver 1330 may be a circuit, a bus, a transceiver or any other device that can be used for information exchange.
  • the communication apparatus 1300 may be applied to the aforementioned first device, or may also be the aforementioned second device.
  • the memory 1320 stores necessary computer programs, program instructions and/or data for implementing the functions of the relay device in any of the above-mentioned embodiments.
  • the processor 1310 may execute the computer program stored in the memory 1320 to complete the method in any of the foregoing embodiments.
  • a specific connection medium among the transceiver 1330, the processor 1310, and the memory 1320 is not limited.
  • the memory 1320, the processor 1310, and the transceiver 1330 are connected through a bus.
  • the bus is represented by a thick line in FIG. 13, and the connection between other components is only for schematic illustration. It is not limited.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 13 , but it does not mean that there is only one bus or one type of bus.
  • the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or Execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the memory may be a non-volatile memory, such as a hard disk (hard disk drive, HDD) or a solid-state drive (solid-state drive, SSD), etc., and may also be a volatile memory (volatile memory), such as Random-access memory (RAM).
  • the memory may also be, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing computer programs, program instructions and/or data.
  • the embodiment of the present application also provides another communication device 1400, including: an interface circuit 1410 and a logic circuit 1420; the interface circuit 1410 can be understood as the same operation steps as the transceiver shown in FIG. 13 , the present application will not go into details here.
  • the logic circuit 1420 can be used to run the code instructions to execute the method in any of the above-mentioned embodiments. It can be understood as the processor in the above-mentioned FIG. .
  • the embodiments of the present application further provide a readable storage medium, the readable storage medium stores instructions, and when the instructions are executed, the training method for generating a GAN in any of the above embodiments is implemented.
  • the readable storage medium may include various mediums capable of storing program codes such as U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising the instruction device, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种GAN的训练方法、机器学习系统及通信装置,涉及通信技术及AI领域。其中,机器学习系统包括第一设备和第二设备,第一设备运行有第一GAN,第二设备运行有第二GAN,第一GAN包括第一生成器和第一判别器,第二GAN包括第二生成器和第二判别器。第一设备传输第一设备的第一判别器的参数至第二设备;接收来自第二设备的第二判别器的参数以及第二生成器的参数,第二判别器的参数为第二设备对来自至少一个第一设备的第一判别器的参数进行参数聚合确定的,第二生成器的参数为第二设备基于第二判别器的参数确定的;更新第一判别器的参数和第一生成器的参数,可减少第一设备与第二设备之间传输的数据量,提高GAN的训练效率。

Description

一种GAN的训练方法、机器学习系统及通信装置
相关申请的交叉引用
本申请要求在2021年06月21日提交中国国家知识产权局、申请号为202110688066.4、申请名称为“一种GAN的训练方法、机器学习系统及通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中;本申请要求在2021年07月22日提交中国知识产权局、申请号为202110831248.2、申请名称为“一种GAN的训练方法、机器学习系统及通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术及人工智能(artificial intelligence,AI)领域,尤其涉及一种生成对抗网络(generative adversarial network,GAN)的训练方法、机器学习系统及通信装置。
背景技术
生成模型(generative models,GM)是近年来计算机视觉领域中一个快速发展的研究方向。2014年,Ian Goodfellow提出了一种基于概率分布以用于生成拟真数据的生成模型,取名为GAN。因其具有近似复杂概率密度函数的能力,生成对抗网络已被证实可用于包括图像生成、视频生成和自然语言处理在内的各类机器学习任务。
随着大数据时代的到来,设备每天都会以各种形式产生大量的原始数据。但是基于GAN的集中式学习在数据传输时,会上报大量的数据,由于无线信道的有限带宽和传输不可靠性,在终端上传梯度更新时会存在信道误码,影响全局模型训练的收敛的情况,GAN的训练效率较低。
发明内容
本申请提供一种GAN的训练方法、机器学习系统及通信装置,以减少设备间信息的上报,提高GAN的训练效率。
第一方面,本申请提供一种生成GAN的训练方法,该方法可应用于机器学习系统中,机器学习系统包括第一设备和第二设备,第一设备运行有第一GAN,第二设备运行有第二GAN,第一GAN包括第一生成器和第一判别器,第二GAN包括第二生成器和第二判别器。其中,第一设备可以为终端设备,如:用户设备(user equipment,UE)、车载设备等,也可以理解为终端设备中的模块(例如,芯片),第二设备可以为网络设备,如:传输接收点(transmission reception point,TRP)、第五代移动通信技术(5th generation mobile communication technology,5G)基站(gnodeB,gNB)等,也可以理解为网络设备中的模块(例如,芯片),本申请在此不作具体限定。
该方法包括:第一设备传输第一设备的第一判别器的参数至第二设备,第一判别器的参数为第一设备基于本地数据和第一设备的第一生成器的参数确定的;接收来自第二设备的第二判别器的参数以及第二生成器的参数,第二判别器的参数为第二设备对来自至少一个第一设备的第一判别器的参数进行参数聚合确定的,第二生成器的参数为第二设备基于第二判别器的参数确定的;通过第二判别器的参数和第二生成器的参数,更新第一判别器 的参数和第一生成器的参数。
本申请中,GAN的训练是通过第一设备和第二设备的交互实现的,第一设备将第一判别器的参数传输至第二设备以便第二设备进行参数聚合确定第二判别器的参数,而不是将本地原始数据传输至第二设备,该方式可保证第一设备的用户数据的隐私性,且相对于传输本地原始数据而言,第一判别器的参数的数据量明显降低。此外,GAN在训练时,第一判别器的参数和第一生成器的参数的更新是通过第二设备的第二判别器的参数和第二生成器的参数确定的,通过该方式可以减少第一设备的数据处理压力,提高GAN的训练效率。
在一种可选的方式中,第一判别器的参数可为第一设备基于本地数据、第一生成器的参数以及第一随机数样本集合确定的;第二生成器的参数可为第二设备基于第二判别器的参数和第二随机数样本集合确定的;其中,第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,X个第一设备均传输第一判别器的参数至第二设备,X为大于等于1的正整数。
需要说明的是,在实际应用时,可将第一随机数样本输入到以第一生成器的参数为参数的第一生成器中获取“虚假”数据,之后通过“虚假”数据和真实数据也即本地数据输入到第一判别器中,对第一判别器进行训练,得到第一判别器的参数。将第二随机数样本以及第二判别器的参数输入到第二生成器中,对第二生成器进行训练,得到第二生成器的参数。此外,由于第二设备可能与多个第一设备通信连接,第二随机数样本集合包括向其传输第一判别器的参数的所有第一设备的第一随机数样本,该第一随机数样本可以是第一设备主动发送的,也可以是第二设备采用与第一设备相同的随机数生成方式生成的,本申请在此不作具体限定。第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,可以保证GAN的训练得以进行。
在一种可选的方式中,第一判别器的参数可以更新M次,M为大于等于1的正整数,其中,第i+1次第一判别器的参数的更新可以是第一设备基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~(M-1)中的任一整数。
需要说明的是,本实施例提出的“交替更新”训练机制采用第一设备的第一判别器和第二设备的第二生成器互相“对抗”进行训练的方式,可以有效提升每一个训练周期内模型的性能增益,从而减少达到模型收敛所需的总训练周期数,降低第一设备与第二设备之间的通信开销。在通信受限而计算充足的系统中(如窄带蜂窝系统),使用“交替更新”训练机制可以有效地加快训练过程。
在另一种可选的方式中,第一判别器的参数可以更新M次,M为大于等于1的正整数,第i次第一判别器的参数的更新可以是第一设备基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~M中的任一整数。
需要说明的是,本实施例提出的“同时更新”训练机制采用第一设备和第二设备同时基于同一组更新前的模型参数进行训练的方式,可有效实现第一设备的第一判别器和第二设备第二生成器模型更新的并行化,可有效地降低每轮训练的时延。在计算受限而通信充足的系统中(如宽带传感器网络),使用“同步更新”训练机制可以有效地加快训练过程。
在一种可选的方式中,第一随机数样本集合和第二随机数样本集合是基于相同的伪随机数算法确定的。
相应的,第一随机数样本集合可以通过下述方式确定:
第一设备可选取随机数种子;确定第一预设随机数样本集合中的元素的个数;将随机数种子以及第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定第一随机数样本集合。
在另一种可选的方式中,第一随机数样本集合和第二随机数样本集合是基于相同的随机数码本确定的。
相应的,第一设备可选择码本初始位置;确定第二预设随机数样本集合中的元素的个数;基于码本初始位置以及第二预设随机数样本集合中的元素的个数查询随机数码本确定第一随机数样本集合。
在一种可选的方式中,第一设备传输第一判别器的参数至第二设备之前,还可接收来自第二设备的随机数样本集合同步信息。
在一种可选的方式中,第一设备传输第一判别器的参数至第二设备之前,还可传输随机数样本集合同步信息至第二设备。
第二方面,本申请提供一种GAN的训练方法,应用于机器学习系统,机器学习系统包括第一设备和第二设备,第一设备运行有第一GAN,第二设备运行有第二GAN,第一GAN包括第一生成器和第一判别器,第二GAN包括第二生成器和第二判别器。其中,第一设备可以为终端设备,如:UE、车载设备等,也可以理解为终端设备中的模块(例如,芯片),第二设备可以为网络设备,如:TRP、gNB等,也可以理解为网络设备中的模块(例如,芯片),本申请在此不作具体限定。
该方法包括:第二设备接收来自N个第一设备的第一判别器的参数,第一判别器的参数为第一设备基于本地数据和第一设备的第一生成器的参数确定的;N为大于等于1的整数;对N个第一设备的第一判别器的参数进行参数聚合确定第二判别器的参数,并基于第二判别器的参数确定第二生成器的参数;传输第二判别器的参数和第二生成器的参数至L个第一设备,L为正整数。
本申请中,GAN的训练是通过第一设备和第二设备的交互实现的,第一设备将第一判别器的参数传输至第二设备以便第二设备进行参数聚合确定第二判别器的参数,而不是将本地原始数据传输至第二设备,该方式保证了第一设备的用户数据的隐私性,且相对于传输本地原始数据而言,第一判别器的参数的数据量明显降低。此外,GAN在训练时,第一判别器的参数和第一生成器的参数的更新是通过第二设备的第二判别器的参数和第二生成器的参数确定的,通过该方式可以减少第一设备的数据处理压力,提高GAN的训练效率。
此外,还要说明的是,在实际应用时,第一设备的位置是灵活变化的,第一设备上报第一判别器的参数到第二设备后,可能移动到第二设备不能覆盖的范围中,因此第二设备可以不向这些第一设备下发第二判别器的参数和第二生成器的参数。另外,第二设备覆盖的范围内可能包括多个第一设备,部分第一设备上传第一设备的第一判别器参数后,第二设备可将第二判别器的参数和第二生成器的参数下发给全部的第一设备,这样可提高第一设备第一GAN的训练效率,加速GAN的收敛。因此上述L的取值可以大于N,等于N,也可以小于N,可根据实际业务需求设定,本申请在此不作具体限制。
另外,上述基于聚合后的第二判别器的参数确定第二生成器的参数更加简便快捷,数据计算效率更高。
在一种可选的方式中,第二生成器的参数还可基于N个第一设备的第一判别器的参数 确定,该方式可分别考量了各个第一判别器参数的信息,基于此确定的第二生成器的参数,考量的信息更加全面,确定的第二生成器的参数的可信度更高。
在一种可选的方式中,第一判别器的参数为第一设备基于本地数据、第一生成器的参数以及第一随机数样本集合确定的;第二生成器的参数为第二设备基于第二判别器的参数和第二随机数样本集合确定的;其中,第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,X个第一设备均传输第一判别器的参数至第二设备,X为大于等于1的正整数。
在一种可选的方式中,第一随机数样本集合和第二随机数样本集合可以是基于相同的伪随机数算法确定的。
相应的,第一随机数样本集合的确定过程可以为:第二设备可接收来自第一设备的随机数样本集合同步信息,选取随机数种子;确定第一预设随机数样本集合中的元素的个数;将随机数种子以及第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定第二随机数样本集合。
在一种可选的方式中,第一随机数样本集合和第二随机数样本集合可以是基于相同的随机数码本确定的。
相应的,第二随机数样本集合的确定过程可以为:第二设备可接收来自第一设备的随机数样本集合同步信息,选取随机数种子;第二设备可选择码本初始位置;确定第二预设随机数样本集合中的元素的个数;基于码本初始位置以及第二预设随机数样本集合中的元素的个数查询随机数码本确定第二随机数样本集合。
在一种可选的方式中,第二设备可传输随机数样本同步信息,以使第一设备根据随机数样本同步信息确定第一随机数样本集合。
第三方面,本申请提供一种机器学习系统,机器学习系统包括第一设备和第二设备,第一设备运行有第一GAN,第二设备运行有第二GAN,第一GAN包括第一生成器和第一判别器,第二GAN包括第二生成器和第二判别器;
第一设备可用于传输第一设备的第一判别器的参数至第二设备,第一判别器的参数为第一设备基于本地数据和第一设备的第一生成器的参数确定的;接收来自第二设备的第二判别器的参数以及第二生成器的参数,第二判别器的参数为第二设备对来自至少一个第一设备的第一判别器的参数进行参数聚合确定的,第二生成器的参数为第二设备基于第二判别器的参数确定的;通过第二判别器的参数和第二生成器的参数,更新第一判别器的参数和第一生成器的参数。
第二设备可用于接收来自N个第一设备的第一判别器的参数,第一判别器的参数为第一设备基于本地数据和第一设备的第一生成器的参数确定的;N为大于等于1的整数;对N个第一设备的第一判别器的参数进行参数聚合确定第二判别器的参数,并基于第二判别器的参数确定第二生成器的参数;传输第二判别器的参数和第二生成器的参数至L个第一设备,L为正整数。
在一种可选的方式中,第一判别器的参数可为第一设备基于本地数据、第一生成器的参数以及第一随机数样本集合确定的;第二生成器的参数为第二设备基于第二判别器的参数和第二随机数样本集合确定的;其中,第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,X个第一设备均传输第一判别器的参数至第二设备,X为大于等于1的正整数。
在一种可选的方式中,第一判别器的参数可被更新M次,M为大于等于1的正整数,第i+1次第一判别器的参数的更新可以是第一设备基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~(M-1)中的任一整数。
在一种可选的方式中,第一判别器的参数可被更新M次,M为大于等于1的正整数,第i次第一判别器的参数的更新可以是第一设备基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~M中的任一整数。
在一种可选的方式中,第一随机数样本集合和第二随机数样本集合可以是基于相同的伪随机数算法确定的。
相应的,第一设备还可以选取随机数种子;确定第一预设随机数样本集合中的元素的个数;将随机数种子以及第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定第一随机数样本集合。
在一种可选的方式中,第一随机数样本集合和第二随机数样本集合可以是基于相同的随机数码本确定的。
相应的,第一设备还可以选择码本初始位置;确定第二预设随机数样本集合中的元素的个数;基于码本初始位置以及第二预设随机数样本集合中的元素的个数查询随机数码本确定第一随机数样本集合。
在一种可选的方式中,第一设备在传输第一设判别器的参数至第二设备之前,还用于:接收来自第二设备的随机数样本集合同步信息。
在一种可选的方式中,第一设备在传输第一判别器的参数至第二设备之前,还用于:传输随机数样本集合同步信息至第二设备。
第四方面,本申请提供一种通信装置,包括至少一个处理器和存储器;该存储器用于存储计算机程序或指令,当该装置运行时,该至少一个处理器执行该计算机程序或指令,以使该通信装置执行如上述第一方面或第一方面的各实施例的方法或上述第二方面或第二方面的各实施例的方法。
第五方面,本申请提供另一种通信装置,包括:接口电路和逻辑电路;其中接口电路,可以理解为输入输出接口,逻辑电路可用于运行代码指令以执行上述第一方面或第一方面的各实施例的方法或上述第二方面或第二方面的各实施例的方法。
第六方面,本申请还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机可读指令,当计算机可读指令在计算机上运行时,以使得计算机执行如第一方面或第一方面中任一种可能的设计中的方法或如第二方面或第二方面中任一种可能的设计中的方法。
第七方面,本申请提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的各实施例的方法或上述第二方面或第二方面的各实施例的方法。
第八方面,本申请提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现上述第一方面或第一方面中任一种可能的设计中所述的方法或如第二方面或第二方面中任一种可能的设计中的方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
第九方面,本申请提供了一种通信系统,所述系统包括第一设备以及第二设备,所述通信系统用于执行上述第一方面或第一方面中任一种可能的设计中所述的方法或如第二 方面或第二方面中任一种可能的设计中的方法。
上述第二方面至第九方面可以达到的技术效果,请参照上述第一方面中相应可能设计方案可以达到的技术效果说明,本申请这里不再重复赘述。
附图说明
图1示出了本申请实施例提供的一种通信系统的示意图;
图2示出了联邦学习系统的结构示意图;
图3示出了一种GAN模型的结构示意图;
图4A示出了一种中心式的GAN训练系统的结构示意图;
图4B示出了一种联邦学习GAN训练系统的结构示意图;
图5示出了本申请实施例提供的机器学习系统的结构示意图;
图6示出了本申请实施例提供的一种GAN训练方法的流程示意图;
图7示出了本申请实施例提供的一种随机样本生成方法的示意图;
图8示出了本申请实施例提供的另一种随机样本生成方法的示意图;
图9A示出了本申请实施例提供的一种同步更新方法的流程示意图;
图9B示出了本申请实施例提供的一种同步更新方法的流程示意图;
图10A示出了本申请实施例提供的一种交替更新方法的流程示意图;
图10B示出了本申请实施例提供的一种交替更新方法的流程示意图;
图11示出了本申请实施例提供的仿真结果示意图;
图12示出了本申请实施例提供的仿真结果示意图;
图13示出了本申请实施例提供的通信装置的结构示意图;
图14示出了本申请实施例提供的通信装置的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。其中,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。因此装置与方法的实施可以相互参见,重复之处不再赘述。
本申请实施例提供的GAN的训练方法可以应用于5G通信系统或未来的各种通信系统。具体的,例如5G通信系统最典型的三个通信场景增强型移动互联网(enhance mobile broadband,eMBB)、海量机器连接通信(massive machine type communication,mMTC)和高可靠低延迟通信(ultra reliable low latency communication,URLLC)。
下面来介绍适用于本申请的通信系统,该通信系统中的第一设备可以为终端设备、车载设备以及物联网设备等,第二设备可以为网络设备、中继节点以及TRP等,在实际应用时本申请不作具体限定。接下来以第一设备为终端设备,第二设备为网络设备为例,参照图1来介绍本申请可能适用的通信系统。
图1示出一种适用于本申请的通信系统100。该通信系统100包括网络设备110、终端设备120、终端设备130以及终端设备140,网络设备110与终端设备120或终端设备130或终端设备140之间可以进行数据的交互。本申请在此不限定终端设备的数量,在此仅以终端设备120、终端设备130以及终端设备140为例进行示意。
上述的网络设备为是一种部署在无线接入网中为终端设备提供无线通信功能的装置。接入网设备具有无线收发功能的设备或可设置于该设备的芯片,该设备包括但不限于:演进型节点B(evolved node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved nodeB,或home node B,HNB)、基带单元(baseband unit,BBU),无线保真(wireless fidelity,WIFI)系统中的接入点(access point,AP)、无线中继节点、无线回传节点、传输点(transmission and reception point,TRP或者transmission point,TP)等,还可以为5G(如NR)系统中的gNB,或,传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU)、DU、卫星、无人机等。
在一些部署中,gNB可以包括集中式单元(centralized unit,CU)和DU。gNB还可以包括射频单元(radio unit,RU)。CU实现gNB的部分功能,DU实现gNB的部分功能,比如,CU实现RRC,分组数据汇聚层协议(packet data convergence protocol,PDCP)层的功能,DU实现无线链路控制(radio link control,RLC)、媒体接入控制(media access control,MAC)和物理(physical,PHY)层的功能。由于RRC层的信息最终会变成PHY层的信息(即通过PHY层发送),或者,由PHY层的信息转变而来,因而,在这种架构下,高层信令,如RRC层信令或PDCP层信令,也可以认为是由DU发送的,或者,由DU+RU发送的。可以理解的是,接入网设备可以为CU节点、或DU节点、或包括CU节点和DU节点的设备。此外,CU可以划分为接入网RAN中的网络设备,也可以将CU划分为核心网CN中的网络设备,在此不作限制。
本申请实施例中所涉及的终端设备,又可以称之为终端,是用户侧的一种用于接收或发射信号的实体,用于向网络设备发送上行信号,或从网络设备接收下行信号。包括向用户提供语音和/或数据连通性的设备,例如可以包括具有无线连接功能的手持式设备、或连接到无线调制解调器的处理设备。该终端设备可以经无线接入网(radio access network,RAN)与核心网进行通信,与RAN交换语音和/或数据。该终端设备可以包括UE、V2X终端设备、无线终端设备、移动终端设备、设备到设备通信(device-to-device,D2D)终端设备、机器到机器/机器类通信(machine-to-machine/machine-type communications,M2M/MTC)终端设备、物联网(internet of things,IoT)终端设备、订户单元(subscriber unit)、订户站(subscriber station),移动站(mobile station)、远程站(remote station)、接入点(access point,AP)、远程终端(remote terminal)、接入终端(access terminal)、用户终端(user terminal)、用户代理(user agent)、或用户装备(user device)、可穿戴设备、车载设备、无人机等。
作为示例而非限定,在本申请实施例中,该终端设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备或智能穿戴式设备等,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能头盔、智能首饰等。
而如上介绍的各种终端设备,如果位于车辆上(例如放置在车辆内或安装在车辆内),都可以认为是车载终端设备,车载终端设备例如也称为车载单元(on-board unit,OBU)。
随着大数据时代的到来,每台设备每天都会以各种形式产生大量的原始数据,传统的集中式学习要求各个边缘设备将本地数据统一传输到中心端的服务器上,其后再利用收集到的数据进行模型的训练与学习,然而这一架构随着时代的发展逐渐受到如下因素的限制:
(1)边缘设备广泛地分布于世界上各个地区和角落,这些设备将以飞快的速度源源不断地产生和积累巨大量级的原始数据。若中心端需要收集来自全部边缘设备的原始数据,势必会带来巨大的通信损耗和算力需求。
(2)随着现实生活中实际场景的复杂化,越来越多的学习任务要求边缘设备能够做出及时而有效的决策与反馈。传统的集中式学习由于涉及到大量数据的上传势必会导致较大程度的时延,致使其无法满足实际任务场景的实时需求。
(3)考虑到行业竞争、用户隐私安全、行政手续复杂等问题,将数据进行集中整合将面临越来越大的阻力制约。因而系统部署将越来越倾向于在本地存储数据,同时由边缘设备自身完成模型的本地计算。
因此,如何在满足数据隐私、安全和监管要求的前提下,设计一个机器学习框架,让AI系统能够更加高效、准确地共同使用各自的数据,成为了当前人工智能发展的一个重要议题。基于此,相关技术提出联邦学习的架构,来解决上述的问题,如图2所示,联邦学习,需要各个终端设备利用本地的数据训练本地的机器学习模型,得到本地的机器学习模型的参数或梯度,将本地的机器学习模型的参数或梯度上传至中心服务器,通过中心服务器对各终端设备上传的本地的机器学习模型的参数或梯度进行融合,得到全局的机器学习模型的参数,并将全局的机器学习模型的参数广播至终端设备,终端设备根据全局的机器学习模型的参数更新终端设备侧的机器学习模型,并进行下一轮本地的机器学习模型的训练。一方面,由于无线信道的有限带宽和传输不可靠性,在终端上传梯度更新时会存在信道误码,导致接收的梯度更新出错,影响全局模型训练的收敛。另一方面,由于移动终端的计算能力不足,本地计算时延不能被忽略。有限的无线信道资源会导致较大的通信开销,使得终端上传梯度更新的传输时延较大。因此,联邦学习的训练时延较大。
需要说明的是,通常真实的数据样本的数量是有限的,故而可通过GAN构建虚拟的数据样本来解决样本匮乏的问题。图3示出了一种GAN模型,GAN通常由一个生成器(Generator)与一个判别器(Discriminator)组成。生成器从一个潜在空间中随机取样作为输入,经过处理后输出虚假样本,并要求输出的虚假样本尽可能拟真训练集中的真实样本数据。判别器的输入为真实样本数据或生成器的虚假样本,并输出一个输入样本属于真实样本的概率值。判别器旨在将生成器所产生的虚假样本从真实样本中分辨出来,而生成器则尽可能去欺骗判别器,使其无法判别出输入样本的真假。通过生成器和判别器不断地相互对抗,来调整各自的模型参数(也即生成器参数和判别器参数),最终到达使判别器无法判断生成器的输出样本是否属于真实样本。
图4A示出了一种GAN进行中心式训练的系统,在该系统中包括K个终端设备和一个中心服务器,每个终端设备拥有一定数量的真实数据样本,而GAN的生成器和判别器部署在服务器端。所有终端将本地的数据样本也即图示的原始数据直接传输到中心服务器。在服务器进行数据汇总得到全局数据集后,运行随机梯度下降方法进行训练直至生成器和 判别器收敛。最后,服务器将训练所得的全局生成器和判别器参数通过广播信道反馈给所有终端,实现所有终端和服务器的模型共享。但是该方案要求所有终端将原始数据样本直接传输到中心服务器端进行集中训练,受系统的带宽的限制,传输大量的数据样本会导致很大的传输延时,同时引发网络拥塞和数据丢包现象。此外,原始数据中携带有用户的隐私信息,在传输过程中易受到第三方的恶意攻击而造成数据泄漏。
图4B示出了一种GAN进行联邦训练的系统,在该系统中包括K个终端设备和一个中心服务器,在该系统中每个终端中均部署有GAN的生成器和判别器,各个终端的生成器和判别器训练完成后,将生成器参数和判别器参数或相应梯度上传至中心服务器,中心服务器对这些参数进行聚合求平均后下发至各个终端。由于生成器和判别器的训练均在终端完成,对终端的算力要求较高,此外,在带宽资源受限的系统中,上传所有的生成器和判别器的参数或梯度也可能造成上行链路的阻塞。另外,梯度平均所采用梯度压缩算法,其算法复杂度较高,在实际系统中难以部署,且量化过程也造成了一定程度的梯度信息的丢失,也减缓了模型的收敛速率。
基于此,本申请提供一种新的机器学习系统,如图5所示,该机器学习系统包括1个或多个第一设备和第二设备,第一设备运行有第一GAN,第二设备运行有第二GAN,第一GAN包括第一生成器和第一判别器,第二GAN包括第二生成器和第二判别器。其中,第一设备可以为终端设备,如:UE、车载设备等,也可以理解为终端设备中的模块(例如,芯片),第二设备可以为网络设备,如:TRP、gNB等,也可以理解为网络设备中的模块(例如,芯片),本申请在此不作具体限定。图5以第一设备为终端1~终端k,其中,k为大于等于1的正整数,第二设备为中心服务器为例进行示意,但在实际应用时,并不限定第一设备和第二设备的具体类型。终端可采集真实样本并对第一判别器进行训练,中心服务器可收集来自终端的第一判别器的参数,并基于第一判别器的参数进行聚合,得到第二判别器的参数后对第二生成器进行训练。GAN的训练是通过第一设备和第二设备的交互实现的,第一设备将第一判别器的参数传输至第二设备以便第二设备进行参数聚合确定第二判别器的参数,而不是将本地原始数据传输至第二设备,该方式保证了第一设备的用户数据的隐私性,且相对于传输本地原始数据而言,第一判别器的参数的数据量明显降低。此外,GAN在训练时,第一判别器的参数和第一生成器的参数的更新是通过第二设备的第二判别器的参数和第二生成器的参数确定的,通过该方式可以减少第一设备的数据处理压力,提高GAN的训练效率。
此外,需要说明的是,上述的第一生成器或第二生成器可以由神经网络模型实现,通常生成器模型G(θ,z)中,输入为一个随机数样本z,输出为一个虚假数据样本,θ为生成器的参数。其中,随机数样本也可以理解为样本噪声,还可以理解为随机变量等。上述的第一判别器或第二判别器也可以由神经网络模型实现,通常判别器模型
Figure PCTCN2022099839-appb-000001
中,输入d为一个真实数据样本或由生成器产生的虚假数据样本,输出为判定输入数据样本为真实数据样本的概率,
Figure PCTCN2022099839-appb-000002
为判别器参数。面向生成器的梯度函数
Figure PCTCN2022099839-appb-000003
Figure PCTCN2022099839-appb-000004
为偏导算子。面向判别器的梯度函数
Figure PCTCN2022099839-appb-000005
x为真实数据样本,下文涉及到相关函数的应用不再重复赘述。
图6示出了本申请实施例提供的一种GAN的训练方法的流程示意图,该方法可应用在图5所示的机器学习系统中。图6中仅以第一设备为终端1、终端k,第二设备为中心服务器进行示意性描述。在实际执行时,可参照如下步骤:
步骤601A,终端1传输终端1的第一判别器的参数至中心服务器,其中,第一判别器的参数为终端1基于本地数据和终端1的第一生成器的参数确定的。
步骤601B,终端k传输终端k的第一判别器的参数至中心服务器,其中,第一判别器的参数为终端k基于本地数据和终端k的第一生成器的参数确定的。
上述步骤601A和步骤601B的执行顺序不分先后,可先执行步骤601A再执行步骤601B,也可先执行步骤601B再执行步骤601A,还可同时执行步骤601A和步骤601B,本申请在此不作具体限定。
相应地,中心服务器会接收终端1的第一判别器的参数和终端k的第一判别器的参数。
需要说明的是,上述步骤601A和步骤601B在执行之前,需要先从中心服务器获取当前的第二生成器的参数θ和第二判别器的参数
Figure PCTCN2022099839-appb-000006
并将θ作为第一生成器的参数的初始值,将
Figure PCTCN2022099839-appb-000007
作为第一判别器的参数的初始值,之后各终端的第一判别器基于本地数据(也即真实数据样本)以及第一生成器的参数确定第一判别器的参数。此外,第一判别器的参数可为第一设备基于本地数据、第一生成器的参数以及第一随机数样本集合确定的,也即终端可将第一随机数样本输入到以第一生成器的参数为参数的第一生成器中获取“虚假”数据,之后通过“虚假”数据和真实数据也即本地数据输入到第一判别器中,对第一判别器进行训练,得到第一判别器的参数。在实际执行时,终端可从本地数据集中选择一部分数据作为样本,并从随机数样本空间中随机选择同样个数的随机数样本,并通过与服务器端的交互,保持与服务器端使用相同的噪声样本,之后终端通过运行随机梯度下降算法,更新第一判别器模型,并输出更新后的第一判别器的参数。可参照如下算法,但也不限定仅采用如下算法1确定第一判别器的参数。下面以终端k的第一判别器的参数更新为例来说明。
终端k的第一判别器的参数通过如下方式确定:
1、输入:第二生成器的参数θ和第二判别器的参数
Figure PCTCN2022099839-appb-000008
2、选择随机梯度下降的迭代次数n d
3、选择训练样本个数m k
4、令
Figure PCTCN2022099839-appb-000009
5、当j=1,…,n d时,执行循环
从随机数样本空间和本地数据集中进行采样,得到随机数样本序列
Figure PCTCN2022099839-appb-000010
和数据序列
Figure PCTCN2022099839-appb-000011
计算
Figure PCTCN2022099839-appb-000012
结束循环
6、输出:
Figure PCTCN2022099839-appb-000013
也即经过n d次迭代后,终端k输出的第一判别器的参数。
其中,x k,j,i是终端k上的判别器第j轮训练中使用的第i个真实数据样本,z k,j,i是终端k上的判别器第j轮训练中使用的第i个随机样本序列,m k为终端k上的判别器训练使用的样本数量,η是学习率,
Figure PCTCN2022099839-appb-000014
是经过j次迭代后,终端k输出的第一判别器的参数,
Figure PCTCN2022099839-appb-000015
指示经过j-1次迭代后,终端k输出的第一判别器的参数与终端k的第一判别器的梯度函数的差值。
步骤602,中心服务器对终端1的第一判别器的参数和终端k的第一判别器的参数进行参数聚合确定第二判别器的参数,并基于第二判别器的参数确定第二生成器的参数。
在一个可选的实施例中,第二生成器的参数为第二设备基于第二判别器的参数和第二随机数样本集合确定的;其中,第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,X个第一设备均传输第一判别器的参数至第二设备,X为大于等于1的正整数。第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,可以提高GAN的训练效率。
需要说明的是,中心服务器可能与多个终端之间通信连接,中心服务器可预先设定调度规则,选择部分终端的第一判别器的参数进行聚合后进行当前第二生成器的训练。其中,调度规则可以为轮询调度如,将多个终端分组,先接收其中第一组终端的第一判别器的参数进行第二生成器的训练,再接收第二组终端的第一判别器的参数进行第二生成器的训练,直到所有组终端被调度完成为止,也可以为全局调度,将所有的终端的第一判别器的参数全都用于第二生成器的训练,也可以为重要性调度,将所有终端按照其数据的重要性进行排队,将重要性较高的终端的第一判别器的参数用于第二生成器的训练。中心服务器收集来自被调度到的终端的第一判别器的参数,并进行聚合,得到第二判别器的模型。通常GAN的训练需要通过多个训练回合来实现,下面以一个训练回合调度|S|(|S|指示集合S包括的元素个数)个终端,且以加权平均为例来说明,具体操作算法2可如下,但是在实际应用时并不具体限定具体执行算法:
1、输入:终端的第一判别器的参数
Figure PCTCN2022099839-appb-000016
和训练样本数m k,其中k∈S,其中,S为被调度的终端的集合。
2、计算
Figure PCTCN2022099839-appb-000017
3、输出:
Figure PCTCN2022099839-appb-000018
其中,
Figure PCTCN2022099839-appb-000019
为中心服务器基于各终端的第一判别器的参数以及各终端对应的训练样本聚合后得到的第二判别器的参数。
之后,中心服务器与所调度的终端进行交互,保持与所调度终端使用相同的随机数样本集合,并运行随机梯度下降算法,更新第二生成器模型,并输出更新后的第二生成器的参数。其中,生成器的更新算法3如下,但是在实际应用时,并不具体限定执行算法:
1、输入:第二生成器模型G(θ,z)和第二判别器模型的初始参数
Figure PCTCN2022099839-appb-000020
2、选择迭代次数n g
3、选择用于训练的随机数样本个数M=∑ k∈Sm k。该随机数样本与被调度的终端生成第一判别器的参数采用的随机数样本的并集是相同的。
4、令θ 0=θ。
5、当j=1,…,n g时,执行循环:
从噪声空间中进行采样,得到噪声序列(z j,i) i=1,…,M
计算
Figure PCTCN2022099839-appb-000021
结束循环
其中,
Figure PCTCN2022099839-appb-000022
是根据第j-1轮训练后中心服务器的第二生成器参数θ j-1,中心服务器的第二判别器参数
Figure PCTCN2022099839-appb-000023
和与第i个噪声序列z j,i计算得到的第二生成器的第i个梯度。将所有M个梯度求平均,即
Figure PCTCN2022099839-appb-000024
可以得到第二生成器的平均梯度。基于第二生成器的平均梯度和学习率η,将第二生成器参数从θ j-1更新为θ j
6、输出:
Figure PCTCN2022099839-appb-000025
其中,
Figure PCTCN2022099839-appb-000026
为中心服务器经过n g次迭代后得到的第二生成器的参数。
步骤5中,基于聚合后的第二判别器的参数确定第二生成器的平均梯度,因此方法更加简便快捷,数据计算效率更高。
还要说明的是,算法3在算法2之后执行时,上述第二判别器的初始参数为当前训练回合中算法2中确定的聚合的判别器参数也即
Figure PCTCN2022099839-appb-000027
算法3在算法2之前执行时,上述第二判别器的初始参数为上一训练回合中算法2中确定的聚合的判别器参数。
此外,还要说明的是,上述确定第二生成器的参数方法也不限于算法3,中心服务器在获取各个终端的第一判别器的参数后,也可基于未聚合的第一判别器的参数确定第二生成器的参数。可参照算法4执行如下:
1、输入:第二生成器的初始参数θ和终端k的第一判别器的参数
Figure PCTCN2022099839-appb-000028
其中k∈S。
2、选择迭代次数n g
3、选择用于训练的随机样本个数M=∑ k∈Sm k。该随机数样本与被调度的终端生成第一判别器的参数采用的随机数样本的并集是相同的。
4、令θ 0=θ。
5、当j=1,…,n g时,执行循环
从噪声空间中进行采样,得到噪声序列(z j,i) i=1,…,M
计算
Figure PCTCN2022099839-appb-000029
结束循环
其中,|S|表示被调度到的终端的个数。G(θ j-1,z j,i)是根据第j-1轮训练后中心服务器的第二生成器参数θ j-1和与第i个噪声序列z j,i生成的第i个生成数据。
Figure PCTCN2022099839-appb-000030
是基于第k个终端的第一判别器参数
Figure PCTCN2022099839-appb-000031
对第i个生成数据进行判别得到的第k个判别结果。将基于所有|S|个终端的第一判别器参数得到的判别结果求平均,进而得到针对第i个生成数据的集成判别结果
Figure PCTCN2022099839-appb-000032
基于所有M个生成数据的集成判别结果求梯度
Figure PCTCN2022099839-appb-000033
并求平均,得到第二生成器的集成梯度
Figure PCTCN2022099839-appb-000034
基于第二生成器的集成梯度和学习率η,将第二生成器参数从θ j-1更新为θ j
6、输出:
Figure PCTCN2022099839-appb-000035
其中,
Figure PCTCN2022099839-appb-000036
为中心服务器经过n g次迭代后得到的第二生成器的参数。
步骤5中,基于各个第一判别器参数的信息确定第二生成器的集成梯度,因此该方式可分别考量了各个第一判别器参数的信息,考量的信息更加全面,确定的第二生成器的参数的可信度更高。
步骤603A,中心服务器将第二判别参数和第二生成器的参数传输至终端1。
步骤603B,中心服务器将第二判别参数和第二生成器的参数传输至终端k。
上述步骤603A和步骤603B的执行顺序不分先后,可先执行步骤603A再执行步骤603B,也可先执行步骤603B再执行步骤603A,也可同时执行步骤603A和603B,本申请在此不作具体限定。
相应地,终端1会接收中心服务器的第二判别器的参数和第二生成器的参数,终端k会接收中心服务器的第二判别器的参数和第二生成器的参数。
步骤604A,终端1通过第二判别器的参数和第二生成器的参数,更新终端1的第一判别器的参数和终端1的第一生成器的参数。
步骤604B,终端k通过第二判别器的参数和第二生成器的参数,更新终端k的第一判别器的参数和终端k的第一生成器的参数。
上述步骤604A和步骤604B的执行顺序不分先后,可先执行步骤604A再执行步骤604B,也可先执行步骤604B再执行步骤604A,也可以同时执行步骤604A和604B,本申请在此不作具体限定。
此外,还要说明的是,在实际应用时,终端的位置是灵活变化的,终端上报第一判别器的参数到中心服务器后,可能移动到中心服务器不能覆盖的范围中,因此中心服务器可以不向这些终端下发第二判别器的参数和第二生成器的参数。另外,中心服务器覆盖的范围内可能包括多个终端,部分终端上传终端的第一判别器参数后,中心服务器可将第二判别器的参数和第二生成器的参数下发给全部的终端,这样可提高终端第一GAN的训练效率,加速GAN的收敛。也即虽然仅终端1和终端k传输了第一判别器的参数,但是中心服务器还可将第二判别器的参数和第二生成器的参数下发给除终端1和终端k以外的其他终端,以便其他终端可以加速第一GAN的训练。
在一个可选的实施例中,为了保证终端的第一随机数样本集合与中心服务器的第二随机数样本集合同步,终端可传输随机数样本同步信息至中心服务器,还可以是中心服务器传输随机数样本同步信息至终端。为了保证终端和中心服务器随机数样本的同步,可通过如下方式来实现,但是在实际应用是也不限定仅采用如下方式同步随机数样本。
方式1、基于相同的伪随机算法确定
图7示出了基于伪随机生成器生成随机数样本的示意图,在伪随机生成器中输入随机数种子和第一预设随机数样本集合中元素的个数后,则可输出随机数样本集合,其中,伪随机生成器可以由一个神经网络模型实现。下面以终端传输随机数样本同步信息为例来说明,可执行如下:
步骤1:在所有终端和中心服务器上部署相同的伪随机数生成器(可以由通信标准给定,也可提前约定)。
步骤2:终端k随机选择1个随机数种子,并确定所需的随机数样本集合中的元素的个数m k
步骤3:终端k将随机数种子和所需随机数样本集合中的元素的个数m k输入到本地伪随机数生成器中,得到m k个噪声样本也即第一随机数样本集合。
步骤4:终端将随机数样本同步信息上传给中心服务器,所述随机数样本同步信息包括随机数种子和所需随机数样本个数m k
步骤5:中心服务器将收到的随机数样本同步信息中包含的随机数种子和所需随机数样本个数m k输入到其伪随机数生成器中,得到与终端k相同的噪声样本。对所有被调度的终端发来的随机数种子和所需随机数样本个数执行该操作,最终得到M=∑ k∈Sm k个噪声样本,其中S为被调度的终端集合。
此外,上述步骤4可以在步骤2后执行,即在步骤3之前或与步骤3同时执行。
接下来以中心服务器传输随机数样本同步信息为例来说明,可执行如下:
步骤1:在所有终端和中心服务器上部署相同的伪随机数生成器(可以由通信标准给定,也可提前约定)。
步骤2:中心服务器随机选择与被调度的终端数量相同的随机数种子,并确定调度的各终端所需的随机数样本个数m k,k∈S,其中S为被调度的终端集合。
步骤3:中心服务器分别将所有随机数种子和对应的所需随机数样本个数m k,k∈S输入到本地伪随机数生成器中,得到M=∑ k∈Sm k个噪声样本,也即第二随机数样本集合。
步骤4:中心服务器将第k个随机数样本同步信息下发给终端k,所述第k个随机数样本同步信息包括第k个随机数种子和所需随机数样本个数m k
步骤5:终端k将收到的随机数种子和所需噪声样本个数m k输入到其伪随机数生成器中,得到与服务器相同的随机数样本。
此外,上述步骤4可以在步骤2后执行,即在步骤3之前或与步骤3同时执行。
该方式在终端和中心服务器中均部署伪随机生成器,以进行同样的数据计算确定随机数样本集合,该方式数据存储量小。
方式2、基于相同的随机数码本确定
图8示出了基于随机数码本生成随机数样本的示意图,在确定随机码本的初始位置以及第二预设随机数样本集合中元素的个数后,可查询随机数码本,确定随机数样本集合。下面以终端传输随机数样本同步信息为例来说明,可执行如下:
步骤1:在所有终端和中心服务器上部署同一个随机数码本(可以由通信标准给定,也可提前约定),并给定码字查询规则(可以由标准给定,也可提前约定)。
步骤2:终端k随机选择一个码本的初始位置,并给定所需的随机数样本集合中元素的个数m k
步骤3:终端k根据码本起始位置和随机数样本集合中元素的个数m k通过查询本地随机数码本,得到m k个随机数样本也即第一随机数样本集合。
步骤4:终端k将随机数样本同步信息上传至中心服务器,所述随机数样本同步信息包括其选择的码本初始位置和所需的随机数样本集合中元素的个数m k
步骤5:中心服务器按照收到的随机数样本同步信息中包含的码本的初始位置和所需的随机数样本集合中元素的个数m k,查询随机数码本,得到与终端k相同的随机数样本。对所有收到的被调度终端发来的随机数样本同步信息中包含的码本初始位置和所需样本个数执行该操作,最终得到M=∑ k∈Sm k个随机数样本,其中S为被调度的终端集合。
此外,上述步骤4可以在步骤2后执行,即在步骤3之前或与步骤3同时执行。
接下来以中心服务器传输随机数样本同步信息为例来说明,可执行如下:
步骤1:在所有终端和服务器上部署同一个随机数码本(可以由通信标准给定,也可提前约定),并给定码字查询规则(可以由标准给定,也可提前约定)。
步骤2:中心服务器随机选择与被调度的终端数量相同数量的码本初始位置,并确定所调度的各终端所需的随机数样本集合中元素的个数m k,k∈S,其中S为被调度的终端集合。
步骤3:中心服务器分别将所有码本初始位置和对应的所需随机数样本集合中元素的个数m k,k∈S输入到本地随机数码本中,得到M=∑ k∈Sm k个随机数样本也即第二随机数样本集合。
步骤4:中心服务器将第k个随机数样本同步信息下发给终端k,所述第k个随机数样本同步信息包括第k个码本初始位置和所需随机数样本集合中元素的个数m k
步骤5:终端k将收到的码本初始位置和所需随机数样本集合中元素的个数m k输入到其本地随机数码本中,得到与中心服务器相同的随机数样本。
同样的,步骤4可以在步骤2后执行,即在步骤3之前或与步骤3同时执行。
该方式中,中心服务器和终端仅需存储随机数码本即可,在随机数样本同步查询随机数码本集合,该方式操作简便,执行速度快。
在一个可选的实施例中,中心服务器侧的第二生成器的参数可与终端侧的第一判别器的参数同步更新,也可以交替更新,本申请在此不具体限定更新的顺序。
需要说明的是,在同步更新时若第一判别器的参数更新M次,M为大于等于1的正整数,第i次第一判别器的参数的更新是终端基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~M中的任一整数。
图9A示出了同步更新时中心服务器传输随机样本同步信息的示意图,可执行如下:
步骤1:判别器和生成器模型初始化,终端和中心服务器获取相同的初始化模型(终端可从中心服务器获取,也可从第三方获取在此不做具体限定)。上述的判别器模型和生成器模型的初始化包括第一判别器模型的初始化、第一生成器模型的初始化、第二判别器模型的初始化以及第二生成器模型的初始化。
步骤2:中心服务器基于给定调度算法(可以采用当前广泛采用的调度算法,如轮询调度、全局调度等),进行终端调度,选择本回合被调度的终端。同时,确定随机数样本同步信息,包括随机数种子/码本初始位置和随机数样本数量。
步骤3:中心服务器下发调度和随机数同步信息,指示被调度终端参与本回合训练,并将各被调度终端所使用的随机数种子/码本初始位置和随机数样本数量告知各被调度终端。
步骤4:被调度终端基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据本地真实数据样本、随机数样本和第一生成器对第一判别器进行训练,得到新的第一判别器的参数;同时,中心服务器基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据第二判别器的参数和随机数样本对第二生成器进行训练,得到新的第二生成器的参数。
步骤5:被调度终端将本回合训练得到的第一判别器的参数上传至中心服务器。
步骤6:中心服务器接收被调度终端上传的第一判别器的参数,进行第一判别器的参数聚合,得到新的第二判别器的参数。
步骤7:中心服务器将更新后的第二生成器的参数和第二判别器的参数下发给全部终端。(本步骤的优选方案是将第二生成器的参数和第二判别器的参数下发给全部终端,另外一种可行的方案是,将第二生成器的参数和第二判别器的参数只下发给被调度的终端,但性能会有损)。
步骤8:各终端收到第二生成器的参数和第二判别器的参数,更新第一生成器的参数和第一判别器的参数。
步骤9:重复步骤2~8,直至到达收敛条件(达到最大训练回合数,或模型性能达到预设门限)。
图9B示出了同步更新时终端传输随机样本同步信息的示意图,可执行如下:
步骤1:判别器和生成器模型初始化,终端和中心服务器获取相同的初始化模型(终端可从中心服务器获取,也可从第三方获取在此不作具体限定)。上述的判别器模型和生成器模型的初始化包括第一判别器模型的初始化、第一生成器模型的初始化、第二判别器模型的初始化以及第二生成器模型的初始化。
步骤2:中心服务器基于给定调度算法(可以采用当前广泛采用的调度算法,如轮询调度、比例公平调度等),进行终端调度,选择本回合被调度的终端。
步骤3:中心服务器下发调度信令,指示被调度终端参与本回合训练。
步骤4:被调度终端确定随机数种子/码本初始位置和随机数样本数量,上报给中心服务器。
步骤5:被调度终端基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据本地真实数据样本、随机数样本和第一生成器的参数对第一判别器进行训练,得到新的第一判别器的参数;同时,中心服务器基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据第二判别器、随机数样本和第二生成器对第二生成器进行训练,得到新的第二生成器的参数。
步骤6:被调度终端将本回合训练得到的第一判别器的参数上传至中心服务器。
步骤7:中心服务器接收被调度终端上传的第一判别器的参数,进行第一判别器的参数聚合,得到第二判别器的参数。
步骤8:中心服务器将更新后的第二生成器的参数和第二判别器的参数下发给全部终端。(本步骤的优选方案是将第二生成器的参数和第二判别器的参数下发给全部终端,另外一种可行的方案是,将第二生成器的参数和第二判别器的参数只下发给被调度的终端,但性能会有损)。
步骤9:各终端收到第二生成器的参数和第二判别器的参数,更新第一生成器的参数和第一判别器的参数。
步骤10:重复步骤2~9,直至到达收敛条件(达到最大训练回合数,或模型性能达到预设门限)。
本实施例提出的“同时更新”训练机制采用第一设备和第二设备同时基于同一组更新前的模型参数进行训练的方式,可实现第一设备的第一判别器和第二设备的第二生成器模型更新的并行化,可有效地降低每轮训练的时延。在计算受限而通信充足的系统中(如宽带传感器网络),使用“同步更新”训练机制可以有效地加快训练过程。
在一个可选的实施例中,在交替更新时,若第一判别器的参数更新M次,M为大于等于1的正整数,第i+1次第一判别器的参数的更新是第一设备基于本地数据、第i次更新后的第一生成器的参数以及第一随机数样本集合确定的,i取遍1~(M-1)中的任一整数。
图10A示出了交替更新时中心服务器传输随机样本同步信息的示意图,可执行如下:
步骤1:判别器和生成器模型初始化,终端和中心服务器获取相同的初始化模型(终端可从中心服务器获取,也可从第三方获取在此不做具体限定)。上述的判别器模型和生成器模型的初始化包括第一判别器模型的初始化、第一生成器模型的初始化、第二判别器模型的初始化以及第二生成器模型的初始化。
步骤2:中心服务器基于给定调度算法(可以采用当前广泛采用的调度算法,如轮询调度、比例公平调度等),进行终端调度,选择本回合被调度的终端。同时,确定随机数样本同步信息,包括随机数种子/码本初始位置和随机数样本数量。
步骤3:中心服务器下发调度和随机数样本同步信息,指示被调度终端参与本回合训练,并将各被调度终端所使用的随机数种子/码本初始位置和随机数样本数量告知各被调度 终端。
步骤4:被调度终端基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据本地真实数据样本、随机数样本和第一生成器对第一判别器进行训练,得到新的第一判别器的参数。
步骤5:被调度终端将更新的第一判别器的参数上传至中心服务器。
步骤6:中心服务器进行第一判别器的参数聚合,得到更新的第二判别器的参数。
步骤7:中心服务器基于随机数种子/码本初始位置和随机数样本数量生成噪声样本,并根据更新的第二判别器的参数和随机数样本,对第二生成器进行训练,得到新的第二生成器的参数。
步骤8:中心服务器将更新后的第二生成器的参数和第二判别器的参数下发给全部终端。(本步骤的优选方案是将第二生成器的参数和第二判别器的参数下发给全部终端,另外一种可行的方案是,将第二生成器的参数和第二判别器的参数只下发给被调度的终端,但性能会有损)。
步骤9:各终端收到第二生成器的参数和第二判别器的参数,更新第一生成器的参数和第一判别器的参数。
步骤10:重复步骤2~9,直至到达收敛条件(达到最大训练回合数,或模型性能达到预设门限)。
图10B示出了交底更新时终端传输随机样本同步信息的示意图,可执行如下:
步骤1:判别器和生成器模型初始化,终端和中心服务器获取相同的初始化模型(终端可从中心服务器获取,也可从第三方获取在此不作具体限定)。上述的判别器模型和生成器模型的初始化包括第一判别器模型的初始化、第一生成器模型的初始化、第二判别器模型的初始化以及第二生成器模型的初始化。
步骤2:中心服务器基于给定调度算法(可以采用当前广泛采用的调度算法,如轮询调度、比例公平调度等),进行终端调度,选择本回合被调度的终端。
步骤3:中心服务器下发调度信令,指示被调度终端参与本回合训练。
步骤4:被调度终端确定随机数种子/码本初始位置和随机数样本数量,上报给中心服务器。
步骤5:被调度终端基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据本地真实数据样本、随机数样本和第一生成器的参数对第一判别器进行训练,得到新的第一判别器的参数。
步骤6:被调度终端将本回合训练得到的第一判别器的参数上传至中心服务器。
步骤7:中心服务器接收被调度终端上传的第一判别器的参数,进行第一判别器的参数聚合,得到第二判别器的参数。
步骤8:中心服务器基于随机数种子/码本初始位置和随机数样本数量生成随机数样本,并根据第二判别器、随机数样本和第二生成器对第二生成器进行训练,得到新的第二生成器的参数。
步骤9:中心服务器将更新后的第二生成器的参数和第二判别器的参数下发给全部终端。(本步骤的优选方案是将第二生成器的参数和第二判别器的参数下发给全部终端,另外一种可行的方案是,将第二生成器的参数和第二判别器的参数只下发给被调度的终端,但性能会有损)。
步骤10:各终端收到第二生成器的参数和第二判别器的参数,更新第一生成器的参数和第一判别器的参数。
步骤11:重复步骤2~10,直至到达收敛条件(达到最大训练回合数,或模型性能达到预设门限)。
本实施例提出的“交替更新”训练机制采用第一设备第一判别器和第二设备第二生成器互相“对抗”进行训练的方式,可以有效提升每一个训练周期内模型的性能增益,从而减少了达到模型收敛所需的总训练周期数,大大降低了第一设备与第二设备之间的通信开销。在通信受限而计算充足的系统中(如窄带蜂窝系统),使用“交替更新”训练机制可以有效地加快训练过程。
考虑到上述的同步更新和交替更新,本申请通过一个中心服务器和10个终端共同训练的GAN进行仿真实验,得到如图11所示的仿真结果。数据集选用经典的人脸数据集,并将所有数据随机分成10份后分配给所有终端。系统性能指标采用弗雷歇起始距离(Frechet inception distance,FID)指示,通过FID反映训练所得的生成器所产生的虚假样本与真实数据样本之间的差距。FID的值越小,模型性能越好。当终端与服务器采用系统带宽达到1GHz,此时同步更新机制比交替更新机制拥有更快的收敛速度。当终端与服务器采用系统带宽为10MHz时,由于交替更新机制需要更少的训练周期,因而比同步更新机制拥有更快的收敛速度。
相较于图4B提供的联邦学习系统而言,本申请交替更新和同步更新的系统性能对照如图12所示,从图12中可以看到,本申请所提的交替更新训练机制下,其训练总时间比联邦学习架构短。本申请一方面利用了服务器端的算力,降低了计算时延,另一方面其在上行链路中只需要上传判别器参数而无需上传生成器参数,减少了系统的通信开销。在同时更新训练机制下可以达到和联邦训练架构近似的模型收敛速度,但本申请在终端侧只需要训练第一判别器而无需训练第一生成器,其终端的计算能耗远小于联邦训练架构下终端的计算能耗。
本申请中,GAN的训练是通过第一设备和第二设备的交互实现的,第一设备将第一判别器的参数传输至第二设备以便第二设备进行参数聚合确定第二判别器的参数,而不是将本地原始数据传输至第二设备,该方式保证了第一设备的用户数据的隐私性,且相对于传输本地原始数据而言,第一判别器的参数的数据量明显降低。此外,GAN在训练时,第一判别器的参数和第一生成器的参数的更新是通过第二设备的第二判别器的参数和第二生成器的参数确定的,通过该方式可以减少第一设备的数据处理压力,提高GAN的训练效率。
此外,如图13所示,为本申请还提供的一种通信装置1300。示例性地,通信装置1300可以是芯片或芯片系统。可选的,在本申请实施例中芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
通信装置1300可以包括至少一个处理器1310,通信装置1300还可以包括至少一个存储器1320,用于存储计算机程序、程序指令和/或数据。存储器1320和处理器1310耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器1310可能和存储器1320协同操作。处理器1310可能执行存储器1320中存储的计算机程序。可选的,所述至少一 个存储器1320也可与处理器1310集成在一起。
可选的,在实际应用中,通信装置1300中可以包括收发器1330也可不包括收发器1330,图中以虚线框来示意,通信装置1300可以通过收发器1330和其它设备进行信息交互。收发器1330可以是电路、总线、收发器或者其它任意可以用于进行信息交互的装置。
在一种可能的实施方式中,该通信装置1300可以应用于前述的第一设备,还可以是前述的第二设备。存储器1320保存实施上述任一实施例中的中继设备的功能的必要计算机程序、程序指令和/或数据。所述处理器1310可执行所述存储器1320存储的计算机程序,完成上述任一实施例中的方法。
本申请实施例中不限定上述收发器1330、处理器1310以及存储器1320之间的具体连接介质。本申请实施例在图13中以存储器1320、处理器1310以及收发器1330之间通过总线连接,总线在图13中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实施或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实施存储功能的装置,用于存储计算机程序、程序指令和/或数据。
基于以上实施例,参见图14,本申请实施例还提供另一种通信装置1400,包括:接口电路1410和逻辑电路1420;接口电路1410,可以理解为如图13示意的收发器同样的操作步骤,本申请在此不再赘述。逻辑电路1420可用于运行所述代码指令以执行上述任一实施例中的方法,可以理解成上述图13中的处理器,可以实现处理单元或处理器同样的功能,本申请在此不再赘述。
基于以上实施例,本申请实施例还提供一种可读存储介质,该可读存储介质存储有指令,当所述指令被执行时,使上述任一实施例中生成GAN的训练方法被实施。该可读存储介质可以包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/ 或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理装置的处理器以产生一个机器,使得通过计算机或其他可编程数据处理装置的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理装置以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理装置上,使得在计算机或其他可编程装置上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程装置上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。

Claims (35)

  1. 一种生成对抗网络GAN的训练方法,应用于机器学习系统,所述机器学习系统包括第一设备和第二设备,所述第一设备运行有第一GAN,所述第二设备运行有第二GAN,所述第一GAN包括第一生成器和第一判别器,所述第二GAN包括第二生成器和第二判别器,其特征在于,包括:
    所述第一设备传输所述第一设备的第一判别器的参数至所述第二设备,所述第一判别器的参数为所述第一设备基于本地数据和所述第一设备的第一生成器的参数确定的;
    接收来自所述第二设备的第二判别器的参数以及第二生成器的参数,所述第二判别器的参数为所述第二设备对来自至少一个所述第一设备的第一判别器的参数进行参数聚合确定的,所述第二生成器的参数为所述第二设备基于所述第二判别器的参数确定的;
    通过所述第二判别器的参数和所述第二生成器的参数,更新所述第一判别器的参数和所述第一生成器的参数。
  2. 根据权利要求1所述的方法,其特征在于,所述第一判别器的参数为所述第一设备基于所述本地数据、所述第一生成器的参数以及第一随机数样本集合确定的;
    所述第二生成器的参数为所述第二设备基于所述第二判别器的参数和第二随机数样本集合确定的;
    其中,所述第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,所述X个第一设备均传输第一判别器的参数至所述第二设备,所述X为大于等于1的正整数。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    更新所述第一判别器的参数M次,所述M为大于等于1的正整数,第i+1次第一判别器的参数的更新是所述第一设备基于所述本地数据、第i次更新后的第一生成器的参数以及所述第一随机数样本集合确定的,所述i取遍1~(M-1)中的任一整数。
  4. 根据权利要求2所述的方法,其特征在于,还包括:
    更新所述第一判别器的参数M次,所述M为大于等于1的正整数,所述第i次第一判别器的参数的更新是所述第一设备基于所述本地数据、第i次更新后的第一生成器的参数以及所述第一随机数样本集合确定的,所述i取遍1~M中的任一整数。
  5. 根据权利要求2所述的方法,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的伪随机数算法确定的。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    选取随机数种子;
    确定第一预设随机数样本集合中的元素的个数;
    将所述随机数种子以及所述第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定所述第一随机数样本集合。
  7. 根据权利要求2所述的方法,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的随机数码本确定的。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    选择码本初始位置;
    确定第二预设随机数样本集合中的元素的个数;
    基于所述码本初始位置以及所述第二预设随机数样本集合中的元素的个数查询随机数码本确定所述第一随机数样本集合。
  9. 根据权利要求2-8中任一所述的方法,其特征在于,所述传输所述第一判别器的参数至所述第二设备之前,还包括:
    接收来自所述第二设备的随机数样本集合同步信息。
  10. 根据权利要求2-8中任一所述的方法,其特征在于,所述传输所述第一设备的第一判别器的参数至所述第二设备之前,还包括:
    传输随机数样本集合同步信息至所述第二设备。
  11. 一种生成对抗网络GAN的训练方法,应用于机器学习系统,所述机器学习系统包括第一设备和第二设备,所述第一设备运行有第一GAN,所述第二设备运行有第二GAN,所述第一GAN包括第一生成器和第一判别器,所述第二GAN包括第二生成器和第二判别器,其特征在于,包括:
    所述第二设备接收来自N个所述第一设备的第一判别器的参数,所述第一判别器的参数为所述第一设备基于本地数据和所述第一设备的第一生成器的参数确定的;所述N为大于等于1的整数;
    对所述N个第一设备的第一判别器的参数进行参数聚合确定第二判别器的参数,并基于所述第二判别器的参数确定第二生成器的参数;
    传输所述第二判别器的参数和所述第二生成器的参数至所述L个第一设备;所述L为正整数。
  12. 根据权利要求11所述的方法,其特征在于,所述第二生成器的参数还基于N个第一设备的第一判别器的参数确定。
  13. 根据权利要求11或12所述的方法,其特征在于,所述第一判别器的参数为所述第一设备基于本地数据、所述第一生成器的参数以及第一随机数样本集合确定的;所述第二生成器的参数为所述第二设备基于所述第二判别器的参数和第二随机数样本集合确定的;其中,所述第二随机数样本集合与X个所述第一设备的所述第一随机数样本集合的并集相同,X个所述第一设备均传输所述第一判别器的参数至所述第二设备,所述X为大于等于1的正整数。
  14. 根据权利要求13所述的方法,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的伪随机数算法确定的。
  15. 根据权利要求14所述的方法,其特征在于,还包括:
    选取随机数种子;
    确定第一预设随机数样本集合中的元素的个数;
    将所述随机数种子以及所述第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定所述第二随机数样本集合。
  16. 根据权利要求13所述的方法,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的随机数码本确定的。
  17. 根据权利要求16所述的方法,其特征在于,还包括:
    选取随机数种子;
    所述第二设备选择码本初始位置;
    确定第二预设随机数样本集合中的元素的个数;
    基于所述码本初始位置以及所述第二预设随机数样本集合中的元素的个数查询随机数码本确定所述第二随机数样本集合。
  18. 根据权利要求13-17中任一所述的方法,其特征在于,所述第二设备接收来自N个所述第一设备的第一判别器的参数之前,还包括:
    接收来自所述第一设备的随机数样本集合同步信息。
  19. 根据权利要求13-17中任一所述的方法,其特征在于,所述第二设备接收来自N个所述第一设备的第一判别器的参数之前,还包括:
    传输随机数样本集合同步信息至所述第一设备。
  20. 一种机器学习系统,其特征在于,包括:所述机器学习系统包括第一设备和第二设备,所述第一设备运行有第一GAN,所述第二设备运行有第二GAN,所述第一GAN包括第一生成器和第一判别器,所述第二GAN包括第二生成器和第二判别器;
    其中,所述第一设备用于传输所述第一设备的第一判别器的参数至所述第二设备,所述第一判别器的参数为所述第一设备基于本地数据和所述第一设备的第一生成器的参数确定的;接收来自所述第二设备的第二判别器的参数以及第二生成器的参数,所述第二判别器的参数为所述第二设备对来自至少一个所述第一设备的第一判别器的参数进行参数聚合确定的,所述第二生成器的参数为所述第二设备基于所述第二判别器的参数确定的;以及通过所述第二判别器的参数和所述第二生成器的参数,更新所述第一判别器的参数和所述第一生成器的参数;
    所述第二设备用于接收来自N个所述第一设备的第一判别器的参数,所述第一判别器的参数为所述第一设备基于本地数据和所述第一设备的第一生成器的参数确定的;所述N为大于等于1的整数;对所述N个第一设备的第一判别器的参数进行参数聚合确定第二判别器的参数,并基于所述第二判别器的参数确定第二生成器的参数;传输所述第二判别器的参数和所述第二生成器的参数至所述L个第一设备;所述L为正整数。
  21. 根据权利要求20所述的系统,其特征在于,所述第一判别器的参数为所述第一设备基于所述本地数据、所述第一生成器的参数以及第一随机数样本集合确定的;
    所述第二生成器的参数为所述第二设备基于所述第二判别器的参数和第二随机数样本集合确定的;
    其中,所述第二随机数样本集合与X个第一设备的第一随机数样本集合的并集相同,所述X个第一设备均传输第一判别器的参数至所述第二设备,所述X为大于等于1的正整数。
  22. 根据权利要求21所述的系统,其特征在于,所述第一设备还用于:更新所述第一判别器的参数M次,所述M为大于等于1的正整数,第i+1次第一判别器的参数的更新是所述第一设备基于所述本地数据、第i次更新后的第一生成器的参数以及所述第一随机数样本集合确定的,所述i取遍1~(M-1)中的任一整数。
  23. 根据权利要求21所述的系统,其特征在于,所述第一设备还用于:更新所述第一判别器的参数M次,所述M为大于等于1的正整数,所述第i次第一判别器的参数的更新是所述第一设备基于所述本地数据、第i次更新后的第一生成器的参数以及所述第一随机数样本集合确定的,所述i取遍1~M中的任一整数。
  24. 根据权利要求21所述的系统,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的伪随机数算法确定的。
  25. 根据权利要求24所述的系统,其特征在于,所述第一设备还用于:
    选取随机数种子;
    确定第一预设随机数样本集合中的元素的个数;
    将所述随机数种子以及所述第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定所述第一随机数样本集合。
  26. 根据权利要求24所述的系统,其特征在于,所述第二设备还用于:
    选取随机数种子;
    确定第一预设随机数样本集合中的元素的个数;
    将所述随机数种子以及所述第一预设随机数样本集合中的元素的个数输入到伪随机数生成器中确定所述第二随机数样本集合。
  27. 根据权利要求21所述的系统,其特征在于,所述第一随机数样本集合和所述第二随机数样本集合是基于相同的随机数码本确定的。
  28. 根据权利要求27所述的系统,其特征在于,所述第一设备还用于:
    选择码本初始位置;
    确定第二预设随机数样本集合中的元素的个数;
    基于所述码本初始位置以及所述第二预设随机数样本集合中的元素的个数查询随机数码本确定所述第一随机数样本集合。
  29. 根据权利要求27所述的系统,其特征在于,所述第二设备还用于:
    选择码本初始位置;
    确定第二预设随机数样本集合中的元素的个数;
    基于所述码本初始位置以及所述第二预设随机数样本集合中的元素的个数查询随机数码本确定所述第二随机数样本集合。
  30. 根据权利要求21-29中任一所述的系统,其特征在于,所述第一设备还用于:
    在传输所述第一设备的第一判别器的参数至所述第二设备之前,接收来自所述第二设备的随机数样本集合同步信息。
  31. 根据权利要求21-29中任一所述的系统,其特征在于,所述第一设备还用于:
    在传输所述第一设备的第一判别器的参数至所述第二设备之前,传输随机数样本集合同步信息至所述第二设备。
  32. 一种通信装置,其特征在于,包括:至少一个处理器和存储器;
    所述存储器,存储计算机程序或指令;
    所述至少一个处理器,用于执行所述计算机程序或指令,以使得如权利要求1-10中任一项或如权利要求11-19中任一项所述的方法被执行。
  33. 一种通信装置,其特征在于,包括:逻辑电路和接口电路;
    所述接口电路,用于发送第一判别器的参数或接收第二判别器的参数以及第二生成器的参数;
    所述逻辑电路,用于执行如权利要求1-10中任一项或权利要求11-19中任一项所述的方法。
  34. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令被计算机执行时,使得如权利要求1-10中任一项或如权利要求11-19中任一项所述的方法被执行。
  35. 一种包含计算机程序或指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得上述权利要求1-10中任一项或如权利要求11-19中任一项所述的方法被执行。
PCT/CN2022/099839 2021-06-21 2022-06-20 一种gan的训练方法、机器学习系统及通信装置 WO2022268027A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22827520.2A EP4345699A1 (en) 2021-06-21 2022-06-20 Training method for gan, machine learning system and communication apparatus
US18/544,940 US20240127065A1 (en) 2021-06-21 2023-12-19 Gan training method, machine learning system, and communication apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110688066.4 2021-06-21
CN202110688066 2021-06-21
CN202110831248.2 2021-07-22
CN202110831248.2A CN115577743A (zh) 2021-06-21 2021-07-22 一种gan的训练方法、机器学习系统及通信装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/544,940 Continuation US20240127065A1 (en) 2021-06-21 2023-12-19 Gan training method, machine learning system, and communication apparatus

Publications (1)

Publication Number Publication Date
WO2022268027A1 true WO2022268027A1 (zh) 2022-12-29

Family

ID=84545136

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099839 WO2022268027A1 (zh) 2021-06-21 2022-06-20 一种gan的训练方法、机器学习系统及通信装置

Country Status (3)

Country Link
US (1) US20240127065A1 (zh)
EP (1) EP4345699A1 (zh)
WO (1) WO2022268027A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874648A (zh) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 联邦模型的训练方法、系统和电子设备
US20200134446A1 (en) * 2018-10-31 2020-04-30 General Electric Company Scalable artificial intelligence model generation systems and methods for healthcare
CN112686205A (zh) * 2021-01-14 2021-04-20 电子科技大学中山学院 一种参数更新方法及装置、多终端网络架构

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200134446A1 (en) * 2018-10-31 2020-04-30 General Electric Company Scalable artificial intelligence model generation systems and methods for healthcare
CN110874648A (zh) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 联邦模型的训练方法、系统和电子设备
CN112686205A (zh) * 2021-01-14 2021-04-20 电子科技大学中山学院 一种参数更新方法及装置、多终端网络架构

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JINKE REN; CHONGHE LIU; GUANDING YU; DONGNING GUO: "A New Distributed Method for Training Generative Adversarial Networks", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 19 July 2021 (2021-07-19), 201 Olin Library Cornell University Ithaca, NY 14853, XP091013289 *

Also Published As

Publication number Publication date
US20240127065A1 (en) 2024-04-18
EP4345699A1 (en) 2024-04-03

Similar Documents

Publication Publication Date Title
WO2021243619A1 (zh) 信息传输方法、装置、通信设备及存储介质
US20230179490A1 (en) Artificial intelligence-based communication method and communication apparatus
WO2022041947A1 (zh) 一种更新机器学习模型的方法及通信装置
WO2022012257A1 (zh) 通信的方法及通信装置
WO2021244334A1 (zh) 一种信息处理方法及相关设备
WO2022033456A1 (zh) 一种信道状态信息测量反馈方法及相关装置
WO2021123139A1 (en) Systems and methods for enhanced feedback for cascaded federated machine learning
WO2022121804A1 (zh) 半异步联邦学习的方法和通信装置
Al-Abiad et al. Energy-efficient resource allocation for federated learning in noma-enabled and relay-assisted internet of things networks
WO2020220954A1 (zh) 一种确定调度优先级的方法及装置
EP4158938A1 (en) Traffic flow prediction in a wireless network using heavy- hitter encoding and machine learning
CN114143802A (zh) 数据传输方法和装置
WO2022268027A1 (zh) 一种gan的训练方法、机器学习系统及通信装置
US11997693B2 (en) Lower analog media access control (MAC-A) layer and physical layer (PHY-A) functions for analog transmission protocol stack
WO2022206513A1 (zh) 模型处理的方法、通信装置和系统
WO2023123062A1 (zh) 虚拟信道样本的质量评估方法和设备
WO2022001822A1 (zh) 获取神经网络的方法和装置
Younis et al. Communication-efficient Federated Learning Design with Fronthaul Awareness in NG-RANs
CN112888076B (zh) 一种调度方法及装置
CN115577743A (zh) 一种gan的训练方法、机器学习系统及通信装置
US20230164629A1 (en) Managing a node in a communication network
WO2024026846A1 (zh) 一种人工智能模型处理方法及相关设备
WO2023065972A1 (zh) 机器学习模型的训练方法和装置
WO2024036526A1 (zh) 一种模型调度方法和装置
US20230239239A1 (en) Upper analog media access control (mac-a) layer functions for analog transmission protocol stack

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22827520

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022827520

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022827520

Country of ref document: EP

Effective date: 20231228

NENP Non-entry into the national phase

Ref country code: DE