IP Library Granted Patent US 11,580,975
Granted Patent B2
US 11,580,975 · App. 17/014,458 · Granted Feb 14, 2023

Systems and methods for response selection in multi-party conversations with dynamic topic tracking

Inventors: Weishi Wang (Singapore, SG); Shafiq Rayhan Joty (Singapore, SG); Chu Hong Hoi (Singapore, SG)
Assignee: salesforce.com, inc.
G10L15/22G06K9/6264G10L15/02G10L15/063G10L15/16G10L15/1822G10L2015/221
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,580,975
App. No.
17/014,458
Granted
Feb 14, 2023
Kind
B2
Abstract

Embodiments described herein provide a dynamic topic tracking mechanism that tracks how the conversation topics change from one utterance to another and use the tracking information to rank candidate responses. A pre-trained language model may be used for response selection in the multi-party conversations, which consists of two steps: (1) a topic-based pre-training to embed topic information into the language model with self-supervised learning, and (2) a multi-task learning on the pretrained model by jointly training response selection and dynamic topic prediction and disentanglement tasks.

Claims (81)

1. A system for dynamic topic tracking in a multi-party conversation involving interactions between at least two user participants and the system on different topics, the system comprising:

a memory configured to store a language model, a context history of a plurality of prior utterances from multiple user participants relating to multiple topics, and a plurality of candidate responses at a current turn of the multi-party conversation;

a processor configured to:

input, to the language model, each prior utterance from the context history paired with a candidate response from the plurality of candidate responses;

encode, via the language model, pairs of the prior utterances and the candidate response into a plurality of topic vectors;

generate, by a self-attention layer, a plurality of self-attended topic vectors indicative of topic relevance at an utterance level by inputting and letting the plurality of topic vectors attend to each other at the utterance level;

compute a relevance score for the candidate response given the context history based on max-pooling of the plurality of attended topic vectors; and

determine whether to select the candidate response as a response at the current turn of the multi-party conversation base on the relevance score.

2. The system of claim 1 , wherein the processor is further configured to encode, via the language model, pairs of the prior utterances and the candidate response into the plurality of topic vectors by:

generating an input sequence of tokens representing a pair of an utterance and a candidate response;

encoding, via a transformer layer in the language model, the input sequence of tokens into an encoded representation including a first portion representing a start token in the input sequence of tokens and a second portion representing remaining tokens in the input sequence of tokens;

attending over the second portion of the encoded representation based on the first portion as query; and

concatenating the attended second portion of the encoded representation and the first portion to result in a topic vector from the plurality of topic vectors.

3. The system of claim 1 , wherein the processor is further configured to compute the relevance score for the candidate response given the context history based on max-pooling of the plurality of attended topic vectors by:

generating a max-pooling output from the plurality of attended topic vectors;

performing a softmax operation over a linear mapping of the max-pooling output to obtain the relevance score,

wherein the relevance score indicates a relevance level between the respective prior utterance and the candidate response; and

computing a first entropy loss based on the relevance score and a ground truth label.

4. The system of claim 3 , wherein the processor is further configured to:

compute a binary topic classifier based on the plurality of topic vectors, wherein the binary topic classifier indicates whether the respective prior utterance and the candidate response belongs to a same topic; and

compute a second cross entropy loss based on the binary topic classifier.

5. The system of claim 4 , where the processor is further configured to:

compute a reply-to distribution based on the plurality of attended topic vectors, wherein the reply-to distribution indicates a probability that the candidate response replies to the respective prior utterance; and

compute a third cross-entropy loss based on the reply-to distribution.

6. The system of claim 5 , wherein the processor is further configured to:

compute a combined loss as a weighted sum of the first cross-entropy loss, the second cross-entropy loss and the third cross-entropy loss; and

jointly update a response selection module, a topic prediction module and a topic entanglement module based on the combined loss.

7. The system of claim 1 , wherein the language model is pre-trained with a pretraining dataset including a plurality of utterances, each utterance being paired with a respective positive response from the multi-party conversation and a respective negative response from outside the multi-party conversation.

8. The system of claim 7 , wherein the processor is further configured to:

input a first utterance and a second utterance, from the pretraining dataset, in a form of a training sequence to the language model, wherein the training sequence includes a first token that predicts whether the first utterance and the second utterance belong to a same topic;

generate, by embedding, a token representation of the training sequence;

generate, by an encoder layer of the language model, encoded topic vectors of the token representation, wherein the encoded topic vector includes a first encoded topic vector corresponding to the first token and wherein the first encoded topic vector encodes a topic relationship between the first utterance and the second utterance;

determine whether the first utterance and the second utterance are matched in topic using the encoded first token as a contextual embedding; and

update the language model using a determined topic relationship between the first utterance and the second utterance.

9. The system of claim 8 , wherein the processor is further configured to:

mask at least a portion of the pretraining dataset comprising the plurality of utterances, paired positive responses and paired negative responses; and

train the language model using the masked pretraining dataset based on a masked language modeling loss.

10. The system of claim 8 , wherein the token representation includes a first representation corresponding to a start token in the training sequence, and the processor is further configured to:

encode, via a transformer layer in the language model, a topic relationship between the first utterance and the second utterance into the first representation.

11. A method for dynamic topic tracking in a multi-party conversation involving interactions between at least two user participants and the system on different topics, the method comprising:

retrieving, from a memory, a language model, a context history of a plurality of prior utterances from multiple user participants relating to multiple topics, and a plurality of candidate responses at a current turn of the multi-party conversation;

inputting, to the language model, each prior utterance from the context history paired with a candidate response from the plurality of candidate responses;

encoding, via the language model, pairs of the prior utterances and the candidate response into a plurality of topic vectors;

generating, by a self-attention layer, a plurality of self-attended topic vectors indicative of topic relevance at an utterance level by inputting and letting the plurality of topic vectors attend to each other at the utterance level;

computing a relevance score for the candidate response given the context history based on max-pooling of the plurality of attended topic vectors; and

determining whether to select the candidate response as a response at the current turn of the multi-party conversation base on the relevance score.

12. The method of claim 11 , wherein the encoding, via the language model, pairs of the prior utterances and the candidate response into the plurality of topic vectors comprises:

generating an input sequence of tokens representing a pair of an utterance and a candidate response;

encoding, via a transformer layer in the language model, the input sequence of tokens into an encoded representation including a first portion representing a start token in the input sequence of tokens and a second portion representing remaining tokens in the input sequence of tokens;

attending over the second portion of the encoded representation based on the first portion as query; and

concatenating the attended second portion of the encoded representation and the first portion to result in a topic vector from the plurality of topic vectors.

13. The method of claim 11 , wherein the computing the relevance score for the candidate response given the context history based on max-pooling of the plurality of attended topic vectors comprises:

generating a max-pooling output from the plurality of attended topic vectors;

performing a softmax operation over a linear mapping of the max-pooling output to obtain the relevance score,

wherein the relevance score indicates a relevance level between the respective prior utterance and the candidate response; and

computing a first entropy loss based on the relevance score and a ground truth label.

14. The method of claim 13 , further comprising:

computing a binary topic classifier based on the plurality of topic vectors, wherein the binary topic classifier indicates whether the respective prior utterance and the candidate response belongs to a same topic; and

computing a second cross entropy loss based on the binary topic classifier.

15. The method of claim 14 , further comprising:

computing a reply-to distribution based on the plurality of attended topic vectors, wherein the reply-to distribution indicates a probability that the candidate response replies to the respective prior utterance; and

computing a third cross-entropy loss based on the reply-to distribution.

16. The method of claim 15 , further comprising:

computing a combined loss as a weighted sum of the first cross-entropy loss, the second cross-entropy loss and the third cross-entropy loss; and

jointly updating a response selection module, a topic prediction module and a topic entanglement module based on the combined loss.

17. The method of claim 11 , wherein the language model is pre-trained with a pretraining dataset including a plurality of utterances, each utterance being paired with a respective positive response from the multi-party conversation and a respective negative response from outside the multi-party conversation.

18. The method of claim 17 , further comprising:

inputting a first utterance and a second utterance, from the pretraining dataset, in a form of a training sequence to the language model, wherein the training sequence includes a first token that predicts whether the first utterance and the second utterance belong to a same topic;

generating, by embedding, a token representation of the training sequence;

generating, by an encoder layer of the language model, encoded topic vectors of the token representation, wherein the encoded topic vector includes a first encoded topic vector corresponding to the first token and wherein the first encoded topic vector encodes a topic relationship between the first utterance and the second utterance;

determining whether the first utterance and the second utterance are matched in topic using the encoded first token as a contextual embedding; and

updating the language model using a determined topic relationship between the first utterance and the second utterance.

19. The method of claim 18 , wherein the token representation includes a first representation corresponding to a start token in the training sequence, and the method further comprises:

encoding, via a transformer layer in the language model, a topic relationship between the first utterance and the second utterance into the first representation.

20. A processor-readable non-transitory storage medium storing processor-executable instructions for dynamic topic tracking in a multi-party conversation involving interactions between at least two user participants and the system on different topics, the processor-executable instructions being executed by a processor to perform operations including:

retrieving a language model, a context history of a plurality of prior utterances from multiple user participants relating to multiple topics, and a plurality of candidate responses at a current turn of the multi-party conversation;

inputting, to the language model, each prior utterance from the context history paired with a candidate response from the plurality of candidate responses;

encoding, via the language model, pairs of the prior utterances and the candidate response into a plurality of topic vectors;

generating, by a self-attention layer, a plurality of self-attended topic vectors indicative of topic relevance at an utterance level by inputting and letting the plurality of topic vectors attend to each other at the utterance level;

computing a relevance score for the candidate response given the context history based on max-pooling of the plurality of attended topic vectors; and

determining whether to select the candidate response as a response at the current turn of the multi-party conversation base on the relevance score.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0507 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 8, 2020
From: WANG, WEISHI; JOTY, SHAFIQ RAYHAN; HOI, CHU HONG
To: SALESFORCE.COM, INC.
Reel/Frame 053713/0852 →