IP Library Granted Patent US 12,437,162
Granted Patent B2
US 12,437,162 · App. 16/890,097 · Granted Oct 7, 2025

Removing undesirable signals from language models using negative data

Inventors: Michael Louis Wick (Lexington, MA); Jean-Baptiste Frederic George Tristan (Lexington, MA); Adam Craig Pocock (Burlington, MA); Katherine Silverstein (Somerville, MA)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F40/58
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 12,437,162
App. No.
16/890,097
Granted
Oct 7, 2025
Kind
B2
Abstract

A method for training a language model using negative data may include accessing a first training corpus comprising positive training data and accessing a second training corpus comprising negative training data. The method may further include training a first language model using at least the first training corpus, the second training corpus, and a maximum likelihood function. The maximum likelihood function may maximize the likelihood of the first language model predicting the positive training data while minimizing the likelihood of the first language model predicting the negative training data.

Claims (35)

1. A method for training a language model using negative data, the method comprising:

accessing a first training corpus comprising positive training data for training a first language model;

accessing a second language model, wherein the second language model comprises an n-gram model or a transformer model that is inhibited by removing position information from the transformer model and configured to generate outputs that are less grammatically correct than outputs generated by the first language model;

generating output text from the second language model to use as a second training corpus of negative training data; and

training the first language model using at least the first training corpus, the second training corpus, and a maximum likelihood function, wherein the maximum likelihood function maximizes a likelihood of the first language model predicting the positive training data while minimizing a likelihood of the first language model predicting the negative training data.

2. The method of claim 1 , wherein minimizing the likelihood of the first language model predicting the negative training data comprises:

maximizing 1 minus the likelihood of the first language model predicting the negative training data.

3. The method of claim 2 , wherein the maximum likelihood function maximizes the likelihood of 1 minus the likelihood of the first language model predicting the negative training data by:

maximizing a lower bound on the likelihood of 1 minus the likelihood of the first language model predicting the negative training data.

4. The method of claim 3 , wherein the lower bound comprises a product of 1 minus a probability of the first language model predicting each word in the second training corpus.

5. The method of claim 1 , wherein the likelihood of the first language model predicting the positive training data is calculated using a likelihood function that accepts the positive training data and a plurality of weights for the first language model as inputs.

6. The method of claim 1 , wherein the likelihood of the first language model predicting the negative training data is calculated using a likelihood function that accepts the negative training data and a plurality of weights for the first language model as inputs.

7. The method of claim 6 , wherein the likelihood function optimizes values for the plurality of weights.

8. A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:

accessing a first training corpus comprising positive training data for training a first language model;

accessing a second language model, wherein the second language model comprises an n-gram model or a transformer model that is inhibited by removing position information from the transformer model and configured to generate outputs that are less grammatically correct than outputs generated by the first language model;

generating output text from the second language model to use as a second training corpus of negative training data; and

training the first language model using at least the first training corpus, the second training corpus, and a maximum likelihood function, wherein the maximum likelihood function maximizes a likelihood of the first language model predicting the positive training data while minimizing a likelihood of the first language model predicting the negative training data.

9. The non-transitory computer-readable medium of claim 8 wherein training the first language model using at least the first training corpus, the second training corpus, and the maximum likelihood function removes negative n-gram statistics from the first language model.

10. The non-transitory computer-readable medium of claim 8 , wherein training the first language model using at least the first training corpus, the second training corpus, and the maximum likelihood function decreases an error rate for subject-verb agreement.

11. The non-transitory computer-readable medium of claim 8 , wherein the second language model is inhibited such that the second language model does not consider word position.

12. The non-transitory computer-readable medium of claim 8 , wherein the second language model comprises a transformer-based model with word-location identifiers removed.

13. The non-transitory computer-readable medium of claim 8 , wherein the outputs from the n-gram model or a transformer model that is inhibited comprise text strings that may be provided as training data to the first language model.

14. The non-transitory computer-readable medium of claim 8 , wherein the transformer model is also inhibited by implementing a statistical assumption that is not true about a language of the second training corpus in general, but which is true about the data in the second training corpus.

15. A system comprising:

one or more processors; and

one or more memory devices comprising instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:

accessing a first training corpus comprising positive training data for training a first language model;

accessing a second language model, wherein the second language model comprises an n-gram model or a transformer model that is inhibited by removing position information from the transformer model and configured to generate outputs that are less grammatically correct than outputs generated by the first language model;

generating output text from the second language model to use as a second training corpus of negative training data; and

training the first language model using at least the first training corpus, the second training corpus, and a maximum likelihood function, wherein the maximum likelihood function maximizes a likelihood of the first language model predicting the positive training data while minimizing a likelihood of the first language model predicting the negative training data.

16. The system of claim 15 , wherein the first language model comprises a neural language model.

17. The system of claim 15 , wherein the first language model comprises a transformer-based language model.

18. The system of claim 15 , wherein the first training corpus does not include the second training corpus.

19. The system of claim 15 , wherein the first training corpus and the second training corpus are both subsets of a larger training corpus.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2020
From: WICK, MICHAEL LOUIS; TRISTAN, JEAN-BAPTISTE FREDERIC GEORGE; POCOCK, ADAM CRAIG; SILVERSTEIN, KATHERINE
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 052817/0200 →
Continuity (1)
Related Publication 20210374361A1 · Dec 2, 2021
References Cited (33)
US 10978056B1 · Challa · 2021 [cited by examiner]
US 11568138B2 · Huang · 2023 [cited by examiner]
US 20110225155A1 · Roulland · 2011 [cited by examiner]
US 20110270604A1 · Qi · 2011 [cited by examiner]
US 20150095017A1 · Mnih · 2015 [cited by examiner]
US 20180082197A1 · Aravamudan · 2018 [cited by examiner]
US 20180329887A1 · Bull · 2018 [cited by examiner]
US 20190005020A1 · Gregory · 2019 [cited by examiner]
US 20200380027A1 · Aggarwal · 2020 [cited by examiner]
US 20210049236A1 · Nguyen · 2021 [cited by examiner]
US 20210173872A1 · Tan · 2021 [cited by examiner]
US 20210216715A1 · Wang · 2021 [cited by examiner]
US 20210224324A1 · Fourney · 2021 [cited by examiner]
US 20210326534A1 · Wang · 2021 [cited by examiner]
US 20210375280A1 · Wang · 2021 [cited by examiner]
US 20210406452A1 · Hasan · 2021 [cited by examiner]
US 20220036890A1 · Yuan · 2022 [cited by examiner]
US 20220067278A1 · Huang · 2022 [cited by examiner]
US 20220138492A1 · Paulson · 2022 [cited by examiner]
Author={Goldberg, Yoav and Levy, Omer}, title={word2vec Explained: deriving Mikolov et al.'s negative-sampling word-embedding method}, 2014, journal={arXiv preprint arXiv:1402.3722}, pp. 1-5. (Year: 2014). [cited by examiner]
Irie et al., Training language models for long-span cross-sentence evaluation, 2019, IEEE, pp. 419-426 (Year: 2019). [cited by examiner]
Malte et al., Evolution of Transfer learning in Natural Language Processing, journal={arXiv preprint arXiv:1910.07370}, year={2019}, pp. 1-11. (Year: 2019). [cited by examiner]
Bojanowski et al., title={Enriching word vectors with subword information}, journal={Transactions of the association for computational linguistics}, vol.={5}, pp.={135-146}, year={2017}, (Year: 2017). [cited by examiner]
Si et al., title={What does bert learn from multiple-choice reading comprehension datasets?}, journal={arXiv preprint arXiv:1910.12391}, year={2019}, pp. 1-10 (Year: 2019). [cited by examiner]
Zhang et al., Adversarial Attacks on Deep Learning Models in Natural Language Processing: A Survey, 2019, Computation and Language (cs.CL), arXiv:1901.06796 [cs.CL], pp. 1-40 (Year: 2019). [cited by examiner]
Sun et al. , BERT4Rec: Sequential recommendation with bidirectional encoder representations from transformer, Proceedings of the 28th ACM international conference on information and knowledge management}, pp.={1441-1450… [cited by examiner]
Kassner et al., author={Kassner, Nora and Sch{\″u}tze, Hinrich}, title={Negated and misprimed probes for pretrained language models: Birds can talk, but cannot fly}, journal={arXiv preprint arXiv:1911.03343}, pp. 1-8, y… [cited by examiner]
Liu et al., title={Linguistic knowledge and transferability of contextual representations}, journal={arXiv preprint arXiv:1903.08855}, pp. 1-22, year={2019} (Year: 2019). [cited by examiner]
Karpathy, et al., “Visualizing and understanding recurrent Networks”. In ICLR WS track, 2016, 11 pages. [cited by applicant]
Kovaleva, et al., “Revealing the dark secrets of BERT”, In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing… [cited by applicant]
Radford, et al., “Language models are unsupervised multitask learners”, Computer Science, Mar. 2019, 24 pages. [cited by applicant]
Ravfogei, et al., “Studying the inductive biases of rnns with synthetic variations of natural languages”, CoRR, abs/1903.06400, Jun. 2019, 11 pages. [cited by applicant]
Zaremba, et al., “Recurrent neural network regularization”, CoRR, abs/1409.2329, Sep. 2014, 8 pages. [cited by applicant]