# US 2021/0232773 A1 · Unified Vision and Dialogue Transformer with BERT

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

- Number: US 2021/0232773 A1
- Document ID: US20210232773A1
- Status: Published application
- Kind: A1
- Application number: 16/929,738
- Filed: 2020-07-15
- Published: 2021-07-29
- Earliest claimed: 2020-01-23
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Yue WANG; Chu Hong HOI; Shafiq Rayhan JOTY
- Web page: https://patentgrep.com/patent/US20210232773A1

## CPC

- G06F 40/35: Discourse or dialogue representation
- G06F 18/21: Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06N 3/045: Combinations of networks
- G06N 3/0499: Feedforward networks
- G06N 3/08: Learning methods
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06N 3/096: Transfer learning
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A visual dialogue model receives image input and text input that includes a dialogue history between the model and a current utterance by a human user. The model generates a unified contextualized representation using a transformer encoder network, in which the unified contextualized representation includes a token level encoding of the image input and text input. The model generates an encoded visual dialogue input from the unified contextualized representation using visual dialogue encoding layers. The encoded visual dialogue input includes a position level encoding and a segment type encoding. The model generates an answer prediction from the encoded visual dialogue input using a first self-attention mask associated with discriminative settings or a second self-attention mask associated with generative settings. Dense annotation fine tuning may be performed to increase accuracy of the answer prediction. The model provides the answer prediction as a response to the current utterance of the human user.

## Claims

### Claim 1

A method for performing a visual dialogue task by a neural network model, the method comprising:
receiving, at a visual dialogue neural network language model, an image input and text input, wherein the text input comprises a dialogue history between the visual dialogue neural network language model and a human user and a current utterance by the human user;
generating, from the image input and text input and using a transformer encoder network in the visual dialogue neural network language model, a unified contextualized representation, wherein the unified contextualized representation includes a token level encoding of the image input and text input;
generating, from the unified contextualized representation, using a plurality of visual encoding layers in the visual dialogue neural network language model, an encoded visual dialogue input, wherein the encoded visual dialogue input includes a position level encoding and a segment type encoding;
generating, from the encoded visual dialogue input and using a first self-attention mask associated with discriminative settings of the transformer encoder network or a second self-attention mask associated with generative settings of the transformer encoder network, an answer prediction; and
providing the answer prediction as a response to the current utterance of the human user.

### Claim 2 (depends on 1)

The method of claim 1, wherein the unified contextualized representation comprises a concatenation of the image input and the text input that comprises a caption of the image input, a dialogue history of a user-machine interaction and a user question of the current utterance.

### Claim 3 (depends on 1)

The method of claim 1, wherein generating the answer prediction comprises:
masking, at the visual dialogue neural network language model, in a random order, a subset of tokens including special tokens in a text segment of the text input; and
replacing the subset of tokens including the special tokens with a mask token using masked language modeling.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
setting a first subset of generative settings associated with the second self-attention mask to zero values that allows each token in a context sequence to be visible for attending to each other with one or more attention layers in the transformer encoder network.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
setting a second subset of generative settings associated with the second self-attention mask to non-zero values for attending one or more tokens ahead of a subject token in an answer sequence with the one or more attention layers in the transformer encoder network, wherein the second subset is different from the first subset.

### Claim 6 (depends on 1)

The method of claim 1, wherein generating the answer prediction comprises:
generating, by the visual dialogue neural network language model, a prediction indicating a likelihood of whether an appended answer in the text input is correct or not based on the encoded visual dialogue input using a next-sentence prediction (NSP) operation.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
setting each of a plurality of discriminative settings associated with the first self-attention mask to zero values that allows each token to be visible for attending to each other with one or more attention layers in the transformer encoder network.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
utilizing a final hidden vector corresponding to a special token in the unified contextualized representation as a head token in the NSP operation for binary classification of the appended answer to distinguish whether the appended answer is correct or not.

### Claim 9 (depends on 1)

The method of claim 1, wherein generating the answer prediction comprises:
generating, by the transformer encoder network, a plurality of answer candidates; and
providing, by a ranking module of the visual dialogue neural network language model, a plurality of dense annotations that specify a plurality of relevance scores for the plurality of answer candidates.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
combining the plurality of relevance scores for each of the plurality of answer candidates to form a combined set of relevance scores; and
normalizing the combined set of relevance scores into a probability distribution to fine tune the plurality of dense annotations.

### Claim 11 (depends on 9)

The method of claim 9, further comprising:
generating a sampled answer candidate list that comprises the plurality of relevance scores based at least in part on first relevance score candidates with non-zero values having a first priority and second relevance score candidates with zero values having a second priority, wherein the first priority is greater than the second priority.

### Claim 12

A system comprising:
a non-transitory memory; and
one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the system to perform operations comprising:
receiving, at a visual dialogue module neural network language model, an image input and text input, wherein the text input comprises a dialogue history between the visual dialogue module neural network language model and a human user and a current utterance by the human user;
generating, using a plurality of image encoding layers in the visual dialogue module neural network language model, an encoded image input, wherein the encoded image input includes a token level encoding and at least one of a position level encoding or a segment level encoding;
generating, using a plurality of text encoding layers in the visual dialogue module neural network language model, an encoded text input, wherein the encoded text input includes a token level encoding and at least one of a position level encoding or a segment level encoding;
concatenating the encoded image input and the encoded text input in to a single input sequence; and
generating, from the single input sequence and using a pre-trained language model with one or more self-attention mask layers in the visual dialogue module neural network language model, a response to the current utterance of the human user.

### Claim 13 (depends on 12)

The system of claim 12, wherein a segment level encoding layer from the plurality of image encoding layers generates the segment level encoding from the image input, wherein the segment level encoding identifies visual information type of the image input.

### Claim 14 (depends on 12)

The system of claim 12, wherein a position level encoding layer from the plurality of image encoding layers generates the position level encoding, wherein the position level encoding identifies a spatial level ordering of frames in the image input and spatial ordering of spatial regions within each frame.

### Claim 15 (depends on 12)

The system of claim 12, wherein a token level encoding layer from the plurality of text encoding layers generates the token level encoding from the text input, wherein the token level encoding identifies text information type of a token in the text input that indicates that the token is included in a caption, an utterance of the human user in the dialogue history or a language model response.

### Claim 16 (depends on 12)

The system of claim 12, wherein a position level encoding layer from the plurality of text encoding layers generates the position level encoding, wherein the position level encoding identifies a token ordering in the text input.

### Claim 17

A non-transitory, machine-readable medium having stored thereon machine-readable instructions executable to cause a system to perform operations comprising:
receiving, at a visual dialogue neural network language model, an image input and text input, wherein the text input comprises a dialogue history between the visual dialogue neural network language model and a human user and a current utterance by the human user;
generating, from the image input and text input, using a plurality of visual encoding layers in the visual dialogue neural network language model, an encoded visual dialogue input, wherein the encoded visual dialogue input includes a position level encoding and a segment type encoding;
generating, from the encoded visual dialogue input and using a transformer encoder network in the visual dialogue neural network language model, a unified contextualized representation, wherein the unified contextualized representation includes a token level encoding of the encoded visual dialogue input;
generating, from the unified contextualized representation and using a first self-attention mask associated with discriminative settings of the transformer encoder network or a second self-attention mask associated with generative settings of the transformer encoder network, an answer prediction; and
providing the answer prediction as a response to the current utterance of the human user.

### Claim 18 (depends on 17)

The non-transitory, machine-readable medium of claim 17, wherein generating the answer prediction comprises:
masking, at the visual dialogue neural network language model, in a random order, a subset of tokens including special tokens in a text segment of the text input; and
replacing the subset of tokens including the special tokens with a mask token using masked language modeling.

### Claim 19 (depends on 17)

The non-transitory, machine-readable medium of claim 17, further comprising:
setting a first subset of generative settings associated with the second self-attention mask to zero values that allows each token in a context sequence to be visible for attending to each other with one or more attention layers in the transformer encoder network; and
setting a second subset of generative settings associated with the second self-attention mask to non-zero values for attending one or more tokens ahead of a subject token in an answer sequence with the one or more attention layers in the transformer encoder network, wherein the second subset is different from the first subset.

### Claim 20 (depends on 17)

The non-transitory, machine-readable medium of claim 17, wherein generating the answer prediction comprises:
generating, by the visual dialogue neural network language model, a prediction indicating a likelihood of whether an appended answer in the text input is correct or not based on the encoded visual dialogue input using a next-sentence prediction (NSP) operation; and
setting each of a plurality of discriminative settings associated with the first self-attention mask to zero values that allows each token to be visible for attending to each other with one or more attention layers in the transformer encoder network.
