IP Library Granted Patent US 11,481,646
Granted Patent B2
US 11,481,646 · App. 16/759,692 · Granted Oct 25, 2022

Selecting answer spans from electronic documents using neural networks

Inventors: Thomas Mieczyslaw Kwiatkowski (Brooklyn, NY); Ankur P. Parikh (New York, NY); Swabha Swayamdipta (Seattle, WA)
Assignee: Google LLC
G06N5/04G06F40/30G06K9/6215G06N3/0454G06N3/08G06V30/40
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 11,481,646
App. No.
16/759,692
Granted
Oct 25, 2022
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for selecting a text span from an input electronic document that answers an input question. One of the methods includes obtaining a respective first numeric representations of text spans in the input document; for each of the text spans: determining, for a segment that contains the text span, a question-aware segment vector, determining, for the question, a segment-aware question vector, and processing the first numeric representation of the text span, the question-aware segment vector, and the segment-aware question vector using a second feedforward neural network to generate a second numeric representation of the text span; for each unique text span in the plurality of text spans: determining an aggregate representation for the unique text span, and determining, from the aggregate representation, a final score for the unique text span; and selecting a unique text span.

Claims (69)

1. A computer-implemented method of selecting a text span from an input electronic document that answers an input question that includes a plurality of question tokens, the method comprising:

obtaining a respective first numeric representation of each of a plurality of text spans in the input document;

for each of the plurality of text spans:

determining, for a segment that contains the text span in the input document, a question-aware segment vector that is based on a similarity between the question tokens in the question and segment tokens in the segment that contains the text span,

determining, for the question, a segment-aware question vector for the question that is also based on the similarity between the question tokens in the question and segment tokens in the segment that contains the text span, and

processing the first numeric representation of the text span, the question-aware segment vector, and the segment-aware question vector using a second feedforward neural network to generate a second numeric representation of the text span;

for each unique text span in the plurality of text spans:

determining an aggregate representation for the unique text span from the second numeric representations of the text spans that correspond to the unique text span, and

determining, from the aggregate representation, a final score for the unique text span that measures how well the unique text span answers the question; and

selecting a unique text span having a highest final score as an answer to the question.

2. The method of claim 1 , further comprising:

outputting the selected unique text span in a response to the question.

3. The method of claim 2 , wherein the question is received as a voice input, and wherein outputting the unique text span comprises:

outputting a verbal utterance of the text span as part of the response to the question.

4. The method of claim 1 , wherein determining an aggregate representation for the unique text span comprises:

processing the second numeric representations for each of the text spans that correspond to the unique text span using a third feedforward neural network to generate a respective transformed numeric representation for each of the text spans; and

determining the aggregate representation by summing the transformed numeric representations.

5. The method of claim 1 , wherein determining the final score for the unique text span comprises:

processing the aggregate representation of the unique text span using a linear prediction layer to generate the final score.

6. The method of claim 1 , wherein determining the question-aware segment vector for the segment in the input document that contains the text span comprises:

determining a respective attended vector for each segment token that accounts for a similarity of the segment token to the question tokens; and

determining the question-aware segment vector from the attended vectors for the segment tokens.

7. The method of claim 1 , wherein determining the segment-aware question vector for the question comprises:

determining a respective attended vector for each question token that measures a similarity of the question token to the segment tokens; and

determining the segment-aware question vector from the attended vectors for the question tokens.

8. The method of claim 1 , wherein the second numeric representation is an output of a last hidden layer in the second feedforward neural network.

9. The method of claim 1 , wherein obtaining a respective first numeric representation of each of the plurality of text spans in the input document comprises, for each text span:

obtaining an initial representation of the text span that is based on the tokens in the text span;

obtaining an initial representation of the question that is based on the question tokens; and

determining a question-span representation of the text span from the initial representation of the text span and the initial representation of the question.

10. The method of claim 9 , wherein obtaining a respective first numeric representation of each of the plurality of text spans in the input document comprises, for each text span:

obtaining an initial representation of a left context of the text span in the document that is based on the tokens in the left context of the text span;

obtaining an initial representation of a right context of the text span in the document that is based on the tokens in the right context of the text span; and

determining a span-context representation of the text span from the initial representation of the text span and the initial representations of the left context and right context.

11. The method of claim 10 , wherein the first representation is a concatenation of the question-span representation and the span-context representation.

12. The method of claim 9 , wherein the initial representation of the text span is a bag of words embedding of the tokens in the text span.

13. The method of claim 9 , wherein the initial representation of the text span is a concatenation of a bag of words embedding of the tokens in the text span and a question-word feature that indicates whether the text span includes any of the question tokens.

14. 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 for selecting a text span from an input electronic document that answers an input question that includes a plurality of question tokens, the method comprising:

obtaining a respective first numeric representation of each of a plurality of text spans in the input document;

for each of the plurality of text spans:

determining, for a segment that contains the text span in the input document, a question-aware segment vector that is based on a similarity between the question tokens in the question and segment tokens in the segment that contains the text span,

determining, for the question, a segment-aware question vector for the question that is also based on the similarity between the question tokens in the question and segment tokens in the segment that contains the text span, and

processing the first numeric representation of the text span, the question-aware segment vector, and the segment-aware question vector using a second feedforward neural network to generate a second numeric representation of the text span;

for each unique text span in the plurality of text spans:

determining an aggregate representation for the unique text span from the second numeric representations of the text spans that correspond to the unique text span, and

determining, from the aggregate representation, a final score for the unique text span that measures how well the unique text span answers the question; and

selecting a unique text span having a highest final score as an answer to the question.

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

outputting the selected unique text span in a response to the question.

16. The system of claim 15 , wherein the question is received as a voice input, and wherein outputting the unique text span comprises:

outputting a verbal utterance of the text span as part of the response to the question.

17. One or more non-transitory computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations for selecting a text span from an input electronic document that answers an input question that includes a plurality of question tokens, the method comprising:

obtaining a respective first numeric representation of each of a plurality of text spans in the input document;

for each of the plurality of text spans:

determining, for a segment that contains the text span in the input document, a question-aware segment vector that is based on a similarity between the question tokens in the question and segment tokens in the segment that contains the text span,

determining, for the question, a segment-aware question vector for the question that is also based on the similarity between the question tokens in the question and segment tokens in the segment that contains the text span, and

processing the first numeric representation of the text span, the question-aware segment vector, and the segment-aware question vector using a second feedforward neural network to generate a second numeric representation of the text span;

for each unique text span in the plurality of text spans:

determining an aggregate representation for the unique text span from the second numeric representations of the text spans that correspond to the unique text span, and

determining, from the aggregate representation, a final score for the unique text span that measures how well the unique text span answers the question; and

selecting a unique text span having a highest final score as an answer to the question.

18. The system of claim 17 , wherein determining the final score for the unique text span comprises:

processing the aggregate representation of the unique text span using a linear prediction layer to generate the final score.

19. The system of claim 17 , wherein determining the question-aware segment vector for the segment in the input document that contains the text span comprises:

determining a respective attended vector for each segment token that accounts for a similarity of the segment token to the question tokens; and

determining the question-aware segment vector from the attended vectors for the segment tokens.

20. The system of claim 17 , wherein determining an aggregate representation for the unique text span comprises:

processing the second numeric representations for each of the text spans that correspond to the unique text span using a third feedforward neural network to generate a respective transformed numeric representation for each of the text spans; and

determining the aggregate representation by summing the transformed numeric representations.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 13, 2020
From: KWIATKOWSKI, THOMAS MIECZYSLAW; PARIKH, ANKUR P.; SWAYAMDIPTA, SWABHA
To: GOOGLE LLC
Reel/Frame 052647/0711 →
Continuity (2)
Provisional Application 62578347 · Oct 27, 2017
Related Publication 20200265327A1 · Aug 20, 2020
Cited By (1)
US 12,229,523