# US 2021/0081503 A1 · Utilizing a gated self-attention memory network model for predicting a candidate answer match to a query

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0081503 A1
- Document ID: US20210081503A1
- Status: Published application
- Kind: A1
- Application number: 16/569,513
- Filed: 2019-09-12
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Quan Tran; Tuan Manh Lai; Trung Bui
- Web page: https://patentgrep.com/patent/US20210081503A1

## CPC

- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 16/3329: Natural language query formulation
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06F 40/30: Semantic analysis
- G06F 40/44: Statistical methods, e.g. probability models
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 3/096: Transfer learning
- G06N 5/04: Inference or reasoning models
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure relates to systems, methods, and non-transitory computer-readable media that can determine an answer to a query based on matching probabilities for combinations of respective candidate answers. For example, the disclosed systems can utilize a gated-self attention mechanism (GSAM) to interpret inputs that include contextual information, a query, and candidate answers. The disclosed systems can also utilize a memory network in tandem with the GSAM to form a gated self-attention memory network (GSAMN) to refine outputs or predictions over multiple reasoning hops. Further, the disclosed systems can utilize transfer learning of the GSAM/GSAMN from an initial training dataset to a target training dataset.

## Claims

### Claim 1

A non-transitory computer-readable medium storing instructions that, when executed by at least one processor, cause a computing device to:
generate a context vector based on contextual information associated with one or more utterances;
generate input vectors based on combinations of respective candidate answers of a plurality of candidate answers and a query;
for each combination of a respective candidate answer and the query:
generate, based on a gated self-attention mechanism (GSAM) and the context vector, a gated self-attention output vector;
determine, based on the gated self-attention output vector, a matching probability between the query and the respective candidate answer; and
determine, based on the matching probabilities for the combinations of the respective candidate answers and the query, an answer to the query from the plurality of candidate answers.

### Claim 2 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the instructions, when executed by the at least one processor, cause the computing device to generate the gated self-attention output vector based on the GSAM and the context vector by aggregating an input vector and the context vector both weighted by self-attention outputs of the GSAM.

### Claim 3 (depends on 1)

The non-transitory computer-readable medium of claim 1, further comprising instructions that, when executed by the at least one processor, cause the computing device to:
for each combination of a respective candidate answer and the query:
generate, a next cell state of a memory network based on the GSAM, a current context vector state, and a current cell state of the memory network.

### Claim 4 (depends on 3)

The non-transitory computer-readable medium of claim 3, further comprising instructions that, when executed by the at least one processor, cause the computing device to:
for each combination of a respective candidate answer and the query:
generate a next context vector state based on a current gated self-attention output vector state of the GSAM, the current context vector state, and the next cell state of the memory network.

### Claim 5 (depends on 4)

The non-transitory computer-readable medium of claim 4, wherein the instructions, when executed by the at least one processor, cause the computing device to determine the matching probability between the query and the respective candidate answer based on the gated self-attention output vector by determining the matching probability between the query and the respective candidate answer based on the next context vector state.

### Claim 6 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the instructions, when executed by the at least one processor, cause the computing device to generate the input vectors based on the combinations of respective candidate answers of the plurality of candidate answers and the query by:
generating, via a word-vector representation model, a query embedding of the query; and
for each combination of a respective candidate answer and the query:
generating, via the word-vector representation model, a candidate answer embedding of the respective candidate answer; and
concatenating the candidate answer embedding and the query embedding.

### Claim 7 (depends on 1)

The non-transitory computer-readable medium of claim 1, further comprising instructions that, when executed by the at least one processor, cause the computing device to:
for each combination of a respective candidate answer and the query:
generate an initial cell state of a memory network according to a word-vector representation model.

### Claim 8 (depends on 1)

The non-transitory computer-readable medium of claim 1, further comprising instructions that, when executed by the at least one processor, cause the computing device to:
initially train the GSAM using a first question-answer dataset; and
tune the GSAM using a second question-answer dataset, the second question-answer dataset being a target dataset.

### Claim 9 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the instructions, when executed by the at least one processor, cause the computing device to generate the context vector based on contextual information associated with one or more utterances by generating, via a word-vector representation model, an embedding of the contextual information.

### Claim 10

A system comprising:
one or more memory devices comprising:
a gated-self attention mechanism (GSAM);
a memory network;
a query; and
a plurality of candidate answers to the query; and
at least one server configured to cause the system to:
generate a context vector for a plurality of context vector states based on contextual information associated with one or more utterances;
generate input vectors based on combinations of respective candidate answers of the plurality of candidate answers and the query;
for each combination of a respective candidate answer and the query:
generate a next cell state of the memory network based on the GSAM, a current context vector state, and a current cell state of the memory network;
generate a next context vector state based on a current gated self-attention output vector state of the GSAM, the current context vector state, and the next cell state of the memory network; and
determine, based on the next context vector state, a matching probability between the query and the respective candidate answer; and
determine, based on the matching probabilities for the combinations of the respective candidate answers and the query, an answer to the query from the plurality of candidate answers.

### Claim 11 (depends on 10)

The system of claim 10, wherein the at least one server is configured to cause the system to generate the next cell state of the memory network based on the GSAM, the current context vector state, and the current cell state of the memory network by generating a gated-self attention output vector by aggregating an input vector and the context vector both weighted by self-attention outputs of the GSAM.

### Claim 12 (depends on 11)

The system of claim 11, wherein the at least one server is configured to cause the system to generate the next cell state of the memory network based on the GSAM, the current context vector state, and the current cell state of the memory network further by combining a dot product of the gated-self attention output vector and the current cell state of the memory network.

### Claim 13 (depends on 12)

The system of claim 12, wherein the at least one server is configured to cause the system to generate the next context vector state based on the current gated self-attention output vector state of the GSAM, the current context vector state, and the next cell state of the memory network by combining an average value of the next cell state with a dot product of the current gated self-attention output vector state and the current context vector state.

### Claim 14 (depends on 10)

The system of claim 10, wherein the at least one server is configured to cause the system to generate the input vectors based on the combinations of respective candidate answers of the plurality of candidate answers and the query by:
generating, via a word-vector representation model, a query embedding of the query; and
for each combination of a respective candidate answer and the query:
generating, via the word-vector representation model, a candidate answer embedding of the respective candidate answer; and
concatenating the candidate answer embedding and the query embedding.

### Claim 15 (depends on 10)

The system of claim 10, wherein the at least one server is further configured to cause the system to:
initially train the GSAM using a first question-answer dataset; and
tune the GSAM using a second question-answer dataset, the second question-answer dataset being a target dataset.

### Claim 16

A computer-implemented method comprising:
generating a context vector for a plurality of context vector states based on contextual information associated with one or more utterances;
generating input vectors based on combinations of respective candidate answers of a plurality of candidate answers and a query;
for each combination of a respective candidate answer and the query:
generating, based on a gated self-attention mechanism (GSAM) and the context vector, a gated self-attention output vector;
generating, based on the gated self-attention output vector, a next cell state of a memory network;
generating, based on a current gated self-attention output vector state of the GSAM and the next cell state of the memory network, a next context vector state; and
determining, based on the next context vector state, a matching probability between the query and the respective candidate answer; and
determining, based on the matching probabilities for the combinations of the respective candidate answers and the query, an answer to the query from the plurality of candidate answers.

### Claim 17 (depends on 16)

The computer-implemented method of claim 16,
wherein generating the next cell state of the memory network based on the gated self-attention output vector comprises combining a dot product of the gated self-attention output vector and a current cell state of the memory network.

### Claim 18 (depends on 16)

The method of claim 16, wherein generating the next context vector state based on the current gated self-attention output vector state and the next cell state of the memory network comprises combining an average value of the next cell state with a dot product of the current gated self-attention output vector state and a current context vector state.

### Claim 19 (depends on 16)

The method of claim 16, wherein generating the gated self-attention output vector based on the GSAM and the context vector comprises aggregating an input vector and the context vector both weighted by self-attention outputs of the GSAM.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
initially training the GSAM using a first question-answer dataset; and
tuning the GSAM using a second question-answer dataset, the second question-answer dataset being a target dataset.
