Neural network training utilizing loss functions reflecting neighbor token dependencies
Abstract
Systems and methods for neural network training utilizing loss functions reflecting neighbor token dependencies. An example method comprises: receiving a training dataset comprising a plurality of labeled tokens; determining, by a neural network, a first tag associated with a current token processed by the neural network, a second tag associated with a previous token which has been processed by the neural network before processing the current token, and a third tag associated with a next token to be processed by the neural network after processing the current token; computing, for the training dataset, a value of a loss function reflecting a first loss value, a second loss value, and a third loss value, wherein the first loss value is represented by a first difference of the first tag and a first label associated with the current token by the training dataset, wherein the second loss value is represented by a second difference of the second tag and a second label associated with the previous token by the training dataset, and wherein the third loss value is represented by a third difference of the third tag and a third label associated with the next token by the training dataset; and adjusting a parameter of the neural network based on the value of the loss function.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method, comprising:
receiving, by a processing device, a training dataset comprising a sequence of labeled tokens comprising a first token, a second token, and a third token, wherein the second token follows the first token, and the third token follows the second token; determining, by a neural network, a first tag corresponding to the first token, a second tag corresponding to the second token, and a third tag corresponding to the third token; computing a value of a loss function reflecting a first loss value, a second loss value, and a third loss value, wherein the first loss value is represented by a first difference of the first tag and a first label associated with the first token by the training dataset, wherein the second loss value is represented by a second difference of the second tag and a second label associated with the second token by the training dataset, and wherein the third loss value is represented by a third difference of the third tag and a third label associated with the third token by the training dataset; and adjusting a parameter of the neural network based on the value of the loss function.
2 . The method of claim 1 , further comprising:
performing, using the neural network, a natural language processing task.
3 . The method of claim 1 , further comprising:
repeating the determining, computing, and adjusted operations until the value of the loss function falls below a predetermined threshold.
4 . The method of claim 1 , wherein the first token is represented by a natural language word, and wherein the first tag identifies a part of speech associated with the first token.
5 . The method of claim 1 , wherein the first token is represented by a natural language word, and wherein the first tag identifies one or more grammatical attributes associated with the first token.
6 . The method of claim 1 , wherein the value of the loss function is represented by a linear combination of the first loss value, the second loss value, and the third loss value.
7 . The method of claim 1 , wherein adjusting the parameter of the neural network further comprises:
back-propagating an error reflected by the value of the loss function to one or more previous layers of the neural network; and adjusting an edge weight in order to minimize the loss function.
8 . The method of claim 1 , wherein the neural network comprises a feature extraction layer, a bi-directional long-short term memory (BiLSTM) layer, and a prediction layer, and wherein the BiLSTM layer further comprises a BiLSTM, a backward LSTM and a forward LSTM, such that a first output of the backward LSTM and a second output of the forward LSTM is fed to the BiLSTM.
9 . A system, comprising:
a memory; and a processing device coupled to the memory, the processing device configured to:
receive a training dataset comprising a sequence of labeled tokens comprising a first token, a second token, and a third token, wherein the second token follows the first token, and the third token follows the second token;
determine, by a neural network, a first tag corresponding to the first token, a second tag corresponding to the second token, and a third tag corresponding to the third token;
compute a value of a loss function reflecting a first loss value, a second loss value, and a third loss value, wherein the first loss value is represented by a first difference of the first tag and a first label associated with the first token by the training dataset, wherein the second loss value is represented by a second difference of the second tag and a second label associated with the second token by the training dataset, and wherein the third loss value is represented by a third difference of the third tag and a third label associated with the third token by the training dataset; and
adjust a parameter of the neural network based on the value of the loss function.
10 . The system of claim 9 , wherein the processing device is further configured to:
perform, using the neural network, a natural language processing task.
11 . The system of claim 9 , wherein the processing device is further configured to:
repeat the determining, computing, and adjusted operations until the value of the loss function falls below a predetermined threshold.
12 . The system of claim 9 , wherein the first token is represented by a natural language word, and wherein the first tag identifies a part of speech associated with the first token.
13 . The system of claim 9 , wherein the first token is represented by a natural language word, and wherein the first tag identifies one or more grammatical attributes associated with the first token.
14 . The system of claim 9 , wherein the value of the loss function is represented by a linear combination of the first loss value, the second loss value, and the third loss value.
15 . The system of claim 9 , wherein adjusting the parameter of the neural network further comprises:
back-propagating an error reflected by the value of the loss function to one or more previous layers of the neural network; and adjusting an edge weight in order to minimize the loss function.
16 . A computer-readable non-transitory storage medium comprising executable instructions that, when executed by a computer system, cause the computer system to:
receive a training dataset comprising a sequence of labeled tokens comprising a first token, a second token, and a third token, wherein the second token follows the first token, and the third token follows the second token; determine, by a neural network, a first tag corresponding to the first token, a second tag corresponding to the second token, and a third tag corresponding to the third token; compute a value of a loss function reflecting a first loss value, a second loss value, and a third loss value, wherein the first loss value is represented by a first difference of the first tag and a first label associated with the first token by the training dataset, wherein the second loss value is represented by a second difference of the second tag and a second label associated with the second token by the training dataset, and wherein the third loss value is represented by a third difference of the third tag and a third label associated with the third token by the training dataset; and adjust a parameter of the neural network based on the value of the loss function.
17 . The computer-readable non-transitory storage medium of claim 16 , wherein the first token is represented by a natural language word, and wherein the first tag identifies a part of speech associated with the first token.
18 . The computer-readable non-transitory storage medium of claim 16 , wherein the first token is represented by a natural language word, and wherein the first tag identifies one or more grammatical attributes associated with the first token.
19 . The computer-readable non-transitory storage medium of claim 16 , wherein the value of the loss function is represented by a linear combination of the first loss value, the second loss value, and the third loss value.
20 . The computer-readable non-transitory storage medium of claim 16 , wherein adjusting the parameter of the neural network further comprises:
back-propagating an error reflected by the value of the loss function to one or more previous layers of the neural network; and adjusting an edge weight in order to minimize the loss function.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.