IP Library Granted Patent US 11,829,721
Granted Patent B2
US 11,829,721 · App. 17/161,214 · Granted Nov 28, 2023

Systems and methods for unsupervised paraphrase generation

Inventors: Tong Niu (Sunnyvale, CA); Semih Yavuz (Redwood City, CA); Yingbo Zhou (Mountain View, CA); Nitish Shirish Keskar (San Francisco, CA); Huan Wang (Palo Alto, CA); Caiming Xiong (Menlo Park, CA)
Assignee: salesforce.com, inc.
G06F40/284G06F18/214G06F18/22G06F40/242G06N7/01
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,829,721
App. No.
17/161,214
Granted
Nov 28, 2023
Kind
B2
Abstract

Embodiments described herein provide dynamic blocking, a decoding algorithm which enables large-scale pretrained language models to generate high-quality paraphrases in an un-supervised setting. Specifically, in order to obtain an alternative surface form, when the language model emits a token that is present in the source sequence, the language model is prevented from generating the next token that is the same as the subsequent source token in the source sequence at the next time step. In this way, the language model is forced to generate a paraphrased sequence of the input source sequence, but with mostly different wording.

Claims (46)

1. A method of generating a paraphrase of an input sentence, the method comprising:

receiving, at a data interface, the input sentence including a sequence of tokens;

encoding, at an encoder of a language model, the sequence of tokens into an encoded vector representation;

building a block dictionary comprising a plurality of block entries, wherein a block entry in the block dictionary maps each token in the input sentence to a respective successor token in the input sentence;

sampling, according to a probability, a subset of block entries from the plurality of block entries in the block dictionary;

generating, at a decoder of the language model, a set of candidate tokens subsequent to a previously emitted token via beam search in an encoded space based on the encoded vector representation;

removing a first candidate token from the set of candidate tokens when the first candidate token equates to a successor token to the previously emitted token, and

selecting, by the decoder of the language model, a second candidate token having a highest likelihood score among remaining candidate tokens in the set of candidate tokens; and

generating an output paraphrase based at least in part on the selected second candidate token in response to the input sentence.

2. The method of claim 1 , wherein the removing the first candidate token occurs at one time step.

3. The method of claim 1 , further comprising:

determining that the previously emitted token belongs to a particular block entry in the sampled subset of block entries, wherein the particular block entry maps the previously emitted token to the successor token.

4. The method of claim 1 , further comprising:

ranking the set of candidate tokens, wherein the first candidate token is ranked highest among the set of candidate tokens.

5. The method of claim 1 , further comprising:

emitting, by the decoder, the selected second candidate token as a token in the output paraphrase at a current time step.

6. The method of claim 1 , wherein the language model is updated by task-adaptive training with training data that has been corrupted by token deletion and random shuffling.

7. The method of claim 6 , wherein the language model is trained, subsequent to the task-adaptive training, with pseudo-labels generated from a task-adapted model after the task-adaptive training.

8. The method of claim 1 , further comprising:

computing a metric corresponding to the output paraphrase as a weighted harmonic mean of a first metric term and one minus a second metric term.

9. The method of claim 8 , wherein the first metric term is computed based on a cosine similarity between each token in the output paraphrase and in a reference sentence.

10. The method of claim 8 , wherein the second metric term is generated as a score between the input sentence and the output paraphrase.

11. A system for generating a paraphrase of an input sentence, the system comprising:

a memory that stores a language model;

a data interface that receives the input sentence including a sequence of tokens;

a processor that reads instructions from the memory to perform:

encoding, at an encoder of the language model, the sequence of tokens into an encoded vector representation;

building a block dictionary comprising a plurality of block entries, wherein a block entry in the block dictionary maps each token in the input sentence to a respective successor token in the input sentence;

sampling, according to a probability, a subset of block entries from the plurality of block entries in the block dictionary;

generating, at a decoder of the language model, a set of candidate tokens subsequent to a previously emitted token via beam search in an encoded space based on the encoded vector representation;

removing a first candidate token from the set of candidate tokens when the first candidate token equates to a successor token to the previously emitted token, and

selecting, by the decoder of the language model, a second candidate token having a highest likelihood score among remaining candidate tokens in the set of candidate tokens; and

generating an output paraphrase based at least in part on the selected second candidate token in response to the input sentence.

12. The system of claim 11 , wherein the removing the first candidate token occurs at one time step.

13. The system of claim 11 , wherein the processor further reads instructions from the memory to perform:

determining that the previously emitted token belongs to a particular block entry in the sampled subset of block entries, wherein the particular block entry maps the previously emitted token to the successor token.

14. The system of claim 11 , wherein the processor further reads instructions from the memory to perform:

ranking the set of candidate tokens, wherein the first candidate token is ranked highest among the set of candidate tokens.

15. The system of claim 11 , wherein the processor further reads instructions from the memory to perform:

emitting, by the decoder, the selected second candidate token as a token in the output paraphrase at a current time step.

16. The system of claim 11 , wherein the language model is updated by task-adaptive training with training data that has been corrupted by token deletion and random shuffling.

17. The system of claim 16 , wherein the language model is trained, subsequent to the task-adaptive training, with pseudo-labels generated from a task-adapted model after the task-adaptive training.

18. The system of claim 11 , wherein the processor further reads instructions from the memory to perform:

computing a metric corresponding to the output paraphrase as a weighted harmonic mean of a first metric term and one minus a second metric term.

19. The system of claim 18 , wherein the first metric term is computed based on a cosine similarity between each token in the output paraphrase and in a reference sentence.

20. The system of claim 18 , wherein the second metric term is generated as a score between the input sentence and the output paraphrase.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0512 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2021
From: NIU, TONG; YAVUZ, SEMIH; ZHOU, YINGBO; KESKAR, NITISH SHIRISH; WANG, HUAN; XIONG, CAIMING
To: SALESFORCE.COM, INC.
Reel/Frame 055356/0754 →
Continuity (2)
Provisional Application 63104988 · Oct 23, 2020
Related Publication 20220129629A1 · Apr 28, 2022
Cited By (2)
US 12,682,619 US 12,711,325