IP Library Granted Patent US 10,402,719
Granted Patent B1
US 10,402,719 · App. 15/076,426 · Granted Sep 3, 2019

Generating output sequences from input sequences using neural networks

Inventors: Oriol Vinyals (Palo Alto, CA); Navdeep Jaitly (Mountain View, CA)
Assignee: Google LLC
G06N3/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,402,719
App. No.
15/076,426
Granted
Sep 3, 2019
Kind
B1
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for generating output sequences from input sequences. One of the methods includes obtaining an input sequence having a first number of inputs arranged according to an input order; processing each input in the input sequence using an encoder recurrent neural network to generate a respective encoder hidden state for each input in the input sequence; and generating an output sequence having a second number of outputs arranged according to an output order, each output in the output sequence being selected from the inputs in the input sequence, comprising, for each position in the output order: generating a softmax output for the position using the encoder hidden states that is a pointer into the input sequence; and selecting an input from the input sequence as the output at the position using the softmax output.

Claims (89)

1. A method comprising:

obtaining an input sequence having a first number of inputs arranged according to an input order;

processing each input in the input sequence using an encoder recurrent neural network to generate a respective encoder hidden state for each input in the input sequence; and

generating an output sequence having a second number of outputs arranged according to an output order, each output in the output sequence being selected from the inputs in the input sequence, comprising, for each position in the output order and beginning at an initial position in the output order:

generating, using the encoder hidden states, an attention vector for the position in the output order;

generating, using the attention vector, a softmax output for the position in the output order, wherein the softmax output scores each position in the input order;

determining, using the softmax output, a pointer to a particular position in the input order; and

selecting, as the output for the position in the output order, an input from the input sequence that is located at the particular position in the input order identified by the pointer.

2. The method of claim 1 , wherein:

generating the softmax output for the position comprises, for the initial position in the output order:

processing a predetermined initial output using a decoder recurrent neural network to generate an initial decoder hidden state, and

generating, from the initial decoder hidden state and the encoder hidden states for the inputs in the input sequence, the softmax output for the initial position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises, for the initial position in the output order, selecting an input at the highest-scoring position in the input order according to the output scores as the output at the initial position in the output order.

3. The method of claim 2 , wherein processing the predetermined initial output using the decoder recurrent neural network to generate an initial decoder hidden state comprises:

initializing an internal state of the decoder recurrent neural network to the encoder hidden state for the last input in the input sequence; and

processing the predetermined initial output using the decoder recurrent neural network to update the initialized internal state to the initial decoder hidden state.

4. The method of claim 1 , wherein:

generating the softmax output for the position comprises, for each position in the output order after the initial position in the output order:

processing an output at the preceding position in the output order using a decoder recurrent neural network to generate a decoder hidden state for the output at the preceding position, and

generating, from the decoder hidden state for the output at the preceding position and the encoder hidden states for the inputs in the input sequence, the softmax output for the position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises selecting an input at the highest-scoring position in the input order according to the output scores as the output at the position in the output order.

5. The method of claim 1 , wherein generating, using the encoder hidden states, the attention vector for the position in the output order comprises:

generating an attention vector having a dimensionality equal to the first number of inputs in the input sequence.

6. The method of claim 1 , further comprising, for each position in the output order:

determining whether or not the selected output at the position is a designated input;

when the selected output at the position is not the designated input, determining that an output should be generated for a subsequent position in the output order; and

when the selected output at the position is the designated input, determining that the position is the last position in the output order.

7. The method of claim 1 , further comprising:

generating one or more additional output sequences using a beam search technique;

determining a respective sequence score for the output sequence and for each additional output sequence; and

selecting an output sequence having a highest sequence score as a final output sequence for the input sequence.

8. A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to perform operations comprising:

obtaining an input sequence having a first number of inputs arranged according to an input order;

processing each input in the input sequence using an encoder recurrent neural network to generate a respective encoder hidden state for each input in the input sequence; and

generating an output sequence having a second number of outputs arranged according to an output order, each output in the output sequence being selected from the inputs in the input sequence, comprising, for each position in the output order and beginning at an initial position in the output order:

generating, using the encoder hidden states, an attention vector for the position in the output order;

generating, using the attention vector, a softmax output for the position in the output order, wherein the softmax output scores each position in the input order;

determining, using the softmax output, a pointer to a particular position in the input order; and

selecting, as the output for the position in the output order, an input from the input sequence that is located at the particular position in the input order identified by the pointer.

9. The system of claim 8 , wherein:

generating the softmax output for the position comprises, for the initial position in the output order:

processing a predetermined initial output using a decoder recurrent neural network to generate an initial decoder hidden state, and

generating, from the initial decoder hidden state and the encoder hidden states for the inputs in the input sequence, the softmax output for the initial position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises, for the initial position in the output order, selecting an input at the highest-scoring position in the input order according to the output scores as the output at the initial position in the output order.

10. The system of claim 9 , wherein processing the predetermined initial output using the decoder recurrent neural network to generate an initial decoder hidden state comprises:

initializing an internal state of the decoder recurrent neural network to the encoder hidden state for the last input in the input sequence; and

processing the predetermined initial output using the decoder recurrent neural network to update the initialized internal state to the initial decoder hidden state.

11. The system of claim 8 , wherein:

generating the softmax output for the position comprises, for each position in the output order after the initial position in the output order:

processing an output at the preceding position in the output order using a decoder recurrent neural network to generate a decoder hidden state for the output at the preceding position, and

generating, from the decoder hidden state for the output at the preceding position and the encoder hidden states for the inputs in the input sequence, the softmax output for the position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises selecting an input at the highest-scoring position in the input order according to the output scores as the output at the position in the output order.

12. The system of claim 8 , wherein generating, using the encoder hidden states, the attention vector for the position in the output order comprises:

generating an attention vector having a dimensionality equal to the first number of inputs in the input sequence.

13. The system of claim 8 , the operations further comprising, for each position in the output order:

determining whether or not the selected output at the position is a designated input;

when the selected output at the position is not the designated input, determining that an output should be generated for a subsequent position in the output order; and

when the selected output at the position is the designated input, determining that the position is the last position in the output order.

14. The system of claim 8 , the operations further comprising:

generating one or more additional output sequences using a beam search technique;

determining a respective sequence score for the output sequence and for each additional output sequence; and

selecting an output sequence having a highest sequence score as a final output sequence for the input sequence.

15. One or more non-transitory computer storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:

obtaining an input sequence having a first number of inputs arranged according to an input order;

processing each input in the input sequence using an encoder recurrent neural network to generate a respective encoder hidden state for each input in the input sequence; and

generating an output sequence having a second number of outputs arranged according to an output order, each output in the output sequence being selected from the inputs in the input sequence, comprising, for each position in the output order and beginning at an initial position in the output order:

generating, using the encoder hidden states, an attention vector for the position in the output order;

generating, using the attention vector, a softmax output for the position in the output order, wherein the softmax output scores each position in the input order;

determining, using the softmax output, a pointer to a particular position in the input order; and

selecting, as the output for the position in the output order, an input from the input sequence that is located at the particular position in the input order identified by the pointer.

16. The non-transitory computer storage media of claim 15 , wherein:

generating the softmax output for the position comprises, for the initial position in the output order:

processing a predetermined initial output using a decoder recurrent neural network to generate an initial decoder hidden state, and

generating, from the initial decoder hidden state and the encoder hidden states for the inputs in the input sequence, the softmax output for the initial position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises, for the initial position in the output order, selecting an input at the highest-scoring position in the input order according to the output scores as the output at the initial position in the output order.

17. The non-transitory computer storage media of claim 16 , wherein processing the predetermined initial output using the decoder recurrent neural network to generate an initial decoder hidden state comprises:

initializing an internal state of the decoder recurrent neural network to the encoder hidden state for the last input in the input sequence; and

processing the predetermined initial output using the decoder recurrent neural network to update the initialized internal state to the initial decoder hidden state.

18. The non-transitory computer storage media of claim 15 , wherein:

generating the softmax output for the position comprises, for each position in the output order after the initial position in the output order:

processing an output at the preceding position in the output order using a decoder recurrent neural network to generate a decoder hidden state for the output at the preceding position, and

generating, from the decoder hidden state for the output at the preceding position and the encoder hidden states for the inputs in the input sequence, the softmax output for the position in the output order, wherein the softmax output comprises a respective output score for each position in the input order; and

selecting an input from the input sequence as the output for the position in the output order comprises selecting an input at the highest-scoring position in the input order according to the output scores as the output at the position in the output order.

19. The non-transitory computer storage media of claim 15 , wherein generating, using the encoder hidden states, the attention vector for the position in the output order comprises:

generating an attention vector having a dimensionality equal to the first number of inputs in the input sequence.

20. The non-transitory computer storage media of claim 15 , the operations further comprising, for each position in the output order:

determining whether or not the selected output at the position is a designated input;

when the selected output at the position is not the designated input, determining that an output should be generated for a subsequent position in the output order; and

when the selected output at the position is the designated input, determining that the position is the last position in the output order.

Assignments (3)
CHANGE OF NAME Recorded Jul 11, 2019
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 049730/0466 →
CHANGE OF NAME Recorded Oct 20, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044567/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 9, 2016
From: VINYALS, ORIOL; JAITLY, NAVDEEP
To: GOOGLE INC.
Reel/Frame 038511/0038 →