Sample processing method, device and system and storage medium

CN120409543APending Publication Date: 2025-08-01HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410144751.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

[0006]本申请实施例提供了一种样本处理方法、装置、系统和存储介质,用于解决相关技术中神经网络的网络模型的鲁棒性较差的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409543A_ABST
    Figure CN120409543A_ABST
Patent Text Reader

Abstract

The invention discloses a sample processing method, device and system and a storage medium, relates to the technical field of machine learning, and is used for improving the robustness and generalization ability of a network model and solving the problem of poor robustness of a network model of a neural network in related technologies. The method comprises the steps that a child node sends sample information of at least one sample to a center node, the center node receives the sample information of the at least one sample from the child node, then for each sample, indication information of the sample is generated based on the sample information of the sample, and the indication information of the at least one sample is sent to the child node, and after receiving the indication information for at least one sample from the central node, the child node processes the sample based on the indication information of each sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular, to a sample processing method, apparatus, system, and storage medium. Background Art

[0002] A neural network (NN) is a large-scale, multi-parameter optimization tool. Relying on a large number of samples, a neural network can learn hidden features that are difficult to summarize in the data, so as to complete multiple complex tasks, such as image semantic segmentation. Neural networks are widely used in the field of artificial intelligence (AI).

[0003] Currently, a neural network can be trained using a distributed learning method. Distributed learning mainly includes two types: federated learning and split learning. Federated split learning is another way to train a neural network by combining federated learning and split learning.

[0004] In the process of training a neural network using federated split learning, the child nodes and the central node need to repeat the following steps until the network model of the neural network converges: Each child node parallelly uses local data to perform forward propagation to calculate features and feedback them to the central node. The central node can use the features to perform forward propagation to calculate the sample gradients corresponding to each child node, and perform backpropagation to update its own neural network parameters. Then, the central node can send the sample gradients to the corresponding child nodes, and the child nodes can perform backpropagation to update their own neural network parameters and send them to the central node, so that the central node can perform an aggregation operation on the updated neural network parameters of each child node and feedback them to each child node.

[0005] In summary, in federated split learning, the child nodes not only need to repeatedly traverse all samples, and 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

[0006] Embodiments of this application provide a sample processing method, apparatus, system, and storage medium, which are used to solve the problem of poor robustness of the network model of a neural network in related technologies.

[0007] To achieve the above object, the embodiments of this application provide the following technical solutions:

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

[0009] Specifically, this method is executed by any sub-node in the distributed training system, or can also be executed by a module in the sub-node, such as a chip, a chip system, or a circuit; or can also be implemented by a logic module or software that can implement all or part of the functions of the sub-node, and there is no limitation on this. For the convenience of description, the following will take the execution by the sub-node as an example for illustration.

[0010] This method includes: the sub-node sends the labels and features of at least one sample to the central node, and after receiving the indication information for at least one sample from the central node, processes the sample based on the indication information of each sample. Among them, the indication information of each sample is used to indicate at least one of the contribution degree of the sample in the process of training the network model and the data processing method corresponding to the sample. That is, the indication information of each sample can be used to indicate the contribution degree of the sample in the process of training the network model, can also be used to indicate the data processing method corresponding to the sample, and can also be used to indicate the contribution degree of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0011] The feature of each sample is the value obtained after inputting the sample into the first network model deployed in the sub-node.

[0012] From the above method, it can be seen that after the sub-node sends the labels and features of at least one sample to the central node, it can process the sample targeted according to the contribution degree of the sample indicated by the central node and / or the data processing method of the sample, so as to apply the processed sample to the next training of the network model. That is, the sub-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 sub-node are constantly changing, rather than remaining unchanged. Furthermore, it can effectively improve the robustness and generalization ability of the network model of the neural network obtained by training, and avoid the problem that the robustness of the network model is poor due to using the same samples for each training.

[0013] Specifically, in the case where the indication information of each sample indicates the contribution degree 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 degrees of the 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 fitness between the sample and the first network model can be made higher, that is, the contribution degree of the at least one sample in the process of training the network model is improved, and thus the robustness of the first network model trained by the at least one sample is improved. When the adjustment method is to delete the sample, the number of samples in the child node can be reduced, and thus the computational resources generated when the child node determines the features of the at least one sample and the transmission overhead when the child node sends the features of the at least one sample to the central node can be saved.

[0014] 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 fitness between the sample and the first network model can be made higher, that is, the contribution degree of the at least one sample in the process of training the network model is improved, and thus the robustness of the first network model trained by the at least one sample is improved. 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, and thus the computational resources generated when the child node determines the features of the at least one sample and the transmission overhead when the child node sends the features of the at least one sample to the central node can be saved.

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

[0016] The contribution degree of the first sample processed by the first data processing method in the process of training the network model is greater than the contribution degree of the first sample before being processed by the first data processing method in the process of training the network model.

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

[0018] Among them, the degree of change of the first data processing method for the first sample is greater than that of the second data processing method for the first sample.

[0019] The contribution degree threshold can be 50 or 90, and the present application does not limit this.

[0020] It can be seen from the above method that when the contribution degree of the first sample in the process of training the network model is less than the contribution degree threshold, the first sample does not play a crucial role in the training of the network model. Such samples can be called invalid samples. At this time, the child node can delete the first sample, that is, the invalid sample, and retain the samples with higher contribution degrees in the samples, which can not only ensure the normal training of the network model, but also reduce the number of samples in the child node, achieving the effects of saving the computing resources generated when the child node determines the features of at least one sample and reducing the transmission overhead when the child node sends the features 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 degree of the first sample in the process of training the network model, thereby improving the robustness of the first network model obtained by training with at least one sample.

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

[0022] In an alternative embodiment, the child node may include a second sample. When the indication information of the second sample indicates the data processing method corresponding to the second sample, the child node can use this data processing method to process the second sample.

[0023] It should be noted that the contribution degree of the second sample in the process of training the network model after being processed by this data processing method is greater than that of the second sample before being processed by this data processing method in the process of training the network model.

[0024] In an alternative embodiment, the indication information of each sample is further used to indicate whether to perform data processing on the sample.

[0025] In this way, the child node can determine whether to perform data processing on each sample according to the indication information. When it is indicated 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 pre-determined data processing method to process the corresponding sample, or use the data processing method indicated in the indication information to process the corresponding sample. When it is indicated not to perform data processing on the sample, the child node can directly delete the sample or directly retain the sample. The embodiments of the present application do not make any limitations in this regard.

[0026] In an alternative embodiment, the child node can also receive the gradients corresponding to the features of at least one sample from the central node, and then update the model parameters of the first network model based on the gradients corresponding to the features of the at least one sample, and send the updated model parameters to the central node when a preset condition is met.

[0027] As can be seen from the above method, after the child node updates the model parameters of the first network model, when a preset condition is met, it can send the updated model parameters to the central node, instead of sending 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.

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

[0029] The preset update number can include multiple values. For example, 10, 15, 20, etc. The present application does not make any limitations in this regard. When the number of times of updating the model parameters of the first network model is equal to any value in the preset update number, the child node can send the updated model parameters to the central node.

[0030] By limiting the preset condition through the above content, the feasibility of the present solution can be effectively improved.

[0031] In an alternative embodiment, the child node can also update the first network model with the updated model parameters to obtain an updated first network model when the preset condition is not met.

[0032] As can be seen from the above method, when the preset condition is not met, the child node can directly update the first network model with the updated model parameters to obtain an updated first network model, which can effectively improve the training rate of the first network model on the basis of reducing the transmission overhead between the child node and the central node.

[0033] In an alternative embodiment, the child node may also receive the aggregated model parameters from the central node, and update the first network model with the aggregated model parameters to obtain an updated first network model.

[0034] This facilitates keeping the model parameters of the network model of the child node synchronized with those of the network model of the central node, ensuring the accuracy of data processing by both based on network models with the same model parameters.

[0035] In an alternative embodiment, the child node is a terminal device and the central node is a network device. Alternatively, in an alternative embodiment, the child node is an OTT device.

[0036] Based on this possible embodiment, an application scenario of the present application is given, expanding the application scope of the present application.

[0037] In a second 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 using the distributed manner, 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.

[0038] Specifically, the method described in the second aspect is executed by the central node in the distributed training system, or can also be executed by a module in the central node, such as a chip, a chip system or a circuit; or can also be implemented by a logic module or software that can implement all or part of the functions of the child node, which is not limited herein. For ease of description, the following will be described by taking the execution by the central node as an example.

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

[0040] The sample information of each sample includes the label and features of the sample. The indication information of each sample is used to indicate at least one of the contribution degree of the sample in the process of training the network model and the data processing method corresponding to the sample. That is, the indication information of each sample can be used to indicate the contribution degree of the sample in the process of training the network model, can also be used to indicate the data processing method corresponding to the sample, or can also be used to indicate the contribution degree of the sample in the process of training the network model and the data processing method corresponding to the sample.

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

[0042] As can be seen from the above method, after the central node sends the sample information of at least one sample to the child nodes, the child nodes can process at least one sample according to the indication information of the central node. Specifically, when the indication information of each sample indicates the contribution degree of the sample in the process of training the network model, the child nodes can adjust at least one sample according to the contribution degrees 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, it can make the adaptability between the sample and the first network model higher, that is, improve the contribution degree of at least one sample in the process of training the network model, and further improve the robustness of the first network model trained by at least one sample. When the adjustment method is to delete the sample, it can reduce the number of samples in the child nodes, and further achieve the effects of saving the computing resources generated when the child nodes determine the features of at least one sample and reducing the transmission overhead when the child nodes send the features of at least one sample to the central node.

[0043] When 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, it can make the adaptability between the sample and the first network model higher, that is, improve the contribution degree of at least one sample in the process of training the network model, and further improve the robustness of the first network model trained by at least one sample. When the data processing method of a certain sample is a data deletion operation, it can reduce the number of samples in the child nodes, and further achieve the effects of saving the computing resources generated when the child nodes determine the features of at least one sample and reducing the transmission overhead when the child nodes send the features of at least one sample to the central node.

[0044] In an alternative embodiment, the central node can determine the sample metrics of the sample based on the sample information of the sample, and generate the indication information of the sample according to the sample metrics. The sample metrics are used to reflect the importance of the sample. And the importance of the sample is positively correlated with the contribution degree of the sample in the process of training the network model.

[0045] The above method provides a specific implementation manner for the central node to generate the indication information of the sample, enhancing the feasibility of the solution.

[0046] In an alternative embodiment, the sample metrics include at least one of the sample loss value of the sample, the sample confidence, and the influence degree of the sample on the model parameters of the first network model.

[0047] The above method provides various metric values for the sample metrics. In this way, it can be compatible with multiple model training scenarios, improving the diversity and flexibility of the solution.

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

[0049] In an alternative embodiment, the method further includes: receiving the 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.

[0050] In an alternative embodiment, the child node is a terminal device and the central node is a network device.

[0051] In an alternative embodiment, the child node is an OTT device.

[0052] Based on this possible embodiment, an application scenario of the present application is given, improving the application scope of the present application.

[0053] In a third aspect, a sample processing device is provided. The sample processing device may be a child node or located in a child node, such as a functional module or chip located in a child node, etc. The sample processing device may include: functional units for performing any one of the methods provided in the first aspect, and the actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software. The device includes a transceiver module and a processing module. Among them:

[0054] The transceiver module is used for sending the sample information of at least one sample to the central node. The sample information of each sample includes the label and feature of the sample.

[0055] The transceiver module is further used for receiving the 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 degree of the sample in the process of training the network model and the data processing method corresponding to the sample.

[0056] The processing module is used for processing the sample based on the indication information of each sample.

[0057] In a fourth aspect, a sample processing device is provided. The sample processing device may be a central node or located in a central node, such as a functional module or chip located in a central node, etc. The sample processing device may include: functional units for performing any one of the methods provided in the second aspect, and the actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software.

[0058] The device includes a transceiver module and a processing module. Among them:

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

[0060] A processing module, configured to generate indication information of a sample 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 degree of the sample in the process of training a network model and the data processing method corresponding to the sample.

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

[0062] In a fifth aspect, a sample processing device is provided. The sample processing device includes at least one processor, and the at least one processor is 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 executes any one of the sample processing methods provided in the first aspect or any optional implementation manner of the first aspect.

[0063] In a sixth aspect, a sample processing device is provided. The sample processing device includes at least one processor, and the at least one processor is 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 executes any one of the sample processing methods provided in the second aspect or any optional implementation manner of the second aspect.

[0064] In a seventh aspect, a distributed training system is provided. The distributed training system includes: at least one child node and a central node; each child node is configured to execute any one of the sample processing methods provided in the first aspect or any optional implementation manner of the first aspect; the central node is configured to execute any one of the sample processing methods provided in the second aspect or any optional implementation manner of the second aspect.

[0065] In an eighth aspect, a computer-readable storage medium is provided, including computer-executable instructions. When the computer-executable instructions run on a computer, the computer is caused to execute any one of the sample processing methods provided in the first aspect, the second aspect, any optional implementation manner of the first aspect, or any optional implementation manner of the second aspect.

[0066] In a ninth aspect, a chip is provided. The chip includes: a processor and an interface circuit; the interface circuit is configured to receive code instructions and transmit them to the processor; the processor is configured to run the code instructions to execute any one of the sample processing methods provided in the first aspect, the second aspect, any optional implementation manner of the first aspect, or any optional implementation manner of the second aspect.

[0067] In a tenth aspect, there is provided a computer program product including computer-executable instructions that, when run on a computer, cause the computer to execute any one of the sample processing methods provided in the first aspect, the second aspect, any optional implementation manner of the first aspect, or any optional implementation manner of the second aspect.

[0068] It should be noted that for the technical effects brought about by any implementation manner in the third aspect to the tenth aspect, reference may be made to the technical effects brought about by the corresponding implementation manner in the first aspect, the second aspect, any optional implementation manner of the first aspect, or any optional implementation manner of the second aspect, which will not be elaborated herein. Description of the Drawings

[0069] Figure 1 It is a schematic structural diagram of a DNN;

[0070] Figure 2 It is a schematic structural diagram of a DNN;

[0071] Figure 3 It is a system architecture diagram of a distributed training system provided by an embodiment of the present application;

[0072] Figure 4 It is a schematic composition diagram of a sample processing device provided by an embodiment of the present application;

[0073] Figure 5 It is a schematic interaction flow diagram of a sample processing method provided by an embodiment of the present application;

[0074] Figure 6 It is a schematic interaction flow diagram of another sample processing method provided by an embodiment of the present application;

[0075] Figure 7 It is a schematic interaction flow diagram of another sample processing method provided by an embodiment of the present application;

[0076] Figure 8 It is a schematic structural diagram of another sub-node provided by an embodiment of the present application;

[0077] Figure 9 It is a schematic structural diagram of another central node provided by an embodiment of the present application. Detailed Embodiments

[0078] In the description of this application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. "And / or" in this article is merely a correlative relationship describing related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, "at least one" means one or more, and "a plurality of" means two or more. The terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily limit to be different.

[0079] It should be noted that in this application, words such as "exemplarily" or "for example" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in this application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.

[0080] "For indication" may include direct indication and indirect indication, and may also include explicit indication and implicit indication. When describing "a certain indication information is used to indicate A" or "the indication information of A", it may include that the indication information directly indicates A or indirectly indicates A, rather than meaning that A must be carried in the indication information. The information indicated by a certain information is called the information to be indicated. In the specific implementation process, 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 the index of the information to be indicated, etc. It is also possible to indirectly indicate the information to be indicated by indicating other information, where there is an association relationship between the other information and the information to be indicated. It is also possible to only indicate a part of the information to be indicated, while the other parts of the information to be indicated are known or pre-agreed. For example, it is also possible to use the arrangement order of each piece of information pre-agreed (such as protocol regulations) to implement the indication of specific information, thereby reducing the indication overhead to a certain extent. At the same time, the common parts of each piece of information can be identified and indicated uniformly to reduce the indication overhead caused by separately indicating the same information. In addition, the specific indication method can also be various existing indication methods. For example, but not limited to, the above indication methods and their various combinations, etc. The specific details of various indication methods can refer to the prior art and will not be elaborated herein. As can be seen from the above description, for example, when it is necessary to indicate multiple pieces of information of the same type, there may be a situation where the indication methods of different pieces of information are different. In the specific implementation process, the required indication method can be selected according to specific needs. The indication method selected in the embodiments of the present application is not limited. In this way, the indication methods involved in the embodiments of the present application should be understood to cover various methods that can enable the party to be indicated to obtain the information to be indicated. The information to be indicated can be sent as a whole, or divided into multiple sub-information and 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 the present application. Among them, the sending periods and / or sending times of these sub-information can be predefined, for example, predefined according to the protocol, or can be configured by the transmitting device by sending configuration information to the receiving device. Among them, the configuration information can, for example, but not limited to, include one or at least two combinations of radio resource control signaling, medium access control (MAC) layer signaling, and physical layer signaling. Among them, the radio resource control signaling is, for example, radio resource control (RRC) signaling; the MAC layer signaling includes, for example, MAC control element (CE); the physical layer signaling includes, for example, downlink control information (DCI).

[0081] With the continuous development of science and technology, the number of user equipment (UE) such as mobile phones and wearable devices is increasing continuously. It can be foreseen that in the near future, billions of UEs will be deployed in communication networks to achieve the automation and intelligence of social development. To achieve automation and intelligence, machine learning (ML) is proposed.

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

[0083] Supervised learning can, based on the collected samples and labels, use machine learning algorithms to learn the mapping relationship between samples and labels, and use a machine learning model to represent the 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, the received signal with noise is the sample, and the true noise points in the received signal are the labels. A machine learning model can be trained using the samples and labels to learn the mapping relationship between the samples and labels, so that the trained machine learning model has the function of a signal detector to detect the true noise points in the received signal.

[0084] When training a machine learning model, the model parameters of the machine learning model can be optimized through the error between the predicted value of the machine learning model and the label. Once the mapping relationship is learned, the learned mapping relationship can be used to predict the label corresponding to each new sample. The mapping relationship learned by supervised learning can include linear mapping and non-linear mapping. In addition, according to the type of label, the tasks of supervised learning can be divided into two categories: classification tasks and regression tasks.

[0085] Unsupervised learning can, based on the collected samples, use machine learning algorithms to learn the pattern structure in the samples. In unsupervised learning, there is a type of algorithm that uses the samples themselves as the supervision signal, that is, the model learns the mapping relationship from samples to samples, which is called self-supervised learning. During training, the model parameters can be optimized by calculating the error between the predicted value of the model and the samples themselves. Self-supervised learning can be used in applications such as signal compression and decompression recovery. Common algorithms include autoencoders and adversarial generative networks, etc.

[0086] Reinforcement learning is a type of algorithm that learns to solve problems by interacting with the environment. Different from supervised learning and unsupervised learning, during the reinforcement learning process, there is no explicit "correct" action label data. The model needs to interact with the environment to obtain the reward signal feedback from the environment, and then adjust the decision-making actions to obtain a larger reward signal value. For example, in downlink power control, the reinforcement learning model adjusts the downlink transmission power of each user according to the total system throughput rate fed back by the wireless network, and then expects to obtain a higher system throughput rate. The goal of reinforcement learning is also to learn the mapping relationship between the environmental state and the optimal decision-making action. However, because the "correct" action label cannot be obtained in advance, the network cannot be optimized by calculating the error between the action and the "correct action". The training of reinforcement learning is achieved through iterative interaction with the environment.

[0087] Deep neural network (DNN) is a specific implementation form of machine learning. DNN has the ability to learn any mapping. Traditional distributed training systems need to rely on rich knowledge to design the communication module, while the distributed training system based on DNN can automatically discover the implicit pattern structure from a large amount of data sets, establish the mapping relationship between data, and obtain better performance than traditional modeling methods.

[0088] DNN can contain multiple layers of structures, and each layer can contain multiple neurons. Each neuron can perform a weighted sum operation on its input values, and calculate the corresponding output value through a non-linear function for the result of the weighted sum. Specifically, as Figure 1 shown, assume that the input value of a certain neuron is x = [x0,…,x n , the weights corresponding to each input value are w = [w0,…,w n , and the non-linear function is where b is the bias of the weighted sum. This neuron can perform a weighted sum operation on the input value x = [x0,…,x n using the weights w = [w0,…,w n , and then calculate the corresponding output value y through the non-linear function .

[0089] The above non-linear function can be diversified. For example, when the non-linear function is the maximum function max{0,x}, its corresponding output value y can be expressed as:

[0090] The weights in each neuron are the parameters of the DNN. After the parameters are trained and optimized, the DNN can have the ability to extract data features and express the mapping relationship. DNN generally uses supervised learning or unsupervised learning strategies to optimize the model parameters.

[0091] Figure 2 shows a schematic structural diagram of a DNN, as Figure 2 shown. In the multi-layer structure of the DNN, it can include an input layer, a hidden layer, and an output layer. The input layer can pass the received numerical values to the middle hidden layer after being processed by neurons. After being processed by neurons, the hidden layer then passes it to the output layer, and the output layer obtains the final output of the DNN after being processed by neurons. The hidden layer can affect the ability of the DNN to extract information and fit functions. Increasing the number of hidden layers or expanding the width of each hidden layer can improve the function fitting ability of the DNN.

[0092] According to the construction method of the network, the DNN can include a feedforward neural network (FNN), a convolutional neural network (CNN), and a recurrent neural network (RNN).

[0093] The characteristic of the FNN is that neurons between adjacent layers are completely connected in pairs, as Figure 2 shown. The FNN usually requires a large amount of storage space, resulting in a high computational complexity of the FNN.

[0094] The feedforward neural network is a neural network specifically designed to process data with a similar grid structure. For example, time series data and image data. The feedforward neural network does not perform operations using all the input information at once, but instead uses a window of a fixed size to intercept part of the information for convolution operations, thus greatly reducing the computational amount of model parameters. Additionally, according to the different types of information intercepted by the window, each window can use different convolution kernels for operations, enabling the feedforward neural network to better extract the features of the input data.

[0095] The convolutional neural network is a type of DNN network that utilizes feedback time series information. Its input includes the new input value at the current moment and its own output value at the previous moment. The convolutional neural network is suitable for obtaining sequence features that are correlated in time and is applicable to fields such as speech recognition and channel coding and decoding.

[0096] The network structures of various neural networks such as the feedforward neural network, the convolutional neural network, and the recurrent neural network are all constructed based on neurons. As introduced above, each neuron performs a weighted summation operation on its input value and calculates the weighted summation result through a non-linear function to obtain the corresponding output value. We can call the weight value and non-linear function of each neuron in the neural network the parameters of the neural network.

[0097] Optionally, the neural network is trained in two ways: centralized training or distributed learning.

[0098] During the process of training the neural network using centralized training, a sufficient number of samples need to be collected. Usually, the samples are from UEs, so users need to upload this data. However, during the upload and use of this data, not only will there be a large amount of upload overhead, but it may also infringe on user privacy, such as revealing the user's location, movement route, or photos.

[0099] During the process of training the neural network using distributed learning, generally multiple sub-nodes (such as UEs) and a central node (such as a network device) jointly participate in the training of the neural network. Users can upload neural network parameters or intermediate layer outputs to the central node through the sub-nodes, and cooperate with the central node to complete the training of the neural network, so as to avoid the direct sharing of raw data and protect user privacy.

[0100] Distributed learning mainly includes two types: federated learning and split learning.

[0101] In federated learning, each sub-node can use local samples to train a complete neural network and send the neural network parameters to the central node. The central node can aggregate the neural network parameters of each sub-node to build a global model. Since the samples always remain at the sub-nodes, federated learning can protect user privacy. However, in federated learning, the sub-nodes need to undertake the training of the entire neural network, so it will increase the computational overhead of the sub-nodes.

[0102] In split learning, the neural network is divided into two parts, one part is trained by the sub-nodes and the other part is trained by the central node. For example: Suppose the neural network to be trained has N L layers It can use the N c th layer as the split layer to divide the neural network into two parts. The first part of the neural network can be trained by the sub-nodes and is called the sub-node neural network / model f(·, w u ), and the second part of the neural network can be trained by the central node and is called the central node neural network / model g(·, w c ).

[0103] In this way, the sub-nodes only train some of the parameters of the neural network. Therefore, compared with federated learning, split learning can effectively reduce the computational overhead of the sub-nodes.

[0104] Specifically, in split learning, each sub-node can be used as the current sub-node in turn, and the following steps are executed until the model converges:

[0105] Taking the current child node as child node n as an example, child node n randomly and without replacement extracts a batch of data from its own local training set D n and, wherein, is a sample, is a label. The child node can input into the child node model to obtain features Then, the child node can send the features and the label to the central node. The central node calculates the output through forward propagation according to the features and calculates the loss value and the parameter gradient of the parameter w c related to the preset loss function L(p, y): and the feature gradient related to the features:

[0106] The central node can use the parameter gradient to perform backpropagation to update its own parameters and send the feature gradient g z to child node n. After receiving the feature gradient g z , the child node calculates the parameter gradient related to its own parameters and uses the parameter gradient to perform backpropagation to update its own parameters.

[0107] After that, child node n repeats the above process until the local training set D of child node n n is traversed once. Then, child node n can send its own parameters to another child node k. At this time, child node k is the current child node, and the above steps are iteratively executed.

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

[0109] 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, other child nodes are in an idle waiting state, resulting in low training efficiency and underutilization of computing resources.

[0110] 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. Therefore, a large amount of computing resources and transmission resources are required.

[0111] To solve the above problems, federated learning and split learning can be combined to derive a new way of training a neural network: federated split learning. During the process of training a neural network using federated split learning, the child nodes and the central node need to repeat the following steps until the network model of the neural network converges:

[0112] Each child node parallelly uses local data to perform forward propagation to calculate features and feedback them to the central node. The central node can use the features to perform forward propagation to calculate the gradients corresponding to the features of the samples of each child node, and perform backpropagation to update its own neural network parameters. Then, the central node can send the sample gradients to the corresponding child nodes, and the child nodes can perform backpropagation to update their own neural network parameters and send them to the central node, so that the central node can perform an aggregation operation on the updated neural network parameters of each child node and feedback them to each child node.

[0113] It can be seen from this that in federated split learning, the child nodes not only need to repeatedly traverse all samples, and the samples in each traversal process are exactly the same, resulting in poor robustness of the network model of the trained neural network.

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

[0115] It can be seen from the above method that after each time the child node sends the labels and features of at least one sample to the central node, it can process at least one sample according to the indication information of the central node. During the model training process, the samples in the child node are constantly changing instead of remaining unchanged, thereby effectively improving the robustness and generalization ability of the network model of the trained neural network.

[0116] The sample processing method provided by the embodiment of the present application can be applied to a distributed training system, and this distributed training system can be applied to services facing non-wireless communication, such as image recognition, natural language processing, etc.; it can also be applied to services facing wireless communication, such as beam selection based on environmental information, etc. The embodiment of the present application does not make any limitations in this regard.

[0117] Figure 3The system architecture diagram of a distributed training system provided by an embodiment of the present application may include a central node and multiple sub-nodes. The sub-nodes may include, but are not limited to, terminal devices such as OTT devices; the central node may include, but is not limited to, network devices. In the embodiment of the present application, the sub-nodes and the central node are not limited. The following takes the sub-node as the terminal device and the central node as the network device as an example for illustration.

[0118] The central node refers to an entity on the network side for transmitting or receiving signals, such as a base station. The sub-node refers to an entity on the user side for receiving or transmitting signals, such as a UE. Exemplarily, as Figure 3 shown, the network device 301 is the central node in the distributed training system, and the terminal devices 302 to 306 are multiple sub-nodes in the distributed training system.

[0119] In the embodiment of the present application, an AI processing module may be deployed in the network device and the terminal device. A network model of a neural network may be deployed in the AI processing module, and operations related to AI such as constructing a training data set and training the network model may be performed.

[0120] The terminal device involved in the embodiments of this application can be a user equipment (UE), access terminal, terminal unit, user station, terminal station, mobile station, mobile device, remote station, remote terminal, user terminal (TE), mobile equipment, wireless communication device, terminal agent, tablet computer (pad), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, vehicle-mounted transceiver unit, wearable device, or terminal device. The access terminal can be a cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, drone, robot, intelligent point of sale (POS) machine, customer-premises equipment (CPE) or wearable device, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc.

[0121] Alternatively, the terminal device can be a terminal with communication function in the internet of things (IOT), such as a terminal in vehicle-to-everything (V2X) (e.g., vehicle networking device), a terminal in device-to-device (D2D) communication, or a terminal in machine-to-machine (M2M) communication, etc. The terminal device can be mobile or fixed.

[0122] The embodiments of the present application do not limit the form of the terminal device. The device for implementing the functions of the terminal device may be the terminal device; or it may be a device capable of supporting the terminal device to implement such functions, such as a chip system. This device may be installed in the terminal device or used in matching with the terminal device. In the embodiments of the present application, the chip system may be composed of chips or may include chips and other discrete devices.

[0123] The embodiments of the present application do not limit the number of terminal devices, which may include more or fewer terminal devices than those in Figure 3 the present application.

[0124] The network device involved in the present application may be a device for communicating with the terminal device. For example, it may include evolved base stations (nodeB or eNB or evolutional 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 eNB and a micro eNB in a heterogeneous network scenario. Or, it may include a next generation node B (gNB) in an NR system. Or, 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 BBU pool, or a wireless fidelity (WiFi) access point (AP), etc. Or, it may include a base station in a non-terrestrial network (NTN), that is, it may be deployed on a flying platform or a satellite. In the NTN, the network device may act as a layer 1 (L1) relay, or may act as a base station, or may act as an integrated access and backhaul (IAB) node.

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

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

[0127] In the embodiments of the present application, the form of the network device is not limited. The device for implementing the functions of the network device may be the network device; it may also be a device capable of supporting the network device to implement the functions, such as a chip system. The device may be installed in the network device or used in matching with the network device.

[0128] In the embodiments of the present application, the child node may send data to the central node, such as: the features and labels of at least one sample in the child node, the model parameters after updating the model parameters of its own network model, the feedback amount for indicating the status information of the child node, etc. The central node may also send data to the child node, such as: the indication information reflecting the fitness between the sample and the network model, the gradient corresponding to the features of the sample, the aggregated model parameters, etc.

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

[0130] In the embodiments of the present application, the child node may send the labels and features of at least one sample to the central node. After receiving the sample information of at least one sample sent by the child node, the central node may generate the indication information of the sample 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 of at least one sample sent by the central node, the child node may process the sample based on the indication information of each sample.

[0131] It should be noted that Figure 3 is an exemplary drawing,Figure 3 The number of the terminal devices shown Figure 3 The naming of the interfaces between the devices is not restricted. And except Figure 3 the network elements shown Figure 3 the distributed training system shown may further include other devices, such as access network devices, etc., without restriction.

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

[0133] Further, the sample processing device 400 may further include a memory 404. Among them, the processor 401, the memory 404, and the communication interface 402 may be connected through the communication line 403.

[0134] Among them, 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 of a network model (such as a DNN network model), without restriction.

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

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

[0137] A memory 404 for storing instructions. Among them, the instructions can be computer programs.

[0138] Among them, the memory 404 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, can also be a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, and can also be 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 discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, etc., without limitation.

[0139] It should be noted that the memory 404 can exist independently of the processor 401 or can be integrated with the processor 401. The memory 404 can be used to store instructions, program codes, samples, etc. The memory 404 can be located inside the sample processing device 400 or outside the sample processing device 400, without limitation. The processor 401 is used to execute the instructions stored in the memory 404 to implement the sample processing method applied to the distributed training system provided in the following embodiments of the present application.

[0140] In one example, the processor 401 can include one or more CPUs, such as Figure 4 CPU0 and CPU1 in

[0141] As an alternative implementation, the sample processing device 400 includes multiple processors. For example, in addition to Figure 4 the processor 401 in

[0142] As an alternative implementation, the sample processing device 400 also includes an output device 405 and an input device 406. Exemplarily, the input device 406 is a device such as a keyboard, a mouse, a microphone, or a joystick, and the output device 405 is a device such as a display screen or a speaker.

[0143] It should be noted that the sample processing device 400 can be a desktop computer, a laptop computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system, or a device with a Figure 4 similar structure in Figure 4The compositional structures shown do not constitute limitations on access network devices, core network devices, and terminal devices. Except Figure 4 for the components shown, access network devices, core network devices, and terminal devices may include more or fewer components than those shown, or combine certain components, or have different component arrangements.

[0144] In the embodiments of the present application, the chip system may be composed of chips, or may include chips and other discrete devices.

[0145] In addition, actions, terms, etc. involved among the embodiments of the present application can be referred to each other without limitation. The information names or parameter names in the information exchanged between at least one device in the embodiments of the present application are only examples, and other names can also be used in specific implementations without limitation. The execution entity of the embodiments of the present application can be an access network device, or a device in the access network device, such as a chip, etc. It can also be a core network device, or a device in the core network device, such as a chip, etc. It can also be a terminal device, or a device in the terminal device, such as a chip, etc.

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

[0147] S500, the central node sends the model information of the first network model to at least one child node.

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

[0149] The above model information can at least include model configuration information and model training information.

[0150] The model configuration information may include, but is not limited to, the model type, model structure, and model parameters of the network model. The model type may be a DNN, CNN, RNN, Transformer model, etc.; the model structure may include the number of hidden layers included in the network model, the number of neurons included in each layer or some layers, and the activation function, etc.

[0151] The model training information may include, but is not limited to, the optimizer, regularization penalty term, initial learning rate, gradient update batch size, and one or more data augmentation methods used when optimizing the network model. 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 an L2 penalty term, etc.

[0152] The model configuration information and model training information sent by the central node to at least one child node may be sent in text form or in the form of a code script that compiles the corresponding network model. The embodiments of the present application do not limit this.

[0153] In addition, the model parameters in the model configuration information may be generated by the central node through a certain strategy, such as randomly generated, pre-trained generated, or obtained from other third-party devices, etc. The embodiments of the present application do not limit this.

[0154] The number of layers of the first network model may 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 layers, the number of layers of the first network model may be 10 layers, and the number of layers of the second network model may be 90 layers; the number of layers of the first network model may 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 layers, the number of layers of the first network model may be 10 layers, and the number of layers of the second network model may be 10 layers. The embodiments of the present application do not limit this.

[0155] The preset segmentation method may be to segment the number of 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 layers, the central node can divide the network model into a first network model with 10 layers and a second network model with 90 layers.

[0156] The preset splitting method can also be to split the number of layers of the network model according to a preset number of layers. For example, assuming that the preset number of layers is 5 layers and the total number of layers of the network model is 20 layers, the central node can divide the network model into a first network model including 5 layers and a second network model including 15 layers. The embodiments of the present application do not limit this.

[0157] In specific implementation, assume that the user intends to train with the service data of service A as a sample to obtain a network model that can map the internal mode structure of the service data of service A. The user can trigger a model training operation for service A, and the user's terminal device can, in response to the model training operation, determine a network model B corresponding to the service data of service A. Then, the terminal device can generate a training instruction for training the network model B and send it to the central node.

[0158] 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 that the preset ratio is 1:9 and the number of layers of the network model B is 100 layers, the central node can divide the network model into a first network model including layers 1 to 10 and a second network model including layers 11 to 100 according to the preset ratio. Among them, the first network model is trained by the sub-node, and the second network model is trained by the central node. After the division, the central node can send the model configuration information and model training information of the first network model to at least one sub-node within its service range.

[0159] It should be understood that S500 is an optional step. The first network model can be pre-configured in the sub-node or configured in the sub-node by using the S500 process. In the case where the first network model is pre-configured in the sub-node, S500 can be not executed.

[0160] S501, the sub-node n sends the sample information of at least one sample to the central node.

[0161] The sub-node n can include multiple samples and the labels of each sample. At least one sample is used to train the first network model.

[0162] The sample information of each sample includes the label and features of the sample. Among them, the features of each sample are obtained after inputting the sample into the first network model.

[0163] After receiving the model information of the first network model, the sub-node n can use the model information of the first network model to initialize the local model to obtain the first network model, then determine the labels and features of at least one sample of the first network model, and send the labels and features of at least one sample to the central node.

[0164] After receiving the model information, for each sample, child node n can input the sample into the first network model and perform forward propagation calculation to obtain the feature of the sample. 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.

[0165] Exemplarily, assume that there are 5 samples in child node n, 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 sequentially input x1, x2, x3, x4, and x5 into the first network model and perform forward propagation calculation 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. After that, 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.

[0166] S502, the central node receives the sample information of at least one sample from child node n.

[0167] S503, for each sample, the central node generates indication information of the sample based on the sample information of the sample.

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

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

[0170] The sample index is used to reflect the importance of the sample. The importance of the sample refers to the importance of the sample in the process of training the network model. The importance of the sample is positively correlated with the contribution degree of the sample in the process of training the network model. That is, the more important the sample is, the greater the contribution degree of the sample in the process of training the network model.

[0171] The sample metrics of each sample may include at least one of the sample loss value of the sample, the sample confidence, and the degree of influence of the sample on the model parameters of the first network model. Among them, the sample loss value is positively correlated with the importance of the sample. The larger the sample loss value, the more important the sample. In the case where 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. In the case where 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 degree of influence of the sample on the model parameters of the first network model, the more important the sample.

[0172] The following will separately introduce the process by which the central node determines the sample loss value, the sample confidence, and the degree of influence of the sample on the model parameters of the first network model.

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

[0174] In the process of determining the sample loss value of the sample, the central node may input the features of the sample into the second network model, perform forward propagation calculation to obtain an output value, and then input the label of the sample and the output value into a pre-determined loss function to obtain the sample loss value of the sample.

[0175] Exemplarily, assume that the sample is x1, the label of x1 is y1, the feature is z1, the second network model in the central node is g(·, w c ), and the pre-determined loss function is |g(·, w c ) - y|. The central node may input the feature z1 into the network model g(·, w c ), perform forward propagation calculation to obtain an output value P, that is, P = g(z1, w c ), and then input the label y1 and the output value P into the loss function |g(·, w c ) - y| to obtain the sample loss value L of the sample x1.

[0176] (2) Determine the sample confidence of the sample

[0177] In the process of determining the sample confidence of the 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 the pre-set confidence algorithm corresponding to the model type.

[0178] The model type of the network model may include but is not limited to a classification model and a regression model, and the embodiments of the present application do not limit this.

[0179] The following will use the example where the model types of the network model include a classification model and a regression model to illustrate how the central node determines the sample confidence of a sample.

[0180] 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 an output value, then input the output value into the softmax function, and take the maximum value in the output values of the softmax function as the sample confidence of the sample.

[0181] Exemplarily, assume 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 ) to perform forward propagation calculation to obtain an output value P, that is, P = g(z1, w c ), then input the output value P into the softmax function to get softmax(p) = [p1, p2, p3], and the central node can take the maximum value among p1, p2, and p3 as the sample confidence of the sample x1.

[0182] When the network model is a regression model, for each sample, the central node can input the features of the sample into its own network model, perform forward propagation calculation to obtain an output value, and then determine the sample confidence of the sample according to the output value, the label of the sample, and the following formula (1).

[0183] e = |p - y| / |y| (Formula 1)

[0184] Where p represents the output value, y represents the label of the sample, and e represents the sample confidence of the sample.

[0185] Exemplarily, assume 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 ) to perform forward propagation calculation to obtain an output value P, that is, P = g(z1, w c ), and then obtain the sample confidence of the sample according to P, y, and the above formula (1).

[0186] (3) Determine the influence degree of the sample on the model parameters of the first network model

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

[0188] Exemplarily, assume that the sample is x1, the sample loss value of this sample is L(p, y), and the model parameters of the network model of the central node are w c , then the central node can use to determine the influence degree of the sample x1 on the model parameters of the first network model.

[0189] After determining the sample metrics of at least one sample in the above manner, the child node n can generate indication information of the sample according to the sample metrics.

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

[0191] It can be understood that the contribution degree 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 influence degree of the sample in the process of training the first network model, or the adaptation degree 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 make any limitation on this.

[0192] It should be noted that when the number of metrics included in the sample metrics is different, the way for the central node to generate the indication information of the sample will also be different. The following will take the indication information of each sample being used to indicate the contribution degree of the sample in the process of training the network model as an example, and respectively illustrate the way for the central node to generate the indication information of at least one sample when there is one metric or multiple metrics included in the sample metrics.

[0193] A. There is one metric included in the sample metrics.

[0194] After determining the sample metrics of at least one sample, for each sample, the central node can generate the indication information of this sample according to the sample metrics of this sample and a preset metric threshold.

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

[0196] Among them, the first contribution degree is greater than the second contribution degree. For example, the first contribution degree can be 1 and the second contribution degree can be 0. The embodiments of the present application do not limit the first contribution degree and the second contribution degree.

[0197] Exemplarily, assume that the network model is a regression model, and the sub-node n includes two samples, namely sample x1 and sample x2. The sample loss value included in the sample metrics of sample x1 is 15, and the sample loss value included in the sample metrics of sample x2 is 25. The metric threshold corresponding to the sample loss value is 20, the first contribution degree is 1, and the second contribution degree is 0. The central node can set the contribution degree of sample x1 during the training of the network model to 0, set the contribution degree of sample x2 during the training of the network model to 1, generate the indication information of sample x1 according to the contribution degree of sample x1 during the training of the network model, and generate the indication information of sample x2 according to the contribution degree of sample x2 during the training of the network model.

[0198] In some other embodiments, in the case where the network model is a classification model, for each sample, when the sample metrics of the sample include the sample loss value of the sample or the influence degree of the sample on the model parameters of the first network model, the central node can obtain the corresponding metric threshold, and when the sample metrics are greater than or equal to the metric threshold, set the contribution degree of the sample during the training of the network model to the first contribution degree, and when the sample metrics are less than the metric threshold, set the contribution degree of the sample during the training of the network model to the second contribution degree, and generate the indication information including the contribution degree.

[0199] When the sample metrics of the sample include the sample confidence of the sample, the central node can obtain the corresponding metric threshold, and when the sample metrics are greater than or equal to the metric threshold, set the contribution degree of the sample during the training of the network model to the second contribution degree, and when the sample metrics are less than the metric threshold, set the contribution degree of the sample during the training of the network model to the first contribution degree, and generate the indication information including the contribution degree.

[0200] Exemplarily, assume that the network model is a classification model, and the sub-node n includes two samples, namely sample x1 and sample x2. The sample confidence included in the sample metrics of sample x1 is 15, and the sample confidence included in the sample metrics of sample x2 is 25. The metric threshold corresponding to the sample confidence is 20, the first contribution degree is 1, and the second contribution degree is 0. The central node can set the contribution degree of sample x1 during the training of the network model to 1, set the contribution degree of sample x2 during the training of the network model to 0, generate the indication information of sample x1 according to the contribution degree of sample x1 during the training of the network model, and generate the indication information of sample x2 according to the contribution degree of sample x2 during the training of the network model.

[0201] B. Multiple metrics are included in the sample metrics.

[0202] After determining the sample metrics of at least one sample, for each sample, the central node can first select target metrics from the multiple metrics of the sample according to preset screening conditions, and then generate indication information of the sample based on the target metrics and preset metric thresholds.

[0203] The preset screening conditions can include, but are not limited to, determining the metric with the highest preset metric importance as the target metric. The embodiments of the present application do not limit this.

[0204] The preset metric importance can be that the metric importance of the sample loss value is greater than the metric importance of the sample confidence, and the metric importance of the sample confidence is greater than the influence degree of the sample on the model parameters of the first network model; or the metric importance of the sample loss value is less than the metric importance of the sample confidence, and the metric importance of the sample confidence is less than the influence degree of the sample on the model parameters of the first network model. The embodiments of the present application do not limit this.

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

[0206] Exemplarily, assume that the network model is a regression model, and the sample x1 is included in the sub-node n. The sample metrics of the sample x1 include the sample loss value and the sample confidence, the sample loss value is 15, the sample confidence is 25, the first contribution degree is 1, the second contribution degree is 0, and the metric importance of the sample loss value is greater than the metric importance of the sample confidence. The central node can determine the sample loss value of the sample x1 as the target metric, and then obtain the metric threshold corresponding to the target metric. Assume that the metric threshold corresponding to the sample loss value is 20. The central node can set the contribution degree of the sample x1 in the process of training the network model to 0, and generate indication information of the sample x1 according to the contribution degree of the sample x1 in the process of training the network model.

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

[0208] If the target metric 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 may set the contribution degree of the sample in the process of training the network model to the first contribution degree when the sample metric is greater than or equal to the metric threshold, and set the contribution degree of the sample in the process of training the network model to the second contribution degree when the sample metric is less than the metric threshold.

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

[0210] Exemplarily, assume that the network model is a classification model, the child node n includes the sample x1, the sample confidence included in the sample metrics of the 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 degree is 1, the second contribution degree is 0, and the metric importance of the sample confidence is greater than the metric importance of the degree of influence of the sample on the model parameters of the first network model. The central node may determine the sample confidence of the sample x1 as the target metric, and then obtain the metric threshold corresponding to the target metric. Assume that the metric threshold corresponding to the sample confidence is 30, the central node may set the contribution degree of the sample x1 in the process of training the network model to 1, and generate the indication information of the sample x1 according to the contribution degree of the sample x1 in the process of training the network model.

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

[0212] S505. The child node n receives the indication information of at least one sample from the central node.

[0213] S506. The child node n processes the sample based on the indication information of each sample.

[0214] As can be seen from the above, the indication information of each sample can be used to indicate at least one of the contribution degree of the sample in the process of training the network model and the corresponding data processing method of the sample. And in the case where the content of the indication information knowledge of the sample is different, the child node n can perform different processing on the sample. The following will respectively illustrate the process of the child node n processing the sample based on the indication information from the following three aspects.

[0215] 1) The indication information of the sample is used to indicate the contribution degree of the sample in the process of training the network model.

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

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

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

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

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

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

[0222] In the case where the sample is multi-dimensional data, such as red green 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, covering a certain proportion (such as more than 50%) of the elements, Gaussian filtering, symmetry transformation, adding at least one of multi-dimensional noises. The second data processing method may include: cropping along a certain dimension, rotating along a certain direction, translating along a certain direction, covering a certain proportion (such as more than 50%) of the elements, Gaussian filtering, symmetry transformation, adding at most one of multi-dimensional noises.

[0223] In the embodiments of the present application, the first data processing method and the second data processing method may be pre-determined or randomly selected, and there is no limitation thereto.

[0224] For example, assuming that the preset contribution threshold is 50, the first data processing method includes adding one-dimensional noise and covering 70% of the elements, and the first sample is sample x1. The contribution of sample x1 during the training of the network model is 30, that is, the contribution of sample x1 during the training of the network model is less than the contribution threshold. The child node n may delete sample x1, or add one-dimensional noise to sample x1 and cover 70% of the elements of sample x1.

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

[0226] In some embodiments, the above-described contribution threshold may include one threshold or multiple thresholds. For example, the contribution threshold may include a first threshold, a second threshold, and a third threshold. Among them, the first threshold is less than the second threshold, and the second threshold is less than the third threshold.

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

[0228] For example, assume 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 degree of sample x1 during the training of the network model is 30, that is, the contribution degree of sample x1 during the training of 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 sample x1 and mask 70% of the elements of sample x1.

[0229] For example, assume 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 degree of sample x1 during the training of the network model is 10, that is, the contribution degree of sample x1 during the training of the network model is less than the first threshold. The child node n can delete sample x1.

[0230] From the above method, it can be seen that when the contribution degree of the first sample during the training of the network model is less than the contribution degree threshold, the child node can delete the first sample to reduce the number of samples in the child node, achieving the effect of saving the computing resources generated when the child node determines the features of at least one sample and reducing the transmission overhead when the child node sends the features 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 degree of the first sample during the training of the network model, thereby improving the robustness of the first network model trained by at least one sample.

[0231] When the contribution degree of the first sample during the training of the network model is greater than the contribution degree threshold, the child node can use the second data processing method to process the first sample to further improve the contribution degree of the first sample during the training of the network model, making the fitness between the first sample and the first network model higher, thereby effectively improving the robustness of the first network model trained by at least one sample.

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

[0233] In some embodiments, on the basis that the child node contains 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, it can use the data processing method indicated in the indication information to process the second sample.

[0234] It should be noted that the contribution degree of the second sample after data processing using this data processing method to the training of the network model is greater than that of the second sample before data processing of the first sample using this data processing method to the training of the network model.

[0235] The data processing method may include, but is not limited to, data augmentation methods. The embodiments of the present application do not limit the data processing method. 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 data processing methods: covering a certain proportion (more than 50%) of the elements, frequency domain high-pass, low-pass, and band-pass filtering, and adding one-dimensional noise.

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

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

[0238] From the above description, it can be seen that when the indication information of the second sample indicates a data processing method, the child node can use this data processing method to process the second sample, so as to further improve the contribution degree of the first sample to the training of the network model, make the adaptability between the second sample and the first network model higher, and thus effectively improve the robustness of the first network model trained by at least one sample.

[0239] 3) The indication information of the sample is used to indicate the contribution degree of the sample to the training of the network model and the data processing method corresponding to the sample.

[0240] In some embodiments, on the basis that the child node contains a third sample, and the indication information of the third sample is used to indicate the contribution degree of the third sample to the training of 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 degree of the third sample to the training of the network model is less than the contribution degree threshold, the data processing method is used to perform data processing on the third sample. If the contribution degree of the third sample to the training of the network model is greater than the contribution degree threshold, the third sample is not processed.

[0241] The specific implementation method can refer to the content described in 1) and 2) above, and will not be elaborated here.

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

[0243] 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.

[0244] 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.

[0245] 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.

[0246] 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.

[0247] 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.

[0248] For example, when the data processing method for 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 degree of at least one sample during the training of the network model is improved, and further the robustness of the first network model obtained by training with at least one sample is improved. When the data processing method for a certain sample is a data deletion operation, the number of samples in the child node can be reduced, and further the effect of saving the computing resources generated when the child node determines the features of at least one sample and reducing the transmission overhead when the child node sends the features of at least one sample to the central node can be achieved.

[0249] In addition, 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, and further the robustness and generalization ability of the network model of the neural network obtained by training can be effectively improved.

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

[0251] S601, the central node sends the model information of the first network model to at least one child node.

[0252] The specific implementation manner can refer to S500 shown above Figure 5 and will not be elaborated here.

[0253] After receiving the model configuration information and model training information of the network model sent by the central node, each child node can train the network model with its own samples. The following takes the child node n as an example to train the network model with its own samples, and the training processes of the remaining child nodes can refer to the training process of the child node n and will not be elaborated one by one.

[0254] S602, the child node n initializes the local model using the model information to obtain the first network model.

[0255] S603, the child node n determines the sample information of at least one sample.

[0256] S604, the child node n sends the sample information of at least one sample to the central node.

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

[0258] Specifically, for each sample, the central node can input the features of the sample into the second network model, perform forward propagation calculation to obtain an output value, and then input the label of the sample and the output value into a pre-determined loss function to obtain the sample loss value of the sample. After that, 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 features of the sample.

[0259] Exemplarily, assume 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 ), and the pre-determined loss function is |g(·, w c ) - y|. The central node can input the feature z1 into the network model g(·, w c ), perform forward propagation calculation to obtain the output value P, that is, P = g(z1, w c ), and then input the label y1 and the output value P into the loss function |g(·, w c ) - y| to obtain the sample loss value L of the sample x1, that is, L = |g(z1, w c ) - y1|.

[0260] After that, the central node can perform backpropagation, that is, take the derivative of z1 in L = |g(z1, w c ) - y1| to obtain the gradient g z corresponding to the feature z1 of the sample x1, and take the derivative of w c to obtain the gradient corresponding to the parameters of the second network model

[0261] S606. For each sample, the central node determines the sample metric of the sample based on the sample information of the sample.

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

[0263] S608. For each sample, the central node generates the indication information of the sample according to the sample metric of the sample.

[0264] S609. The central node sends the indication information of at least one sample and the gradient corresponding to the features of at least one sample to the child node n.

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

[0266] 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.

[0267] 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.

[0268] 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.

[0269] 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.

[0270] 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.

[0271] 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 The child node n can first aggregate g z1 , g z2 and g z3 to obtain the aggregated gradient g z , and then based on g z take the derivative of the parameters of the first network model to obtain the gradient g w corresponding to the parameters of the first network model, and use the gradient g w to update the model parameters of the first network model.

[0272] S611, the child node n determines whether the preset condition is satisfied; if so, execute step S612; if not, execute step S617;

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

[0274] The number of times of updating the model parameters of the first network model reaches the preset update times;

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

[0276] In the embodiments of the present application, the preset update times may include multiple preset values, such as 10, 15, 20, etc., and the embodiments of the present application do not limit this.

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

[0278] In this way, after the child node updates the model parameters of the first network model, it sends the updated model parameters to the central node only when the preset condition is satisfied, rather than sending 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.

[0279] S612, the child node n sends the updated model parameters to the central node.

[0280] S613, the central node aggregates the model parameters sent by at least one child node to obtain the aggregated model parameters.

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

[0282] Aggregating the model parameters sent by at least one child node can be to determine the mean value of the model parameters sent by the at least one child node, or it can be the mean value after weighted summation of the model parameters sent by the at least one child node. The embodiments of the present application do not limit this.

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

[0284] In some embodiments, after aggregating the model parameters sent by at least one child node, the central node can determine whether the first network model and the second network model converge according to the model parameters after this aggregation and the model parameters obtained from the previous aggregation. Exemplarily, 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, it is considered that the first network model and the second network model converge. 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 change degree threshold, it is considered that the first network model and the second network model do not converge.

[0285] In other embodiments, after aggregating the model parameters sent by at least one child node, the central node can determine whether the first network model and the second network model converge according to the magnitude of the sample loss value. Exemplarily, if the degree of change between the sample loss value this time and the sample loss value of the previous time is less than a preset loss value threshold, it is considered that the first network model and the second network model converge. If the degree of change between the sample loss value this time and the sample loss value of the previous time is greater than or equal to the preset loss value threshold, it is considered that the first network model and the second network model do not converge.

[0286] The specific implementation manners of the above two methods can refer to the related technologies and will not be elaborated here.

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

[0288] S616. Child node n updates the first network model with the aggregated model parameters to obtain the updated first network model.

[0289] S617. Child node n updates the first network model with the updated model parameters to obtain the updated first network model.

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

[0291] For the specific implementation method, reference can be made to the above S506, which will not be elaborated here.

[0292] After the child node n processes the at least one sample, it can determine the sample information of the at least one sample based on the processed samples, and repeat the steps shown starting from the above S603 Figure 6 until the first network model and the second network model converge.

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

[0294] 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 according to the model parameters of the first network model and the model parameters of the second network model, so that the subsequent child nodes can directly use the complete network model to perform forward propagation locally to infer the corresponding results.

[0295] In this way, when the child node needs to infer a certain piece of information or data using the complete network model, the child node can directly confirm through the network model stored in itself, so as to effectively improve the model processing efficiency of the child node.

[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 may also not send the model parameters of the second network model to the child node. When the subsequent child node needs to infer a certain piece of information or data using the complete network model, it can transmit the information or data to the central node. After receiving the information or data, the central node can infer the information or data using the complete network model, obtain the corresponding output result, and send it to the child node. In this way, it can help the child node save computing resources.

[0297] The above takes a single child node n as an example to illustrate the sample processing method provided in the embodiments of the present application. The following takes multiple child nodes as an example to illustrate the sample processing method provided in the embodiments of the present application.

[0298] Figure 7 It is a schematic diagram of the interaction process of another sample processing method provided in the embodiments of the present application. As Figure 7 shown, this method includes:

[0299] 1. At least one child node sends the labels and features of at least one sample contained in itself to the central node through the downlink channel.

[0300] For example, assume the number of child nodes is k, which are M1 - M k , the local dataset of M1 is D1, and M k 's local dataset is D k . Each child node can successively input its own samples into its own network model to obtain the labels and features of at least one sample, and send them to the central node through the downlink channel.

[0301] Specifically, reference can be made to S501, which will not be elaborated here.

[0302] 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 features of the sample.

[0303] Specifically, reference can be made to S503 and S605, which will not be elaborated here.

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

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

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

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

[0308] 7. When the model has not converged, the central node sends the aggregated model parameters to at least one child node.

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

[0310] Specifically, reference can be made to S506, which will not be elaborated here.

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

[0312] After that, each child node can use the updated first network model to determine the labels and features of the processed at least one sample, and send them to the central node to repeat steps 1 to 9 until the model converges.

[0313] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of the interaction between each network element. Correspondingly, the embodiments of the present application also provide a sample processing device, which is used to implement the above various methods. The sample processing device may be a sub-node in the above method embodiments, or a component available for the sub-node; or, the sample processing device may be a central node in the above method embodiments, or a component available for the central node. It can be understood that in order to implement the above functions, the sample processing device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

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

[0315] For example, taking the sample processing device as a sub-node in the above method embodiments as an example, Figure 8 FIG. shows a schematic structural diagram of a sub-node. The sub-node includes a transceiver module 801 and a processing module 802. The transceiver module 801, which can also be referred to as a transceiver unit, is used to implement the transceiver function. For example, it can be a transceiver circuit, a transceiver, a transceiver, or a communication interface.

[0316] Among them, the transceiver module 801 is used to send the 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. It is also used to receive the 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 degree of the sample in the process of training the network model and the data processing method corresponding to the sample.

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

[0318] In the embodiments of the present application, the sub-node is presented in the form of dividing each functional module in an integrated manner. Here, the "module" may refer to a specific ASIC, circuit, processor and memory that execute 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 can think that the sub-node can adopt Figure 4 the form of the sample processing device 400 shown.

[0319] For example, Figure 4 the processor 401 in the sample processing device 400 shown can call the computer-executable instructions stored in the memory 404, so that the sample processing device 400 executes the sample processing method in the above method embodiments.

[0320] Specifically, Figure 8 the functions / implementation processes of the transceiver module 801 and the processing module 802 in Figure 4 can be implemented by the processor 401 in the sample processing device 400 shown calling the computer-executable instructions stored in the memory 404. Or, Figure 8 the function / implementation process of the processing module 802 in Figure 4 can be implemented by the processor 401 in the sample processing device 400 shown calling the computer-executable instructions stored in the memory 404, Figure 8 the function / implementation process of the transceiver module 801 in Figure 4 can be implemented by the communication interface 402 in the sample processing device 400 shown in

[0321] Since the sub-node provided by the embodiments of the present application can execute the above sample processing method, the technical effects it can obtain can refer to the above method embodiments and will not be elaborated here.

[0322] Or, for example, taking the sample processing device as the central node in the above method embodiments as an example, Figure 9 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 can also be referred to as a transceiver unit, is used to implement the transceiver function. For example, it can be a transceiver circuit, a transceiver, a transceiver, or a communication interface.

[0323] Among them, the transceiver module 901 is used to receive the sample information of at least one sample from the sub-node; the sample information of each sample includes the label and features of the sample.

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

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

[0326] 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 cited in the function description of the corresponding functional module, and will not be elaborated here.

[0327] In the embodiment of the present application, the central node is presented in the form of dividing each functional module in an integrated manner. Here, the "module" can refer to a specific ASIC, circuit, processor and memory that execute 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 can think that the terminal device can adopt Figure 4 the form of the sample processing device 400 shown.

[0328] For example, Figure 4 the processor 401 in the sample processing device 400 shown can call the computer execution instructions stored in the memory 404, so that the sample processing device 400 executes the sample processing method in the above method embodiment.

[0329] Specifically, Figure 9 the functions / implementation processes of the transceiver module 901 and the processing module 902 in Figure 4 can be implemented by the processor 401 in the sample processing device 400 shown calling the computer execution instructions stored in the memory 404. Or, Figure 9 the function / implementation process of the processing module 902 in Figure 4 can be implemented by the processor 401 in the sample processing device 400 shown calling the computer execution instructions stored in the memory 404, Figure 9 the function / implementation process of the transceiver module 901 in Figure 4 can be implemented by the communication interface 402 in the sample processing device 400 shown.

[0330] Since the central node provided in the embodiment of the present application can execute the above sample processing method, the technical effects that can be obtained can refer to the above method embodiment, and will not be elaborated here.

[0331] It should be understood that one or more of the above modules or units can be implemented by software, hardware, or a combination of both. When any of the above modules or units is implemented by software, the software exists in the form of computer program instructions and is stored in the memory. The processor can be used to execute the program instructions and implement the above method flow. The processor can be built into the SoC (System on Chip) or ASIC, or it can be an independent semiconductor chip. In addition to the cores in the processor for executing software instructions for arithmetic operations or processing, it can further include necessary hardware accelerators, such as field programmable gate array (FPGA), PLD (Programmable Logic Device), or logic circuits for implementing dedicated logic operations.

[0332] When the above modules or units are implemented by hardware, the hardware can be any one or any combination of CPU, microprocessor, digital signal processing (DSP) chip, micro controller unit (MCU), artificial intelligence processor, ASIC, SoC, FPGA, PLD, dedicated digital circuit, hardware accelerator, or non-integrated discrete devices, which can run the necessary software or execute the above method flow without relying on software.

[0333] Optionally, an embodiment of the present application further provides a sample processing device (for example, the sample processing device can be a chip or a chip system). The sample processing device includes a processor for implementing the method in any of the above method embodiments. In a possible design, the sample processing device further includes a memory. The memory is used to store necessary program instructions and data. 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 can be composed of chips or can include chips and other discrete devices. The embodiments of the present application do not make specific limitations on this.

[0334] In a possible implementation manner, an embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When it runs on the sample processing device, it enables the sample processing device to execute the method described in any of the above method embodiments or any of its implementation manners.

[0335] In a possible implementation manner, an embodiment of the present application further provides a distributed training system. The distributed training system 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.

[0336] 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.

[0337] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. 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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0338] The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state drive (SSD)), etc.

[0339] Although the present application has been described in conjunction with various embodiments herein, however, in the process of implementing the claimed present application, those skilled in the art can understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure content, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0340] Although the present application has been described in connection with specific features and their embodiments, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

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, and a first network model is deployed on each sub - node. The method includes: Sending 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; Receiving indication information for the at least one sample from the central node; the indication information for each sample is used to indicate at least one of the contribution degree of the sample in the process of training the network model and the data processing method corresponding to the sample; Processing the sample based on the indication information of each sample.

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

3. The method according to claim 1, characterized in that, The sub - node contains a second sample; the indication information of the second sample is used to indicate the data processing method corresponding to the second sample; The processing the sample based on the indication information of each sample includes: Performing data processing on the second sample using the data processing method.

4. The method according to claim 1, characterized in that, 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, characterized in that The method further includes: Receiving the gradients corresponding to the features of the at least one sample from the central node; Updating the model parameters of the first network model based on the gradients corresponding to the features of the at least one sample; Sending the updated model parameters to the central node when a preset condition is met.

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

7. The method according to claim 5, wherein The method further includes: When the preset condition is not met, updating the first network model with the updated model parameters to obtain an updated first network model.

8. The method according to claim 5, characterized in that, The method further includes: Receiving the aggregated model parameters from the central node; Updating the first network model with the aggregated model parameters to obtain an updated first network model.

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

10. A sample processing method, characterized in that, Applied to the central node in a distributed training system, the distributed training system includes at least one sub - node and a central node, and a first network model is deployed on each sub - node. The method includes: Receive the sample information of at least one sample from a child node; the sample information of each sample includes the label and features of the sample; For each sample, generate indication information of the 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 degree of the sample in the process of training the network model and the data processing method corresponding to the sample; Send the indication information of the at least one sample to the child node.

11. The method according to claim 10, characterized in that, The generating the indication information of the sample based on the sample information of the sample includes: Based on the sample information of the sample, determine the sample metric of the sample; the sample metric is used to reflect the importance degree of the sample; the importance degree of the sample is positively correlated with the contribution degree of the sample in the process of training the network model; Generate the indication information according to the sample metric.

12. The method according to claim 11, wherein The sample metric includes at least one of the sample loss value of the sample, the sample confidence, and the influence degree of the sample on the model parameters of the first network model.

13. The method according to claim 10, wherein The method further includes: For each sample, determine the gradient corresponding to the features of the sample based on the sample information of the sample; Send the gradient corresponding to the features of the at least one sample to the child node.

14. The method according to claim 10, characterized in that, The method further includes: Receive the updated model parameters from at least one child node; Aggregate the updated model parameters sent by the at least one child node; Send the aggregated model parameters to the at least one child node respectively.

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

16. A sample processing device, characterized in that, The device is located at the child node, and the device includes: A transceiver module, configured to send the 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; The transceiver module is further configured to receive the indication information of 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 degree of the sample in the process of training the network model and the data processing method corresponding to the sample; A processing module, 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 the central node, and the device includes: A transceiver module, configured to receive the sample information of at least one sample from a child node; the sample information of each sample includes the label and features of the sample; A processing module, configured to generate indication information of the sample 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 degree 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 the indication information of the at least one sample to the child node.

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

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

Citation Information

Cited By

  • Language and frequency prior fused few-sample contraband image recognition method

    CN121278639A