Sample processing method, apparatus, system, and storage medium

By processing samples based on the instructions of the central node in federated segmentation learning, the problem of poor robustness of the neural network model caused by repeated traversal of the samples by child nodes is solved, and the robustness and generalization ability of the model are improved.

WO2025161870A1PCT designated stage Publication Date: 2025-08-07HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/071028
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-31
Filing Date
2025-01-07
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

In federated segmentation learning, child nodes need to repeatedly traverse all samples and the samples during each traversal are consistent, resulting in poor robustness of the trained neural network model.

Method used

The child node sends the labels and features of the sample to the central node, and processes the sample according to the indication information of the central node. The indication information includes the contribution degree of the sample and the data processing method, so as to continuously change the samples during the training process and improve the robustness of the model.

Benefits of technology

By dynamically adjusting the contribution degree and data processing method of samples, the robustness and generalization ability of the trained neural network model are improved, and the computing resources and transmission overhead are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025071028_07082025_PF_FP_ABST
    Figure CN2025071028_07082025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine learning, and discloses a sample processing method, an apparatus, a system, and a storage medium, for use in improving the robustness and generalization capability of network models and solving the problem in the related art of poor robustness of neural network-based network models. The method comprises: a sub-node sends sample information of at least one sample to a central node; the central node receives the sample information of the at least one sample from the sub-node, then generates, for each sample, indication information of the sample on the basis of the sample information of the sample, and sends the indication information of at least one sample to the sub-node; and upon receipt of the indication information of the at least one sample from the central node, on the basis of the indication information of each sample, the sub-node processes the sample.
Need to check novelty before this filing date? Find Prior Art

Description

Sample processing method, device, system and storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 31, 2024, with application number 202410144751.4 and application name “Sample Processing Method, Device, System and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of machine learning technology, and in particular to a sample processing method, device, system and storage medium. Background Art

[0003] Neural networks (NNs) are a tool for large-scale, multi-parameter optimization. Relying on a large number of samples, NNs can learn hidden features in data that are difficult to summarize, thereby completing complex tasks such as image semantic segmentation. NNs are widely used in the field of artificial intelligence (AI).

[0004] Currently, distributed learning can be used to train neural networks. Distributed learning mainly includes federated learning and segmented learning. Federated segmented learning is a combination of federated learning and segmented learning to develop another method for training neural networks.

[0005] When training a neural network using federated segmentation learning, the child nodes and the central node repeat the following steps until the neural network model converges: Each child node uses local data in parallel, performs forward propagation to calculate features, and feeds this back to the central node. The central node uses the features to perform forward propagation to calculate the sample gradients corresponding to each child node, and then performs backpropagation to update its own neural network parameters. The central node then sends the sample gradients to the corresponding child node. The child node then performs backpropagation to update its own neural network parameters and sends them back to the central node. This allows the central node to aggregate the updated neural network parameters of each child node and feed them back to the child nodes.

[0006] In summary, in federated segmentation learning, child nodes not only need to repeatedly traverse all samples, but also the samples in each traversal process are exactly the same, resulting in poor robustness of the network model of the trained neural network. Summary of the Invention

[0007] The embodiments of the present application provide a sample processing method, device, system and storage medium for solving the problem of poor robustness of the network model of the neural network in the related art.

[0008] To achieve the above objectives, the present invention provides the following technical solutions:

[0009] In a first aspect, a sample processing method is provided. The method is applied to a distributed training system for training a network model in a distributed manner. When training a network model in a distributed manner, the network model can be divided into a first network model and a second network model, with the first network model deployed in each child node and the second network model deployed in the central node.

[0010] Specifically, the method is executed by any child node in the distributed training system, or by a module within the child node, such as a chip, chip system, or circuit; or by a logic module or software that implements all or part of the child node's functionality, without limitation. For ease of description, the following description uses child node execution as an example.

[0011] The method includes: a child node sending the label and features of at least one sample to a central node, and after receiving indication information for the at least one sample from the central node, processing the sample based on the indication information for each sample. The indication information for each sample is used to indicate at least one of the sample's contribution to the training of a network model and the data processing method corresponding to the sample. That is, the indication information for each sample can be used to indicate the sample's contribution to the training of the network model, the data processing method corresponding to the sample, or both.

[0012] The feature of each sample is a value obtained after the sample is input into the first network model deployed in the child node.

[0013] It can be seen from the above method that after the child node sends the label and features of at least one sample to the central node, the sample can be processed in a targeted manner according to the contribution of the sample indicated by the central node and / or the data processing method of the sample, so that the processed sample can be applied to the next training network model, that is, the child node can continuously process each sample based on the indication information of each sample sent by the central node. Therefore, during the model training process, the samples in the child node are constantly changing rather than remaining unchanged, which can effectively improve the robustness and generalization ability of the network model of the trained neural network, and avoid the problem of poor robustness of the network model caused by using the same sample for each training.

[0014] Specifically, when the indication information of each sample indicates the contribution of the sample in the process of training the network model, the child node can adjust each sample in the at least one sample according to the contribution of at least one sample, and different adjustment methods will also produce different effects. For example, when the adjustment method is to perform data augmentation on the sample, the adaptability between the sample and the first network model can be made higher, that is, the contribution of the at least one sample in the process of training the network model is improved, thereby improving the robustness of the first network model obtained by training at least one sample. When the adjustment method is to delete the sample, the number of samples in the child node can be reduced, thereby achieving the effect of saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node.

[0015] In the case where the indication information of each sample indicates the data processing method corresponding to the sample, the child node can process the sample according to the data processing method corresponding to each sample, and different data processing methods will also produce different effects. For example, when the data processing method of a certain sample is a data augmentation method, the adaptability between the sample and the first network model can be made higher, that is, the contribution of at least one sample in the process of training the network model is increased, thereby improving the robustness of the first network model obtained by training at least one sample. When the data processing method of a certain sample is a data deletion operation, the number of samples in the child node can be reduced, thereby achieving the effect of saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node.

[0016] In an optional embodiment, the child node may include a first sample. When the indication information of the first sample is used to indicate the contribution of the first sample in the process of training the network model, if the contribution of the first sample in the process of training the network model is less than a contribution threshold, the first sample is deleted, or the first sample is processed using the first data processing method. If the contribution of the first sample in the process of training the network model is greater than the contribution threshold, the first sample is processed using the second data processing method.

[0017] The contribution of the first sample processed by the first data processing method to the training process of the network model is greater than the contribution of the first sample before processed by the first data processing method to the training process of the network model.

[0018] Similarly, the contribution of the first sample after being processed by the second data processing method in the process of training the network model is greater than the contribution of the first sample before being processed by the second data processing method in the process of training the network model.

[0019] The degree of change of the first sample caused by the first data processing method is greater than the degree of change of the first sample caused by the second data processing method.

[0020] The contribution threshold can be 50 or 90, which is not limited in this application.

[0021] Through the above method, it can be seen that when the contribution of the first sample in the process of training the network model is less than the contribution threshold, the first sample does not play a vital role in the training of the network model. Such samples can be called invalid samples. In this case, the child node can delete the first sample, that is, the invalid sample, and retain the samples with higher contribution. This not only ensures the normal training of the network model, but also reduces the number of samples in the child node, thereby saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node. The child node can also use the first data processing method to process the first sample to improve the contribution of the first sample in the process of training the network model, thereby improving the robustness of the first network model obtained through training with at least one sample.

[0022] When the contribution of the first sample in the process of training the network model is greater than the contribution threshold, the child node can use the second data processing method to process the first sample to further improve the contribution of the first sample in the process of training the network model, so that the adaptability between the first sample and the first network model is higher, thereby effectively improving the robustness of the network model obtained by training at least one sample.

[0023] In an optional implementation, the child node may include a second sample. When the indication information of the second sample indicates a data processing method corresponding to the second sample, the child node may use the data processing method to perform data processing on the second sample.

[0024] It should be noted that the contribution of the second sample after being processed by the data processing method to the training of the network model is greater than the contribution of the second sample before being processed by the data processing method to the training of the network model.

[0025] In an optional implementation, the indication information of each sample is also used to indicate whether to perform data processing on the sample.

[0026] In this way, the child node can determine whether to perform data processing on each sample based on the indication information. If the instruction is to perform data processing on the sample, the child node can randomly select a data processing method to process the corresponding sample, or use a predetermined data processing method to process the corresponding sample, or use the data processing method indicated in the indication information to process the corresponding sample. If the instruction is not to perform data processing on the sample, the child node can directly delete the sample or directly retain the sample. This embodiment of the present application is not limited to this.

[0027] In an optional embodiment, the child node may also receive a gradient corresponding to a feature of at least one sample from the central node, and then update the model parameters of the first network model based on the gradient corresponding to the feature of at least one sample, and send the updated model parameters to the central node if preset conditions are met.

[0028] It can be seen from the above method that after the child node updates the model parameters of the first network model, it can send the updated model parameters to the central node if the preset conditions are met, without the need to send the updated model parameters to the central node every time. Therefore, the transmission overhead between the child node and the central node can be further reduced.

[0029] In an optional embodiment, the preset condition includes any one of the following conditions: the number of times the model parameters of the first network model are updated reaches a preset number of updates; the degree of difference between the updated model parameters and the model parameters most recently received from the central node is greater than a preset threshold.

[0030] The preset update times may include multiple values, for example, 10, 15, 20, etc., which are not limited in this application. When the number of times the model parameters of the first network model are updated is equal to any value in the preset update times, the child node may send the updated model parameters to the central node.

[0031] By limiting the preset conditions through the above content, the feasibility of this solution can be effectively improved.

[0032] In an optional implementation, the child node may also use updated model parameters to update the first network model when the preset conditions are not met to obtain an updated first network model.

[0033] It can be seen from the above method that when the preset conditions are not met, the child node can directly use the updated model parameters to update the first network model to obtain the updated first network model. On the basis of reducing the transmission overhead between the child node and the central node, the training rate of the first network model can also be effectively improved.

[0034] In an optional implementation, the child node may also receive aggregated model parameters from the central node, and use the aggregated model parameters to update the first network model to obtain an updated first network model.

[0035] This makes it easier for the model parameters of the network model of the child node to be synchronized with the model parameters of the network model of the central node, ensuring the accuracy of data processing based on the network model with the same model parameters.

[0036] In an optional embodiment, the sub-node is a terminal device and the central node is a network device. Alternatively, in an optional embodiment, the sub-node is an OTT device.

[0037] Based on this possible implementation method, the application scenario of this application is given to expand the application scope of this application.

[0038] In the second aspect, a sample processing method is provided, which is applied to a distributed training system. The distributed training system is used to train a network model in a distributed manner. When a distributed manner is adopted, the network model can be divided into a first network model and a second network model, and the first network model is deployed in each child node and the second network model is deployed in the central node.

[0039] Specifically, the method described in the second aspect is executed by a central node in a distributed training system, or by a module within the central node, such as a chip, chip system, or circuit; or, alternatively, by a logic module or software capable of implementing all or part of the functions of the sub-nodes, without limitation. For ease of description, the following description uses execution by a central node as an example.

[0040] The method includes: a central node receives sample information of at least one sample from a child node, then generates sample indication information for each sample based on the sample information, and sends the at least one sample indication information to the child node.

[0041] The sample information for each sample includes the sample's label and features. The indicative information for each sample indicates at least one of the sample's contribution to the network model training process and the corresponding data processing method. Specifically, the indicative information for each sample can indicate either the sample's contribution to the network model training process or the corresponding data processing method. Alternatively, the indicative information can indicate both the sample's contribution to the network model training process and the corresponding data processing method.

[0042] The feature of each sample is a value obtained after the sample is input into the first network model deployed in the child node.

[0043] It can be seen from the above method that the central node can send the sample information of at least one sample to the child node so that the child node can process the at least one sample according to the instruction information of the central node. Specifically, when the instruction information of each sample indicates the contribution of the sample in the process of training the network model, the child node can adjust the at least one sample according to the contribution of at least one sample, and different adjustment methods will also produce different effects. For example, when the adjustment method is to perform data augmentation on the sample, the adaptability between the sample and the first network model can be made higher, that is, the contribution of at least one sample in the process of training the network model is improved, thereby improving the robustness of the first network model obtained by training at least one sample. When the adjustment method is to delete the sample, the number of samples in the child node can be reduced, thereby achieving the effect of saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node.

[0044] In the case where the indication information of each sample indicates the data processing method corresponding to the sample, the sample can be processed according to the data processing method corresponding to each sample, and different data processing methods will also produce different effects. For example, when the data processing method of a certain sample is a data augmentation method, the adaptability between the sample and the first network model can be made higher, that is, the contribution of at least one sample in the process of training the network model is increased, thereby improving the robustness of the first network model obtained by training at least one sample. When the data processing method of a certain sample is a data deletion operation, the number of samples in the child node can be reduced, thereby achieving the effect of saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node.

[0045] In an optional embodiment, the central node can determine a sample index based on the sample information and generate sample indication information based on the sample index. The sample index reflects the importance of the sample. The importance of the sample is positively correlated with the sample's contribution to the network model training process.

[0046] The above method provides a specific implementation method for the central node to generate the indication information of the sample, which enhances the feasibility of this solution.

[0047] In an optional embodiment, the sample indicator includes at least one of a sample loss value of the sample, a sample confidence, and a degree of influence of the sample on a model parameter of the first network model.

[0048] The above method provides multiple indicator values ​​for sample indicators, which can be compatible with various model training scenarios and improve the diversity and flexibility of this solution.

[0049] In an optional embodiment, the method further includes: determining, for each sample, a gradient corresponding to a feature of the sample based on sample information of the sample, and sending the gradient corresponding to the feature of at least one sample to the child node.

[0050] In an optional embodiment, the method further includes: receiving updated model parameters from at least one child node, aggregating the updated model parameters sent by at least one child node, and sending the aggregated model parameters to at least one child node respectively.

[0051] In an optional implementation, the sub-node is a terminal device, and the central node is a network device.

[0052] In an optional implementation, the sub-node is an OTT device.

[0053] Based on this possible implementation method, the application scenario of this application is given to improve the application scope of this application.

[0054] In a third aspect, a sample processing device is provided. The sample processing device may be a subnode or located in a subnode, such as a functional module or chip located in the subnode. The sample processing device may include: functional units for executing any of the methods provided in the first aspect, wherein the actions performed by each functional unit are implemented through hardware or through hardware executing corresponding software implementations. The device includes a transceiver module and a processing module.

[0055] The transceiver module is used to send sample information of at least one sample to the central node. The sample information of each sample includes the label and features of the sample.

[0056] The transceiver module is further configured to receive indication information for at least one sample from the central node. The indication information for each sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0057] The processing module is configured to process each sample based on the indication information of the sample.

[0058] In a fourth aspect, a sample processing device is provided. The sample processing device can be a central node or located at the central node, for example, it can be a functional module or chip located in the central node. The sample processing device may include: a functional unit for executing any one of the methods provided in the second aspect, and the actions performed by each functional unit are implemented through hardware or through hardware executing corresponding software implementations.

[0059] The device includes a transceiver module and a processing module.

[0060] The transceiver module is configured to receive sample information of at least one sample from a child node. The sample information of each sample includes a label and features of the sample.

[0061] The processing module is configured to generate, for each sample, sample information based on the sample information of the sample. The sample information of each sample is configured to indicate at least one of the contribution of the sample in the training of the network model and the data processing method corresponding to the sample.

[0062] The transceiver module is further configured to send indication information of at least one sample to the child node.

[0063] In a fifth aspect, a sample processing device is provided, which includes at least one processor, and the at least one processor is coupled to at least one memory: the at least one processor is used to execute a computer program or instruction stored in the at least one memory, so that the sample processing device performs any sample processing method provided by the first aspect or any optional embodiment of the first aspect.

[0064] In a sixth aspect, a sample processing device is provided, comprising at least one processor coupled to at least one memory: the at least one processor is configured to execute a computer program or instruction stored in the at least one memory, so that the sample processing device performs any sample processing method provided in the second aspect or any optional embodiment of the second aspect.

[0065] In the seventh aspect, a distributed training system is provided, which includes: at least one sub-node and a central node; each sub-node is used to execute any sample processing method provided by the first aspect or any optional implementation method of the first aspect; the central node is used to execute any sample processing method provided by the second aspect or any optional implementation method of the second aspect.

[0066] In an eighth aspect, a computer-readable storage medium is provided, comprising computer-executable instructions, which, when executed on a computer, cause the computer to execute any sample processing method provided in the first aspect or the second aspect or any optional embodiment of the first aspect or any optional embodiment of the second aspect.

[0067] In the ninth aspect, a chip is provided, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any sample processing method provided in the first aspect or the second aspect or any optional embodiment of the first aspect or any optional embodiment of the second aspect.

[0068] In the tenth aspect, a computer program product is provided, comprising computer execution instructions, which, when the computer execution instructions are run on a computer, enable the computer to execute any sample processing method provided by the first aspect or the second aspect or any optional embodiment of the first aspect or any optional embodiment of the second aspect.

[0069] In an eleventh aspect, a sample processing device is provided, the sample processing device being located in a child node and comprising a functional unit that executes the first aspect or any optional implementation of the first aspect. The actions executed by the functional unit are implemented by hardware or by hardware executing corresponding software implementations.

[0070] In a twelfth aspect, a sample processing device is provided, the sample processing device being located at a central node and comprising a functional unit that executes the second aspect or any optional implementation of the second aspect. The actions executed by the functional unit are implemented by hardware or by hardware executing corresponding software implementations.

[0071] It should be noted that the technical effects brought about by any implementation method in the third aspect to the twelfth aspect can be referred to the technical effects brought about by the corresponding implementation method in the first aspect or the second aspect or any optional implementation method of the first aspect or any optional implementation method of the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 is a schematic diagram of the structure of a DNN;

[0073] Figure 2 is a schematic diagram of the structure of another DNN;

[0074] FIG3 is a system architecture diagram of a distributed training system provided in an embodiment of the present application;

[0075] FIG4 is a schematic diagram of the composition of a sample processing device provided in an embodiment of the present application;

[0076] FIG5 is a schematic diagram of an interactive process of a sample processing method provided in an embodiment of the present application;

[0077] FIG6 is a schematic diagram of an interactive process of another sample processing method provided in an embodiment of the present application;

[0078] FIG7 is a schematic diagram of an interactive process of another sample processing method provided in an embodiment of the present application;

[0079] FIG8 is a schematic diagram of the structure of a sub-node provided in an embodiment of the present application;

[0080] FIG9 is a schematic structural diagram of a central node provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.

[0082] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0083] "Used to indicate" can include direct and indirect indications, as well as explicit and implicit indications. When describing "a certain indication information is used to indicate A" or "indication information of A," this can include whether the indication information directly indicates A or indirectly indicates A, but does not necessarily mean that the indication information contains A. The information indicated by a certain information is referred to as the information to be indicated. During implementation, there are many ways to indicate the information to be indicated. For example, but not limited to, the information to be indicated can be directly indicated, such as the information to be indicated itself or an index of the information to be indicated. The information to be indicated can also be indirectly indicated by indicating other information, where the other information is associated with the information to be indicated. Alternatively, only a portion of the information to be indicated can be indicated, while the rest of the information to be indicated is known or agreed upon in advance. For example, a pre-agreed (e.g., protocol-specified) order of information can be used to indicate specific information, thereby reducing indication overhead to a certain extent. Furthermore, common portions of various information can be identified and indicated uniformly, reducing the indication overhead associated with separately indicating the same information. Furthermore, the specific indication method can also be any of the various existing indication methods, such as, but not limited to, the aforementioned indication methods and their various combinations. The specific details of various indication methods can be referred to the prior art and will not be elaborated herein. As can be seen from the above, for example, when multiple pieces of information of the same type need to be indicated, different indication methods may be used for different pieces of information. During implementation, the desired indication method can be selected based on specific needs. The embodiments of this application do not limit the selected indication method. Thus, the indication methods involved in the embodiments of this application should be understood to encompass various methods by which the party to be indicated can be informed of the information to be indicated. The information to be indicated can be sent as a whole or as multiple sub-information sent separately, and the sending periods and / or sending times of these sub-information can be the same or different. The specific sending method is not limited in this application. The sending periods and / or sending times of these sub-information can be predefined, for example, according to a protocol, or can be configured by the transmitting device sending configuration information to the receiving device. The configuration information can, for example, but is not limited to, one or a combination of at least two of radio resource control signaling, media access control (MAC) layer signaling, and physical layer signaling. The radio resource control signaling includes, for example, radio resource control (RRC) signaling; the MAC layer signaling includes, for example, a MAC control element (CE); and the physical layer signaling includes, for example, downlink control information (DCI).

[0084] With the continuous advancement of science and technology, the number of user equipment (UE), such as mobile phones and wearable devices, continues to increase. It is foreseeable that billions of UEs will be deployed in communication networks in the near future, enabling the automation and intelligence of social development. To achieve this automation and intelligence, machine learning (ML) has been proposed.

[0085] Among them, machine learning can be divided into supervised learning, unsupervised learning and reinforcement learning.

[0086] Supervised learning uses machine learning algorithms to learn the mapping relationship between samples and labels based on collected samples and labels, and then uses machine learning models to express this learned mapping relationship. The process of training a machine learning model is the process of learning this mapping relationship. For example, in a signal detection scenario, a noisy received signal is a sample, and the actual noise in the received signal is the label. The samples and labels can be used to train a machine learning model to learn the mapping relationship between samples and labels. This enables the trained machine learning model to function as a signal detector, detecting actual noise in the received signal.

[0087] When training a machine learning model, the error between the model's predictions and labels can be used to optimize the model's parameters. Once the mapping relationship is learned, it can be used to predict the label for each new sample. The mapping relationships learned by supervised learning can include linear and nonlinear mappings. Furthermore, supervised learning tasks can be divided into classification and regression tasks based on the type of label.

[0088] Unsupervised learning uses machine learning algorithms to learn the pattern structures within collected samples. One type of unsupervised learning algorithm uses the samples themselves as supervisory signals, allowing the model to learn the mapping from one sample to another. This is called self-supervised learning. During training, the error between the model's predictions and the samples themselves can be calculated to optimize model parameters. Self-supervised learning can be used in applications such as signal compression and decompression recovery. Common algorithms include autoencoders and generative adversarial networks.

[0089] Reinforcement learning is a type of algorithm that learns to solve problems through interaction with an environment. Unlike supervised and unsupervised learning, reinforcement learning lacks explicit data for "correct" action labels. Instead, the model interacts with the environment, obtaining reward signals from the environment, and then adjusts its actions to maximize the reward signal value. For example, in downlink power control, a reinforcement learning model adjusts the downlink transmit power of each user based on the overall system throughput fed back by the wireless network, hoping to achieve higher system throughput. The goal of reinforcement learning is also to learn the mapping between environmental states and optimal action decisions. However, because the "correct" action labels cannot be obtained in advance, network optimization cannot be achieved by calculating the error between actions and the "correct action." Reinforcement learning training is achieved through iterative interaction with the environment.

[0090] Deep neural networks (DNNs) are a specific implementation of machine learning. DNNs are capable of learning arbitrary mappings. Traditional distributed training systems require extensive knowledge to design communication modules. However, DNN-based distributed training systems can automatically discover implicit patterns in massive datasets and establish mapping relationships between data, achieving performance superior to traditional modeling methods.

[0091] DNN can contain multiple layers, and each layer can contain multiple neurons. Each neuron can perform a weighted sum operation on its input value and calculate the corresponding output value through a nonlinear function. Specifically, as shown in Figure 1, suppose the input value of a neuron is x = [x0,…,x n ], and the weight corresponding to each input value is w=[w0,…,w n ], the nonlinear function is Where b is the bias of the weighted sum. The neuron can use the weight w=[w0,…,w n ] for input value x=[x0,…,x n ] performs weighted summation and then passes nonlinear function Calculate and get the corresponding output value y.

[0092] The nonlinear function can be diverse. For example, when the nonlinear function is a maximum function max{0,x}, its corresponding output value y can be expressed as:

[0093] The weights in each neuron are the parameters of the DNN. After training and optimization, these parameters enable the DNN to extract data features and express mapping relationships. DNNs typically use supervised or unsupervised learning strategies to optimize model parameters.

[0094] Figure 2 shows a schematic diagram of a DNN architecture. As shown in Figure 2, a DNN's multi-layered structure can include an input layer, hidden layers, and an output layer. The input layer processes received values ​​through neurons and then passes them to the intermediate hidden layer. The hidden layer then processes them again through neurons and passes them to the output layer, which then processes them again to produce the final DNN output. Hidden layers can influence the DNN's ability to extract information and fit functions. Increasing the number of hidden layers or increasing the width of each hidden layer can improve the DNN's function-fitting capabilities.

[0095] Depending on how the network is constructed, DNN can include feedforward neural networks (FNN), convolutional neural networks (CNN), and recurrent neural networks (RNN).

[0096] The characteristic of FNN is that neurons in adjacent layers are fully connected to each other, as shown in Figure 2. FNN usually requires a large amount of storage space, resulting in high computational complexity of FNN.

[0097] Feedforward neural networks are specialized for processing data with grid-like structures, such as time series data and image data. Instead of using all input information at once, feedforward neural networks employ convolution operations, capturing a portion of the information using a fixed-size window. This significantly reduces the computational complexity of model parameters. Furthermore, depending on the type of information captured by the window, different convolution kernels can be used for each window, enabling feedforward neural networks to better extract features from the input data.

[0098] Convolutional neural networks are a type of DNN that utilizes feedback time series information. Their input consists of a new input value at the current moment and their own output value at the previous moment. Convolutional neural networks are suitable for capturing temporally correlated sequence features and are applicable to fields such as speech recognition and channel coding.

[0099] The network structures of various neural networks, such as feedforward neural networks, convolutional neural networks, and recurrent neural networks, are all based on neurons. As mentioned above, each neuron performs a weighted summation operation on its input values ​​and calculates the corresponding output value through a nonlinear function. We can call the weights and nonlinear functions of each neuron in a neural network the parameters of the neural network.

[0100] Optionally, the neural network can be trained using either centralized training or distributed learning.

[0101] Centralized training of neural networks requires collecting sufficient samples. These samples typically originate from mobile devices (UEs), requiring users to upload this data. Uploading and using this data not only incurs significant overhead but can also infringe on user privacy, such as leaking their location, movement patterns, or photos.

[0102] In the distributed neural network training process, multiple child nodes (such as UEs) and a central node (such as a network device) typically participate in the training. Users can upload neural network parameters or intermediate layer outputs to the central node through child nodes, collaborating with the central node to complete the neural network training, avoiding direct sharing of raw data and protecting user privacy.

[0103] Distributed learning mainly includes federated learning and segmented learning.

[0104] In federated learning, each child node can train a complete neural network using local samples and send the neural network parameters to the central node. The central node aggregates the neural network parameters of each child node to build a global model. Because the samples are always kept in the child nodes, federated learning can protect user privacy. However, in federated learning, the child nodes are responsible for training the entire neural network, which increases the computational overhead of the child nodes.

[0105] In segmented learning, the neural network is divided into two parts, one part is trained by the child nodes, and the other part is trained by the central node. For example: suppose the neural network to be trained has N layers L Layer Neural Network You can use the Nth c The layer is a segmentation layer, which divides the neural network into two parts. The first part of the neural network Can be trained by child nodes, called child node neural network / model f(·,w u ), Part II Neural Network It can be trained by the central node, which is called the central node neural network / model g(·,w c ).

[0106] In this way, the child nodes only train part of the parameters of the neural network. Therefore, compared with federated learning, split learning can effectively reduce the computational overhead of the child nodes.

[0107] Specifically, in segmentation learning, each child node can be used as the current child node in turn, and the following steps can be performed until the model converges:

[0108] Taking the current child node as child node n as an example, child node n is in its own local training set D nIn the example, a batch of data is randomly sampled without replacement. in, For the sample, As a label. The child node can Input into the subnode model to obtain features The child node can then and tags Send to the central node. The central node will Forward propagation calculation output And calculate the loss value and parameter w according to the preset loss function L(p,y) c The relevant parameter gradients are: And the feature gradient associated with the feature:

[0109] The central node can use parameter gradients Perform back propagation to update its own parameters and transform the feature gradient g z Sent to child node n. The child node receives the feature gradient g z After that, calculate the parameter gradient related to its own parameters And use the parameter gradient Perform backpropagation to update its own parameters.

[0110] After that, child node n repeats the above process until the local training set D of child node n is n Then, child node n can send its own parameters to another child node k. At this time, child node k becomes the current child node and iterates the above steps.

[0111] However, in the above training process, there are at least the following problems:

[0112] 1. The child nodes interact with the central node one by one in a polling manner to complete the training. Therefore, when one child node participates in the training, the other child nodes are in an idle waiting state, resulting in low training efficiency and underutilization of computing resources.

[0113] 2. All samples in the child nodes need to be repeatedly traversed during the training process, and the features of all samples need to be fed back to the central node, which requires a large amount of computing resources and transmission resources.

[0114] To address the above issues, federated learning and segmented learning can be combined to develop a new method for training neural networks: federated segmented learning. In the process of training a neural network using federated segmented learning, the child nodes and the central node need to repeat the following steps until the neural network model converges:

[0115] Each child node uses local data in parallel to perform forward propagation to calculate features and feed them back to the central node. The central node can use the features to perform forward propagation to calculate the gradients corresponding to the features of each child node's samples and perform backpropagation to update its own neural network parameters. The central node can then send the sample gradients to the corresponding child node. The child node can then perform backpropagation to update its own neural network parameters and send them back to the central node. The central node can then perform an aggregation operation on the updated neural network parameters of each child node and feed them back to each child node.

[0116] It can be seen from this that in federated segmentation learning, child nodes not only need to repeatedly traverse all samples, but also the samples in each traversal process are completely consistent, resulting in poor robustness of the network model of the trained neural network.

[0117] In view of this, an embodiment of the present application provides a sample processing method, in which a child node sends the label and features of at least one sample to a central node, and after receiving indication information for at least one sample from the central node, processes the sample based on the indication information for each sample. The indication information for each sample is used to indicate at least one of the sample's contribution to the training of the network model and the data processing method corresponding to the sample.

[0118] Through the above method, we can see that each time a child node sends the label and features of at least one sample to the central node, it can process the at least one sample according to the central node's instructions. During model training, the samples in the child nodes are constantly changing rather than being static, which effectively improves the robustness and generalization ability of the trained neural network model.

[0119] The sample processing method provided in the embodiment of the present application can be applied to a distributed training system, and the distributed training system can be applied to non-wireless communication services, such as image recognition, natural language processing, etc.; it can also be applied to wireless communication services, such as beam selection based on environmental information, etc., which is not limited in the embodiment of the present application.

[0120] Figure 3 is a system architecture diagram of a distributed training system provided in an embodiment of the present application. This system architecture diagram may include a central node and multiple sub-nodes. Sub-nodes may include, but are not limited to, terminal devices, such as OTT devices; central nodes may include, but are not limited to, network devices. In this embodiment of the present application, there are no limitations on the terms sub-node and central node. The following description uses the example of a terminal device as the sub-node and a network device as the central node.

[0121] A central node is an entity on the network side that transmits or receives signals, such as a base station. A subnode is an entity on the user side that transmits or receives signals, such as a user equipment terminal (UE). For example, as shown in Figure 3, network device 301 is the central node in a distributed training system, and terminal devices 302 through 306 are multiple subnodes in the distributed training system.

[0122] In the embodiments of the present application, an AI processing module may be deployed in the network device and the terminal device. The AI ​​processing module may be deployed with a neural network model, and may perform AI-related operations such as building a training data set and training a network model.

[0123] The terminal device involved in the embodiments of the present application may be a UE, an access terminal, a terminal unit, a user station, a terminal station, a mobile station, a mobile station, a remote station, a remote terminal, a user terminal (terminal equipment, TE), a mobile device, a wireless communication device, a terminal agent, a tablet computer (pad), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle-mounted transceiver unit, a wearable device, or a terminal device in a fifth generation mobile communication technology (5th generation, 5G) network or a public land mobile network (public land mobile network, PLMN) evolved after 5G. The access terminal may 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 function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a drone, a robot, an intelligent point of sale (POS) machine, a customer-premises equipment (CPE) or a wearable device, a virtual reality (VR) device. Reality (VR) terminal equipment, augmented reality (AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.

[0124] Alternatively, the terminal device may be a terminal with communication functionality in the Internet of Things (IoT), such as a terminal in V2X (e.g., a vehicle-to-everything (V2X) device), a terminal in D2D communication, or a terminal in M2M communication. The terminal device may be mobile or fixed.

[0125] The embodiments of this application do not limit the form of the terminal device. The device used to implement the functions of the terminal device can be the terminal device; it can also be a device that supports the terminal device to implement the functions, such as a chip system. The device can be installed in the terminal device or used in conjunction with the terminal device. In the embodiments of this application, the chip system can be composed of chips or include chips and other discrete devices.

[0126] The embodiment of the present application does not limit the number of terminal devices and may include more or fewer terminal devices than those in Figure 3.

[0127] The network device involved in the present application may be a device for communicating with a terminal device, for example, it may include an evolved base station (nodeB or eNB or evolutionary node B, e-NodeB) in a long term evolution (LTE) system or an enhanced LTE (LTE-advanced, LTE-A) system, such as a traditional macro base station eNB and a micro base station eNB in ​​a heterogeneous network scenario. Alternatively, it may include a next generation node B (gNB) in an NR system. Alternatively, it may include a transmission reception point (TRP), a home base station (e.g., home evolved nodeB, or home node B, HNB), a base band unit (BBU), a base band pool (BBU pool), or a wireless fidelity (WiFi) access point (AP), etc. Alternatively, it may include a base station in a non-terrestrial network (NTN), that is, it may be deployed on an aircraft platform or a satellite. In the NTN, the network equipment may serve as a layer 1 (L1) relay, or as a base station, or as an integrated access and backhaul (IAB) node.

[0128] Alternatively, the network device may be a device that implements a base station function in IoT, such as a device that implements a base station function in drone communication, V2X, D2D, or machine to machine (M2M).

[0129] Optionally, the base station in the embodiment of the present application may include various forms of base stations, such as: macro base stations, micro base stations (also called small stations), relay stations, access points, home base stations, TRPs, transmitting points (TPs), mobile switching centers, etc., and the embodiments of the present application do not make specific limitations on this.

[0130] In the embodiments of the present application, the form of the network device is not limited. The device used to implement the function of the network device can be a network device; it can also be a device that can support the network device to implement the function, such as a chip system. The device can be installed in the network device or used in conjunction with the network device.

[0131] In the embodiment of the present application, a child node can send data to the central node, such as the features and labels of at least one sample in the child node, updated model parameters of its own network model, feedback indicating the status of the child node, etc. The central node can also send data to the child node, such as information indicating the degree of fit between the sample and the network model, gradients corresponding to the sample's features, and aggregated model parameters.

[0132] It should be noted that the data transmitted between the central node and the sub-node can be carried on physical channels, such as physical downlink control channel (PDCCH), physical downlink shared channel (PDSCH), physical uplink shared channel (PUSCH), physical uplink control channel (PUCCH), physical sidelink control channel (PSCCH), physical sidelink shared channel (PSSCH), etc.

[0133] In an embodiment of the present application, the child node can send the label and features of at least one sample to the central node. After the central node receives the sample information of at least one sample sent by the child node, it can generate sample indication information for each sample based on the sample information of the sample, and send the indication information of at least one sample to the child node. After receiving the indication information for at least one sample sent by the central node, the child node can process the sample based on the indication information of each sample.

[0134] It should be noted that Figure 3 is an illustrative figure, and the number of terminal devices shown in Figure 3 and the naming of the interfaces between the devices in Figure 3 are not limited. In addition to the network elements shown in Figure 3, the distributed training system shown in Figure 3 may also include other devices, such as access network devices, without limitation.

[0135] In specific implementations, the devices in Figure 3 may all adopt the structure shown in Figure 4, or include the components shown in Figure 4. Figure 4 is a schematic diagram of the structure of a sample processing device 400 provided in an embodiment of the present application. The sample processing device 400 may be a terminal device or a chip or system-on-chip in a terminal device. Alternatively, the sample processing device 400 may be a network device or a chip or system-on-chip in a network device. As shown in Figure 4, the sample processing device 400 includes a processor 401, a communication interface 402, and a communication line 403.

[0136] Furthermore, the sample processing device 400 may further include a memory 404 , wherein the processor 401 , the memory 404 and the communication interface 402 may be connected via a communication line 403 .

[0137] The processor 401 is a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 401 may also be other devices with processing functions, such as circuits, devices, or software modules. For example, the processor may have the ability to process network models (such as DNN network models), without limitation.

[0138] Communication interface 402 is used to communicate with other devices or other communication networks. Such other communication networks may be Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. Communication interface 402 may be a module, circuit, communication interface, or any other device capable of implementing communication.

[0139] The communication line 403 is used to transmit information between the components included in the sample processing device 400 .

[0140] The memory 404 is used to store instructions, where the instructions may be computer programs.

[0141] The memory 404 may be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions, or a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.

[0142] It should be noted that memory 404 can exist independently of processor 401 or can be integrated with processor 401. Memory 404 can be used to store instructions, program code, samples, etc. Memory 404 can be located within or outside sample processing device 400, without limitation. Processor 401 is configured to execute instructions stored in memory 404 to implement the sample processing method for a distributed training system provided in the following embodiments of this application.

[0143] In one example, the processor 401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 4 .

[0144] As an optional implementation, the sample processing device 400 includes multiple processors. For example, in addition to the processor 401 in FIG. 4 , it may also include a processor 407 .

[0145] As an optional implementation, the sample processing apparatus 400 further includes an output device 405 and an input device 406. For example, the input device 406 is a keyboard, a mouse, a microphone, or a joystick, and the output device 405 is a display screen, a speaker, or the like.

[0146] It should be noted that the sample processing device 400 can be a desktop computer, a portable computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system, or a device with a similar structure to that shown in FIG4 . Furthermore, the structure shown in FIG4 does not limit the access network device, the core network device, and the terminal device. In addition to the components shown in FIG4 , the access network device, the core network device, and the terminal device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0147] In the embodiment of the present application, the chip system can be composed of chips, or can include chips and other discrete devices.

[0148] In addition, the actions, terms, etc. involved in the various embodiments of this application can refer to each other without limitation. The name of the information exchanged between at least one device or the name of the parameter in the information is only an example. Other names can also be used in the specific implementation without limitation. The execution subject of the embodiment of this application can be an access network device, or a device in the access network device, such as a chip. It can also be a core network device, or a device in the core network device, such as a chip. It can also be a terminal device, or a device in a terminal device, such as a chip.

[0149] In the following, in conjunction with Figure 3, the sample processing method provided by the present application is described by taking the child node as the terminal device in Figure 3 and the central node as the network device in Figure 3 as an example. Figure 5 is a schematic diagram of the interactive flow of a sample processing method provided by an embodiment of the present application. The method is executed by the child node and the central node shown in Figure 3. In this method, multiple child nodes may be included, and each child node may process its own samples during the model training process using the method shown in Figure 5. The following description takes child node n as an example. As shown in Figure 5, the method includes:

[0150] S500: The central node sends model information of a first network model to at least one child node.

[0151] Specifically, after receiving a training instruction for any network model, the central node can, based on the number of layers of the network model and a preset segmentation method, divide the network model into a first network model trained by the child nodes and a second network model trained by the central node. The central node then sends the model information of the first network model to at least one child node within its service range. It should be understood that the at least one child node within its service range can also replace the child node described as assisting the central node in performing distributed training.

[0152] The above-mentioned model information may at least include model configuration information and model training information.

[0153] Model configuration information may include, but is not limited to, the model type, model structure, and model parameters of the network model. Model types may include DNN, CNN, RNN, or Transformer models. Model structure may include the number of hidden layers in the network model, the number of neurons in each layer or partial layer, and the activation function.

[0154] Model training information may include, but is not limited to, the optimizer used when optimizing the network model, the regularization penalty term, the initial learning rate, the gradient update batch size, and one or more data augmentation methods. The optimizer may be a stochastic gradient descent (SGD) optimizer, a root mean square propagation (RMSprop) optimizer, or an adaptive moment estimation (Adam) optimizer. The regularization penalty term may be, for example, an L2 penalty term.

[0155] The model configuration information and model training information sent by the central node to at least one child node may be sent in the form of text or in the form of a code script compiled into the corresponding network model. This embodiment of the present application does not limit this.

[0156] In addition, the model parameters in the model configuration information may be generated by the central node through a certain strategy, such as random generation, pre-training generation, or acquisition from other third-party devices, etc., and the embodiments of the present application are not limited to this.

[0157] The number of layers of the first network model can be less than the number of layers of the second network model. For example, if the total number of layers of the network model is 100, the number of layers of the first network model can be 10, and the number of layers of the second network model can be 90. The number of layers of the first network model can also be equal to the number of layers of the second network model. For example, if the total number of layers of the network model is 20, the number of layers of the first network model can be 10, and the number of layers of the second network model can be 10. This embodiment of the present application does not limit this.

[0158] The preset segmentation method is to segment the layers of the network model according to a preset ratio. For example, assuming the preset ratio is 1:9 and the total number of layers of the network model is 80, the central node can divide the network model into a first network model containing 10 layers and a second network model containing 90 layers.

[0159] The preset segmentation method can also be to segment the layers of the network model according to a preset number of layers. For example, assuming that the preset number of layers is 5 and the total number of layers of the network model is 20, the central node can divide the network model into a first network model including 5 layers and a second network model including 15 layers. This embodiment of the present application is not limited to this.

[0160] In a specific implementation, assume that a user intends to train using the business data of business A as a sample to obtain a network model that can map the inherent pattern structure of the business data of business A. The user can trigger a model training operation for business A. The user's terminal device can respond to the model training operation and determine the network model B corresponding to the business data of business A. The terminal device can then generate a training instruction for network model B and send it to the central node.

[0161] After receiving the training instruction, the central node can first divide the network model into a first network model and a second network model. For example, assuming the preset ratio is 1:9 and the number of layers of network model B is 100, the central node can divide the network model into a first network model containing layers 1 to 10 and a second network model containing layers 11 to 100 according to the preset ratio, wherein the first network model is trained by the child node and the second network model is trained by the central node. After the division is completed, the central node can send the model configuration information and model training information of the first network model to at least one child node within its service range.

[0162] It should be understood that S500 is an optional step, and the first network model may be pre-configured in the child node, or may be configured in the child node using the S500 process. In the case where the first network model is pre-configured in the child node, S500 may not be performed.

[0163] S501: Child node n sends sample information of at least one sample to a central node.

[0164] The child node n may contain multiple samples and labels for each sample. At least one sample is used to train the first network model.

[0165] The sample information of each sample includes a label and a feature of the sample, wherein the feature of each sample is obtained after the sample is input into the first network model.

[0166] After receiving the model information of the first network model, the child node n can use the model information of the first network model to initialize the local model to obtain the first network model, and then determine the label and characteristics of at least one sample of the first network model, and send the label and characteristics of at least one sample to the central node.

[0167] After receiving the model information, child node n can input each sample into the first network model and perform forward propagation to obtain the sample's features. After obtaining the features of at least one sample, child node n can send the features and labels of at least one sample to the central node.

[0168] For example, assume that child node n contains 5 samples, namely x1, x2, x3, x4, and x5, and the label corresponding to x1 is y1, the label corresponding to x2 is y2, the label corresponding to x3 is y3, the label corresponding to x4 is y4, and the label corresponding to x5 is y5. Child node n can input x1, x2, x3, x4, and x5 into the first network model in sequence, and perform forward propagation to obtain the feature z1 corresponding to x1, the feature z2 corresponding to x2, the feature z3 corresponding to x3, the feature z4 corresponding to x4, and the feature z5 corresponding to x5. Afterwards, child node n can send the label y1 and feature z1 of x1, the label y2 and feature z2 of x2, the label y3 and feature z3 of x3, the label y4 and feature z4 of x4, and the label y5 and feature z5 of x5 to the central node.

[0169] S502: The central node receives sample information of at least one sample from a child node n.

[0170] S503: The central node generates sample indication information for each sample based on the sample information of the sample.

[0171] Optionally, the indication information of the sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0172] In some embodiments, for each sample, the central node may first determine a sample index of the sample based on the sample information of the sample, and then generate indication information of the sample according to the sample index.

[0173] Sample metrics reflect the importance of a sample. Sample importance refers to the importance of a sample in the process of training a network model. The importance of a sample is positively correlated with its contribution to the training process. That is, the more important a sample is, the greater its contribution to the training process.

[0174] The sample index of each sample may include at least one of the sample loss value, sample confidence, and the degree of influence of the sample on the model parameters of the first network model. The sample loss value is positively correlated with the importance of the sample. The larger the sample loss value, the more important the sample. When the network model is a classification model, the sample confidence is negatively correlated with the importance of the sample. The smaller the sample confidence, the more important the sample. When the network model is a regression model, the sample confidence is positively correlated with the importance of the sample. The larger the sample confidence, the more important the sample. The degree of influence of the sample on the model parameters of the first network model is positively correlated with the importance of the sample. The greater the influence of the sample on the model parameters of the first network model, the more important the sample.

[0175] The following will introduce the process of the central node determining the sample loss value, sample confidence and the degree of influence of the sample on the model parameters of the first network model.

[0176] (1) Determine the sample loss value of the sample

[0177] In the process of determining the sample loss value of a sample, the central node can input the features of the sample into the second network model, perform forward propagation calculations to obtain an output value, and then input the sample label and the output value into a predetermined loss function to obtain the sample loss value of the sample.

[0178] For example, suppose the sample is x1, the label of x1 is y1, the feature is z1, and the second network model in the central node is g(·,w c ), the predetermined loss function is |g(·,w c )-y|. The central node can input the feature z1 into the network model g(·,w c ), the forward propagation calculation is performed to obtain the output value P, that is, P = g(z1,w c ), and then input the label y1 and output value P into the loss function |g(·,w c )-y|, the sample loss value L of sample x1 is obtained.

[0179] (2) Determining the sample confidence level

[0180] In the process of determining the sample confidence of a sample, the central node may first determine the model type of the network model, and then determine the sample confidence of at least one sample according to the model type and a preset confidence algorithm corresponding to the model type.

[0181] The model type of the network model may include but is not limited to a classification model and a regression model, which is not limited in the embodiments of the present application.

[0182] The following will take the model types of network models including classification models and regression models as examples to illustrate the sample confidence of the sample determined by the central node.

[0183] Specifically, when the network model is a classification model, for each sample, the central node can input the features of the sample into the second network model, perform forward propagation calculation to obtain the output value, and then input the output value into the softmax function, and use the maximum value of the output value of the softmax function as the sample confidence of the sample.

[0184] For example, suppose the sample is x1, the label of x1 is y1, the feature is z1, and the second network model in the central node is g(·,w c ). The central node can input z1 into the second network model g(·,wc ), the forward propagation calculation is performed to obtain the output value P, that is, P = g(z1,w c ), and then input the output value P into the softmax function to obtain softmax(p) = [p1, p2, p3]. The central node can take the maximum value of p1, p2, p3 as the sample confidence of sample x1.

[0185] When the network model is a regression model, for each sample, the central node can input the sample's features into its own network model, perform forward propagation calculations to obtain the output value, and then determine the sample confidence of the sample based on the output value, the sample's label, and the following formula 1. e = |py| / |y| (Formula 1)

[0186] Among them, p represents the output value, y represents the label of the sample, and e represents the sample confidence of the sample.

[0187] For example, suppose the sample is x1, the label of x1 is y1, the feature is z1, and the second network model in the central node is g(·,w c ). The central node can input z1 into the second network model g(·,w c ), the forward propagation calculation is performed to obtain the output value P, that is, P = g(z1,w c ), and then according to P, Y and the above formula 1, the sample confidence of the sample is obtained.

[0188] (3) Determining the influence of the sample on the model parameters of the first network model

[0189] Specifically, for each sample, after obtaining the sample loss value of the sample, the central node can determine the modulus of the sample loss value and the model parameters of the network model of the central node as the degree of influence of the sample on the model parameters of the first network model.

[0190] For example, assuming that the sample is x1, the sample loss value of the sample is L(p,y), and the model parameter of the network model of the central node is w c , then the central node can Determine the degree of influence of sample x1 on the model parameters of the first network model.

[0191] After determining the sample index of at least one sample in the above manner, the child node n may generate indication information of the sample according to the sample index.

[0192] The indication information of each sample can be used to indicate the contribution of the sample in the process of training the network model, and can also be used to indicate the data processing method corresponding to the sample. It can also be used to indicate the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0193] It can be understood that the contribution of the sample in the process of training the network model can also be understood as the matching degree of the sample in the process of training the first network model, or the degree of influence of the sample in the process of training the first network model, or the adaptability of the sample in the process of training the first network model, or the importance of the sample in the process of training the first network model, etc. This application does not limit this.

[0194] It should be noted that the central node generates sample indication information differently depending on the number of indicators included in the sample index. The following uses the example of each sample's indication information indicating its contribution to the network model training process to explain how the central node generates at least one sample's indication information, depending on whether the sample index includes one indicator or multiple indicators.

[0195] A. The sample indicators include one indicator.

[0196] After determining the sample index of at least one sample, for each sample, the central node may generate indication information of the sample according to the sample index of the sample and a preset index threshold.

[0197] In some embodiments, when the network model is a regression model, for each sample, when the sample index of the sample includes any one of the sample loss value, sample confidence and the degree of influence of the sample on the model parameters of the first network model, the central node can obtain the corresponding index threshold, and when the sample index is greater than or equal to the index threshold, set the contribution of the sample in the process of training the network model to the first contribution; when the sample index is less than the index threshold, set the contribution of the sample in the process of training the network model to the second contribution, and generate indication information including the contribution.

[0198] The first contribution is greater than the second contribution, for example, the first contribution may be 1, and the second contribution may be 0. The embodiment of the present application does not limit the first contribution and the second contribution.

[0199] For example, assuming that the network model is a regression model, the child node n includes two samples, namely sample x1 and sample x2, the sample loss value included in the sample index of sample x1 is 15, the sample loss value included in the sample index of sample x2 is 25, the index threshold corresponding to the sample loss value is 20, the first contribution is 1, and the second contribution is 0. The central node can set the contribution of sample x1 in the process of training the network model to 0, and set the contribution of sample x2 in the process of training the network model to 1, and generate indication information of sample x1 based on the contribution of sample x1 in the process of training the network model, and generate indication information of sample x2 based on the contribution of sample x2 in the process of training the network model.

[0200] In other embodiments, when the network model is a classification model, for each sample, when the sample index of the sample includes the sample loss value of the sample or the degree of influence of the sample on the model parameters of the first network model, the central node can obtain the corresponding index threshold, and when the sample index is greater than or equal to the index threshold, the contribution of the sample in the process of training the network model is set to the first contribution; when the sample index is less than the index threshold, the contribution of the sample in the process of training the network model is set to the second contribution, and generate indication information including the contribution.

[0201] When the sample confidence of the sample is included in the sample index of the sample, the central node can obtain the corresponding index threshold, and when the sample index is greater than or equal to the index threshold, the contribution of the sample in the process of training the network model is set to the second contribution; when the sample index is less than the index threshold, the contribution of the sample in the process of training the network model is set to the first contribution, and generate indication information including the contribution.

[0202] For example, assuming that the network model is a classification model, the child node n includes two samples, namely sample x1 and sample x2. The sample confidence included in the sample index of sample x1 is 15, the sample confidence included in the sample index of sample x2 is 25, the index threshold corresponding to the sample confidence is 20, the first contribution is 1, and the second contribution is 0. The central node can set the contribution of sample x1 in the process of training the network model to 1 and the contribution of sample x2 in the process of training the network model to 0, and generate indication information of sample x1 based on the contribution of sample x1 in the process of training the network model, and generate indication information of sample x2 based on the contribution of sample x2 in the process of training the network model.

[0203] B. The sample indicators include multiple indicators.

[0204] After determining the sample index of at least one sample, for each sample, the central node can first select a target index from multiple indicators of the sample according to a preset screening condition, and then generate indication information of the sample based on the target index and a preset index threshold.

[0205] The preset screening condition may include, but is limited to, determining the preset indicator with the highest importance as the target indicator, which is not limited in the embodiment of the present application.

[0206] The preset indicator importance can be that the indicator importance of the sample loss value is greater than the indicator importance of the sample confidence, and the indicator importance of the sample confidence is greater than the degree of influence of the sample on the model parameters of the first network model; it can also be that the indicator importance of the sample loss value is less than the indicator importance of the sample confidence, and the indicator importance of the sample confidence is less than the degree of influence of the sample on the model parameters of the first network model. The embodiments of the present application are not limited to this.

[0207] In some embodiments, when the network model is a regression model, for each sample, when the sample index of the sample includes at least two of the sample loss value, sample confidence and influence of the sample on the model parameters, the central node can determine the preset index with the highest importance as the target index, and then obtain the index threshold corresponding to the target index, and when the sample index is greater than or equal to the index threshold, set the contribution of the sample in the process of training the network model to the first contribution; when the sample index is less than the index threshold, set the contribution of the sample in the process of training the network model to the second contribution, and generate indication information containing the contribution.

[0208] For example, assuming the network model is a regression model, child node n includes sample x1, and the sample indicator of sample x1 includes a sample loss value and a sample confidence level. The sample loss value is 15, the sample confidence level is 25, the first contribution level is 1, the second contribution level is 0, and the indicator importance of the sample loss value is greater than the indicator importance of the sample confidence level. The central node can determine the sample loss value of sample x1 as the target indicator and then obtain the indicator threshold corresponding to the target indicator. Assuming that the indicator threshold corresponding to the sample loss value is 20, the central node can set the contribution of sample x1 in the network model training process to 0 and generate indication information for sample x1 based on the contribution of sample x1 in the network model training process.

[0209] In other embodiments, when the network model is a classification model, for each sample, when the sample indicators of the sample include at least two of the sample loss value, sample confidence and the degree of influence of the sample on the model parameters of the first network model, the central node can determine the preset indicator with the highest importance as the target indicator, and obtain the indicator threshold corresponding to the target indicator.

[0210] If the target indicator is the sample loss value of the sample or the degree of influence of the sample on the model parameters of the first network model, the central node can set the contribution of the sample in the process of training the network model to the first contribution when the sample indicator is greater than or equal to the indicator threshold, and set the contribution of the sample in the process of training the network model to the second contribution when the sample indicator is less than the indicator threshold.

[0211] If the target indicator is the sample confidence of the sample, the central node can set the contribution of the sample in the process of training the network model to the second contribution when the sample indicator is greater than or equal to the indicator threshold, and set the contribution of the sample in the process of training the network model to the first contribution when the sample indicator is less than the indicator threshold.

[0212] For example, assuming that the network model is a classification model, child node n includes sample x1, the sample confidence included in the sample index of sample x1 is 25, the degree of influence of the sample on the model parameters of the first network model is 30, the first contribution is 1, the second contribution is 0, and the index importance of the sample confidence is greater than the index importance of the degree of influence of the sample on the model parameters of the first network model. The central node can determine the sample confidence of sample x1 as the target index and then obtain the index threshold corresponding to the target index. Assuming that the index threshold corresponding to the sample confidence is 30, the central node can set the contribution of sample x1 in the process of training the network model to 1 and generate indication information of sample x1 based on the contribution of sample x1 in the process of training the network model.

[0213] S504: The central node sends indication information of at least one sample to the child node n.

[0214] S505: Child node n receives indication information for at least one sample from the central node.

[0215] S506: Child node n processes each sample based on the indication information of the sample.

[0216] As can be seen from the above, each sample's indication information can be used to indicate at least one of the sample's contribution to the network model training process and the corresponding data processing method. Depending on the content of the sample's indication information, child node n can perform different processing on the sample. The following describes how child node n processes the sample based on the indication information from the following three aspects.

[0217] 1) The sample's indication information is used to indicate the sample's contribution to the network model training process.

[0218] In some embodiments, it is assumed that the child node includes a first sample, and the indication information of the first sample is used to indicate the contribution of the first sample in the process of training the network model.

[0219] On this basis, when child node n processes the first sample based on the indication information of the first sample, if the contribution of the first sample in the process of training the network model is less than the contribution threshold, the first sample is deleted, or the first data processing method is used to process the first sample. If the contribution of the first sample in the process of training the network model is greater than the contribution threshold, the second data processing method is used to process the first sample.

[0220] The degree of change of the first sample by the first data processing method is greater than the degree of change of the first sample by the second data processing method.

[0221] It should be noted that the contribution of the first sample processed by the first data processing method to the training process of the network model is greater than the contribution of the first sample before processed by the first data processing method to the training process of the network model.

[0222] The contribution of the first sample after being processed by the second data processing method to the process of training the network model is greater than the contribution of the first sample before being processed by the second data processing method to the process of training the network model.

[0223] The first data processing method and the second data processing method may include but are not limited to a data augmentation method, and the embodiments of the present application do not limit the first data processing method and the second data processing method. For example: when the sample is single-dimensional data, such as text data, the first data processing method may include: masking a certain proportion (such as more than 50%) of elements, frequency domain high-pass, low-pass, band-pass filtering, adding one-dimensional noise and other data processing methods. The second data processing method may include: masking a certain proportion (such as more than 50%) of elements, frequency domain high-pass, low-pass, band-pass filtering, adding one-dimensional noise and other data processing methods at most one.

[0224] When the sample is multi-dimensional data, such as red, green, and blue (RGB) image data, the first data processing method may include: cropping along a certain dimension, rotating along a certain direction, translating along a certain direction, masking a certain proportion (e.g., more than 50%) of elements, Gaussian filtering, symmetric transformation, and adding multi-dimensional noise. The second data processing method may include: cropping along a certain dimension, rotating along a certain direction, translating along a certain direction, masking a certain proportion (e.g., more than 50%) of elements, Gaussian filtering, symmetric transformation, and adding multi-dimensional noise.

[0225] In the embodiment of the present application, the first data processing method and the second data processing method may be predetermined or randomly selected, and there is no limitation on this.

[0226] For example, assuming that the preset contribution threshold is 50, the first data processing method includes adding one-dimensional noise and masking out 70% of the elements, the first sample is sample x1, and the contribution of sample x1 in the process of training the network model is 30, that is, the contribution of sample x1 in the process of training the network model is less than the contribution threshold. The child node n can delete sample x1, or add one-dimensional noise to sample x1, and mask out 70% of the elements of sample x1.

[0227] For another example, assuming that the preset contribution threshold is 50, the second data processing method is to add one-dimensional noise, the first sample is sample x2, and the contribution of sample x2 in the process of training the network model is 70, that is, the contribution of sample x2 in the process of training the network model is greater than the contribution threshold, and the child node n can add one-dimensional noise to sample x2.

[0228] In some embodiments, the contribution threshold described above may include one threshold or multiple thresholds. For example, the contribution threshold may include a first threshold, a second threshold, and a third threshold. The first threshold is smaller than the second threshold, and the second threshold is smaller than the third threshold.

[0229] On this basis, when child node n processes the first sample, if the contribution of the first sample to the training of the network model is less than a first threshold, the first sample is deleted. If the contribution of the first sample to the training of the network model is greater than the first threshold but less than a second threshold, the first data processing method is used to process the first sample. If the contribution of the first sample to the training of the network model is greater than the second threshold but less than a third threshold, the second data processing method is used to process the first sample. If the contribution of the first sample to the training of the network model is greater than the third threshold, the first sample is not processed.

[0230] For example, assuming that the first threshold is 20, the second threshold is 50, and the third threshold is 80, the first data processing method includes adding one-dimensional noise and covering up 70% of the elements, the second data processing method is adding one-dimensional noise, the first sample is sample x1, and the contribution of sample x1 in the process of training the network model is 30, that is, the contribution of sample x1 in the process of training the network model is greater than the first threshold and less than the second threshold. The child node n can add one-dimensional noise to the sample x1 and cover up 70% of the elements of the sample x1.

[0231] For example, assuming that the first threshold is 20, the second threshold is 50, and the third threshold is 80, the first data processing method includes adding one-dimensional noise and masking 70% of the elements, the second data processing method is adding one-dimensional noise, the first sample is sample x1, and the contribution of sample x1 in the process of training the network model is 10, that is, the contribution of sample x1 in the process of training the network model is less than the first threshold, and the child node n can delete sample x1.

[0232] The above method indicates that if the contribution of a first sample to the network model training process is less than a contribution threshold, the child node can delete the first sample to reduce the number of samples in the child node, thereby saving computing resources generated by the child node in determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node. The child node can also process the first sample using the first data processing method to increase the contribution of the first sample to the network model training process, thereby improving the robustness of the first network model obtained through training with the at least one sample.

[0233] When the contribution of the first sample in the process of training the network model is greater than the contribution threshold, the child node can use the second data processing method to process the first sample to further improve the contribution of the first sample in the process of training the network model, so that the adaptability between the first sample and the first network model is higher, thereby effectively improving the robustness of the first network model obtained by training at least one sample.

[0234] 2) The indication information of the sample is used to indicate the data processing method corresponding to the sample.

[0235] In some embodiments, the child node includes a second sample, and the indication information of the second sample is used to indicate the data processing method corresponding to the second sample. When the child node n processes the second sample based on the indication information of the second sample, the child node n can use the data processing method indicated in the indication information to process the second sample.

[0236] It should be noted that the contribution of the second sample after the data processing method is used to process the second sample in the process of training the network model is greater than the contribution of the second sample before the data processing method is used to process the first sample in the process of training the network model.

[0237] Data processing methods may include, but are not limited to, data augmentation methods, and are not limited to these methods in the present application. For example, when the sample is single-dimensional data, such as text data, the data processing method may include at least one of the following: masking a certain proportion (more than 50%) of elements, frequency domain high-pass, low-pass, or band-pass filtering, and adding one-dimensional noise.

[0238] When the sample is multi-dimensional data, such as RGB image data, the data processing method may include: cropping along a certain dimension, rotating along a certain direction, translating along a certain direction, masking a certain proportion (more than 50%) of elements, Gaussian filtering, symmetric transformation, and adding at least one of multi-dimensional noise.

[0239] For example, assuming that the second sample is sample x3, and the data processing method indicated by the indication information of sample x3 is symmetric transformation, the child node n may perform symmetric transformation on the sample x3 after receiving the indication information of the sample x3.

[0240] From the above description, it can be seen that when a data processing method is indicated in the indication information of the second sample, the child node can use the data processing method to process the second sample to further improve the contribution of the first sample in the process of training the network model, so that the adaptability between the second sample and the first network model is higher, thereby effectively improving the robustness of the first network model obtained by training at least one sample.

[0241] 3) The sample's indication information is used to indicate the sample's contribution to the network model training process and the data processing method corresponding to the sample.

[0242] In some embodiments, a child node includes a third sample, and the indication information of the third sample is used to indicate the contribution of the third sample in the process of training the network model and the data processing method corresponding to the third sample. When the child node n processes the third sample based on the indication information of the third sample, if the contribution of the third sample in the process of training the network model is less than a contribution threshold, the data processing method is used to process the third sample. If the contribution of the third sample in the process of training the network model is greater than the contribution threshold, the third sample is not processed.

[0243] For the specific implementation method, please refer to the contents described in 1) and 2) above, which will not be repeated here.

[0244] In some embodiments, the indication information of each sample is also used to indicate whether data processing is performed on the sample.

[0245] On this basis, when child node n processes the sample based on the indication information of the sample, if the indication information indicates not to perform data processing on the sample, child node n can directly delete the sample or directly retain the original sample. If the indication information indicates to perform data processing on the sample, child node n can use the corresponding data processing method to process the sample.

[0246] For example, assuming that child node n includes a fourth sample, and the indication information of the fourth sample is used to indicate the contribution of the first sample in the process of training the network model and whether to perform data processing on the fourth sample, when child node n processes the fourth sample based on the indication information of the fourth sample, if the contribution of the fourth sample in the process of training the network model is less than a contribution threshold, the first sample is deleted. If the contribution of the fourth sample in the process of training the network model is greater than the contribution threshold, the fourth sample is not processed.

[0247] As can be seen from the above description, each time a child node sends the label and features of at least one sample to the central node, it can process the at least one sample based on the central node's instructions. Specifically, if the instructions for each sample indicate the sample's contribution to the network model training process, the child node can adjust the at least one sample based on the sample's contribution, and different adjustment methods will produce different results.

[0248] For example, when the adjustment method involves data augmentation of a sample, the sample can be made more compatible with the first network model, thereby increasing the contribution of at least one sample to the training of the network model and improving the robustness of the first network model trained with the at least one sample. When the adjustment method involves sample deletion, the number of samples in the child node can be reduced, thereby saving computing resources generated by the child node when determining the features of the at least one sample and reducing the transmission overhead when the child node sends the features of the at least one sample to the central node.

[0249] In the case where the indication information of each sample indicates the data processing method corresponding to the sample, the child node may process the sample according to the data processing method corresponding to each sample, and different data processing methods may also produce different effects.

[0250] For example, when the data processing method for a sample is a data augmentation method, the sample can be more compatible with the first network model, that is, the contribution of at least one sample in the network model training process is increased, thereby improving the robustness of the first network model obtained by training with at least one sample. When the data processing method for a sample is a data deletion operation, the number of samples in the child node can be reduced, thereby saving the computing resources generated by the child node when determining the characteristics of at least one sample and reducing the transmission overhead when the child node sends the characteristics of at least one sample to the central node.

[0251] In addition, the child nodes can continuously process each sample based on the indication information of each sample sent by the central node. Therefore, during the model training process, the samples in the child nodes are constantly changing rather than remaining unchanged, which can effectively improve the robustness and generalization ability of the network model of the trained neural network.

[0252] In order to describe the sample processing method shown in Figure 5 in detail, Figure 6 is a schematic diagram of the interactive flow of another sample processing method provided in an embodiment of the present application. As shown in Figure 6, the method includes:

[0253] S601: The central node sends model information of a first network model to at least one child node.

[0254] The specific implementation method can refer to S500 shown in Figure 5 above, and will not be repeated here.

[0255] After receiving the network model configuration and training information from the central node, each child node can train the network model using its own samples. The following example uses child node n training the network model using its own samples. The training process for the remaining child nodes can be referenced to that of child node n and will not be detailed here.

[0256] S602: Child node n initializes a local model using model information to obtain a first network model.

[0257] S603: The child node n determines sample information of at least one sample.

[0258] S604: Child node n sends sample information of at least one sample to the central node.

[0259] S605: For each sample, the central node determines, based on the sample information of the sample, a sample loss value corresponding to the sample, a gradient corresponding to the parameters of the second network model, and a gradient corresponding to the features of the sample.

[0260] Specifically, for each sample, the central node can input the sample's features into the second network model, perform forward propagation to obtain the output value, and then input the sample label and the output value into a predetermined loss function to obtain the sample loss value for the sample. Afterwards, the central node can perform backpropagation to obtain the gradient corresponding to the parameters of the second network model and the gradient corresponding to the sample's features.

[0261] For example, suppose the sample is x1, the label of x1 is y1, the feature is z1, and the second network model in the central node is g(·,w c ), the predetermined loss function is |g(·,w c )-y|. The central node can input the feature z1 into the network model g(·,w c ), the forward propagation calculation is performed to obtain the output value P, that is, P = g(z1,w c ), and then input the label y1 and output value P into the loss function |g(·,w c )-y|, the sample loss value L of sample x1 is obtained, that is, L=|g(z1,w c )-y1|.

[0262] Afterwards, the central node can perform back propagation, i.e., L=|g(z1,w c )-y1|, and obtain the gradient g corresponding to the feature z1 of sample x1. z , and w c Derivative, get the gradient corresponding to the parameters of the second network model

[0263] S606: For each sample, the central node determines a sample index of the sample based on the sample information of the sample.

[0264] S607: The central node updates the second network model using the gradient corresponding to the parameters of the second network model.

[0265] S608: For each sample, the central node generates indication information of the sample according to the sample indicator of the sample.

[0266] S609: The central node sends indication information of at least one sample and a gradient corresponding to a feature of at least one sample to the child node n.

[0267] S610: The child node n updates the model parameters of the first network model based on the gradient corresponding to the feature of at least one sample.

[0268] In some embodiments, child node n may perform backpropagation on the gradient corresponding to the features of each sample to obtain the gradient corresponding to the parameters of the first network model. After obtaining the gradients corresponding to the parameters of multiple first network models, child node n may aggregate the gradients corresponding to the parameters of the multiple first network models and use the aggregated gradients to update the model parameters of the first network model.

[0269] When performing an aggregation operation on the gradients corresponding to the parameters of the multiple first network models, it may include but is not limited to determining the mean of the gradients corresponding to the parameters of the multiple first network models, which is not limited in this embodiment of the present application.

[0270] For example, suppose that the child node n contains 3 samples, namely x1, x2 and x3, and the gradient corresponding to the feature of x1 is g z1 , the gradient corresponding to the feature of x2 is g z2 , the gradient corresponding to the feature of x3 is g z3 , the first network model is Child node n can be based on g z1 Parameters of the first network model Derivative, get the gradient g w1 , based on g z2 Parameters of the first network model Derivative, get the gradient g w2 , based on g z3 Parameters of the first network model Derivative, get the gradient g w3 , then the gradient g w1 , gradient g w2 and the gradient g w3 Perform polymerization to obtain the gradient g after polymerization w , and then use the aggregated gradient g w The model parameters of the first network model are updated.

[0271] In other embodiments, the child node n may first perform an aggregation operation on the gradients corresponding to the features of at least one sample, perform back propagation on the aggregated gradients to obtain the gradients corresponding to the parameters of the first network model, and use the gradients corresponding to the parameters of the first network model to update the model parameters of the first network model.

[0272] When performing an aggregation operation on the gradients corresponding to the features of at least one sample, it may include but is not limited to determining the mean of the gradients corresponding to the features of at least one sample, which is not limited in this embodiment of the present application.

[0273] For example, suppose that the child node n contains 3 samples, namely x1, x2 and x3, and the gradient corresponding to the feature of x1 is g z1, the gradient corresponding to the feature of x2 is g z2 , the gradient corresponding to the feature of x3 is g z3 , the first network model is Child node n can first z1 、g z2 and g z3 Perform polymerization to obtain the gradient g after polymerization z , then based on g z Parameters of the first network model Derivative, get the gradient g corresponding to the parameters of the first network model w , and adopt the gradient g w The model parameters of the first network model are updated.

[0274] S611, child node n determines whether it meets the preset conditions; if so, execute step S612; if not, execute step S617;

[0275] In some embodiments, the preset condition may include any of the following conditions:

[0276] The number of times the model parameters of the first network model are updated reaches a preset number of updates;

[0277] The difference between the updated model parameters and the model parameters most recently received from the central node is greater than a preset threshold.

[0278] In the embodiment of the present application, the preset number of updates may include multiple pre-set values, such as 10, 15, 20, etc., which is not limited in the embodiment of the present application.

[0279] It can be understood that if the difference between the updated model parameters and the model parameters most recently received from the central node is greater than a preset threshold, it can be inferred that the similarity between the updated model parameters and the model parameters most recently received from the central node is less than the similarity threshold.

[0280] In this way, after the child node updates the model parameters of the first network model, it will send the updated model parameters to the central node only when the preset conditions are met, without having to send the updated model parameters to the central node every time. Therefore, the transmission overhead between the child node and the central node can be further reduced.

[0281] S612: Child node n sends updated model parameters to the central node.

[0282] S613: The central node aggregates the model parameters sent by at least one child node to obtain aggregated model parameters.

[0283] After receiving the model parameters of the first network model sent by at least one child node, the central node may aggregate the model parameters of the first network model sent by at least one child node to obtain aggregated model parameters of the first network model.

[0284] Aggregating the model parameters sent by at least one child node may be determining the mean of the model parameters sent by at least one child node, or may be the mean after weighted summation of the model parameters sent by at least one child node. This embodiment of the present application does not limit this.

[0285] S614: The central node determines whether the first network model and the second network model have converged based on the aggregated model parameters; if so, execute S619; if not, execute S615.

[0286] In some embodiments, after aggregating the model parameters sent by at least one child node, the central node may determine whether the first network model and the second network model have converged based on the model parameters after this aggregation and the model parameters obtained from the previous aggregation. For example, if the degree of change between the model parameters after this aggregation and the model parameters obtained from the previous aggregation is less than a preset parameter threshold, the first network model and the second network model are considered to have converged; if the degree of change between the model parameters after this aggregation and the model parameters obtained from the previous aggregation is greater than or equal to the preset degree of change threshold, the first network model and the second network model are considered to have not converged.

[0287] In other embodiments, after aggregating the model parameters sent by at least one child node, the central node may determine whether the first network model and the second network model have converged based on the size of the sample loss value. For example, if the change between the current sample loss value and the previous sample loss value is less than a preset loss value threshold, the first network model and the second network model are considered to have converged. If the change between the current sample loss value and the previous sample loss value is greater than or equal to the preset loss value threshold, the first network model and the second network model are considered to have not converged.

[0288] The specific implementation methods of the above two methods can refer to relevant technologies and will not be repeated here.

[0289] S615: The central node sends the aggregated model parameters to at least one child node.

[0290] S616: The child node n updates the first network model using the aggregated model parameters to obtain an updated first network model.

[0291] S617: The child node n updates the first network model using the updated model parameters to obtain an updated first network model.

[0292] S618: The child node n processes the at least one sample based on the indication information of the at least one sample.

[0293] The specific implementation method can refer to the above S506 and will not be repeated here.

[0294] After processing at least one sample, the child node n may determine sample information of the at least one sample based on the processed sample, and repeat the steps shown in FIG. 6 starting from S603 above until the first network model and the second network model converge.

[0295] S619: The central node sends the model parameters of the second network model to the child node n.

[0296] In some embodiments, after the first network model trained by the child node and the second network model trained by itself converge, the central node can send the model parameters of the second network model to the child node. After receiving the model parameters of the second network model, the child node can determine the complete network model based on the model parameters of the first network model and the model parameters of the second network model, so that subsequent child nodes can directly use the complete network model to perform forward propagation inference locally to obtain corresponding results.

[0297] In this way, when a child node needs to use a complete network model to infer certain information or data, the child node can directly use the network model stored in its own storage to effectively improve the model processing efficiency of the child node.

[0298] In some embodiments, after the first network model trained by the child node and the second network model trained by the central node converge, the central node may not send the model parameters of the second network model to the child node. Subsequently, when the child node needs to use the complete network model to infer certain information or data, it can transmit the information or data to the central node. After receiving the information or data, the central node can use the complete network model to infer the information or data, obtain the corresponding output result, and send it to the child node. This can help the child node save computing resources.

[0299] The above description uses a single child node n as an example to illustrate the sample processing method provided in the embodiment of the present application. The following description uses multiple child nodes as an example to illustrate the sample processing method provided in the embodiment of the present application.

[0300] FIG7 is a schematic diagram of an interactive process of another sample processing method provided in an embodiment of the present application. As shown in FIG7 , the method includes:

[0301] 1. At least one child node sends the label and features of at least one sample contained in it to the central node through the downlink channel.

[0302] For example, suppose the number of child nodes is k, M1-M k , the local dataset of M1 is D1, M k The local dataset is D k Each child node can input its own sample into its own network model in turn to obtain the label and features of at least one sample, and send it to the central node through the downlink channel.

[0303] For details, please refer to S501 and will not be repeated here.

[0304] 2. Based on the sample information of each sample, the central node determines the indication information of the sample and the gradient corresponding to the characteristics of the sample.

[0305] For details, please refer to S503 and S605, which will not be repeated here.

[0306] 3. The central node sends the indication information of at least one sample of the child node and the gradient corresponding to the feature of at least one sample to each child node.

[0307] 4. Each child node updates the model parameters of the first network model based on the gradient corresponding to the feature of at least one sample.

[0308] 5. Each child node sends the updated model parameters to the central node when the preset conditions are met.

[0309] 6. The central node aggregates the model parameters sent by at least one child node to obtain the aggregated model parameters.

[0310] 7. If the model does not converge, the central node sends the aggregated model parameters to at least one child node.

[0311] 8. At least one child node processes at least one sample according to the indication information of the at least one sample.

[0312] For details, please refer to S506 and will not be repeated here.

[0313] 9. At least one child node updates the first network model according to the aggregated model parameters.

[0314] Afterwards, each child node may adopt the updated first network model, determine the label and features of at least one processed sample, and send the labels and features to the central node to repeat steps 1 to 9 until the model converges.

[0315] The above description primarily describes the solutions provided by the embodiments of the present application from the perspective of interaction between various network elements. Accordingly, the embodiments of the present application also provide a sample processing device, which is used to implement the various methods described above. The sample processing device can be a subnode or a component usable in a subnode in the above method embodiments; alternatively, the sample processing device can be a central node or a component usable in a central node in the above method embodiments. It will be understood that, to implement the aforementioned functions, the sample processing device includes hardware structures and / or software modules corresponding to each function. Those skilled in the art will readily appreciate that, in conjunction with the various exemplary units and algorithm steps described in the embodiments disclosed herein, the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or in a hardware-driven manner by computer 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 implementations should not be considered beyond the scope of this application.

[0316] In the embodiment of the present application, the functional modules of the sample processing device can be divided according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. It should be understood that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, other division methods can be used.

[0317] For example, taking the sample processing device as a subnode in the above method embodiment, Figure 8 shows a schematic structural diagram of a subnode, which includes a transceiver module 801 and a processing module 802. The transceiver module 801, which may also be referred to as a transceiver unit, is used to implement transceiver functions, and may be, for example, a transceiver circuit, a transceiver, a transceiver, or a communication interface.

[0318] The transceiver module 801 is configured to transmit sample information of at least one sample to the central node; the sample information for each sample includes the sample's label and features. It is also configured to receive instruction information for at least one sample from the central node; the instruction information for each sample indicates at least one of the sample's contribution to the network model training process and the data processing method corresponding to the sample.

[0319] The processing module 802 is configured to process the sample based on the indication information of each sample.

[0320] In the embodiments of the present application, the sub-node is presented in the form of functional modules divided in an integrated manner. "Module" here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above-mentioned functions. In a simple embodiment, those skilled in the art will appreciate that the sub-node can take the form of the sample processing device 400 shown in Figure 4.

[0321] For example, the processor 401 in the sample processing device 400 shown in FIG4 may call computer-executable instructions stored in the memory 404 to enable the sample processing device 400 to execute the sample processing method in the above method embodiment.

[0322] Specifically, the functions / implementation processes of the transceiver module 801 and the processing module 802 in FIG8 can be implemented by the processor 401 in the sample processing device 400 shown in FIG4 calling computer-executable instructions stored in the memory 404. Alternatively, the functions / implementation processes of the processing module 802 in FIG8 can be implemented by the processor 401 in the sample processing device 400 shown in FIG4 calling computer-executable instructions stored in the memory 404, and the functions / implementation processes of the transceiver module 801 in FIG8 can be implemented by the communication interface 402 in the sample processing device 400 shown in FIG4.

[0323] Since the sub-node provided in the embodiment of the present application can execute the above-mentioned sample processing method, the technical effects that can be obtained can be referred to the above-mentioned method embodiment and will not be repeated here.

[0324] Alternatively, for example, taking the sample processing device as the central node in the above method embodiment, FIG9 shows a schematic structural diagram of a central node, which includes a transceiver module 901 and a processing module 902. The transceiver module 901, which may also be referred to as a transceiver unit, is used to implement transceiver functions, and may be, for example, a transceiver circuit, a transceiver, a transceiver, or a communication interface.

[0325] The transceiver module 901 is used to receive sample information of at least one sample from a child node; the sample information of each sample includes a label and features of the sample.

[0326] The processing module 902 is used to generate sample indication information for each sample based on the sample information of the sample. The indication information of each sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0327] The transceiver module 901 is further configured to send indication information of at least one sample to the child node.

[0328] Among them, the transceiver module 901 can be used to implement the transceiver function corresponding to the central node in the above method embodiment, and the processing module 902 can be used to implement the processing function corresponding to the central node in the above method embodiment. Furthermore, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0329] In the embodiments of the present application, the central node is presented in the form of various functional modules divided in an integrated manner. The "module" here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above functions. In a simple embodiment, those skilled in the art will appreciate that the terminal device can take the form of the sample processing device 400 shown in Figure 4.

[0330] For example, the processor 401 in the sample processing device 400 shown in FIG4 may call computer-executable instructions stored in the memory 404 to enable the sample processing device 400 to execute the sample processing method in the above method embodiment.

[0331] Specifically, the functions / implementation processes of the transceiver module 901 and the processing module 902 in FIG9 can be implemented by the processor 401 in the sample processing device 400 shown in FIG4 calling computer-executable instructions stored in the memory 404. Alternatively, the functions / implementation processes of the processing module 902 in FIG9 can be implemented by the processor 401 in the sample processing device 400 shown in FIG4 calling computer-executable instructions stored in the memory 404, and the functions / implementation processes of the transceiver module 901 in FIG9 can be implemented by the communication interface 402 in the sample processing device 400 shown in FIG4.

[0332] Since the central node provided in the embodiment of the present application can execute the above-mentioned sample processing method, the technical effects that can be obtained can be referred to the above-mentioned method embodiment and will not be repeated here.

[0333] It should be understood that one or more of the above modules or units can be implemented by software, hardware, or a combination of the two. When any of the above modules or units is implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor can be built into an SoC (system on chip) or an ASIC, or it can be an independent semiconductor chip. In addition to the core used to execute software instructions to perform calculations or processing within the processor, it can further include necessary hardware accelerators, such as field programmable gate arrays (FPGAs), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.

[0334] When the above modules or units are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a digital signal processing (DSP) chip, a microcontroller unit (MCU), an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.

[0335] Optionally, an embodiment of the present application further provides a sample processing device (for example, the sample processing device may be a chip or a chip system), which includes a processor for implementing the method in any of the above method embodiments. In one possible design, the sample processing device also includes a memory. The memory is used to store necessary program instructions and data, and the processor can call the program code stored in the memory to instruct the sample processing device to execute the method in any of the above method embodiments. Of course, the memory may not be in the sample processing device. When the sample processing device is a chip system, it may be composed of a chip, or it may include a chip and other discrete devices, and the embodiment of the present application does not specifically limit this.

[0336] In one possible implementation, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program or instruction. When the computer program or instruction is run on a sample processing device, the sample processing device can execute the method described in any of the above method embodiments or any of its implementations.

[0337] In a possible implementation, an embodiment of the present application further provides a distributed training system, which includes the access network device described in the above method embodiment, the core network device described in the above method embodiment, and the terminal device described in the above method embodiment.

[0338] In a possible implementation, an embodiment of the present application further provides a communication method, which includes the method described in any of the above method embodiments or any of its implementations.

[0339] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0340] 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, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives (SSDs)).

[0341] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0342] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.

Claims

1. A sample processing method, characterized in that: Applied to any sub-node in a distributed training system, the distributed training system includes at least one sub-node and a central node, each sub-node is deployed with a first network model, and the method includes: Sending sample information of at least one sample to the central node; the sample information of each sample includes a label and features of the sample; Receiving indication information for the at least one sample from the central node; the indication information of each sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample; Based on the indication information for each sample, the sample is processed.

2. The method according to claim 1, characterized in that The subnode includes a first sample; the indication information of the first sample is used to indicate the contribution of the first sample in the process of training the network model; The processing of the sample based on the indication information of each sample includes: If the contribution of the first sample in the process of training the network model is less than a contribution threshold, deleting the first sample or performing data processing on the first sample using a first data processing method; If the contribution of the first sample in the process of training the network model is greater than the contribution threshold, the second data processing method is used to process the first sample; the degree of change of the first sample by the first data processing method is greater than the degree of change of the first sample by the second data processing method.

3. The method according to claim 1, characterized in that The subnode includes a second sample; the indication information of the second sample is used to indicate a data processing method corresponding to the second sample; The processing of the sample based on the indication information of each sample includes: The data processing method is used to perform data processing on the second sample.

4. The method according to claim 1, wherein The indication information of each sample is also used to indicate whether to perform data processing on the sample.

5. The method according to claim 1, wherein The method further comprises: receiving a gradient corresponding to a feature of the at least one sample from the central node; Updating model parameters of the first network model based on a gradient corresponding to the feature of the at least one sample; When the preset conditions are met, the updated model parameters are sent to the central node.

6. The method according to claim 5, characterized in that The pre-condition includes any of the following conditions: The number of times the model parameters of the first network model are updated reaches a preset number of updates; The difference between the updated model parameters and the model parameters most recently received from the central node is greater than a preset threshold.

7. The method according to claim 5, characterized in that The method further comprises: When the preset condition is not met, the first network model is updated using the updated model parameters to obtain an updated first network model.

8. The method according to claim 5, characterized in that The method further comprises: receiving aggregated model parameters from the central node; The first network model is updated using the aggregated model parameters to obtain an updated first network model.

9. The method according to any one of claims 1 to 8, characterized in that The sub-nodes are terminal devices; the central node is a network device.

10. A sample processing method, characterized in that: A method for applying a central node in a distributed training system, wherein the distributed training system includes at least one sub-node and a central node, each sub-node being deployed with a first network model, and comprising: Receive sample information of at least one sample from a child node; the sample information of each sample includes a label and features of the sample; For each sample, generating sample indication information based on the sample information of the sample; the indication information of each sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample; Sending indication information of the at least one sample to the child node.

11. The method according to claim 10, characterized in that The generating, based on the sample information of the sample, indication information of the sample includes: Determining a sample index of the sample based on the sample information of the sample; the sample index is used to reflect the importance of the sample; the importance of the sample is positively correlated with the contribution of the sample in the process of training the network model; The indication information is generated according to the sample indicator.

12. The method according to claim 11, characterized in that The sample indicator includes at least one of a sample loss value of the sample, a sample confidence, and a degree of influence of the sample on a model parameter of the first network model.

13. The method according to claim 10, characterized in that The method further comprises: For each sample, determining a gradient corresponding to a feature of the sample based on sample information of the sample; Sending a gradient corresponding to the feature of the at least one sample to the child node.

14. The method according to claim 10, characterized in that The method further comprises: receiving updated model parameters from at least one child node; Aggregating the updated model parameters sent by the at least one child node; The aggregated model parameters are sent to the at least one child node respectively.

15. The method according to any one of claims 10 to 14, characterized in that The sub-nodes are terminal devices; the central node is a network device.

16. A sample processing device, characterized in that: The device is located at a child node, and includes: A transceiver module, configured to send sample information of at least one sample to the central node; the sample information of each sample includes a label and features of the sample; The transceiver module is further configured to receive indication information for the at least one sample from the central node; the indication information for each sample is configured to indicate at least one of a contribution of the sample in the process of training the network model and a data processing method corresponding to the sample; The processing module is configured to process the sample based on the indication information of each sample.

17. A sample processing device, characterized in that: The device is located at a central node and includes: a transceiver module, configured to receive sample information of at least one sample from a child node; the sample information of each sample includes a label and features of the sample; A processing module, configured to generate, for each sample, sample indication information based on the sample information of the sample; the indication information of each sample is used to indicate at least one of the contribution of the sample in the process of training the network model and the data processing method corresponding to the sample; The transceiver module is further configured to send indication information of the at least one sample to the child node.

18. A sample processing device, characterized in that: The device is located at a child node and includes: a functional unit for executing the method according to any one of claims 1 to 9; wherein the actions executed by the functional unit are implemented by hardware or by hardware executing corresponding software implementations.

19. A sample processing device, characterized in that: The device is located at a central node and includes: a functional unit for executing the method according to any one of claims 10 to 15; wherein the actions executed by the functional unit are implemented by hardware or by hardware executing corresponding software implementations.

20. A distributed training system, characterized in that: The system includes: a sub-node and a central node; The subnode is configured to execute the sample processing method according to any one of claims 1 to 9; The central node is used to execute the sample processing method according to any one of claims 10 to 15.

21. A computer-readable storage medium, characterized in that The method comprises a program code, which, when running on a computer or a processor, enables the computer or the processor to execute the sample processing method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Distributed unmanned ship model training data privacy protection method based on split federated learning

    CN115758454A

  • Federal learning client contribution evaluation method based on significant score

    CN115905859A

  • Federal segmentation learning-oriented excitation method and related equipment

    CN117455007A

  • Motor

    KR1020250032134A