IP Library Granted Patent US 11,734,600
Granted Patent B2
US 11,734,600 · App. 16/376,254 · Granted Aug 22, 2023

Contrastive sequence-to-sequence data selector

Inventors: Wei Wang (Sunnyvale, CA); Bowen Liang (Mountain View, CA); Macduff Hughes (Los Gatos, CA); Taro Watanabe (Mountain View, CA); Tetsuji Nakagawa (Tokyo, JP); Alexander Rudnick (Mountain View, CA)
Assignee: Google LLC
G06N20/00G06N7/01H04L67/10
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,734,600
App. No.
16/376,254
Granted
Aug 22, 2023
Kind
B2
Abstract

A method includes generating a base model by training with a first dataset of data pairs and generating an adapted model by training the base model on a second dataset of data pairs. The method also includes determining a contrastive score for each data pair of a third dataset of data pairs using the base model and the adapted model. The contrastive score is indicative of a probability of quality of the respective data pair. The method also includes training a target model using the data pairs of the third dataset and the contrastive scores.

Claims (70)

1. A method comprising:

generating, by data processing hardware, a base model by training with a first dataset of data pairs;

generating, by the data processing hardware, an adapted model by training the base model on a second dataset of data pairs;

for each respective data pair of a third dataset of data pairs:

determining, by the data processing hardware, a first probability distribution for the respective data pair using the base model;

determining, by the data processing hardware, a second probability distribution for the respective data pair using the adapted model;

determining, by the data processing hardware, a measure of a divergence between the first probability distribution and the second probability distribution; and

determining, by the data processing hardware, a respective contrastive score for the respective data pair using the determined measure of the divergence, the respective contrastive score indicative of a probability of quality of the respective data pair;

sorting, by the data processing hardware, the data pairs of the third dataset based on the respective contrastive scores; and

training, by the data processing hardware, using the sorted data pairs of the third dataset and the respective contrastive scores, a target model based on an order of the sorted data pairs of the third dataset.

2. The method of claim 1 , wherein training the target model further comprises using the data pairs of the third dataset that satisfy a threshold contrastive score.

3. The method of claim 1 , wherein training the target model further comprises:

generating a plurality of data batches, wherein each data batch comprises at least one data pair and wherein a probability that a select data pair is included in a select data batch is based on the respective contrastive score of the select data pair and wherein the probability increases as the respective contrastive score increases; and

training the target model using each data batch.

4. The method of claim 3 , wherein generating the plurality of data batches comprises:

determining a selection ratio for each data batch;

determining a batch size for each data batch, wherein the batch size is based on the selection ratio and a number of data pairs in the third dataset;

selecting a number of data pairs from the third dataset that corresponds with the determined batch size;

sorting the selected number of data pairs based on the respective contrastive scores; and

removing, from the data batch, a removal ratio of the selected number of data pairs with lowest contrastive scores, the removal ratio comprising an inverse of the selection ratio.

5. The method of claim 4 , wherein the selection ratio decreases over training time.

6. The method of claim 5 , wherein the batch size is equal to a fixed batch size divided by the selection ratio.

7. The method of claim 1 , wherein the target model has a first size and the base model has a second size, and wherein the first size is larger than the second size.

8. The method of claim 1 , further comprising:

determining, by the data processing hardware, that a first size corresponding to the target model and a second size corresponding to the base model are the same; and

when the first size is the same as the second size:

replacing, by the data processing hardware, the base model with the adapted model;

replacing, by the data processing hardware, the adapted model with the target model;

determining, by the data processing hardware, the respective contrastive score for each data pair of a fourth dataset of data pairs using the base model and the replaced adapted model; and

training, by the data processing hardware, a subsequent target model using the data pairs of the fourth dataset and the respective contrastive scores.

9. The method of claim 1 , wherein the first dataset comprises random data.

10. The method of claim 9 , wherein the second dataset comprises data that is cleaner than the random data of the first dataset.

11. The method of claim 1 , wherein the respective contrastive score comprises a Kullback-Leibler (KL) divergence.

12. The method of claim 1 , wherein each dataset comprises sentence language pairs.

13. A system comprising:

data processing hardware; and

memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:

generating a base model by training with a first dataset of data pairs;

generating an adapted model by training the base model on a second dataset of data pairs;

for each respective data pair of a third dataset of data pairs:

determining a first probability distribution for the respective data pair using the base model;

determining, by the data processing hardware, a second probability distribution for the respective data pair using the adapted model;

determining, by the data processing hardware, a measure of a divergence between the first probability distribution and the second probability distribution; and

determining a respective contrastive score for the respective data pair using the determined measure of the divergence, the respective contrastive score indicative of a probability of quality of the respective data pair;

sorting the data pairs of the third dataset based on the respective contrastive scores; and

training, using the sorted data pairs of the third dataset and the respective contrastive scores, a target model based on an order of the sorted data pairs of the third dataset.

14. The system of claim 13 , wherein training the target model comprises using the data pairs of the third dataset that satisfy a threshold contrastive score.

15. The system of claim 13 , wherein training the target model further comprises:

generating a plurality of data batches, wherein each data batch comprises at least one data pair and wherein a probability that a select data pair is included in a select data batch is based on the respective contrastive score of the select data pair and wherein the probability increases as the respective contrastive score increases; and

training the target model using each data batch.

16. The system of claim 15 , wherein generating the plurality of data batches comprises:

determining a selection ratio for each data batch;

determining a batch size for each data batch, wherein the batch size is based on the selection ratio and a number of data pairs in the third dataset;

selecting a number of data pairs from the third dataset that corresponds with the determined batch size;

sorting the selected number of data pairs based on the respective contrastive scores; and

removing, from the data batch, a removal ratio of the selected number of data pairs with lowest contrastive scores, the removal ratio comprising an inverse of the selection ratio.

17. The system of claim 16 , wherein the selection ratio decreases over training time.

18. The system of claim 17 , wherein the batch size is equal to a fixed batch size divided by the selection ratio.

19. The system of claim 13 , wherein the target model has a first size and the base model has a second size, and wherein the first size is larger than the second size.

20. The system of claim 13 , wherein the operations further comprise:

determining that a first size corresponding to the target model and a second size corresponding to the base model are the same; and

when the first size is the same size as the second size:

replacing the base model with the adapted model;

replacing the adapted model with the target model;

determining the respective contrastive score for each data pair of a fourth dataset of data pairs using the base model and the replaced adapted model; and

training a subsequent target model using data pairs of the fourth dataset satisfying a threshold contrastive score.

21. The system of claim 13 , wherein the first dataset comprises random data.

22. The system of claim 21 , wherein the second dataset comprises data that is cleaner than the random data of the first dataset.

23. The system of claim 13 , wherein the respective contrastive score comprises a Kullback—Leibler (KL) divergence.

24. The system of claim 13 , wherein each dataset comprises sentence language pairs.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 25, 2019
From: WANG, WEI; LIANG, BOWEN; HUGHES, MACDUFF; WATANABE, TARO; NAKAGAWA, TETSUJI; RUDNICK, ALEXANDER
To: GOOGLE LLC
Reel/Frame 048990/0450 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 24, 2019
From: WANG, WEI; LIANG, BOWEN; HUGHES, MACDUFF; WATANABE, TARO; NAKAGAWA, TETSUJI; RUDNICK, ALEXANDER
To: GOOGLE LLC
Reel/Frame 048983/0405 →
Continuity (2)
Provisional Application 62668650 · May 8, 2018
Related Publication 20190347570A1 · Nov 14, 2019