Artificial intelligence model training method and communication apparatus
By interacting only some parameters update results of the artificial intelligence model in distributed AI model training, the problem of large feedback overhead between nodes in distributed AI model training is solved, and efficient AI model training effect is achieved and the performance of centralized model is approximate.
Patent Information
- Application Number
- PCT/CN2024/095522
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-29
- Filing Date
- 2024-05-27
- Publication Date
- 2024-12-05
AI Technical Summary
When using the distributed AI model training method, a large number of intermediate results need to be interacted with between the child nodes and the central node, resulting in a large feedback overhead between the nodes and affecting the communication effect.
By interacting only the update results of some model parameters of the artificial intelligence model between the child node and the central node, the feedback overhead is reduced while maintaining the model training effect. The specific method includes the child nodes training part of the AI model based on the local data set and Update and feedback to the central node the updated model parameters or their changes.
While reducing the overhead of data interaction between nodes, the performance of centralized artificial intelligence models is approached, improving the efficiency and effectiveness of AI model training.
Smart Images

Figure CN2024095522_05122024_PF_FP_ABST
Abstract
Description
Artificial intelligence model training method and communication device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 29, 2023, with application number 202310615651.0 and application name “An Artificial Intelligence Model Training Method and Communication Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence, and specifically to an artificial intelligence model training method and communication device. Background Art
[0003] Artificial intelligence (AI) is a key development direction in the information technology industry. With the advancement of communications technology, more and more applications will be intelligentized through AI. AI-based communications technologies have also achieved significant performance advantages.
[0004] In order to improve the training speed of large-scale AI models (models with a large number of nodes and parameters), there is a distributed AI model training method. This distributed AI model training method first uses each child node (such as a microprocessor) to train and update the initialized full model based on local data, and then transfers the intermediate results obtained in the training (such as updated model parameters or gradients, etc.) between the child nodes and the central node. Finally, the obtained intermediate results are fused at the central node to complete the training and update of the full model. When using the distributed A1 model training method to train a large-scale A1 model, a large number of intermediate results need to be exchanged between the child nodes and the central node, resulting in a large feedback overhead between the nodes, affecting the communication effect.
[0005] Summary of the Invention
[0006] The present application provides an artificial intelligence model training method and communication device. This method only exchanges the update results of some model parameters in the artificial intelligence model between each node. While reducing the data interaction overhead between nodes, it can approach the performance of a centralized artificial intelligence model.
[0007] In the first aspect, the present application provides an artificial intelligence model training method, which can be executed by a first sub-node, or by a component of the first sub-node (such as a processor, chip, or chip system, etc.), or by a logic module or software that can realize all or part of the functions of the first sub-node.
[0008] The method includes: training and updating all model parameters of the artificial intelligence model or the first part of the model parameters of all model parameters for the wth time according to a local data set, where w is a positive integer; sending first information to a central node, where the first information indicates the N model parameters after the wth update, or the first information indicates the first change amount of each model parameter in the N model parameters after the wth update, where the N model parameters are the second part of the model parameters in all model parameters, or the N model parameters are the first part of the model parameters, and N is a positive integer.
[0009] It should be understood that the first change in any model parameter can be an absolute change or a cumulative change. An absolute change refers to the change in the value of the model parameter after the current update relative to the value of the model parameter after the previous update. A cumulative change is the sum of multiple absolute changes corresponding to multiple consecutive updates.
[0010] According to the AI model training method provided in the embodiment of the present application, the child node trains and updates all or part of the model parameters of the AI model based on the local data set, and only feeds back the updated part of the model parameters or the first change of part of the model parameters to the central node, thereby reducing the feedback overhead while ensuring the model training effect as much as possible.
[0011] In one possible implementation, the first information indicates the N model parameters after the w-th update, including: the first information includes the parameter values corresponding to the N model parameters after the w-th update and the first position information of the N model parameters in the artificial intelligence model; or, the first information indicates the first change amount of each model parameter in the N model parameters after the w-th update, including: the first information includes the first change amount and first position information of each model parameter in the N model parameters after the w-th update.
[0012] The first location information is the location information of the N model parameters, that is, the first location information can indicate which model parameters of all model parameters the N model parameters are. If the first child node can obtain the location information of the N model parameters without reporting to the central node, for example, the central node indicates to the first child node that the N model parameters are model parameters that need to be fed back, then the first child node may not report the location information of the N model parameters. If the first child node cannot obtain the location information of the N model parameters without reporting to the central node, for example, the first child node determines the N model parameters that need to be fed back by itself, then the first child node needs to report the location information of the N model parameters.
[0013] In one possible implementation, the first position information is an index of N model parameters. Alternatively, the first information includes multiple first bits corresponding one-to-one to all model parameters, where the first bit corresponding to the N model parameters among the multiple first bits indicates the first position information, and the value of the first bit corresponding to the N model parameters among the multiple first bits is different from the values of other bits among the multiple first bits.
[0014] In one possible implementation, all model parameters are divided into multiple parameter groups, the first position information is the index of a first target parameter group among the multiple parameter groups, and the first target parameter group includes N model parameters; or, the first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group among the multiple second bits indicates the first position information, and the value of the second bit corresponding to the first target parameter group among the multiple second bits is different from the values of other bits among the multiple second bits.
[0015] By dividing all model parameters into multiple parameter groups, the overhead of the position information indicating the N model parameters can be reduced.
[0016] In one possible implementation, when all model parameters are trained and updated for the wth time, the N model parameters are the second part of model parameters. Before sending the first information to the central node, the method further includes: determining the N model parameters based on a second change in each model parameter among all model parameters within the first time period; or determining a first target parameter group based on the second change in the model parameters included in each parameter group of multiple parameter groups within the second time period, where all model parameters are divided into multiple parameter groups, and the first target parameter group includes the N model parameters.
[0017] In one possible implementation, determining the first target parameter group based on the second change in the model parameter of each parameter group in the multiple parameter groups within the second time period includes: determining the parameter group with the largest second change in the multiple parameter groups in the second time period as the first target parameter group.
[0018] Based on this solution, by feeding back the model parameter group with the second largest change, on the one hand, the feedback overhead can be reduced, and on the other hand, it is conducive to ensuring the AI model training effect.
[0019] In one possible implementation, N model parameters are determined based on the second change amount of each model parameter among all model parameters in the first time period, including: determining the model parameters among all model parameters whose second change amount is greater than or equal to a preset threshold as N model parameters; or determining the N model parameters among all model parameters whose second change amount is larger as N model parameters.
[0020] Based on this solution, by feeding back model parameters with large changes, on the one hand, the feedback overhead can be reduced, and on the other hand, it is helpful for the AI model to get as close as possible to the centralized AI training effect.
[0021] In one possible implementation, all model parameters are divided into H parameter groups, where H is a positive integer. Before sending the first information to the central node, the method further includes: determining N model parameters based on a training cycle to which the wth training session belongs, each training cycle including at least one training session, each training cycle corresponding to one of the H parameter groups, and the H parameter groups corresponding to different training cycles in a round-robin manner, and the parameter group corresponding to the training cycle to which the wth training session belongs includes N model parameters.
[0022] Based on the above solution, the first child node can poll and feedback some model parameters, thereby avoiding some model parameters from being untrained and unupdated, and improving the AI model training effect.
[0023] In a possible implementation, before sending the first information to the central node, the method further includes: receiving second information from the central node, where the second information indicates N model parameters.
[0024] Exemplarily, the second information includes first position information of N model parameters in the artificial intelligence model.
[0025] In an embodiment of the present application, the central node can indicate the model parameters that need to be trained and updated, and the child nodes can also determine the model parameters that need to be trained and / or updated on their own, which can improve the flexibility of the AI model training process.
[0026] In one possible implementation, before all model parameters or the first part of model parameters are trained and updated for the wth time, the method also includes: receiving third information sent from the second child node, the third information indicating the M model parameters after the i-th update, or the third information indicating the first change amount of each model parameter in the M model parameters after the i-th update, the M model parameters are part of the model parameters or all the model parameters of the artificial intelligence model, and i and M are both positive integers; wherein, all model parameters of the artificial intelligence model or the first part of all model parameters are trained and updated for the wth time according to the local data set, including: training and updating all model parameters or the first part of model parameters for the wth time according to the third information and the local data set.
[0027] Based on this solution, each child node performs local training by leveraging the real-time model status of other child nodes, further improving model training results. Furthermore, direct interaction between child nodes to update results eliminates the need for central node fusion and the transmission of updated results. This reduces the overhead of interaction between child and central nodes while improving AI model training efficiency.
[0028] In one possible implementation, the third information indicates the M model parameters after the i-th update, including: the third information includes the parameter values corresponding to the M model parameters after the i-th update and the second position information of the M model parameters in the artificial intelligence model; or, the third information indicates the first change amount of each model parameter in the M model parameters after the i-th update, including: the third information includes the first change amount and the second position information of each model parameter in the M model parameters after the i-th update.
[0029] It should be understood that the second position information is the position information of the M model parameters, that is, the second position information can indicate which model parameters of all model parameters the M model parameters are.
[0030] In one possible implementation, the second position information is an index of M model parameters; or, the third information includes multiple first bits corresponding one-to-one to all model parameters, the first bit corresponding to the M model parameters in the multiple first bits indicates the second position information, and the value of the first bit corresponding to the M model parameters in the multiple first bits is different from the values of other bits in the multiple first bits.
[0031] In one possible implementation, all model parameters are divided into multiple parameter groups, the second position information is the index of a second target parameter group among the multiple parameter groups, and the second target parameter group includes M model parameters; or, the third information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the second target parameter group among the multiple second bits indicates the second position information, and the value of the second bit corresponding to the second target parameter group among the multiple second bits is different from the values of other bits among the multiple second bits.
[0032] By dividing all model parameters into multiple parameter groups, the overhead of the location information indicating the M model parameters can be reduced.
[0033] In a possible implementation manner, the method further includes: sending the first information to the second child node.
[0034] Based on this solution, each child node performs local training by leveraging the real-time model status of other child nodes, further improving model training results. Furthermore, direct interaction between child nodes to update results eliminates the need for central node fusion and the transmission of updated results. This reduces the overhead of interaction between child and central nodes while improving AI model training efficiency.
[0035] In a possible implementation manner, sending the first information to the central node includes: sending the first information to the central node when a parameter reporting condition is met.
[0036] In a possible implementation, the parameter reporting condition includes: w is an integer multiple of a preset reporting period; or, the first silence information is not received, and the first silence information indicates that the first child node does not need to send the update result of the wth update to the central node.
[0037] Based on this solution, the child node feeds back the update result to the central node when the parameter reporting conditions are met, which can reduce the frequency of the first child node sending the first information to the central node, thereby further reducing the feedback overhead between nodes.
[0038] In one possible implementation, the method further includes: training and updating all model parameters or the first part of model parameters for the w+1th time based on the local data set; and sending a second silent message to the central node, the second silent message indicating that the central node does not need to wait for the update result of the w+1th update.
[0039] Based on this solution, when there is no need to feed back the update result to the central node, the child node can send a second silent message to the central node, so that the central node knows that the child node will not report the update result, and thus no longer waits to receive the update result of the child node.
[0040] On the second aspect, the present application provides an artificial intelligence model training method, which can be executed by a central node, or by a component of the central node (such as a processor, chip, or chip system, etc.), or by a logic module or software that can realize all or part of the central node functions.
[0041] The method includes: receiving first information from a first child node, the first information indicating N model parameters after the wth update, or the first information indicating the first change amount of each model parameter in the N model parameters after the wth update, the N model parameters are partial model parameters of the artificial intelligence model, and N and w are both positive integers; updating the artificial intelligence model according to the first information.
[0042] According to the AI model training method provided in the embodiment of the present application, the child node trains and updates all or part of the model parameters of the AI model based on the local data set, and only feeds back the updated part of the model parameters or the first change of part of the model parameters to the central node, thereby reducing the feedback overhead while ensuring the model training effect as much as possible.
[0043] In one possible implementation, the first information indicates the N model parameters after the w-th update, including: the first information includes the parameter values corresponding to the N model parameters after the w-th update and the first position information of the N model parameters in the artificial intelligence model; or, the first information indicates the first change amount of each model parameter in the N model parameters after the w-th update, including: the first information includes the first change amount and first position information of each model parameter in the N model parameters after the w-th update.
[0044] In one possible implementation, the first position information is an index of N model parameters. Alternatively, the first information includes multiple first bits corresponding one-to-one to all model parameters, where the first bit corresponding to the N model parameters among the multiple first bits indicates the first position information, and the value of the first bit corresponding to the N model parameters among the multiple first bits is different from the values of other bits among the multiple first bits.
[0045] In one possible implementation, all model parameters are divided into multiple parameter groups, the first position information is the index of a first target parameter group among the multiple parameter groups, and the first target parameter group includes N model parameters; or, the first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group among the multiple second bits indicates the first position information, and the value of the second bit corresponding to the first target parameter group among the multiple second bits is different from the values of other bits among the multiple second bits.
[0046] In a possible implementation, before receiving the first information from the first child node, the method further includes: determining N model parameters; and sending second information to the first child node, where the second information indicates the N model parameters.
[0047] Exemplarily, the second information includes first position information of N model parameters in the artificial intelligence model.
[0048] In one possible implementation, all model parameters of the artificial intelligence model are divided into H parameter groups, where H is a positive integer, and N model parameters are determined, including: determining N model parameters based on the training cycle to which the w-th training belongs, each training cycle includes at least one training, each training cycle corresponds to one parameter group in the H parameter groups, and the H parameter groups correspond to different training cycles in a polling manner, and the parameter group corresponding to the training cycle to which the w-th training belongs includes N model parameters.
[0049] In a possible implementation, the method further includes: sending third silence information to the first child node, where the third silence information indicates that the first child node does not need to send the w+1th update result to the central node.
[0050] It should be understood that the beneficial effects of the relevant solutions of the second aspect can be referred to the description of the corresponding solutions of the first aspect above, and will not be repeated here.
[0051] In a third aspect, the present application provides a communication device, which includes a module or unit for executing the method in the first aspect or any possible implementation of the first aspect.
[0052] In a fourth aspect, the present application provides a communication device, which includes a module or unit for executing the method in the second aspect or any possible implementation manner of the second aspect.
[0053] In a fifth aspect, the present application provides a communication device, comprising a processor, the processor being coupled to a memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions stored in the memory to implement the method in the first aspect or any possible implementation of the first aspect, or to implement the method in the second aspect or any possible implementation of the second aspect.
[0054] In one possible implementation, the apparatus further includes a memory coupled to the processor.
[0055] In a possible implementation, there are one or more processors and / or one or more memories.
[0056] In a possible implementation, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0057] In a possible implementation, the device further includes a communication interface, and the processor is coupled to the communication interface.
[0058] In one implementation, the apparatus is a terminal or an access network device.
[0059] In another implementation, the device is a chip in a terminal or a chip in an access network device.
[0060] In a sixth aspect, the present application provides a communication device, comprising a processor, the processor being coupled to a memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions stored in the memory to implement the method in the first aspect or any possible implementation of the first aspect, or to implement the method in the second aspect or any possible implementation of the second aspect.
[0061] In one possible implementation, the apparatus further includes a memory coupled to the processor.
[0062] In a possible implementation, there are one or more processors and / or one or more memories.
[0063] In a possible implementation, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0064] In a possible implementation, the device further includes a communication interface, and the processor is coupled to the communication interface.
[0065] In one implementation, the apparatus is an access network device or a core network device.
[0066] In another implementation, the device is a chip in an access network device or a chip in a core network device.
[0067] In a seventh aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any of the above aspects or any possible implementation of any of the above aspects.
[0068] In a specific implementation, the processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.
[0069] In an eighth aspect, the present application provides a communication system, comprising at least one of the communication device provided in the third aspect and the communication device provided in the fourth aspect, or comprising at least one of the communication device provided in the fifth aspect and the communication device provided in the sixth aspect.
[0070] In the ninth aspect, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any one of the above aspects or any possible implementation of any one of the aspects.
[0071] In the tenth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions). When the computer program runs on a computer, the computer executes the method in any one of the above aspects or any possible implementation of any one of the aspects.
[0072] In the eleventh aspect, a chip is provided, comprising a processor for calling and running a computer program from a memory, so that a communication device equipped with the chip executes the method in any one of the above aspects or any possible implementation of any one of the aspects.
[0073] In the twelfth aspect, a communication device is provided, which includes an interface and a processor, wherein the interface is used to send and / or receive signals, so that the processor executes the method in any one of the above aspects or any possible implementation of any one of the aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] FIG1 is a schematic structural diagram of a communication system according to an embodiment of the present application.
[0075] Figure 2 is a schematic flowchart of the distributed AI model training method.
[0076] Figure 3 is a schematic flowchart of an example of an AI model training method provided in an embodiment of the present application.
[0077] Figure 4 is another schematic flowchart of an AI model training method provided in an embodiment of the present application.
[0078] Figure 5 is another schematic flowchart of an AI model training method provided in an embodiment of the present application.
[0079] Figure 6 is another schematic flowchart of an AI model training method provided in an embodiment of the present application.
[0080] FIG7 is a schematic block diagram of an example of a communication device provided in an embodiment of the present application.
[0081] FIG8 is another schematic block diagram of a communication device according to an embodiment of the present application. DETAILED DESCRIPTION
[0082] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0083] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0084] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. It should be understood that in the present application, similar descriptions such as "under the circumstances of...", "if...", "when...", and "if..." can be used interchangeably.
[0085] This application can be applied to long-term evolution (LTE) systems, fifth-generation (5G) mobile communication systems, new wireless (NR), MulteFire networks, home base station networks, fixed-mobile converged networks (fixed access networks access mobile networks), 6G communication systems, future evolutionary communication systems, or other communication systems, etc., and this application does not limit this. This application is also applicable to information technology (IT) systems.
[0086] The solution provided in this application can be applied to a communication system including a central node and at least one sub-node.
[0087] In one possible implementation, the central node may be an access network device, a core network device, an edge data center, or a general-purpose computer, and the sub-nodes may be terminals. For example, referring to the communication system 100 shown in FIG1 , the communication system 100 includes an access network device 110 as a central node and terminals 120, 130, and 140 as sub-nodes.
[0088] In another possible implementation, the central node may be a core network device, an edge data center, or a general-purpose computer, and the sub-node may be an access network device or a terminal.
[0089] The terminal in the embodiments of the present application may refer to user equipment (UE), station, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal device, wireless communication device, user agent or user device. The terminal may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a smart home, a large screen, a vehicle-mounted device, a wearable device, a terminal in a 5G network or a terminal in a future-evolved public land mobile network (PLMN), etc., and the embodiments of the present application are not limited to this.
[0090] The access network device in the embodiments of the present application refers to a radio access network (RAN) node (or device) that connects a terminal to a wireless network, which can also be called a base station. For example, the access network device can be an evolved NodeB (eNodeB), a transmission reception point (TRP), a next-generation NodeB (gNB) in a 5G mobile communication system, a base station in a future mobile communication system or an access point (AP) in a WiFi system, a wireless controller in a cloud radio access network (CRAN) scenario, a relay station, an access point, a vehicle-mounted device, a wearable device, or an access network device in other communication systems that evolve in the future.
[0091] In one possible scenario, multiple RAN nodes collaborate to assist the terminal in achieving wireless access, and different RAN nodes respectively implement part of the functions of the base station. For example, the RAN node (i.e., the access network device in this application) can be a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU), etc. The CU and DU can be set separately, or they can also be included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or a radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU) or a remote radio head (RRH). In different systems, CU (or CU-CP and CU-UP), DU or RU may also have different names, but those skilled in the art can understand their meanings. For example, in an open radio access network (ORAN) system, CU may also be referred to as O-CU (open CU), DU may also be referred to as O-DU, CU-CP may also be referred to as O-CU-CP, CU-UP may also be referred to as O-CU-UP, and RU may also be referred to as O-RU. Any unit in the CU (or CU-CP, CU-UP), DU and RU in this application may be implemented by a software module, a hardware module, or a combination of a software module and a hardware module. It should be understood that this application does not limit the specific technology and specific device form adopted by the access network equipment.
[0092] The core network device in this application can provide user connections, user management, and service carrying, and provide an interface to the external network as a bearer network. For example, the core network device can be a session management function (SMF).
[0093] AI is a technology that uses computer hardware and software to simulate certain human intelligent behaviors, giving machines human intelligence. Currently, AI technology has achieved great success in a variety of fields, including computer vision, natural language processing, intelligent recommendations, autonomous driving, and drug testing, and is also beginning to gain widespread attention in the field of wireless communications. For example, in frequency division duplexing (FDD) systems, to address the high feedback overhead of channel state information (CSI) between terminals and access network equipment, terminals can encode and compress the CSI using an AI model that meets preset conditions, and then feed it back to the access network equipment, thereby reducing the CSI feedback overhead to a certain extent.
[0094] Currently, commonly used AI model training methods include centralized AI model training methods and distributed AI model training methods. The following describes the centralized AI model training method and the distributed AI model training method with reference to the accompanying figures.
[0095] Exemplarily, the centralized AI model training process is as follows: child nodes (for example, terminal 120, terminal 130, and terminal 140 in FIG1 ) can form a data set of collected data and send it to a central node (for example, access network device 110 in FIG1 ). The central node can then train and update the initial AI model based on the data set. Specifically, a suitable loss function is selected, and the initial AI model is iteratively trained using a local data set through a machine learning algorithm to optimize the various model parameters of the initial AI model (such as weights and biases, etc.), obtain iteratively converged model parameters, minimize the loss function value, and thereby complete a round of training and updating. Repeat the above training process until the initial AI model after training and updating meets the preset conditions (for example, the mean square error is less than the preset value). The AI model obtained by centralized training often has better generalization ability and performance due to the characteristics of extensive data.
[0096] Figure 2 shows a schematic flow chart of a distributed AI model training method. As shown in Figure 2, the distributed AI model training process includes S210 to S250.
[0097] S210: The central node sends an initial AI model to each child node (child node 1 and child node 2). Correspondingly, each child node receives the initial AI model.
[0098] Exemplarily, the central node may be an access network device, for example, the central node may be access network device 110 in Figure 1. Subnode 1 and subnode 2 may be terminals, for example, subnode 1 and subnode 2 may be two of terminals 120, terminal 130, and terminal 140 in Figure 1.
[0099] S220: Each sub-node trains and updates all model parameters of the initial AI model based on the local data set.
[0100] Exemplarily, after receiving the initial AI model, subnode 1 and subnode 2 train and update all model parameters of the initial AI model based on a local data set composed of their own collected data to obtain all model parameters after convergence (update).
[0101] S230: Each child node sends all updated model parameters to the central node. Correspondingly, the central node receives all updated model parameters from each child node.
[0102] S240, the central node fuses all updated model parameters to obtain all fused model parameters.
[0103] Exemplarily, the fused total model parameters may be the average of all updated model parameters sent by each child node. For example, if all model parameters of the initial AI model are a0, b0, and c0, and the updated total model parameters obtained by child node 1 are a1, b1, and c1, and the updated total model parameters obtained by child node 2 are a2, b2, and c2, then the fused total model parameters may be (a1+a2) / 2, (b1+b2) / 2, and (c1+c2) / 2.
[0104] Exemplarily, after determining all the model parameters after fusion, the central node can adjust all the model parameters of the initial AI model to correspond to all the model parameters after fusion.
[0105] S250: The central node sends all the fused model parameters to each child node. Correspondingly, each child node receives all the fused model parameters.
[0106] Exemplarily, after receiving all the fused model parameters, each child node adjusts all the model parameters of the initial AI model to correspond to the fused model parameters, and again trains and updates the updated initial AI model using the local dataset. This training process is repeated until the trained and updated initial AI model meets preset conditions (e.g., the mean square error is less than a preset value).
[0107] In distributed AI model training, the workload for training the AI model can be split and shared among multiple sub-nodes. These sub-nodes can work in parallel to improve the efficiency of AI model training and updating. Exemplarily, the distributed AI model training method can be federated learning (FL).
[0108] Compared with the centralized AI model training method, the distributed AI model training method can effectively reduce the air interface overhead of transmitting data from the sub-node to the central node because it only requires each sub-node to transmit the intermediate results obtained in the training (such as updated model parameters or gradients, etc.). In addition, the distributed AI model can effectively approach the performance of the centralized AI model by fully learning the local data characteristics of each sub-node. Therefore, in wireless communication systems, researching and developing distributed AI model training technology is an important technical means to make the network intelligent.
[0109] However, when using distributed AI model training methods to train large-scale AI models (i.e., AI models contain a large number of nodes and model parameters), a large number of intermediate results need to be exchanged between child nodes and central nodes, resulting in large feedback overhead between nodes and affecting communication effects.
[0110] In view of this, an embodiment of the present application provides an AI model training method, which can only exchange the update results of some model parameters in the AI model between nodes, while reducing the data interaction overhead between nodes and approaching the performance of a centralized artificial intelligence model.
[0111] The AI model training method provided in the embodiment of the present application is introduced in detail below in conjunction with the corresponding flowchart.
[0112] It should be understood that the schematic flow chart provided in this application mainly uses different nodes (first sub-node, second sub-node, central node) as the execution subject of the interactive schematic to illustrate the method, but this application does not limit the execution subject of the interactive schematic. For example, the first sub-node (or second sub-node) in the schematic flow chart may also be a chip, chip system, or processor that supports the first sub-node (or second sub-node) to implement the method, or a logic module or software that can implement all or part of the functions of the first sub-node (or second sub-node). The central node in the schematic flow chart may also be a chip, chip system, or processor that supports the central node to implement the method, or a logic module or software that can implement all or part of the functions of the central node. It should also be understood that the first sub-node can be any sub-node that communicates with the central node, and the second sub-node can also be any sub-node that communicates with the central node.
[0113] Figure 3 shows a schematic flow chart of an example of an AI model training method provided in an embodiment of the present application. The method 300 may include steps S310 to S330, and each step is described in detail below.
[0114] S310, the first sub-node trains and updates all model parameters of the AI model or the first part of model parameters of all model parameters for the wth time according to the local data set.
[0115] Wherein, w represents the number of times all model parameters or the first part of model parameters are trained and updated, and w is a positive integer. When w=1, the AI model may be an initial AI model or a first model. The first child node obtains the initial AI model or the first model from the central node. All model parameters of the initial AI model may be preset values, which may be configured based on empirical data or historical data. The first model may be an AI model obtained by training and updating the initial AI model once or multiple times in advance. When w>1, the AI model may be an AI model obtained by training and updating the initial AI model w-1 times, or the AI model may be an AI model obtained by training and updating the first model w-1 times.
[0116] Exemplarily, the initial AI model refers to a function model that maps an input of a certain dimension to an output of a certain dimension. The initial AI model may be a machine learning model. For example, the initial AI model may be a deep neural network (DNN) model, a feedforward neural network (FNN) model, or a convolutional neural network (CNN) model.
[0117] It should be understood that a neural network is a mathematical model that mimics the behavioral characteristics of animal neural networks and performs distributed parallel information processing.
[0118] In one example, the first child node may train and update all model parameters of the AI model for the wth time based on the local dataset. For example, the AI model includes 1000 model parameters (i.e., all model parameters), and the first child node may train and update 1000 model parameters based on the local dataset.
[0119] In another example, the first subnode may train and update the first portion of model parameters of the AI model for the wth time based on the local dataset. For example, the AI model includes 1000 model parameters (i.e., all model parameters), and the first subnode may train and update 100 of the 1000 model parameters based on the local dataset.
[0120] For example, when training and updating the first part of the model parameters in the AI model (for example, the 100 model parameters mentioned above), the first part of the model parameters can be trained and updated on the basis that the parameter values of other model parameters in all the model parameters (for example, 900 model parameters other than 100 model parameters in 1000 model parameters) remain unchanged.
[0121] S320, the first child node sends the first information to the central node. Correspondingly, the central node receives the first information.
[0122] Among them, the first information indicates the N model parameters after the w-th update, or the first information indicates the change amount of each model parameter among the N model parameters after the w-th update. When the first child node trains and updates all the model parameters of the AI model, the N model parameters can be the second part of the model parameters among all the model parameters. When the first child node trains and updates the first part of the model parameters of the AI model, the N model parameters can be the first part of the model parameters.
[0123] Exemplarily, the first part of the model parameters and the second part of the model parameters are partial model parameters among all the model parameters. For example, the AI model parameters include E model parameters (i.e., all the model parameters), and the partial model parameters can be F of the E model parameters. Both E and F are positive integers, and 1 ≤ F < E. For example, the AI model includes 100 model parameters (such as a1 to a 100 ). The first part of the model parameters (or the second part of the model parameters) can be 10 of the 100 model parameters (such as a 30 to a 39 , or a 60 to a 69 etc.), or can be 5 of the 100 model parameters (such as a 10 , a 23 , a 48 , a 51 and a 60 , or a8, a 18 , a 28 , a 38 and a 48 etc.). Among them, the first part of the model parameters and the second part of the model parameters may be the same or different. For example, the first part of the model parameters and the second part of the model parameters may both be a 30 to a 39 . Or, the first part of the model parameters is a 60 to a 69 , and the second part of the model parameters is a 55 to a 64 .
[0124] Exemplarily, when the first information indicates N model parameters after the wth update, the first information may include parameter values corresponding to the N model parameters after the wth update, and further may include location information of the N model parameters in the AI model. When the first information indicates the first change amount of each model parameter in the N model parameters after the wth update, the first information may include the change amount of each model parameter in the N model parameters after the wth update, and further may include location information of the N model parameters in the AI model.
[0125] For example, if the first child node can obtain the location information of the N model parameters without reporting to the central node, for example, if the central node indicates to the first child node that the N model parameters are model parameters that require feedback, then the first child node may not report the location information of the N model parameters. If the first child node cannot obtain the location information of the N model parameters without reporting to the central node, for example, if the first child node independently determines that the N model parameters require feedback, then the first child node needs to report the N model parameters.
[0126] Hereinafter, the change amount of each model parameter in the N model parameters after the w-th update is recorded as: the first change amount.
[0127] Illustratively, the first change amount of any model parameter may be an absolute change amount or a cumulative change amount.
[0128] The absolute change refers to the change in the parameter value of the model parameter after this update relative to the parameter value of the model parameter after the previous update. For example, the first change in the model parameter after the wth update may refer to the difference between the parameter value of the model parameter after the wth update and the parameter value of the model parameter after the w-1th update. For example, the parameter value of the model parameter a1 after the w-1th update is 6, and the parameter value of the model parameter a1 after the wth update is 6.1, then the first change in the model parameter a1 after the wth update is 0.1. Among them, the parameter value of the model parameter after the 0th update is the parameter value of the model parameter before the 1st update.
[0129] The cumulative change is the sum of the absolute changes corresponding to multiple consecutive updates. For example, the first change of the model parameter after the wth update can refer to the difference between the parameter value of the model parameter after the wth update and the parameter value of the model parameter after the wxth update, where x can be an integer greater than or equal to 2. For example, if the parameter value of model parameter a1 after the w-2th update is 5.8, the parameter value of model parameter a1 after the w-1th update is 6, and the parameter value of model parameter a1 after the wth update is 6.1, then the first change of model parameter a1 after the wth update is 0.3.
[0130] Hereinafter, the position information of the N model parameters in the AI model is referred to as: first position information. The representation of the first position information is described below.
[0131] Optionally, the first position information may be an index of N model parameters.
[0132] Specifically, each model parameter among all the model parameters of the AI model corresponds to an index. The correspondence between the index and the model parameter can be pre-configured in the central node and the child node. By feeding back the index corresponding to the model parameter, the central node can know which model parameter the value or change of the value fed back by the child node is.
[0133] Optionally, the first information may include multiple first bits (i.e., a bitmap) corresponding one-to-one to all model parameters, where N first bits corresponding to N model parameters in the multiple first bits indicate the first position information. The values of the N first bits corresponding to the N model parameters in the multiple first bits are different from the values of other bits in the multiple first bits.
[0134] For example, if all model parameters are a1 to a8, and the eight first bits correspond to the eight model parameters one by one (for example, the first first bit corresponds to model parameter a1, the second first bit corresponds to model parameter a2, and so on), if N model parameters are a4 to a6, then the first information may include bitmap[00011100], or the first information may include bitmap[11100011]. By making the values of the fourth to sixth first bits different from the values of the other first bits, the first position information of the N model parameters in the AI model is indicated.
[0135] It should be understood that in this manner, the central node needs to pre-agree with the sub-nodes on the reporting format, that is, the model parameters indicated by each bit and the meaning of the bit value.
[0136] Optionally, all model parameters of the AI model are divided into multiple parameter groups, and the first position information may be an index of a first target parameter group among the multiple parameter groups, wherein the first target parameter group includes N model parameters.
[0137] Optionally, all model parameters of the AI model are divided into multiple parameter groups, and the first information may include multiple second bits corresponding to the multiple parameter groups. The second bit corresponding to the first target parameter group in the multiple second bits indicates the first position information. The value of the second bit corresponding to the first target parameter group in the multiple second bits is different from the values of other bits in the multiple bits, and the model parameters included in the first target parameter group are the N model parameters mentioned above.
[0138] For example, all model parameters are divided into 10 parameter groups, and the 10 second bits correspond to the 10 parameter groups in sequence (for example, the first second bit corresponds to the first parameter group, and the second second bit corresponds to the second parameter group). If the N model parameters are model parameters included in the first parameter group (i.e., the first target parameter group), the first information may include bitmap[1000000000], or the first information may include bitmap[0111111111]. By making the value of the first second bit different from the values of the other first bits, the first position information of the N model parameters in the AI model is indicated.
[0139] For example, the number of model parameters included in each parameter group in the multiple parameter groups can be the same or different. For example, the 100 model parameters included in the AI model are divided into 5 parameter groups, each parameter group can include 20 model parameters, and the number of model parameters included in the 5 parameter groups can also be 10, 30, 20, 15, and 25, respectively.
[0140] The following is an example of how to determine N model parameters.
[0141] Mode 1: The first sub-node determines N model parameters according to the variation (denoted as the second variation) of each model parameter among all model parameters in the first time period.
[0142] For example, the second variation of the kth model parameter in the first time period is shown in formula (1).
[0143] In formula (1), ΔW t (k) represents the change in the kth model parameter at time t. T1 represents the first time period, which is a preset value and can be set according to empirical data. For example, the first time period can be 30s, 60s, etc. k and i are both positive integers, and 1≤i≤T1. The maximum value of k is the number of all model parameters. For example, if the AI model includes E model parameters (i.e., all model parameters), then 1≤k≤E.
[0144] Specifically, in the process of continuously training and updating all model parameters using the local data set, the second change amount of each model parameter in all model parameters in the first time period is determined by formula (1), and then N model parameters are determined based on the second change amount of each model parameter in all model parameters in the first time period.
[0145] For example, the second variation of all model parameters can be greater than or equal to the preset threshold. The model parameters are determined as N model parameters. That is, if the second change in the k-th model parameter during the first time period is greater than a preset threshold, the k-th model parameter is determined as one of the N model parameters. The preset threshold can be set based on empirical data. For example, the preset threshold can be 0.2, 0.3, etc.
[0146] Exemplarily, N model parameters with larger second changes among all model parameters can be determined as the N model parameters. That is, the second changes of each model parameter among all model parameters in the first time period can be arranged in descending order, and the model parameters corresponding to the first N second changes (i.e., the N model parameters with larger second changes) can be determined as the N model parameters.
[0147] By determining N model parameters in method 1, it is possible to determine from all model parameters that the second variation in the training process is large (greater than the first threshold or greater than ) of the N model parameters, so that only the model parameters with the larger second change amount are fed back between the first child node and the central node. Moreover, infrequent feedback of the model parameters with the smaller second change amount among all the model parameters does not affect the training effect of the model parameters. Therefore, determining the N model parameters by method 1 can reduce the feedback overhead between nodes while approaching the training effect of the centralized AI model training method.
[0148] Mode 2: The first subnode determines a first target parameter group according to a second variation of the model parameters included in each parameter group in the plurality of parameter groups within the second time period, and determines the model parameters included in the first target parameter group to be N model parameters.
[0149] Specifically, during the process of continuously training and updating all model parameters using the local data set, a second change amount of each model parameter among all model parameters within a second time period is determined. Thereafter, a first target parameter group is determined based on the second change amount of the model parameters included in each parameter group within the plurality of parameter groups within the second time period, and the model parameters included in the first target parameter group are determined to be N model parameters.
[0150] It should be understood that before continuously training and updating all model parameters using the local dataset, the first child node and the central node may reach an agreement through a protocol or instruction to divide all model parameters into multiple parameter groups, each parameter group including at least one model parameter. The number of model parameters included in each parameter group may be the same or different.
[0151] The second time period is a preset value and can be set based on empirical data. The second time period can be the same as or different from the first time period. For example, the second time period can be 30 seconds, 80 seconds, etc.
[0152] In one example, the parameter group with the second largest change amount among the multiple parameter groups in the second time period may be determined as the first target parameter group.
[0153] For example, the parameter group with the largest second variation among the plurality of parameter groups within the second time period may be determined by formula (2).
[0154] In formula (2), j is an integer greater than or equal to 1, A j represents the jth parameter group, ΔW t (k) represents the change in the kth model parameter at time t, T2 represents the second time period, i is an integer, and 1≤i≤T2. If all model parameters are divided into Q parameter groups, Q is an integer greater than 1, then 1≤j≤Q.
[0155] By determining N model parameters through method 2, it is possible to determine the N model parameters with larger changes during the training process from all model parameters, so that only the N model parameters with larger changes are fed back between the first child node and the central node, thereby reducing the feedback overhead between nodes while approaching the training effect of the centralized AI model training method.
[0156] Method 3: Determine N model parameters based on the training cycle to which the w-th training belongs.
[0157] All model parameters are divided into H parameter groups, where H is a positive integer. Each training cycle includes at least one training session, and each training cycle corresponds to one of the H parameter groups. The H parameter groups correspond to different training cycles in a round-robin manner. The N model parameters are the model parameters included in the parameter group corresponding to the training cycle to which the wth training session belongs.
[0158] For example, every training session can be regarded as a training cycle, or every five training sessions can be regarded as a training cycle.
[0159] For example, when each training is regarded as a training cycle, the corresponding relationship between the number of training times w, the training cycle and the H parameter groups can be as shown in Table 1.
[0160] Table 1
[0161] For example, when every 5 trainings are regarded as a training cycle, the corresponding relationship between the number of trainings w, the training cycle and the H parameter groups may be as shown in Table 2.
[0162] Table 2
[0163] Specifically, after determining the training cycle to which the w-th training belongs, the model parameters included in the parameter group corresponding to the training cycle to which the w-th training belongs are determined to be N model parameters. For example, if w is 2, according to Table 1, it can be seen that the training cycle to which w belongs is the second training cycle, and the model parameters included in the second parameter group corresponding to the second training cycle are determined to be N model parameters. For another example, if w is 2, according to Table 2, it can be seen that the training cycle to which w belongs is the first training cycle, and the model parameters included in the first parameter group corresponding to the first training cycle are determined to be N model parameters.
[0164] That is, if the number of training times w is any value from q×p+1 to (q+1)×p, the model parameters included in the (q mod H)+1th parameter group among the H parameter groups are determined as N model parameters.
[0165] Wherein, p is a positive integer, q=0, 1, 2, 3, ..., mod represents a remainder, and (q mod H) represents the remainder obtained by dividing q by H. p is a preset value and can be manually configured.
[0166] For example, when p=1 and H=5, if w=2, then q=1, (q mod H)+1=2, and the N model parameters are the model parameters included in the second parameter group of the five parameter groups. If w=3, then q=2, (q mod H)+1=3, and the N model parameters are the model parameters included in the third parameter group of the five parameter groups. When p=5 and H=5, if w=2, then q=0, (q mod H)+1=1, and the N model parameters are the model parameters included in the first parameter group of the five parameter groups. If w=3, then q=0, (q mod H)+1=1, and the N model parameters are the model parameters included in the first parameter group of the five parameter groups.
[0167] It should be understood that p can represent the number of training sessions included in the above training cycle. For example, if each training session constitutes a training cycle, p is 1. If each 5 training sessions constitutes a training cycle, p is 5. (q+1) can represent the training cycle to which the w-th training session belongs. For example, when q=0, it means that the training cycle to which the w-th training session belongs is the 1st training cycle, and when q=1, it means that the training cycle to which the w-th training session belongs is the 2nd training cycle. (q mod H)+1 can represent the parameter group corresponding to the training cycle to which the w-th training session belongs among the H parameter groups.
[0168] By determining N model parameters through method 3, the first child node can alternately update and feedback the update results of all model parameters in rounds, avoiding that some model parameters are never trained and updated, thereby enabling the AI model to achieve better training results.
[0169] Mode 4: The first child node determines N model parameters according to the second information. Mode 4 is described below with reference to FIG.
[0170] For example, Figure 4 shows another schematic flow chart of the AI model training method provided in an embodiment of the present application. As shown in Figure 4, the method 400 may further include S410 to S440.
[0171] S410: The central node determines N model parameters.
[0172] Exemplarily, the central node may determine N model parameters through the above-mentioned method 3.
[0173] S420: The central node sends second information to the first child node. Correspondingly, the first child node receives the second information.
[0174] The second information indicates N model parameters.
[0175] Exemplarily, the second information includes first position information of the N model parameters in the AI model. The first child node determines the corresponding N model parameters based on the first position information. The first position information is the same as the first position information described above and is not further described here.
[0176] S430, the first sub-node trains and updates all model parameters of the AI model or the first part of the model parameters of all model parameters for the wth time according to the local data set.
[0177] S440: The first child node sends first information to the central node. Correspondingly, the central node receives the first information.
[0178] Exemplarily, in this solution, the first information may include parameter values corresponding to the N model parameters after the wth update. Alternatively, the first information may include the change amount of each model parameter in the N model parameters after the wth update.
[0179] Among them, S430 is similar to S310, and S440 is similar to S320, which will not be repeated here.
[0180] Based on the above solution, not only can N model parameters be determined through the first child node, but N model parameters can also be determined through the central node, which improves the flexibility of AI model training.
[0181] Exemplarily, when the first child node trains and updates all model parameters, N model parameters can be determined by any one of methods 1 to 4; when the first child node trains and updates the first part of the model parameters, N model parameters can be determined by method 3 or method 4.
[0182] S330: The central node updates the AI model according to the first information.
[0183] Specifically, the central node can update the corresponding N model parameters in the locally stored AI model based on the first information. The central node can obtain an AI model that meets the requirements (for example, the mean square error is less than a preset value) through the update results continuously fed back by the child nodes, thereby completing the distributed AI model training.
[0184] According to the AI model training method provided in the embodiment of the present application, the child node trains and updates all or part of the model parameters of the AI model based on the local data set, and only feeds back the updated part of the model parameters or the first change of part of the model parameters to the central node, thereby reducing the feedback overhead while ensuring the model training effect as much as possible.
[0185] In some embodiments, S320 may specifically include: sending the first information to the central node when the parameter reporting condition is met. The parameter reporting condition is described in detail below.
[0186] Optionally, the parameter reporting condition may include that w is an integer multiple of a preset reporting period (ie, w mod U=0).
[0187] Specifically, when w is an integer multiple of the preset reporting period, the first child node sends the first information to the central node. U represents the preset reporting period and is a positive integer. U is a preset value that can be manually configured. For example, U can be 5, 10, etc. mod represents the remainder, and w mod U represents the remainder after dividing w by U. That is, the first child node only feeds back the first information once for every U iterations.
[0188] For example, if U = 10, the first child node does not send the first information to the central node after training and updating all or part of the model parameters for the 1st to 9th iterations. It does not send the first information to the central node until the first child node trains and updates all or part of the model parameters for the 10th iteration. That is, the first child node sends the update result (first information) to the central node only after every 10 iterations.
[0189] When w mod U = 0, the first information may include the cumulative value of the first change amount of each model parameter in the N model parameters in the preset reporting period. That is, the first information may include the cumulative value of the first change amount of each model parameter in the N model parameters after the q×U+1th update to the first change amount of each model parameter in the N model parameters after the (q+1)×Uth update. That is, the first information may include the first change amount of each model parameter in the N model parameters between the q×U+1th update and the (q+1)×Uth update. Wherein, q is an integer, q=w / U-1.
[0190] For example, if U = 5, the first child node sends the first information to the central node when w = 5. At this time, q = 0, and the first information includes the cumulative value of the first change in each of the N model parameters after the first update to the first change in each of the N model parameters after the fifth update. In other words, the first information may include the first change in each of the N model parameters between the first update and the fifth update. For example, if the parameter value of model parameter a1 before the first update is 5 and the parameter value of model parameter a1 after the fifth update is 5.6, the cumulative value is 0.6.
[0191] For another example, if U = 5, the first child node also sends the first information to the central node when w = 10. At this time, q = 1, and the first information includes the cumulative value of the first change amount of each model parameter in the N model parameters after the 6th update to the first change amount of each model parameter in the N model parameters after the 10th update. In other words, the first information may include the first change amount of each model parameter in the N model parameters between the 6th update and the 10th update. For example, the parameter value of model parameter a1 before the 6th update is 5.6, and the parameter value of model parameter a1 after the 10th update is 6, then the cumulative value is 0.4.
[0192] Optionally, the parameter reporting condition may include not receiving the first muting information. That is, when the first child node does not receive the first muting information, the first information is sent to the central node. The first muting information indicates that the first child node does not need to send the first information to the central node. The muting information can be used to more flexibly adjust the sending frequency of the first information according to the first change in the model parameter, thereby reducing the feedback overhead between nodes while ensuring the training effect of the AI model. At this time, the first information may include the cumulative value of the first change in each model parameter of the N model parameters between the last time the first muting information was received and the current time when the first muting information was not received.
[0193] Based on this solution, the child node feeds back the update result to the central node only when the parameter reporting conditions are met, which can reduce the frequency of the first child node sending the first information to the central node, thereby further reducing the feedback overhead between nodes.
[0194] In some embodiments, method 300 further includes: the first child node performs a w+1th training and updating of all model parameters or a first part of the model parameters based on the local data set, and the first child node sends a second silent message to the central node. The second silent message indicates that the central node does not need to wait for the w+1th update result. That is, after the first child node trains and updates all model parameters or the first part of the model parameters, the first child node may not feed back the update result to the central node, thereby reducing the frequency with which the first child node sends the first message to the central node and further reducing the feedback overhead between nodes.
[0195] In some embodiments, to improve the training effect of the AI model, the first subnode further receives third information from the second subnode. In this case, S310 includes: training and updating all model parameters or the first part of model parameters for the wth time based on the third information and the local data set.
[0196] The third information indicates the M model parameters after the i-th update. Alternatively, the third information indicates a first change in each of the M model parameters after the i-th update, where the M model parameters are some or all of the model parameters of the AI model, and i and M are both positive integers.
[0197] Exemplarily, the manner of determining the M model parameters is similar to the manner of determining the N model parameters in the above embodiment, and will not be described in detail here.
[0198] Exemplarily, when the third information indicates M model parameters after the i-th update, the third information may include parameter values corresponding to the M model parameters after the i-th update and location information of the M model parameters in the AI model. When the first information indicates the first change amount of each of the M model parameters after the i-th update, the third information may include the first change amount of each of the M model parameters after the i-th update and location information of the M model parameters in the AI model.
[0199] Hereinafter, the position information of the M model parameters in the AI model is referred to as second position information. The representation of the second position information is described below.
[0200] Optionally, the second position information may be an index of M model parameters.
[0201] Optionally, the third information may include multiple first bits (i.e., a bitmap) corresponding one-to-one to all model parameters, where the M first bits corresponding to the M model parameters in the multiple first bits indicate the second position information. The values of the M first bits corresponding to the M model parameters in the multiple first bits are different from the values of other bits in the multiple first bits.
[0202] Optionally, all model parameters of the AI model are divided into multiple parameter groups, and the second position information may be an index of a second target parameter group among the multiple parameter groups, wherein the second target parameter group includes M model parameters.
[0203] Optionally, all model parameters of the AI model are divided into multiple parameter groups, and the third information may include multiple second bits corresponding to the multiple parameter groups. The second bit corresponding to the second target parameter group in the multiple second bits indicates the second position information. The value of the second bit corresponding to the second target parameter group in the multiple second bits is different from the values of other bits in the multiple bits.
[0204] Specifically, after receiving the third information, the first child node may first update M model parameters in the AI model based on the third information, and then train and update all model parameters or the first part of model parameters for the wth time based on the local dataset. The exchange of information between child nodes enables each child node to further train and update all model parameters or the first part of model parameters based on the update results of other child nodes, thereby improving the training effect of the AI model.
[0205] Exemplarily, the first sub-node may obtain the third information through the central node. Specifically, the second sub-node sends the third information to the central node, and the central node forwards the third information to the first sub-node.
[0206] Exemplarily, the second sub-node sends the third information to the first sub-node via unicast or broadcast.
[0207] Figures 5 and 6 are schematic flow charts of an example of an AI model training method provided in an embodiment of the present application. The following describes the AI model training method in conjunction with Figure 5 , where each sub-node determines some model parameters, and in conjunction with Figure 6 , where some model parameters are determined by a central node.
[0208] As shown in Figure 5, the method 500 may include steps S501 to S510. Each step is described in detail below.
[0209] In step S501, the central node sends an AI model to a first child node and a second child node. Accordingly, the first child node receives the AI model, and the second child node receives the AI model.
[0210] Exemplarily, the AI model may be an initial AI model, and the central node may determine the initial AI model based on empirical data or user input.
[0211] Exemplarily, the AI model may be an initial AI model that has been trained and updated once or multiple times in advance.
[0212] S502: The second sub-node trains and updates all model parameters of the AI model or a third part of the model parameters in all model parameters for the i-th time according to the local data set.
[0213] Where i is a positive integer and represents the number of times the second child node trains and updates all model parameters or the third part of model parameters. The third part of model parameters is a subset of all model parameters. The third part of model parameters, the first part of model parameters, and the second part of model parameters may be the same or different.
[0214] S503: The second sub-node sends third information to the first sub-node. Correspondingly, the first sub-node receives the third information.
[0215] The third information indicates the M model parameters after the i-th update, or the third information indicates the first change amount of each model parameter in the M model parameters after the i-th update.
[0216] Exemplarily, the second sub-node may send the third information to the first sub-node in a unicast or broadcast manner.
[0217] S504: The second child node sends third information to the central node. Correspondingly, the central node receives the third information.
[0218] S505: The first sub-node performs a w-th training and update on all model parameters of the AI model or a first part of the model parameters of all model parameters according to the third information and the local data set.
[0219] Exemplarily, the first sub-node may first update M model parameters in the AI model according to the third information, and then perform the wth training and update on all model parameters or the first part of the model parameters according to the local data set.
[0220] S506: The first child node sends the first information to the second child node. Correspondingly, the second child node receives the first information.
[0221] Illustratively, the first sub-node may send the first information to the second sub-node in a unicast or broadcast manner.
[0222] S507: The first child node sends first information to the central node. Correspondingly, the central node receives the first information.
[0223] Specifically, S507 is similar to the above-mentioned S320 and will not be described in detail here.
[0224] Exemplarily, after receiving the first information, the central node updates the corresponding N model parameters in the AI model according to the first information.
[0225] S508: The second sub-node performs the (i+1)th training and update on all model parameters of the AI model or the third part of model parameters in all model parameters according to the first information and the local data set.
[0226] Specifically, after training and updating all model parameters or the third part of model parameters for the i-th time, the second sub-node updates the corresponding N model parameters in the AI model according to the first information, and then uses the local data set to perform the next training and update of all model parameters or the third part of model parameters of the AI model.
[0227] S509: The first sub-node performs the w+1th training and update on all model parameters of the AI model or the first part of the model parameters of all model parameters according to the third information and the local data set.
[0228] Specifically, after training and updating all model parameters or the third part of model parameters for the i-th time, the second sub-node updates the corresponding N model parameters in the AI model according to the first information, and then uses the local data set to perform the next training and update of all model parameters or the third part of model parameters of the AI model.
[0229] S510: The first sub-node sends second silence information to the central node.
[0230] The second silence information indicates that the central node does not need to wait for the w+1th update result.
[0231] Exemplarily, each node (first sub-node, second sub-node and central node) exchanges information (for example, first information, third information, etc.) with each other, and continuously trains and updates all model parameters or part of the model parameters (for example, first part model parameters, second part model parameters, etc.) of the AI model based on the information and local data set until the central node completes the training and update of the AI model.
[0232] The AI model training method provided in the embodiments of the present application uses information exchange between subnodes, enabling each subnode to further train and update all or part of the AI model's parameters based on the update results of other subnodes, thereby achieving better AI model training results. Furthermore, the direct exchange of update results between subnodes eliminates the need for central node fusion and transmission of update results, thereby improving AI model training efficiency.
[0233] As shown in Figure 6, the method 600 may include steps S601 to S612. Each step is described in detail below.
[0234] S601: The central node sends an AI model to a first child node and a second child node. Correspondingly, the first child node receives the AI model, and the second child node receives the AI model.
[0235] Exemplarily, the AI model may be an initial AI model, and the central node may determine the initial AI model based on empirical data or user input.
[0236] Exemplarily, the AI model may be an initial AI model that has been trained once or multiple times in advance.
[0237] S602: The central node sends fourth information to the second child node. Correspondingly, the second child node receives the fourth information.
[0238] The fourth information indicates M model parameters.
[0239] Exemplarily, the fourth information includes second position information of the M model parameters in the AI model. The second child node determines the corresponding M model parameters based on the second position information. This second position information is the same as the aforementioned second position information and is not described in detail here.
[0240] In one example, before the central node sends the fourth information to the second child node, the central node further determines M model parameters that the second child node needs to update and report. The central node determines the M model parameters in the same manner as the aforementioned central node determines the N model parameters, and is not further described here.
[0241] S603: The central node sends second information to the first child node. Correspondingly, the first child node receives the second information.
[0242] Among them, S603 is the same as the above S420 and will not be repeated here.
[0243] In one example, before the central node sends the second information to the first sub-node, the central node further determines N model parameters that the first sub-node needs to update and report (ie, S410).
[0244] S604: The second sub-node trains and updates all model parameters of the AI model or the third part of the model parameters of all model parameters for the i-th time according to the local data set.
[0245] Among them, S604 is the same as the above S502 and will not be repeated here.
[0246] S605: The second sub-node sends third information to the first sub-node. Correspondingly, the first sub-node receives the third information.
[0247] Among them, S605 is the same as the above S503 and will not be repeated here.
[0248] S606: The second child node sends third information to the central node. Correspondingly, the central node receives the third information.
[0249] S607: The central node updates the AI model according to the third information.
[0250] Exemplarily, after receiving the third information, the central node updates the corresponding M model parameters in the AI model according to the third information to obtain an updated AI model.
[0251] S608: The first sub-node performs a w-th training and update on all model parameters of the AI model or a first part of model parameters of all model parameters according to the third information and the local data set.
[0252] Exemplarily, the first subnode may update the corresponding M model parameters in the AI model according to the third information, and then train and update all model parameters or the first part of model parameters using the local data set.
[0253] S609: The first child node sends the first information to the second child node. Correspondingly, the second child node receives the first information.
[0254] Among them, S609 is the same as the above S506 and will not be repeated here.
[0255] S610: The first sub-node sends first information to the central node. Correspondingly, the central node receives the first information.
[0256] Specifically, S610 is the same as the above-mentioned S320 and will not be described in detail here.
[0257] S611: The central node updates the updated AI model according to the first information.
[0258] Exemplarily, after the central node updates the M model parameters of the AI model according to the third information, it may also update the N model parameters of the AI model according to the first information.
[0259] S612: The central node sends third silence information to the first child node.
[0260] The third silence information indicates that the first child node does not need to send the w+1th update result to the central node.
[0261] Exemplarily, each node (first sub-node, second sub-node and central node) exchanges information (for example, first information, third information, etc.) with each other, and continuously trains and updates all model parameters or part of the model parameters (for example, first part model parameters, second part model parameters, etc.) of the AI model based on the information and local data set until the central node completes the training and update of the AI model.
[0262] The above describes the method embodiments provided by this application, and the following describes the device embodiments provided by this application. It should be understood that the description of the device embodiments corresponds to the description of the method embodiments. Therefore, for matters not described in detail, reference can be made to the method embodiments above. For the sake of brevity, they will not be repeated here.
[0263] Figure 7 is a schematic block diagram of a communication device provided in an embodiment of the present application. As shown in Figure 7, the communication device 700 may include a communication unit 710 and a processing unit 720. The communication unit 710 may implement corresponding communication functions, such as internal communication within the communication device 700 or communication between the communication device 700 and other devices; the processing unit 720 may implement corresponding processing functions. The communication unit 710 may also be referred to as a communication interface or a transceiver unit.
[0264] Optionally, the communication device 700 may further include a storage unit, which may be used to store instructions and / or data. The processing unit 720 may read the instructions and / or data in the storage unit so that the device implements the aforementioned method embodiment.
[0265] In some embodiments, the communication device 700 may be the first sub-node in the above method 300, or may be a module or chip applied to the first sub-node. The communication device 700 may be used to execute the steps or processes executed by the first sub-node in the above method embodiments.
[0266] Specifically, the communication device 700 includes: a processing unit 720, used to train and update all model parameters of the AI model or the first part of model parameters in all model parameters for the wth time according to a local data set, where w is a positive integer; a communication unit 710, used to send first information to the central node, where the first information indicates the N model parameters after the wth update, or the first information indicates the first change amount of each model parameter in the N model parameters after the wth update, the N model parameters are the second part of model parameters in all model parameters, or the N model parameters are the first part of model parameters, and N is a positive integer.
[0267] Exemplarily, the first information indicates the N model parameters after the w-th update, including: the first information includes the parameter values corresponding to the N model parameters after the w-th update and the first position information of the N model parameters in the AI model; or, the first information indicates the first change amount of each model parameter in the N model parameters after the w-th update, including: the first information includes the first change amount and first position information of each model parameter in the N model parameters after the w-th update.
[0268] Exemplarily, the first position information is an index of N model parameters; or, the first information includes multiple first bits corresponding one-to-one to all the model parameters, the first bit corresponding to the N model parameters in the multiple first bits indicates the first position information, and the value of the first bit corresponding to the N model parameters in the multiple first bits is different from the values of other bits in the multiple first bits; or, all the model parameters are divided into multiple parameter groups, the first position information is an index of a first target parameter group in the multiple parameter groups, and the first target parameter group includes N model parameters; or, the first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group in the multiple second bits indicates the first position information, and the value of the second bit corresponding to the first target parameter group in the multiple second bits is different from the values of other bits in the multiple second bits.
[0269] Optionally, when all model parameters are trained and updated for the wth time, N model parameters are the second part of model parameters. Before sending the first information to the central node, the processing unit 720 is also used to: determine the N model parameters based on the second change amount of each model parameter in all model parameters in the first time period; or, determine the first target parameter group based on the second change amount of the model parameters included in each parameter group in multiple parameter groups in the second time period, all model parameters are divided into multiple parameter groups, and the first target parameter group includes N model parameters.
[0270] Optionally, the processing unit 720 is specifically configured to: determine a parameter group having the largest change among the multiple parameter groups within the second time period as the first target parameter group.
[0271] Optionally, the processing unit 720 is specifically configured to: determine the model parameters whose second variation is greater than or equal to a preset threshold among all the model parameters as N model parameters; or determine the N model parameters whose second variation is larger among all the model parameters as N model parameters.
[0272] Optionally, all model parameters are divided into H parameter groups, where H is a positive integer. Before sending the first information to the central node, the processing unit 720 is also used to: determine the N model parameters according to the training cycle to which the w-th training belongs, each training cycle includes at least one training, each training cycle corresponds to one parameter group among the H parameter groups, and the H parameter groups correspond to different training cycles in a polling manner, and the parameter group corresponding to the training cycle to which the w-th training belongs includes N model parameters.
[0273] Optionally, before sending the first information to the central node, the communication unit 710 is further configured to: receive second information from the central node, where the second information indicates N model parameters.
[0274] Exemplarily, the second information includes first position information of N model parameters in the AI model.
[0275] Optionally, before performing the w-th training and update on all model parameters or the first part of the model parameters, the communication unit 710 is also used to: receive third information sent from the second child node, the third information indicating the M model parameters after the i-th update, or the third information indicating the first change amount of each model parameter in the M model parameters after the i-th update, the M model parameters are part of the model parameters or all the model parameters of the AI model, and i and M are both positive integers; wherein, the processing unit 720 is specifically used to: perform the w-th training and update on all model parameters or the first part of the model parameters according to the third information and the local data set.
[0276] Exemplarily, the third information indicates the M model parameters after the i-th update, including: the third information includes the parameter values corresponding to the M model parameters after the i-th update and the second position information of the M model parameters in the AI model; or, the third information indicates the first change amount of each model parameter in the M model parameters after the i-th update, including: the third information includes the first change amount and the second position information of each model parameter in the M model parameters after the i-th update.
[0277] Exemplarily, the second position information is an index of M model parameters; or, the third information includes multiple first bits corresponding one-to-one to all the model parameters, the first bit corresponding to the M model parameters in the multiple first bits indicates the second position information, and the value of the first bit corresponding to the M model parameters in the multiple first bits is different from the values of other bits in the multiple first bits; or, all the model parameters are divided into multiple parameter groups, the second position information is an index of a second target parameter group in the multiple parameter groups, and the second target parameter group includes M model parameters; or, the third information includes multiple second bits corresponding one-to-one to multiple parameter groups, the second bit corresponding to the second target parameter group in the multiple second bits indicates the second position information, and the value of the second bit corresponding to the second target parameter group in the multiple second bits is different from the values of other bits in the multiple second bits.
[0278] Optionally, the communication unit 710 is further configured to: send the first information to the second sub-node.
[0279] Optionally, the communication unit 710 is specifically configured to: send the first information to the central node when the parameter reporting condition is met.
[0280] Optionally, the parameter reporting condition includes: w is an integer multiple of a preset reporting period; or, the first silence information is not received, and the first silence information indicates that the first subnode does not need to send the update result of the wth update to the central node.
[0281] Optionally, the processing unit 720 is also used to: perform w+1th training and update on all model parameters or the first part of the model parameters according to the local data set; the communication unit 710 is also used to: send a second silent message to the central node, and the second silent message indicates that the central node does not need to wait for the update result of the w+1th update.
[0282] In other embodiments, the communication device 700 may be the central node in the above method, or a module or chip applied to the central node. The communication device 700 may be used to execute the steps or processes executed by the central node in the above method embodiments.
[0283] Specifically, the communication device includes: a communication unit 710, used to receive first information from a first child node, the first information indicates N model parameters after the wth update, or the first information indicates the first change amount of each model parameter in the N model parameters after the wth update, the N model parameters are partial model parameters of the AI model, and N and w are both positive integers; a processing unit 720, used to update the AI model according to the first information.
[0284] Exemplarily, the first information indicates the N model parameters after the w-th update, including: the first information includes the parameter values corresponding to the N model parameters after the w-th update and the first position information of the N model parameters in the AI model; or, the first information indicates the first change amount of each model parameter in the N model parameters after the w-th update, including: the first information includes the first change amount and first position information of each model parameter in the N model parameters after the w-th update.
[0285] Exemplarily, the first position information is an index of N model parameters; or, the first information includes multiple first bits corresponding one-to-one to all the model parameters, the first bit corresponding to the N model parameters in the multiple first bits indicates the first position information, and the value of the first bit corresponding to the N model parameters in the multiple first bits is different from the values of other bits in the multiple first bits; or, all the model parameters are divided into multiple parameter groups, the first position information is an index of a first target parameter group in the multiple parameter groups, and the first target parameter group includes N model parameters; or, the first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group in the multiple second bits indicates the first position information, and the value of the second bit corresponding to the first target parameter group in the multiple second bits is different from the values of other bits in the multiple second bits.
[0286] Optionally, before receiving the first information from the first subnode, the processing unit 720 is further configured to: determine N model parameters, and the communication unit 710 is further configured to: send second information to the first subnode, where the second information indicates the N model parameters.
[0287] Exemplarily, the second information includes first position information of N model parameters in the AI.
[0288] Optionally, all model parameters of the AI model are divided into H parameter groups, where H is a positive integer. The processing unit 720 is specifically used to: determine N model parameters according to the training cycle to which the w-th training belongs, each training cycle includes at least one training, each training cycle corresponds to one parameter group in the H parameter groups, and the H parameter groups correspond to different training cycles in a polling manner, and the parameter group corresponding to the training cycle to which the w-th training belongs includes N model parameters.
[0289] Optionally, the communication unit 710 is further configured to: send third silence information to the first child node, where the third silence information indicates that the first child node does not need to send the w+1th update result to the central node.
[0290] Regarding the steps or processes executed by each unit in the communication device 700, please refer to the above method embodiment for details, which will not be described in detail here.
[0291] It should be understood that the communication device 700 can also perform the operations performed by the second sub-node in the above-mentioned method 500 or method 600. Regarding the steps or processes performed by each unit in the communication device 700, please refer to the above-mentioned method 500 or method 600 for details and will not be described in detail here.
[0292] It should be understood that the "units" in the communication device 700 can be implemented by hardware, can be implemented by software, and can also be implemented by hardware executing corresponding software implementations. For example, the "units" can refer to application specific integrated circuits (ASICs), electronic circuits, processors (such as shared processors, dedicated processors, or group processors, etc.) and memories for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions. For another example, the communication unit 710 can be replaced by a transceiver transceiver circuit (for example, a receiving circuit and a transmitting circuit), and the processing unit 720 can be replaced by a processor or a processing circuit.
[0293] Figure 8 shows another schematic block diagram of a communication device 800 provided in an embodiment of the present application. The device 800 can be a first subnode or a central node, or can be a chip, a chip system, or a processor that supports the first subnode or central node in implementing the above method. The device can be used to implement the method described in the above method embodiment. For details, please refer to the description of the above method embodiment.
[0294] The device 800 may include one or more processors 810, which may also be referred to as processing units, and may implement certain control functions. The processor 810 may be a general-purpose processor or a dedicated processor. For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may be used to control a communication device (e.g., a base station, a baseband chip, a user chip, a DU or a CU, etc.), execute software programs, and process data from the software programs.
[0295] In an optional design, the processor 810 may also store instructions and / or data, which can be executed by the processor 810 to enable the device 800 to perform the method described in the above method embodiment.
[0296] In another optional design, the apparatus 800 may include a communication interface 820 for implementing receiving and transmitting functions. For example, the communication interface 820 may be a transceiver circuit, an interface, an interface circuit, or a transceiver. The transceiver circuit, interface, interface circuit, or transceiver for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, interface circuit, or transceiver may be used for reading and writing code / data, or the transceiver circuit, interface, interface circuit, or transceiver may be used for transmitting or delivering signals.
[0297] Optionally, the device 800 may include one or more memories 830, which may store instructions that can be executed on the processor 810, causing the device 800 to perform the method described in the above method embodiment. Optionally, the memory 830 may also store data. Optionally, the processor 810 may also store instructions and / or data. The processor 810 and memory 830 may be provided separately or integrated together.
[0298] In one possible design, the communication device 700 or the communication device 800 may be configured in a terminal. Alternatively, the communication device 700 or the communication device 800 itself may be the terminal. In other words, the terminal may perform the actions performed by the first sub-node or the second sub-node in the above method embodiment.
[0299] In another possible design, the communication device 700 or the communication device 800 may be configured in an access network device. Alternatively, the communication device 700 or the communication device 800 itself may be the access network device. Alternatively, the access network device may perform the actions performed by the central node in the above method embodiment.
[0300] It should be understood that, in one possible design, each step in the method embodiment provided in the present application can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0301] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0302] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0303] The present application also provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the various steps or processes executed by the first sub-node, central node, or second sub-node in any of the above method embodiments.
[0304] The present application also provides a computer-readable storage medium, which stores program code. When the program code runs on a computer, it enables the computer to execute the various steps or processes performed by the first sub-node, the central node, or the second sub-node in any of the above method embodiments.
[0305] The present application also provides a communication device, including a processor and an interface, wherein the interface is used to send and / or receive signals, so that the processor executes the various steps or processes performed by the first sub-node, the central node, or the second sub-node in any of the above method embodiments.
[0306] The present application also provides a communication system, which includes at least one of a first sub-node, a central node, and a second sub-node.
[0307] The above-mentioned device embodiments and method embodiments are completely corresponding, and the corresponding steps are performed by the corresponding modules or units. For example, the communication unit or communication interface performs the receiving or sending steps in the method embodiment. Other steps except sending and receiving can be performed by the processing unit or processor.
[0308] In the embodiments of this application, each term and English abbreviation is provided for convenience of description and shall not constitute any limitation to this application. This application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.
[0309] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on one computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable storage media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).
[0310] Those skilled in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0311] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can be based on the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0312] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0313] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0314] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0315] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0316] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0317] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An artificial intelligence model training method, characterized in that: Applied to the first child node, the method comprises: Performing a w-th training and updating of all model parameters of the artificial intelligence model or a first part of the model parameters of all model parameters according to the local data set, where w is a positive integer; Sending first information to a central node, wherein the first information indicates N model parameters after the w-th update, or the first information indicates a first change amount of each model parameter in the N model parameters after the w-th update, the N model parameters are the second part of the model parameters in all the model parameters, or the N model parameters are the first part of the model parameters, and N is a positive integer.
2. The method according to claim 1, characterized in that The first information indicates the N model parameters after the w-th update, including: the first information includes parameter values corresponding to the N model parameters after the w-th update and first position information of the N model parameters in the artificial intelligence model; or, The first information indicates a first change amount of each of the N model parameters after the w-th update, including: the first information includes the first change amount of each of the N model parameters after the w-th update and the first position information.
3. The method according to claim 2, characterized in that The first position information is the index of the N model parameters; or, The first information includes a plurality of first bits corresponding to all the model parameters one by one, a first bit corresponding to the N model parameters among the plurality of first bits indicates the first position information, and a value of the first bit corresponding to the N model parameters among the plurality of first bits is different from values of other bits among the plurality of first bits; or, The entire model parameters are divided into a plurality of parameter groups, the first position information is an index of a first target parameter group among the plurality of parameter groups, and the first target parameter group includes the N model parameters; or The first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group among the multiple second bits indicates the first position information, and the value of the second bit corresponding to the first target parameter group among the multiple second bits is different from the values of other bits in the multiple second bits.
4. The method according to any one of claims 1 to 3, characterized in that In the case where the w-th training and updating are performed on all the model parameters, the N model parameters are the second part of model parameters, and before the first information is sent to the central node, the method further includes: Determine the N model parameters according to the second variation of each model parameter in all the model parameters within the first time period; or, A first target parameter group is determined according to a second change amount of the model parameters included in each parameter group of the multiple parameter groups within a second time period, the entire model parameters are divided into the multiple parameter groups, and the first target parameter group includes the N model parameters.
5. The method according to claim 4, characterized in that The determining the first target parameter group according to the second variation of the model parameter of each parameter group in the plurality of parameter groups within the second time period includes: The parameter group with the second largest change amount among the plurality of parameter groups within the second time period is determined as the first target parameter group.
6. The method according to claim 4, characterized in that The determining the N model parameters according to the second change amount of each model parameter in all the model parameters in the first time period includes: Determine the model parameters whose second variation is greater than or equal to the preset threshold among all the model parameters as the N model parameters; or, The N model parameters having the larger second variation among all the model parameters are determined as the N model parameters.
7. The method according to any one of claims 1 to 3, characterized in that The entire model parameters are divided into H parameter groups, where H is a positive integer. Before sending the first information to the central node, the method further includes: The N model parameters are determined according to the training cycle to which the w-th training belongs, each training cycle includes at least one training, each training cycle corresponds to one parameter group among the H parameter groups, and the H parameter groups correspond to different training cycles in a polling manner, and the parameter group corresponding to the training cycle to which the w-th training belongs includes the N model parameters.
8. The method according to any one of claims 1 to 3, characterized in that Before sending the first information to the central node, the method further includes: Second information is received from the central node, where the second information indicates the N model parameters.
9. The method according to any one of claims 1 to 8, characterized in that Before training and updating all the model parameters or the first part of the model parameters for the wth time, the method further includes: Receive third information sent from the second child node, wherein the third information indicates M model parameters after the i-th update, or the third information indicates a first change amount of each model parameter in the M model parameters after the i-th update, wherein the M model parameters are part of the model parameters or all of the model parameters of the artificial intelligence model, and i and M are both positive integers; The step of training and updating all model parameters of the artificial intelligence model or the first part of model parameters of all model parameters for the wth time according to the local data set includes: The w-th training and updating are performed on all the model parameters or the first part of the model parameters according to the third information and the local data set.
10. The method according to claim 9, characterized in that The third information indicates the M model parameters after the i-th update, including: the third information includes parameter values corresponding to the M model parameters after the i-th update and second position information of the M model parameters in the artificial intelligence model; or, The third information indicates a first change amount of each of the M model parameters after the i-th update, including: the third information includes the first change amount of each of the M model parameters after the i-th update and the second position information.
11. The method according to claim 10, characterized in that The second position information is the index of the M model parameters; or, The third information includes a plurality of first bits corresponding to all the model parameters one by one, a first bit corresponding to the M model parameters among the plurality of first bits indicates the second position information, and a value of the first bit corresponding to the M model parameters among the plurality of first bits is different from values of other bits among the plurality of first bits; or, The entire model parameters are divided into a plurality of parameter groups, the second position information is an index of a second target parameter group in the plurality of parameter groups, and the second target parameter group includes the M model parameters; or, The third information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the second target parameter group among the multiple second bits indicates the second position information, and the value of the second bit corresponding to the second target parameter group among the multiple second bits is different from the values of other bits among the multiple second bits.
12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: The first information is sent to the second child node.
13. The method according to any one of claims 1 to 12, characterized in that The sending of the first information to the central node includes: When the parameter reporting condition is met, the first information is sent to the central node.
14. The method according to claim 13, characterized in that The parameter reporting conditions include: w is an integer multiple of the preset reporting period; or, The first silence information is not received, and the first silence information indicates that the first sub-node does not need to send the update result of the w-th update to the central node.
15. The method according to any one of claims 1 to 13, characterized in that The method further comprises: Performing a w+1th training and updating of all the model parameters or the first part of the model parameters according to the local data set; Sending second silence information to the central node, wherein the second silence information indicates that the central node does not need to wait for an update result of the w+1th update.
16. An artificial intelligence model training method, characterized in that: Applied to the central node, the method includes: Receive first information from a first child node, wherein the first information indicates N model parameters after the w-th update, or the first information indicates a first change amount of each model parameter in the N model parameters after the w-th update, the N model parameters are partial model parameters of the artificial intelligence model, and N and w are both positive integers; Update the artificial intelligence model according to the first information.
17. The method according to claim 16, characterized in that The first information indicates the N model parameters after the w-th update, including: the first information includes parameter values corresponding to the N model parameters after the w-th update and first position information of the N model parameters in the artificial intelligence model; or, The first information indicates a first change amount of each of the N model parameters after the w-th update, including: the first information includes the first change amount of each of the N model parameters after the w-th update and the first position information.
18. The method according to claim 17, characterized in that The first position information is the index of the N model parameters; or, The first information includes a plurality of first bits corresponding to all model parameters one by one, a first bit corresponding to the N model parameters among the plurality of first bits indicates the first position information, and a value of the first bit corresponding to the N model parameters among the plurality of first bits is different from values of other bits among the plurality of first bits; or, The entire model parameters are divided into a plurality of parameter groups, the first position information is an index of a first target parameter group among the plurality of parameter groups, and the first target parameter group includes the N model parameters; or The first information includes multiple second bits corresponding one-to-one to the multiple parameter groups, the second bit corresponding to the first target parameter group among the multiple second bits indicates the first position information, and the value of the second bit corresponding to the target parameter group among the multiple second bits is different from the values of other bits among the multiple second bits.
19. The method according to any one of claims 16 to 18, characterized in that: Before receiving the first information from the first subnode, the method further includes: Determining the N model parameters; Second information is sent to the first subnode, where the second information indicates the N model parameters.
20. The method according to claim 19, characterized in that All model parameters of the artificial intelligence model are divided into H parameter groups, where H is a positive integer, and determining the N model parameters includes: The N model parameters are determined according to the training cycle to which the w-th training belongs, each training cycle includes at least one training, each training cycle corresponds to one parameter group among the H parameter groups, and the H parameter groups correspond to different training cycles in a polling manner, and the parameter group corresponding to the training cycle to which the w-th training belongs includes the N model parameters.
21. The method according to any one of claims 16 to 20, characterized in that The method further comprises: A third silence message is sent to the first sub-node, where the third silence message indicates that the first sub-node does not need to send the w+1th update result to the central node.
22. A communication device, characterized in that: A method comprising a unit for executing each step of the method according to any one of claims 1 to 15, or a method comprising each step of the method according to any one of claims 16 to 21.
23. A communication device, characterized in that: The method comprises a processor and an interface, wherein the interface is used to send and / or receive signals, so that the processor executes the method according to any one of claims 1 to 15 or the method according to any one of claims 16 to 21.
24. A communication device, characterized in that: The device comprises a processor, wherein the processor is coupled to a memory, wherein the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the device executes the method according to any one of claims 1 to 15 or the method according to any one of claims 16 to 21.
25. A readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed, the computer is caused to perform the method according to any one of claims 1 to 15 or the method according to any one of claims 16 to 21.
26. A computer program product, characterized in that The method comprises computer program instructions, wherein the computer program instructions cause the computer to perform the method according to any one of claims 1 to 15 or the method according to any one of claims 16 to 21.
Citation Information
Patent Citations
Gradient compression for distributed training
CN113435682A
Data processing method, federal learning training method and related device and equipment
CN113688855A
Communication method and device
CN115734244A
Information transmission method, lightweight processing method and related communication device
CN115918048A
