Method and apparatus of sampling for backpropagation in training neural network model

The variance-controlled sampling method for backpropagation in neural network training addresses the challenge of scaling neural networks by separately sampling activation and weight gradients and adjusting sampling ratios, resulting in reduced computational costs and accelerated training with maintained convergence trajectory.

WO2025059857A1PCT designated stage expired Publication Date: 2025-03-27ROBERT BOSCH GMBH +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/119712
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

The increasing scale of neural networks leads to significantly higher computational and time costs for training, necessitating a method to reduce computational complexity and accelerate the training process while maintaining effectiveness.

Method used

A variance-controlled sampling method for backpropagation in neural network training, which samples activation gradients and weight gradients separately, adjusting sampling ratios based on activation and weight random variances to minimize randomness variance and maintain convergence trajectory integrity.

Benefits of technology

This approach reduces computational costs and accelerates training by controlling variance, ensuring similar convergence speed and trajectory as original SGD, thus addressing the challenge of scaling neural networks effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023119712_27032025_PF_FP_ABST
    Figure CN2023119712_27032025_PF_FP_ABST
Patent Text Reader

Abstract

A computer implemented method for back-propagation in training of a neural network model having multiple layers, comprising: inputting, a batch of training data into the neural network model; calculating, a loss function based on the output of the batch of training data; calculating, gradients of trainable parameters of the neural network model based on the calculated loss function, at least by calculating an activation gradient and a weight gradient for each layer of the neural network model, and wherein for each layer of the neural network model: sampling, the training data based on a first ratio, for calculating the activation gradient, wherein the first ratio is adjusted based on an activation random variance; and / or sampling, the training data based on a second ratio, for calculating the weight gradient, wherein the second ratio is adjusted based on a weight random variance; and updating, the trainable parameters of the neural network model by the calculated gradients. Several other aspects are also disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS OF SAMPLING FOR BACKPROPAGATION IN TRAINING NEURAL NETWORK MODELFIELD

[0001] Aspects of the present disclosure relate generally to artificial intelligence, and more particularly, to method and apparatus provided for sampling for back-propagation in training of a neural network model.BACKGROUND

[0002] In recent years, neural networks have been developing towards significantly larger scales, resulting in dramatically increased computational and time costs for training. To name a few, with the emergence of Large Language Model (LLM) or various Transformer-based models, the required computational cost increases exponentially. To this respect, how to reduce the computational complexity of neural networks and accelerate their training process while ensuring effectiveness has become a very important issue.

[0003] Numerous efforts have arisen to tackle this challenge. However, the majority of these endeavors are tailored to specific contexts, such as web-crawled data. Such approaches inevitably alter the original convergence trajectory. Modifications to any component of the training process, be it the model or the dataset, may lead to suboptimal behavior.

[0004] Therefore, it is needed a method of training which can reduce the computational cost and accelerate the training process while ensuring effectiveness.SUMMARY

[0005] The following presents a simplified summary of one or more aspects to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.

[0006] Gradient Descent (GD) is one of the most commonly used methods for solving model parameters of machine learning algorithms, i.e. unconstrained optimization problems. When solving the minimum value of the loss function, the gradient descent method can be used to iteratively solve step by step to obtain the minimum loss function and optimal model parameter values.

[0007] To speed up the training and reduce the computational complexity, Stochastic Gradient Descent (SGD) can be used instead of GD, by calculating stochastic gradient rather than full gradient for the backpropagation. However, some structural variance can be  introduced due to the randomness of data selection. As a common literature of SGD training, there is a model ψθ (·) with θ be all trainable parameters, a dataset and a loss function At time t , a batch of size N can be selected and the stochastic gradient is calculated as Meanwhile the full gradient is Then the structural variance Vs is:

[0008] where Var is used to denote the sum of elementwise variance.

[0009] Further, if some sampling method is used to approximately calculate the stochastic gradient, a randomness variance would be introduced in addition to the structural variance. Given a sampling method with sampling distribution ∈ , then gets the sampling stochastic gradient the randomness variance Vr with respect to the sampling distribution is:

[0010] Assuming that sampling is unbiased, which is the sampling stochastic gradient would still be an unbiased estimate of the full gradient gt , and the total variance V can be decoupled into simple addition of Vs and Vr as: V=Vs+Vr              (3)

[0011] The disclosed method herein aims to curtail training expenses while preserving the integrity of the original convergence trajectory. For the reason that except the intrinsic convergence speed of batch gradient descent, the convergence speed of SGD is only negatively correlated with the gradient variance, it is naturally that a smaller Vr is preferred. That is, if it is assured that the randomness variance Vr brought by sampling is far less than the structural variance Vs of SGD, we would get V≈Vs. Under this variance-controlled circumstance, similar gradients for update can be obtained and a similar convergence speed of sampling method with the original SGD can be achieved, resulting in a similar convergence trajectory with the original SGD. Therefore, the issue has collapsed into finding an unbiased sampling method for calculating gradients with as lower variance as possible.

[0012] It is disclosed herein a sampling method for calculating gradients which is characterized by controlled variance. The disclosed method is able to sample activation gradients and weight gradients separately, bolstering the efficiency of backpropagation to achieve training acceleration.

[0013] In an aspect, a computer implemented method of sampling for back-propagation in training of a neural network model having multiple layers is disclosed. The computer implemented method comprises inputting, a batch of training data into the neural network model; calculating, a loss function based on the output of the batch of training data; calculating, gradients of trainable parameters of the neural network model based on the calculated loss function, at least by calculating an activation gradient and a weight gradient for each layer of the neural network model, and wherein for each layer of the neural network model: sampling, the training data based on a first ratio, for calculating the activation gradient, wherein the first ratio is adjusted based on an activation random variance; and / or sampling, the training data based on a second ratio, for calculating the weight gradient, wherein the second ratio is adjusted based on a weight random variance; and updating, the trainable parameters of the neural network model by the calculated gradients.

[0014] In a further aspect, sampling the training data comprises sampling the training data in units of component, feature and / or data.

[0015] In a further aspect, the first ratio is adjusted based on the activation random variance by adjusting up the first ratio based on a ratio of the activation random variance and a batch gradient variance is greater than a first threshold; or adjusting down the first ratio based on the ratio of the activation random variance and the batch gradient variance is less than or equals to the first threshold.

[0016] In a further aspect, the second ratio is adjusted based on the weight random variance by adjusting up the second ratio based on a ratio of the weight random variance and a batch gradient variance is greater than a second threshold, or adjusting down the second ratio based on the ratio of the weight random variance and the batch gradient variance is less than or equals to the second threshold.

[0017] In a further aspect, the first ratio and / or the second ratio are adjusted every certain times of training iterations.

[0018] In a further aspect, the activation random variance, the weight random variance or the batch gradient variance are obtained with a Monte-Carlo method.

[0019] In a further aspect, the batch gradient variance is obtained by running a number of iterations with different batches of training data without sampling for calculating the activation gradient and weight gradient; and obtaining the batch gradient variance with respect to batch gradients corresponding to the number of iterations.

[0020] In a further aspect, the activation random variance is obtained by backward passing multiple times for each of a number of iterations with sampling features for calculating the activation gradient only; calculating, an activation gradient for each backward pass; calculating, an activation random variance with respect to each iteration based on the calculated activation gradients; and averaging the calculated activation random variances for the number of iterations.

[0021] In a further aspect, the weight random variance is obtained by backward passing multiple times for each of a number of iterations; calculating, a weight random variance for each backward pass; and averaging, all the calculated weight random variances for the number of iterations.

[0022] In a further aspect, the first ratio is determined layer-wise and monotone non-decreasing as layers of the neural network model go deeper.

[0023] In a further aspect, the first ratio is determined with a percentage of training data that needed to preserve a certain proportion of a norm of activation gradient for all the layers.

[0024] In a further aspect, the training data for calculating the activation gradient are further sampled proportionally to one of a norm of gradient of each training data; a norm of activation gradient of each training data before the last activation function; a norm of gradient of each training data with respect to parameters before a layer to be sampled; or a norm of an activation gradient of each training data of an output of the layer to be sampled.

[0025] In a further aspect, the second ratio is determined for all the layers of the neural network model.

[0026] In a further aspect, the second ratio is determined with respect to all the trainable parameters of the neural network model respectively.

[0027] In a further aspect, the training data are sampled unbiased.

[0028] In a further aspect, the training data are sampled with a Bernoulli distribution.

[0029] In a further aspect, the neural network model is a transformer-based model.

[0030] In a further aspect, wherein the neural network model is Bidirectional Encoder Representations from Transformers (BERT) , and wherein inputting, a batch of training data into the neural network model further comprising inputting a sequence of sentences with each composed of several words to the BERT.

[0031] In a further aspect, wherein the training data are sampled in units of sentence for calculating the activation gradient; and / or wherein the training data are sampled in units of token for calculating the weight gradient.

[0032] In a further aspect, the BERT is pre-trained for one or more of downstream task as: Vocabulary Representation Learning, Text Classification, Named Entity Recognition, Relation Extraction, Question Answering system, or Text generation.

[0033] In a further aspect, the method further comprises receiving input data by the trained BERT; and outputting a corresponding result through the trained BERT for the downstream task.

[0034] In an aspect, a computer system is disclosed, the computer system comprises one or more processors; and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the one or more methods herein.

[0035] In an aspect, one or more computer readable storage medium storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the one or more methods herein is disclosed.

[0036] In an aspect, one computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of the one or more methods herein is disclosedBRIEF DESCRIPTION OF THE DRAWINGS

[0037] The disclosed aspects will be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.

[0038] Fig. 1 illustrates an exemplary neural network model 100 having multiple layers, in accordance with various aspects of the present disclosure.

[0039] Fig. 2 illustrates an exemplary block diagram 200 for variance-controlled adaptive sampling for backpropagation, in accordance with various aspects of the present disclosure.

[0040] Fig. 3 illustrates an exemplary flow chart 300 for variance controlled adaptive sampling for backpropagation, in accordance with various aspects of the present disclosure.

[0041] Fig. 4 illustrates an exemplary flow chart 400 for using a trained neural network model for a downstream task, in accordance with various aspects of the present disclosure.

[0042] Fig. 5 illustrates an exemplary computer system 500, in accordance with various aspects of the present disclosure.DETAILED DESCRIPTION

[0043] The present disclosure will now be discussed with reference to several example implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.

[0044] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to examples and embodiments are for illustrative purposes, and are not intended to limit the scope of the disclosure. It is noted that “based on” used in the disclosure should be understood as “based at least on” , rather than “solely based on” or “merely based on” .

[0045] It is anticipated that applying the disclosed method might involve the use of user-related data. It should be noted that the use of user-related data requires user authorization and may not exceed the scope of users’ authorization.

[0046] Fig. 1 illustrates an exemplary neural network model 100 having multiple layers, in accordance with various aspects of the present disclosure.

[0047] As shown in Fig. 1, a neural network model may comprise multiple layers, wherein the first layer would be an input layer L1 and the last layer LN would be an output layer, and wherein one or more intermediate layers, hidden layers or blocks each consists of multiple layers exist between the input layer and the output layer, which are represented by Ln in Fig. 1. Generally, layers of the neural network model contain a linear part and an activation function which introduce nonlinear factors to the output.

[0048] As known to a skilled one in the art, the learning process of the neural network model usually consists of a forward pass and a backward pass. In the forward pass, input information I is fed to the input layer L1 and processed layer by layer and transmitted to the output layer LN. If the expected output value cannot be achieved at the output layer LN, a loss function f is constructed based on the output value O and the ground-truth value, which is then transformed into the backward pass that also known as backpropagation. The partial derivatives of the loss function on the trainable parameters are calculated layer by layer, forming the gradient of the loss function on the trainable parameters  as the basis for updating the trainable parameters. The learning of the neural network model is completed when the difference between the output value and the actual value reaches an expected value. The forward pass is shown in solid lines and the backward pass is shown in dash lines in Fig. 1.

[0049] Fig. 1 is shown as an example merely, and other implementations are possible.

[0050] Along with the development of neural networks towards significantly larger scales, dramatically increased computational and time costs for training has become an issue, among which the gradients calculation plays an important role. In order to reduce the computational complexity, especially for gradients calculation, some current methods focus on approximate the forward pass, like using results of former epochs as an estimate or even Naive Bayesian. These methods may inevitably change the convergence trajectory. Therefore, in the disclosed method herein the forward pass is kept exact in order to keep the integrity of the original convergence curve since it’s indirect in gradient calculation.

[0051] For backward pass which is directly linked with gradients, it is disclosed herein to be applied with a sampling method to save the computation efforts. When using backpropagation to calculate gradient, the calculation falls into two parts: activation gradients and weight gradients due to the chain rule, corresponding to the intermediate nodes and the leaf nodes of the computation graph, or in other words, gradients corresponding to the activation function part and weight part of layers of the neural network model. It is disclosed herein that the activation gradients and the weight gradients can be dealt with separately with respective sample ratios.

[0052] Moreover, similar with the decoupling of structural variance Vs and random variance Vr, Vr can further decouple into activation random variance Vact and weight random variance Vw which are introduced by sampling for calculating activation gradients and weight gradients respectively, giving total variance V=Vs+Vact+Vw. As mentioned above, the convergence speed of SGD is only negatively correlated with the gradient variance, thus, it is desirable that the activation random variance Vact and weight random variance Vw resulted by sampling for activation gradients and weight gradients would not exceed a certain threshold. It is disclosed herein that sample ratios for activation gradients and weight gradients can be adjusted according to the activation random variance Vact and weight random variance Vw.

[0053] Further, although lower sample ratios will bring more acceleration, the convergence will be affected more. Besides, as training proceeds the gradients tend to be sparser in various dimensions, posing the necessity of adapting sample ratios according to different training phases. It is disclosed herein that sample ratios for activation gradients and weight gradients can be adjusted according to training phases. More details of the proposed sampling method for backpropagation would be described below with embodiments.

[0054] Fig. 2 illustrates an exemplary block diagram 200 for variance-controlled adaptive sampling for backpropagation, in accordance with various aspects of the present disclosure. In Fig. 2, block 201 may represent a Forward Pass module; block 202 may represent a Loss Calculation module; block 203 may represent a Backward Pass module, in which sub-block 203-1 may represent an Activation Sampling module, and sub-block 203-2 may represent a Weight Sampling module; block 204 may represent a Parameter Update module; and block 205 may represent a Sample Ratio Determination module, in which sub-block 205-1 may represent an Activation Sample Ratio Determination module, and sub-block 205-2 may represent a Weight Sample Ratio Determination module. It is noted that although all the blocks are described to be performed, it is merely for the purpose of illustrating, some blocks may be omitted in various embodiments.

[0055] In some examples, the blocks 201-205 may be implemented in hardware, which may include a processor and memory coupled with the processor configured to perform one or more of the functions described herein (e.g., by executing, by the processor, instructions stored in the memory) . In some examples, the blocks 201-205 may be implemented in single hardware, in other examples, the blocks 201-205 or various combinations or components thereof may be implemented in discrete hardware not physically located together.

[0056] Additionally or alternatively, in some examples, the blocks 201-205 may be implemented in code executed by a processor. If implemented in code executed by a processor, the functions of the blocks 201-205, or various combinations or components  thereof may be performed by a general-purpose processor, a dedicated-purpose processor, a central processing unit (CPU) , a graphic processing unit (GPU) , or any combination of these or other programmable logic devices.

[0057] The block 201, the Forward Pass module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0058] In an embodiment, the block 201 receives training data, converts the training data into suitable format for learning a neural network model having multiple layers, forward passes the converted training data layer by layer, and obtains output value (s) corresponding to the training data.

[0059] In an example, the neural network model may be a convolutional neural network (CNN) , and the training data may be images, audios, sentences, or other types of suitable data.

[0060] In an example, the neural network model may be a transformer-based model, and the training data may be images or sentences, or other suitable types of sequential data.

[0061] In an example, the neural network model may be Bidirectional Encoder Representations from Transformers (BERT) , and the training data may be sentences, or other suitable types of sequential data. Specifically, a sequence of sentences can be input to BERT, with each sentence comprising multiple words. The sequence of sentences may be converted into a sequence of tokens, wherein each word corresponding to one token, and wherein each sentence is separated by a special token [SEP] . Then the sequence of tokens may be encoded into input embeddings for subsequent forward pass, after which output embeddings would be obtained. For example, let X, Z and W be the input, output and weight of shape, having dimension of (N×L) ×C , (N×L) ×D and D×C respectively, wherein N, L, C and D refer to dimension of sentence, token, input feature and output feature. Therefore, in the forward pass performed in block 201, for linear part of each layer, it will calculate  and Z passed through an activation function will be input to next layer.

[0062] The block 202, the Loss Calculation module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0063] In an embodiment, the block 202 receives the output value (s) corresponding to the training data from the block 201, calculates a loss reflecting the difference between the output value (s) and expected value (s) .

[0064] In an example, the expected value may be a ground-truth label, such as in supervised learning or semi-supervised learning.

[0065] In an example, the expected value may be a value inferred based on features or contexts or temporal relations of training data itself, such as in unsupervised learning or semi-supervised learning.

[0066] The block 203, the Backward Pass module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0067] In an embodiment, the block 203 receives the calculated loss from the block 202, and backward passes the partial derivatives of the calculated loss with respect to the trainable parameters layer by layer for gradient calculation, and calculates gradient with respect to the trainable parameters.

[0068] As mentioned above, when using backpropagation to calculate gradient, the calculation falls into two parts: activation gradients and weight gradients due to the chain rule, corresponding to the activation function part and weight part of layers of the neural network model. Still taking BERT as an example, in the backward pass, it will calculate activation gradient as and weight gradient for one layer.

[0069] In an embodiment, the sub-block 203-1, the Activation Sampling module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0070] In an example, the sub-block 203-1 samples the training data based on a first ratio for calculating the activation gradient, in order to reduce computational complexity and accelerate the training process. The first ratio instructs a percentage of the training data should be kept for calculating the activation gradient.

[0071] In an aspect, the first ratio used by the sub-block 203-1 is received from the block 205, the Sampling Ratio Determination Block.

[0072] In some cases, sampling could be performed to different dimensions of training data, such as N, L, C and D in BERT mentioned above. To make a further step, since different components or features of training data may be not independent under many scenarios, and the estimated activation gradient based on sampling will affect later computation so the variance introduced will further accumulate as backpropagation going. Sampling in data dimension rather than other dimensions such as components or features would be more applicable in such cases since it behaves just the same as dropping some data to calculate the gradients.

[0073] In an aspect, the training data may be sampled in units of features, for example, sampled in embedding dimensions in BERT, other transformer-based models, etc., or sampled in RGB features in CNN, etc.

[0074] In another aspect, the training data may be sampled in units of component of data, for example, sampled in word or token dimension in BERT, etc., or sampled in pixel in CNN, etc.

[0075] In still another aspect, the training data may be sampled in units of data, for example, sampled in sentence dimension in BERT, etc., or sampled in image in CNN, etc.

[0076] In other aspects, one or more of the above three aspects can be combined.

[0077] Then, it is known that not all samples are created equal, sampling data with more importance would gain better learning performance. Gradient could be an appropriate indicator for data importance due to its nature of reflecting the direction in which the  function changes the fastest. Additionally, for the purpose of controlling randomness variance of the disclosed method, it has been proved that the optimal solution with lowest variance of importance sampling in data dimension is proportional to the gradient norm of each data.

[0078] In an aspect, a training data may be sampled proportionally to a norm of gradient of the training data.

[0079] In another aspect, a training data may be sampled proportionally to a norm of activation gradient of the training data before the last activation function.

[0080] In still another aspect, a training data may be sampled proportionally to a norm of gradient of the training data with respect to parameters before the layer to be sampled.

[0081] In yet another aspect, a training data may be sampled proportionally to a norm of an activation gradient of the training data of an output of the layer to be sampled.

[0082] In an aspect, the training data may be sampled unbiased.

[0083] In a further aspect, the training data may be sampled with a Bernoulli distribution, which is merely an example, and other suitable distributions for unbiased sampling can be applied.

[0084] In an embodiment, the sub-block 203-2, the Weight Sampling module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0085] In an example, the sub-block 203-2 samples the training data based on a second ratio for calculating the weight gradient, in order to reduce computational complexity and accelerate the training process. The second ratio instructs a percentage of the training data should be kept for calculating the weight gradient.

[0086] In an aspect, the second ratio used by the sub-block 203-1 is received from the block 205, the Sampling Ratio Determination Block.

[0087] Similar to description of the sampling for activation gradient, sampling could also be performed to different dimensions of training data for weight gradient. Using BERT as example, for calculating weight gradient for a layer, there are three dimensions of matrix multiplication: input feature dimension C, output dimension D and sentence multiplying token dimension NL. Sampling in all dimensions is possible.

[0088] In an aspect, the training data may be sampled in units of features, for example, sampled in embedding dimensions in BERT, other transformer-based models, etc., or sampled in RGB features in CNN, etc.

[0089] In another aspect, the training data may be sampled in units of component of data, for example, sampled in word or token dimension in BERT, etc., or sampled in pixel in CNN, etc.

[0090] In another aspect, the training data may be sampled in units of data, for example, sampled in sentence dimension in BERT, etc., or sampled in image in CNN, etc.

[0091] In an aspect, more than one dimensions can be sampled at the same time, since for the purpose of controlling randomness variance of the disclosed method, a thorough sampling in more dimensions may have lower variance.

[0092] In other aspect, only one dimension may be sampled, since how to split sample ratio among different dimensions varying with different matrices may be an issue and is computation consuming to get a solution.

[0093] In a further aspect, for BERT, the training data may be sampled only in units of token, because sampling in sentence multiplying token dimension NL can utilize the inherent sparsity of sentences and words.

[0094] In an aspect, the training data may be sampled unbiased.

[0095] In a further aspect, the training data may be sampled with a Bernoulli distribution, which is merely an example, and other suitable distributions for unbiased sampling can be applied.

[0096] In an aspect, the training data may be sampled proportionally to a norm of a most informative gradient.

[0097] In a further aspect, the training data may be sampled with the method of leverage score sampling.

[0098] In an example, the operations described with the sub-blocks 203-1 and 203-2 may be separately performed, resulting in one of activation gradient sampling or weight gradient sampling is applied. In another example, the operations described with the sub-blocks 203-1 and 203-2 may be jointly performed, resulting in both of activation gradient sampling or weight gradient sampling are applied.

[0099] The block 204, the Parameter Update module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0100] In an example, the block 204 receives the calculated gradient with respect to the trainable parameters, and update the trainable parameters by the calculated gradient.

[0101] In an example, the block 204 sends the updated parameters to the block 201 and block 203 in order to perform next iteration with another batch of training data.

[0102] The block 205, the Sample Ratio Determination module, may support variance-controlled adaptive sampling for backpropagation in accordance with embodiments as disclosed herein.

[0103] In an embodiment, the block 205 sends the determined sample ratios to the block 203, such that the block 203 can perform the sampling.

[0104] In another embodiment, the block 205 receives the empirical data of backward pass or calculations based on the empirical data from the block 203, the block 205 can determine the sample ratios based on the empirical data or their calculations.

[0105] As discussion in preceding part herein, lower sample ratios would bring more acceleration, yet the convergence will be affected more. Also, it is desirable that the  activation random variance Vact and weight random variance Vw resulted by sampling for activation gradients and weight gradients would not exceed a certain threshold. Besides, as training proceeds the gradients tend to be sparser in several dimensions, posing the necessity of adapting sample ratios according to different training phases.

[0106] In the disclosure herein, the randomness variance introduced by sampling can be used as an indicator for sampling ratio adjustment. Utilizing threshold ratios far less than 1 as constraints for Vact and Vw respectively, to make sure randomness variance no more than that much of structural variance, then the convergence trajectory will hardly change. What’s more, the sample ratios can be adjusted automatically with it since with the same variance, a more radical sampling scheme can be tolerated when gradients are sparser.

[0107] In an example, the sub-block 205-1 determines the first ratio for sampling the training data for calculating the activation gradient based on a ratio of the activation random variance Vact and a structural variance Vs, which can be also called a batch gradient variance since compared with a full gradient, it is calculated with a batch of training data instead of a full set.

[0108] In an aspect, the sub-block 205-1 determines to adjust up the first ratio based on the ratio of the activation random variance Vact and the batch gradient variance Vs is larger than a first threshold, and determined to adjust down the first ratio based on the ratio of the activation random variance Vact and the batch gradient variance Vs is less than or equals to the first threshold. For example, the first threshold may be set as 0.01.

[0109] In an aspect, the activation random variance Vact and the batch gradient variance Vs may be obtained with a Monte-Carlo method.

[0110] In a further aspect, to calculate the batch gradient variance Vs, multiple iterations may be run with no sampling for either activation gradients or weight gradients, also called exact iteration. A batch gradient gs can be calculated with empirical data from one exact iteration, and a batch gradient variance Vs can be calculated with the batch gradients from multiple exact iterations. For example, the iterations may be performed by blocks 201-204, and the empirical data from iterations may be sent from block 203 to block 205, or the calculated gs and Vs may be sent from block 203 to block 205.

[0111] In a further aspect, to calculate the activation random variance Vact, multiple iterations may be run, and for each iteration run another multiple backward pass iteration with different seeds and sampling for activation gradients only. An activation gradient gact can be calculated with empirical data from one backward pass iteration, and an activation gradient variance for one backward pass iteration can be calculated with activation gradients from the multiple backward pass iterations, then an average of the calculated activation gradient variances for multiple iterations can be obtained as the Vact. For example, the iterations may be performed by blocks 201-204, and the  empirical data from iterations may be sent from block 203 to block 205, or the calculated gact and Vact may be sent from block 203 to block 205.

[0112] In a further aspect, the multiple iterations for obtaining the batch gradient variance Vs and the activation random variance Vact may be nested together for execution to reduce computational complexity. For example, multiple exact iterations can be run, and for each exact iteration, another multiple backward pass with different seeds and sampling for activation gradients only can be run. Other combinations are possible.

[0113] Additionally, layers closer to the output layer of the neural network model are more sensitive and the norm of activation gradients appear to be more and more sparse as backpropagation proceeds, it is expected to gradually remove data with low gradient norm. Noticing that data sampled will not participate in the calculation of shallower layer.

[0114] In an aspect, the first ratio used for sampling training data may be determined layer-wise and monotone non-decreasing as layers go deeper.

[0115] Moreover, it is expected to keep a certain percentage of activation gradient norm for all layers, denoted by S. The first ratio of each layer can be determined with how much percentage of data is needed to achieve S out of the total gradient norm.

[0116] In an aspect, the first ratio may be determined with a percentage of training data that needed to preserve a certain proportion of a norm of activation gradient for all the layers.

[0117] In a further aspect, the proportion of a norm of activation gradient for all the layers is adjusted up based on the ratio of the activation random variance Vact and the batch gradient variance Vs is larger than a first threshold, and the proportion of a norm of activation gradient for all the layers is adjusted down based on the ratio of the activation random variance Vact and the batch gradient variance Vs is less than or equals the first threshold. For example, the first threshold may be set to 0.01. For example, the proportion of a norm of activation gradient for all the layers may be adjusted with a step 0.05.

[0118] In an example, the sub-block 205-2 determines the second ratio for sampling the training data for calculating the weight gradient based on a ratio of the weight random variance Vw and a structural variance Vs, which can be also called a batch gradient variance since compared with a full gradient, it is calculated with a batch of training data instead of a full set.

[0119] In an aspect, the sub-block 205-2 determines to adjust up the second ratio based on the ratio of the weight random variance Vw and the batch gradient variance Vs is larger than a second threshold, and determined to adjust down the second ratio based on the ratio of the weight random variance Vw and the batch gradient variance Vs is less than or equals to the second threshold. For example, the second threshold may be set as 0.01.

[0120] In an aspect, the weight random variance Vw and the batch gradient variance Vs may be obtained with a Monte-Carlo method.

[0121] In a further aspect, to calculate the batch gradient variance Vs, multiple iterations may be run with no sampling for either activation gradients or weight gradients, also called exact iteration. A batch gradient gs can be calculated with empirical data from one exact iteration, and a batch gradient variance Vs can be calculated with the batch gradients from multiple exact iterations. For example, the multiple exact iterations may be performed by blocks 201-204, and the empirical data from multiple exact iterations may be sent from block 203 to block 205, or the calculated gs and Vs may be sent from block 203 to block 205.

[0122] In a further aspect, to calculate the weight random variance Vw, multiple iterations may be run, and the weight random variance can be theoretically calculated in each iteration, then take the average of the multiple iterations as the weight random variance Vw. For example, the weight random variance for a iteration can be calculated as s.t.  when taking sampling in token dimension NL of BERT as example. Other implementations are possible. For example, the iterations may be performed by blocks 201-204, and the empirical data from iterations may be sent from block 203 to block 205, or the calculated Vw may be sent from block 203 to block 205.

[0123] In a further aspect, the multiple iterations for obtaining the activation random variance Vact described above and the weight random variance Vw may be nested together for execution to reduce computational complexity. For example, multiple iterations can be run, and for each iteration, another multiple backward pass with different seeds and sampling for activation gradients only can be run, and the weight random variance can be calculated in each activation sampling iteration. In still a further aspect, the multiple iterations for obtaining the batch gradient variance Vs and the activation random variance Vact may further be nested together for execution as described above. Other combinations are possible.

[0124] In an aspect, the second ratio used for sampling training data is determined for all layers, due to the sensitivity of parameters are not the same.

[0125] Additionally, it may be hard to get the optimal weight sample ratios satisfying the second threshold for the vague relations between different layers in sampling. Yet, with a little bit scaling, it moves on to a sufficient condition that needs the inequality hold for all trainable parameters. Thus, the second ratio can be determined parameter-wise.

[0126] In an aspect, the second ratio is determined with respect to all the trainable parameters of the neural network model respectively.

[0127] In an example, the operations described with the sub-blocks 205-1 and 205-2 may be separately performed. In another example, the operations described with the sub-blocks 205-1 and 205-2 may be jointly performed.

[0128] In an example, the operations described with the sub-blocks 205-1 and 205-2 may be performed every certain times of training iterations, as progress needed to obtain variances will introduce some overhead since it needs extra iterations. Yet, as weights are changing gradually during training, the variances needed and distribution of gradient norm are slow-changing too. Thus the sampling ratio determination doesn’ t need to be performed in every training iteration.

[0129] Fig. 2 is shown as an example merely, and other implementations are possible.

[0130] Fig. 3 illustrates an exemplary flow chart 300 for variance controlled adaptive sampling for backpropagation, in accordance with various aspects of the present disclosure. As described below, some or all illustrated features may be omitted in an implementation within the scope of the present disclosure, and some illustrated features may not be required for implementation of all embodiments. Further, some of the blocks may be performed parallel or in a different order. In some examples, the method may be carried out by any suitable apparatus or means for carrying out the functions or algorithm described below.

[0131] The method begins at block 301, with inputting, a batch of training data into the neural network model, wherein the neural network model comprises multiple layers.

[0132] In an embodiment, the batch of training data are input and forward pass through all the layers of the neural network model.

[0133] In an embodiment, the neural network model may a CNN, a transformer-based model, and / or the alike.

[0134] In an embodiment, the neural network model may be a BERT, and the batch of training data may be a sequence of sentences with each composed of several words.

[0135] In an embodiment, the operation of block 301 may be performed by block 201 in Fig. 2.

[0136] The method then proceeds to block 302, with calculating, a loss function based on the output of the batch of training data.

[0137] In an embodiment, the operation of block 302 may be performed by block 202 in Fig. 2.

[0138] The method then proceeds to block 303, with calculating, gradients of trainable parameters of the neural network model based on the calculated loss function, at least by calculating an activation gradient and a weight gradient for each layer of the neural network model.

[0139] In an embodiment, the operation of block 303 may be performed by block 203 in Fig. 2.

[0140] Additionally, in sub-block 303-1, for each layer of the neural network model, sampling the training data based on a first ratio for calculating the activation gradient, wherein the first ratio is adjusted based on an activation random variance.

[0141] In an embodiment, the training data may be sampled in units of component, feature and / or data. As an example, the training data may be sampled in units of features, such as sampled in embedding dimensions in BERT, other transformer-based models, etc., or sampled in RGB features in CNN, etc. As another example, the training data may be sampled in units of component of data, for example, sampled in word or token dimension in BERT, etc., or sampled in pixel in CNN, etc. As yet another example, the training data may be sampled in units of data, for example, sampled in sentence dimension in BERT, etc., or sampled in image in CNN, etc.

[0142] In an embodiment, a training data may be sampled proportionally to a norm of gradient of the training data. In another embodiment, a training data may be sampled proportionally to a norm of activation gradient of the training data before the last activation function. In still another embodiment, a training data may be sampled proportionally to a norm of gradient of the training data with respect to parameters before the layer to be sampled. In yet another embodiment, a training data may be sampled proportionally to a norm of an activation gradient of the training data of an output of the layer to be sampled.

[0143] In an embodiment, the training data may be sampled unbiased. In a further embodiment, the training data may be sampled with a Bernoulli distribution, which is merely an example, and other suitable distributions for unbiased sampling can be applied.

[0144] In an embodiment, the operation of sub-block 303-1 may be performed by sub-block 203-1 in Fig. 2.

[0145] Additionally, in sub-block 303-2, for each layer of the neural network model, sampling the training data based on a second ratio for calculating the weight gradient, wherein the second ratio is adjusted based on a weight random variance.

[0146] In an embodiment, the training data may be sampled in units of component, feature and / or data. As an example, the training data may be sampled in units of features, such as sampled in embedding dimensions in BERT, other transformer-based models, etc., or sampled in RGB features in CNN, etc. As another example, the training data may be sampled in units of component of data, for example, sampled in word or token dimension in BERT, etc., or sampled in pixel in CNN, etc. As yet another example, the training data may be sampled in units of data, for example, sampled in sentence dimension in BERT, etc., or sampled in image in CNN, etc.

[0147] In a further embodiment, more than one dimensions can be sampled at the same time.

[0148] Additionally or alternatively, only one dimension may be sampled. In a further embodiment, for BERT, the training data may be sampled only in units of token, in sentence multiplying token dimension.

[0149] In an embodiment, the training data may be sampled unbiased.

[0150] In a further embodiment, the training data may be sampled with a Bernoulli distribution, which is merely an example, and other suitable distributions for unbiased sampling can be applied.

[0151] In an embodiment, the training data may be sampled proportionally to a norm of a most informative gradient.

[0152] In a further embodiment, the training data may be sampled with the method of leverage score sampling.

[0153] In an embodiment, the operation of sub-block 303-2 may be performed by sub-block 203-2 in Fig. 2.

[0154] In an embodiment, the methods described with the sub-blocks 303-1 and 303-2 may be separately performed, or the methods described with the sub-blocks 203-1 and 203-2 may be jointly performed.

[0155] The method then proceeds to block 304, with updating, the trainable parameters of the neural network model by the calculated gradients.

[0156] In an embodiment, the operation of block 304 may be performed by block 204 in Fig. 2.

[0157] In an embodiment, the operations of block 301-304 may be performed iteratively until reach a convergence or expect output values.

[0158] Additionally, before the method proceeds to block 303, it comes to block 305, with adjusting the first ratio for sampling for activation gradient and / or the second ratio for sampling for weight gradient.

[0159] Additionally, in sub-block 305-1, the first ratio is adjusted based on the activation random variance by adjusting up the first ratio based on a ratio of the activation random variance and a batch gradient variance is greater than a first threshold; or adjusting down the first ratio based on the ratio of the activation random variance and the batch gradient variance is less than or equals to the first threshold. For example, the first threshold may be set as 0.01.

[0160] In an embodiment, the activation random variance and / or the batch gradient variance may be obtained with a Monte-Carlo method.

[0161] In an embodiment, the batch gradient variance may be obtained by running a number of iterations with different batches of training data without sampling for calculating the activation gradient and weight gradient and obtaining the batch gradient variance with respect to batch gradients corresponding to the number of iterations.

[0162] In an embodiment, the activation random variance may be obtained by backward passing multiple times for each of a number of iterations with sampling features for calculating the activation gradient only; calculating, an activation gradient for each backward pass; calculating, an activation random variance with respect to each iteration based on the calculated activation gradients; and averaging the calculated activation random variances for the number of iterations.

[0163] In an example, the multiple iterations for obtaining the batch gradient variance and the activation random variance may be nested together, that is, multiple exact iterations can be run, and for each exact iteration, another multiple backward pass with different seeds and sampling for activation gradients only can be run.

[0164] In an embodiment, the first ratio used for sampling training data may be determined layer-wise and monotone non-decreasing as layers go deeper.

[0165] In an embodiment, the first ratio may be determined with a percentage of training data that needed to preserve a certain proportion of a norm of activation gradient for all the layers.

[0166] In a further embodiment, the proportion of a norm of activation gradient for all the layers may be adjusted up based on the ratio of the activation random variance and the batch gradient variance is larger than a first threshold, and the proportion of a norm of activation gradient for all the layers is adjusted down based on the ratio of the activation random variance and the batch gradient variance is less than or equals the first threshold.

[0167] In an embodiment, the operation of sub-block 305-1 may be performed by sub-block 205-1 in Fig. 2.

[0168] Additionally, in sub-block 305-1, the second ratio may be adjusted based on the weight random variance by adjusting up the second ratio based on a ratio of the weight random variance and a batch gradient variance is greater than a second threshold, or adjusting down the second ratio based on the ratio of the weight random variance and the batch gradient variance is less than or equals to the second threshold. For example, the second threshold may be set as 0.01.

[0169] In an embodiment, the weight random variance and the batch gradient variance may be obtained with a Monte-Carlo method.

[0170] In an embodiment, the batch gradient variance may be obtained by running a number of iterations with different batches of training data without sampling for calculating the activation gradient and weight gradient and obtaining the batch gradient variance with respect to batch gradients corresponding to the number of iterations.

[0171] In an embodiment, the weight random variance may be obtained by backward passing multiple times for each of a number of iterations; calculating, a weight random variance for each backward pass; and averaging, all the calculated weight random variances for the number of iterations.

[0172] In an example, the weight random variance for a iteration can be calculated as  s.t.  when taking sampling in token dimension NL of BERT as example. Other implementations are possible.

[0173] In an example, the multiple iterations for obtaining the activation random variance described above and the weight random variance may be nested together for execution,  that is multiple iterations can be run, and for each iteration, another multiple backward pass with different seeds and sampling for activation gradients only can be run.

[0174] In a further example, the multiple iterations for obtaining the batch gradient variance and the activation random variance may be nested together for execution as described above.

[0175] In an embodiment, the second ratio may be determined for all the layers of the neural network model.

[0176] In an embodiment, the second ratio may be determined with respect to all the trainable parameters of the neural network model respectively.

[0177] In an embodiment, the operation of sub-block 305-2 may be performed by sub-block 205-2 in Fig. 2.

[0178] In an embodiment, the operations of sub-block 305-1 and 305-2 may be performed every certain times of training iterations.

[0179] In an embodiment, the operations of sub-block 305-1 and 305-2 may be performed separately or jointly.

[0180] Fig. 3 is shown as an example merely, and other implementations are possible.

[0181] Table 1 shows an example implementation with respect to BERT that combines several embodiments described above for block 303-1 in Fig. 3, which is merely an example and other implementations are possible.

[0182] The method illustrated in Table 1 may be performed by block 201, 202, 204 and sub-block 203-1 in Fig. 2 in an embodiment.

[0183] Table 1

[0184] Table 2 shows an example implementation with respect to BERT that combines several embodiments described above for block 303-2, which is merely an example and other implementations are possible.

[0185] The method illustrated in Table 2 may be performed by block 201, 202, 204 and sub-block 203-2 in Fig. 2 in an embodiment.

[0186] Table 2

[0187] Table 3 shows an example implementation that combines several embodiments described above for blocks 305-1 and 305-2, which is merely an example and other implementations are possible.

[0188] The method illustrated in Table 3 may be performed by blocks 201-205 in Fig. 2 in an embodiment.

[0189] Table 3

[0190] Fig. 4 illustrates an exemplary flow chart 400 for using a trained neural network model for a downstream task, in accordance with various aspects of the present disclosure. As described below, some or all illustrated features may be omitted in an implementation within the scope of the present disclosure, and some illustrated features may not be required for implementation of all embodiments. Further, some of the blocks may be performed parallel or in a different order. In some examples, the method may be carried out by any suitable apparatus or means for carrying out the functions or algorithm described below.

[0191] The method begins at block 401, with receiving input data by the trained neural network.

[0192] In an embodiment, the trained neural network is BERT, and it is pretrained for one or more downstream tasks as Vocabulary Representation Learning, Text Classification, Named Entity Recognition, Relation Extraction, Question Answering system, or Text generation.

[0193] In an embodiment, the input data may be raw texts, words, phrases, sentences, paragraphs or other suitable text formats.

[0194] In an embodiment, the input data may be received remotely via communication links. For example, the BERT may be deployed as a part of the backbone for a search engine, Q&A system, etc.

[0195] The method then proceeds to block 402, with outputting a corresponding result through the trained BERT for the downstream task.

[0196] For example, for the task of Vocabulary Representation Learning, the output may be embeddings for words or phrases, which could be used as input features of other Natural Language Processing tasks. For another example, for the task of Text Classification, the output may be labels for classification. For another example, for the task of Named Entity Recognition, the output may be extracted entities with particular meaning. For another example, for the task of Relation Extraction, the output may be extracted relations between entities. For another example, for the task of Question Answering system, the output may be answers for input questions. For another example, for the task of Text generation, the output may be coherent and semantically reasonable texts generated by the BERT.

[0197] Fig. 5 illustrates an exemplary computer system 500, in accordance with various aspects of the present disclosure. The computer system may comprise at least one processor 510. The computer system may further comprise at least one storage device 520. It should be appreciated that the storage device 520 may store computer-executable instructions that, when executed, cause the processor 510 to perform any operations  according to the embodiments of the present disclosure as described in connection with Figs 1-4.

[0198] The embodiments of the present disclosure may be embodied in one or more computer-readable medium such as non-transitory computer-readable medium. The non-transitory computer-readable medium may store computer-executable instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs 1-4.

[0199] The embodiments of the present disclosure may be embodied in a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs 1-4.

[0200] It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or sequence orders of these operations, and should cover all other equivalents under the same or similar concepts.

[0201] It should also be appreciated that all the modules in the apparatuses described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.

[0202] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims.

Claims

1.A computer implemented method of sampling for back-propagation in training of a neural network model having multiple layers, comprising:inputting, a batch of training data into the neural network model;calculating, a loss function based on the output of the batch of training data;calculating, gradients of trainable parameters of the neural network model based on the calculated loss function, at least by calculating an activation gradient and a weight gradient for each layer of the neural network model, and wherein for each layer of the neural network model:sampling, the training data based on a first ratio, for calculating the activation gradient, wherein the first ratio is adjusted based on an activation random variance; and / orsampling, the training data based on a second ratio, for calculating the weight gradient, wherein the second ratio is adjusted based on a weight random variance; andupdating, the trainable parameters of the neural network model by the calculated gradients.2.The computer implemented method of claim 1, wherein sampling the training data further comprising:sampling the training data in units of component, feature and / or data.3.The computer implemented method of claim 1, wherein the first ratio is adjusted based on the activation random variance by:adjusting up the first ratio based on a ratio of the activation random variance and a batch gradient variance is greater than a first threshold; or adjusting down the first ratio based on the ratio of the activation random variance and the batch gradient variance is less than or equals to the first threshold.4.The computer implemented method of claim 1, wherein the second ratio is adjusted based on the weight random variance by:adjusting up the second ratio based on a ratio of the weight random variance and a batch gradient variance is greater than a second threshold, or adjusting down the second ratio based on the ratio of the weight random variance and the batch gradient variance is less than or equals to the second threshold.5.The computer implemented method of claim 3 or 4, wherein the first ratio and / or the second ratio are adjusted every certain times of training iterations.6.The computer implemented method of claim 3 or 4, wherein the activation random variance, the weight random variance or the batch gradient variance are obtained with a Monte-Carlo method.7.The computer implemented method of claim 3 or 4, wherein the batch gradient variance is obtained by:running a number of iterations with different batches of training data without sampling for calculating the activation gradient and weight gradient;obtaining the batch gradient variance with respect to batch gradients corresponding to the number of iterations.8.The computer implemented method of claim 3, wherein the activation random variance is obtained by:backward passing multiple times for each of a number of iterations with sampling features for calculating the activation gradient only;calculating, an activation gradient for each backward pass;calculating, an activation random variance with respect to each iteration based on the calculated activation gradients;averaging the calculated activation random variances for the number of iterations.9.The computer implemented method of claim 4, wherein the weight random variance is obtained by:backward passing multiple times for each of a number of iterations;calculating, a weight random variance for each backward pass;averaging, all the calculated weight random variances for the number of iterations.10.The computer implemented method of claim 1, wherein the first ratio is determined layer-wise and monotone non-decreasing as layers of the neural network model go deeper.11.The computer implemented method of claim 10, wherein the first ratio is determined with a percentage of training data that needed to preserve a certain proportion of a norm of activation gradient for all the layers.12.The computer implemented method of claim 1, wherein the training data for calculating the activation gradient are further sampled proportionally to one of:a norm of gradient of each training data;a norm of activation gradient of each training data before the last activation function;a norm of gradient of each training data with respect to parameters before a layer to be sampled; ora norm of an activation gradient of each training data of an output of the layer to be sampled.13.The computer implemented method of claim 1, wherein the second ratio is determined for all the layers of the neural network model.14.The computer implemented method of claim 12, wherein the second ratio is determined with respect to all the trainable parameters of the neural network model respectively.15.The computer implemented method of claim 1, wherein the training data are sampled unbiased.16.The computer implemented method of claim 15, wherein the training data are sampled with a Bernoulli distribution.17.The computer implemented method of claim 1, wherein the neural network model is a transformer-based model.18.The computer implemented method of claim 1, wherein the neural network model is Bidirectional Encoder Representations from Transformers (BERT) , andwherein inputting, a batch of training data into the neural network model further comprising inputting a sequence of sentences with each composed of several words to the BERT.19.The computer implemented method of claim 18, wherein the training data are sampled in units of sentence for calculating the activation gradient; and / orwherein the training data are sampled in units of token for calculating the weight gradient.20.The computer implemented method of claim 18, wherein the BERT is pre-trained for one or more of downstream task as: Vocabulary Representation Learning,  Text Classification, Named Entity Recognition, Relation Extraction, Question Answering system, or Text generation.21.The computer implemented method of claim 20, further comprising:receiving input data by the trained BERT; andoutputting a corresponding result through the trained BERT for the downstream task.22.A computer system, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of one of claims 1-21.23.One or more computer readable storage medium storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-21.24.A computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-21.

Citation Information

Patent Citations

  • Method and system for comparing samples trained by neural network

    CN109784477A

  • Processing Data Batches in a Multi-Layer Network

    US20230098994A1

  • Optimally clipped tensors and vectors

    US20230237308A1

  • Neural network based on fixed-point operations

    WO2018140294A1