IP Library Granted Patent US 12,333,396
Granted Patent B2
US 12,333,396 · App. 18/845,615 · Granted Jun 17, 2025

System, method, and computer program product for reducing dataset biases in natural language inference tasks using unadversarial training

Inventors: Minje Choi (Ann Arbor, MI); Javid Ebrahimi (Redwood City, CA); Wei Zhang (Fremont, CA)
Assignee: Visa International Service Association
G06N20/00
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,333,396
App. No.
18/845,615
Filed
Sep 10, 2024
Granted
Jun 17, 2025
Kind
B2
Art Unit
2127
USPC
706/12
Abstract

Provided are systems for generating a machine learning model for classification tasks using unadversarial training that include a processor to perform an unadversarial training procedure to train a machine learning model to provide a trained machine learning model. When performing the unadversarial training procedure, the processor is programmed or configured to receive a training dataset including a plurality of training samples; generate a noise vector for the plurality of training samples based on a uniform distribution; perturb each training sample of the plurality of training samples; obtain a gradient; generate an updated noise vector based on the gradient; perturb each training sample of the plurality of training samples based on the updated noise vector; and update a model weight of the machine learning model based on the second plurality of perturbed training samples to provide the trained machine learning model. Methods and computer program products are also provided.

Claims (104)

1. A system, the system comprising:

at least one processor programmed or configured to:

perform an unadversarial training procedure to train a machine learning model to provide a trained machine learning model, wherein, when performing the unadversarial training procedure, the at least one processor is programmed or configured to:

receive a training dataset comprising a plurality of training samples;

generate a noise vector for the plurality of training samples based on a first uniform distribution;

perturb each training sample of the plurality of training samples based on the noise vector to provide a plurality of perturbed training samples;

obtain a gradient between a first output of the machine learning model that results from inputting each training sample of the plurality of training samples and a second output of the machine learning model that results from inputting each perturbed training sample of the plurality of perturbed training samples;

generate an updated noise vector based on the gradient;

perturb each training sample of the plurality of training samples based on the updated noise vector to provide a second plurality of perturbed training samples; and

update a model weight of the machine learning model based on the second plurality of perturbed training samples to provide the trained machine learning model;

wherein, the trained machine learning model is a first trained machine learning model that exploits bias features of the training dataset to make predictions, and wherein the at least one processor is further programmed or configured to:

train a second machine learning model using a Product of Experts (POE) procedure based on the first trained machine learning model to provide improved predictions as compared to the first trained machine learning model.

2. The system of claim 1 , wherein, when generating the noise vector for the plurality of training samples, the at least one processor is programmed or configured to:

initialize the noise vector with a uniform distribution, wherein, when initializing the noise vector, the at least one processor is programmed or configured to:

multiply the first uniform distribution by a predefined radius to provide a second uniform distribution; and

divide the second uniform distribution by a square root of an input embedding size of the machine learning model to provide an initial value of the noise vector.

3. The system of claim 1 , wherein, when generating the updated noise vector, the at least one processor is programmed or configured to:

multiply the gradient by a step size.

4. The system of claim 1 , wherein, the at least one processor is further programmed or configured to:

restrict a value of the updated noise vector based on a predefined radius to provide a second updated noise vector; and

wherein, when perturbing each training sample of the plurality of training samples based on the updated noise vector to provide the second plurality of perturbed training samples, the at least one processor is programmed or configured to:

perturb each training sample of the plurality of training samples based on the second updated noise vector to provide the second plurality of perturbed training samples.

5. The system of claim 1 , wherein, when training the second machine learning model using the POE procedure, the at least one processor is further programmed or configured to:

generate an unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset;

generate an unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset;

combine the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide a combined unnormalized output; and

update a model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model.

6. The system of claim 5 , wherein, when generating the unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset, the at least one processor is programmed or configured to:

generate an output of the first trained machine learning model using a first logits function based on the plurality of training samples of the training dataset;

wherein, when generating the unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset, the at least one processor is programmed or configured to:

generate an output of the second trained machine learning model using a second logits function based on the plurality of training samples of the training dataset;

wherein, when combining the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide the combined unnormalized output, the at least one processor is programmed or configured to:

combine the output of the first trained machine learning model using the first logits function based on the plurality of training samples of the training dataset and the output of the second machine learning model using the second logits function based on the plurality of training samples of the training dataset to provide a combined output; and

wherein, when updating the model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model, the at least one processor is further programmed or configured to:

update the model weight of the second machine learning model based on the combined output to provide the second trained machine learning model.

7. A computer-implemented method, the method comprising:

performing, by at least one processor, an unadversarial training procedure to train a machine learning model to provide a trained machine learning model, wherein performing the unadversarial training procedure, comprises:

receiving a training dataset comprising a plurality of training samples;

generating a noise vector for the plurality of training samples based on a first uniform distribution;

perturbing each training sample of the plurality of training samples based on the noise vector to provide a plurality of perturbed training samples;

obtaining a gradient between a first output of the machine learning model that results from inputting each training sample of the plurality of training samples and a second output of the machine learning model that results from inputting each perturbed training sample of the plurality of perturbed training samples;

generating an updated noise vector based on the gradient;

perturbing each training sample of the plurality of training samples based on the updated noise vector to provide a second plurality of perturbed training samples; and

updating a model weight of the machine learning model based on the second plurality of perturbed training samples to provide the trained machine learning model;

wherein the trained machine learning model is a first trained machine learning model that exploits bias features of the training dataset to make predictions, and wherein the method further comprises:

training a second machine learning model using a Product of Experts (POE) procedure based on the first trained machine learning model to provide improved predictions as compared to the first trained machine learning model.

8. The computer-implemented method of claim 7 , wherein generating the noise vector for the plurality of training samples comprises:

initializing the noise vector with a uniform distribution, wherein initializing the noise vector comprises:

multiplying the first uniform distribution by a predefined radius to provide a second uniform distribution; and

dividing the second uniform distribution by a square root of an input embedding size of the machine learning model to provide an initial value of the noise vector.

9. The computer-implemented method of claim 7 , wherein generating the updated noise vector comprises:

multiplying the gradient by a step size.

10. The computer-implemented method of claim 7 , further comprising:

restricting a value of the updated noise vector based on a predefined radius to provide a second updated noise vector;

wherein perturbing each training sample of the plurality of training samples based on the updated noise vector to provide the second plurality of perturbed training samples comprises:

perturbing each training sample of the plurality of training samples based on the second updated noise vector to provide the second plurality of perturbed training samples.

11. The computer-implemented method of claim 10 , wherein training the second machine learning model using the POE procedure comprises:

generating an unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset;

generating an unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset;

combining the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide a combined unnormalized output; and

updating a model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model.

12. The computer-implemented method of claim 11 , wherein generating the unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset comprises:

generating an output of the first trained machine learning model using a first logits function based on the plurality of training samples of the training dataset;

wherein generating the unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset comprises:

generating an output of the second trained machine learning model using a second logits function based on the plurality of training samples of the training dataset;

wherein combining the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide the combined unnormalized output comprises:

combining the output of the first trained machine learning model using the first logits function based on the plurality of training samples of the training dataset and the output of the second machine learning model using the second logits function based on the plurality of training samples of the training dataset to provide a combined output; and

wherein updating the model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model comprises:

updating the model weight of the second machine learning model based on the combined output to provide the second trained machine learning model.

13. A computer program product, the computer program product comprising at least one non-transitory computer-readable medium including one or more instructions that, when executed by at least one processor, cause the at least one processor to:

perform an unadversarial training procedure to train a machine learning model to provide a trained machine learning model, wherein, when performing the unadversarial training procedure, the one or more instructions cause the at least one processor to:

receive a training dataset comprising a plurality of training samples;

generate a noise vector for the plurality of training samples based on a first uniform distribution;

perturb each training sample of the plurality of training samples based on the noise vector to provide a plurality of perturbed training samples;

obtain a gradient between a first output of the machine learning model that results from inputting each training sample of the plurality of training samples and a second output of the machine learning model that results from inputting each perturbed training sample of the plurality of perturbed training samples;

generate an updated noise vector based on the gradient;

perturb each training sample of the plurality of training samples based on the updated noise vector to provide a second plurality of perturbed training samples; and

update a model weight of the machine learning model based on the second plurality of perturbed training samples to provide the trained machine learning model:

wherein the trained machine learning model is a first trained machine learning model that exploits bias features of the training dataset to make predictions, and wherein the one or more instructions further cause the at least one processor to:

train a second machine learning model using a Product of Experts (POE) procedure based on the first trained machine learning model to provide improved predictions as compared to the first trained machine learning model.

14. The computer program product of claim 13 , wherein, when generating the noise vector for the plurality of training samples, the one or more instructions cause the at least one processor to:

initialize the noise vector with a uniform distribution, wherein when initializing the noise vector with the uniform distribution, the one or more instructions cause the at least one processor to:

multiply the first uniform distribution by a predefined radius to provide a second uniform distribution; and

divide the second uniform distribution by a square root of an input embedding size of the machine learning model to provide an initial value of the noise vector.

15. The computer program product of claim 13 , wherein, when generating the updated noise vector, the one or more instructions cause the at least one processor to:

multiply the gradient by a step size.

16. The computer program product of claim 13 , wherein, the one or more instructions further cause the at least one processor to:

restrict a value of the updated noise vector based on a predefined radius to provide a second updated noise vector; and

wherein, when perturbing each training sample of the plurality of training samples based on the updated noise vector to provide the second plurality of perturbed training samples, the one or more instructions cause the at least one processor to:

perturb each training sample of the plurality of training samples based on the second updated noise vector to provide the second plurality of perturbed training samples.

17. The computer program product of claim 13 ,

wherein, when training the second machine learning model using the POE procedure, the one or more instructions cause the at least one processor to:

generate an unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset;

generate an unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset;

combine the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide a combined unnormalized output; and

update a model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model.

18. The computer program product of claim 17 , wherein, when generating the unnormalized output from the first trained machine learning model based on the plurality of training samples of the training dataset, the one or more instructions cause the at least one processor to:

generate an output of the first trained machine learning model using a first logits function based on the plurality of training samples of the training dataset;

wherein, when generating the unnormalized output from the second machine learning model based on the plurality of training samples of the training dataset, the one or more instructions cause the at least one to:

generate an output of the second trained machine learning model using a second logits function based on the plurality of training samples of the training dataset;

wherein, when combining the unnormalized output from the first trained machine learning model and the unnormalized output from the second machine learning model to provide the combined unnormalized output, the one or more instructions cause the at least one processor to:

combine the output of the first trained machine learning model using the first logits function based on the plurality of training samples of the training dataset and the output of the second machine learning model using the second logits function based on the plurality of training samples of the training dataset to provide a combined output; and

wherein, when updating the model weight of the second machine learning model based on the combined unnormalized output to provide the second trained machine learning model, the one or more instructions cause the at least one processor to:

update the model weight of the second machine learning model based on the combined output to provide the second trained machine learning model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2024
From: CHOI, MINJE; EBRAHIMI, JAVID; ZHANG, WEI
To: VISA INTERNATIONAL SERVICE ASSOCIATION
Reel/Frame 068541/0729 →
Continuity (2)
Provisional Application 63340132 · May 10, 2022
Related Publication 20250111277A1 · Apr 3, 2025
References Cited (30)
US 20210150340A1 · Liu et al. · 2021 [cited by applicant]
US 20210358178A1 · Staudigl · 2021 [cited by examiner]
Albanie et al., “Stopping FAN Violence: Generative Unadversarial Networks”, arXiv preprint arXiv:1703.02528 (2017). [cited by applicant]
Belinkov et al., “On Adversarial Removal of Hypothesis-only Bias in Natural Language Inference”, arXiv preprint arXiv:1907.04389 (2019). [cited by applicant]
Clark et al., “Don't take the easy way out: Ensemble based methods for avoiding known dataset biases”, Proceedings of the 2019 Conference of Empirical Methods in Natural Language Processing and the 9th International Joi… [cited by applicant]
Clark et al., “Learning to model and ignore dataset bias with mixed capacity ensembles”, Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, EMNLP 2020, pp. 3031-3045. [cited by applicant]
Devlin et al., “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding/24.05”, Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics:… [cited by applicant]
Ghaddar et al., “End-to-end self-debiasing framework for robust NLU training”, aFindings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pp. 1923-1929. [cited by applicant]
Goodfellow et al., “Explaining and harnessing adversarial examples”, 3rd International Conference on Learning Representations, ICLR 2015. [cited by applicant]
Gururangan et al., “Annotation artifacts in natural language inference data”, Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologie… [cited by applicant]
He et al., “Unlearn dataset bias in natural language inference by fitting the residual”, Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP, pp. 132-142. [cited by applicant]
Jiang et al., “Smart: Robust and efficient fine-tuning for pre-trained natural language models through principled regularized optimization”, Proceedings of the 58th Annual Meeting of the Association for Computational Li… [cited by applicant]
Kingma, “Adam: A method for stochastic optimization”, 3rd International Conference on Learning Representations, ICLR 2015. [cited by applicant]
Lazarou, “Training a GAN to Sample from the Normal Distribution”, Towards Data Science, 2020. [cited by applicant]
Liu et al., “Adversarial training for large neural language models”, arXiv preprint arXiv:2004.08994 (2020). [cited by applicant]
Mahabadi et al., “End-to-end bias mitigation by modelling biases in corpora”, Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 8706-8716. [cited by applicant]
Mccoy et al., “Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference”, Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3428-3448. [cited by applicant]
Miyato et al., “Adversarial training methods for semi-supervised text classification”, 5th International Conference on Learning Representations, ICLR 2017. [cited by applicant]
Mizra et al., “Conditional Generative Adversarial Nets”, pp. 1-7. [cited by applicant]
Papernot et al., “Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks”, 37th IEEE Symposium on Security & Privacy, 2016, pp. 1-16. [cited by applicant]
Poliak et al., “Hypothesis only baselines in natural language inference”, Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pp. 180-191. [cited by applicant]
Sagar et al., “Can ML Models Eliminate Bias From Datasets on their Own”. [cited by applicant]
Salman et al., “Unadversarial examples: Designing objects for robust vision”, Advances in Neural Information Processing Systems, 2021, pp. 15270-15284, vol. 34. [cited by applicant]
Sanh et al., “Learning from others' mistakes: Avoiding dataset biases without modeling them”, 9th International Conference on Learning Representations, ICLR 2021. [cited by applicant]
Schuster et al., “Towards debiasing fact verification models”, Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Proces… [cited by applicant]
Turc et al., “Well-read students learn better: The impact of student initialization on knowledge distillation”, arXiv preprint arXiv:1908.08962 13 (2019): 3. [cited by applicant]
Utama et al., “Towards debiasing NLU models from unknown biases”, Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 7597-7610. [cited by applicant]
Williams et al., “A broad-coverage challenge corpus for sentence understanding through inference”, Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human… [cited by applicant]
Wong et al., “Fast is better than free: Revisiting adversarial training”, 8th International Conference on Learning Representations, ICLR 2020, 2020. [cited by applicant]
Zhu et al., “Freelb: Enhanced adversarial training for natural language understanding”, 8th International Conference on Learning Representations, ICLR 2020, 2020. [cited by applicant]
Cited By (1)
US 12,657,461