IP Library Granted Patent US 11,256,754
Granted Patent B2
US 11,256,754 · App. 16/869,903 · Granted Feb 22, 2022

Systems and methods for generating natural language processing training samples with inflectional perturbations

Inventors: Samson Min Rong Tan (Singapore, SG); Shafiq Rayhan Joty (Singapore, SG)
Assignee: salesforce.com, inc.
G06F16/90332G06F40/284G10L15/16G10L15/1822
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,256,754
App. No.
16/869,903
Granted
Feb 22, 2022
Kind
B2
Abstract

Embodiments described herein provide systems and methods for generating an adversarial sample with inflectional perturbations for training a natural language processing (NLP) system. A natural language sentence is received at an inflection perturbation module. Tokens are generated from the natural language sentence. For each token that has a part of speech that is a verb, adjective, or an adverb, an inflected form is determined. An adversarial sample of the natural language sentence is generated by detokenizing inflected forms of the tokens. The NLP system is trained using the adversarial sample.

Claims (41)

1. A method of generating an adversarial sample with inflectional perturbations for training a natural language processing (NLP) system, the method comprising:

receiving an input that is a natural language question;

generating a plurality of tokens from the natural language question;

determining an inflected form of each token in the plurality of tokens, wherein the inflected form for each token maximizes a loss function of the NLP system; and

generating the adversarial sample of the natural language question by detokenizing inflected forms of the plurality of tokens.

2. The method of claim 1 , further comprising:

training the NLP system using the generated adversarial sample of the natural language question, wherein the trained NLP system generates answers to natural language questions that are in a nonstandard or dialectal variant of a language.

3. The method of claim 1 , further comprising:

generating a plurality of adversarial samples including the adversarial sample from a plurality of natural language questions, including the natural language question; and

fine-tuning the NLP system that has been previously trained using the plurality of adversarial samples.

4. The method of claim 1 , wherein the determining further comprises determining the inflected form of each token in the plurality of tokens that is associated with a part of speech that is a noun, an adjective, or a verb.

5. The method of claim 4 , wherein the generating the adversarial sample further comprising generating the adversarial sample using the inflected form of each token in the plurality of tokens that is associated with the part of speech that is the noun, the adjective, or the verb and using other tokens in the plurality of tokens that are not associated with the part of speech that is the noun, the adjective, or the verb.

6. The method of claim 1 , wherein the NLP system is structured as a neural network that receives a spoken natural language question and generates an answer.

7. The method of claim 1 , wherein the inflected form of each token is the same part of speech as the each token.

8. A system of generating an adversarial sample with inflectional perturbations for training a natural language processing (NLP) system, the system comprising:

an inflection perturbation module stored in memory and executing on a processor and configured to:

receive an input that is a natural language question;

generate a plurality of tokens from the natural language question;

determine an inflected form of each token in the plurality of tokens, wherein the inflected form for each token maximizes a loss function of the NLP system; and

generate the adversarial sample of the natural language question by detokenizing inflected forms of the plurality of tokens.

9. The system of claim 8 , wherein the NLP system is configured to be trained using the generated adversarial sample of the natural language question, wherein the trained NLP system is configured to generate answers to natural language questions that are in a nonstandard or dialectal variant of a language.

10. The system of claim 8 , wherein the inflection perturbation module is further configured to:

generate a plurality of adversarial samples including the adversarial sample from a plurality of natural language questions, including the natural language question; and

fine-tune the NLP system that has been previously trained using the plurality of adversarial samples.

11. The system of claim 8 , wherein to determine the inflected form of each token the inflection perturbation module is further configured to determine the inflected form of each token in the plurality of tokens that is associated with a part of speech that is a noun, an adjective, or a verb.

12. The system of claim 8 , wherein to generate the adversarial sample the inflection perturbation module is further configured to generate the adversarial sample using the inflected form of each token in the plurality of tokens that is associated with that the part of speech that is the noun, the adjective, or the verb and using other tokens in the plurality of tokens that are not associated with the part of speech that is the noun, the adjective, or the verb.

13. The system of claim 8 , wherein the inflected form of each token is the same part of speech as the each token.

14. A non-transitory machine-readable medium having stored thereon machine-readable instructions executable to cause a machine to perform operations that generating an adversarial sample with inflectional perturbations for training a natural language processing (NLP) system, the operations comprising:

receiving an input that is a natural language sentence;

generating a plurality of tokens from the natural language sentence;

determining an inflected form of each token in the plurality of tokens, wherein the inflected form for each token maximizes a loss function of the NLP system; and

generating the adversarial sample of the natural language sentence by detokenizing inflected forms of the plurality of tokens.

15. The non-transitory machine-readable medium of claim 14 , wherein the machine is further configured to perform the operations comprising:

training the NLP system using the generated adversarial sample of the natural language question, wherein the trained NLP system generates answers to natural language questions that are in a nonstandard or dialectal variant of a language.

16. The non-transitory machine-readable medium of claim 14 , wherein the machine is further configured to perform the operations comprising:

generating a plurality of adversarial samples including the adversarial sample from a plurality of natural language questions, including the natural language question; and

fine-tuning the NLP system that has been previously trained using the plurality of adversarial samples.

17. The non-transitory machine-readable medium of claim 14 , wherein to determine the inflected form of each token the machine is further configured to perform the operations comprising determining the inflected form of each token in the plurality of tokens that is associated with a part of speech that is a noun, an adjective, or a verb.

18. The non-transitory machine-readable medium of claim 17 , wherein to generate the adversarial sample the machine is further configured to perform the operations comprising generating the adversarial sample using the inflected form of each token in the plurality of tokens that is associated with the part of speech that is the noun, the adjective, or the verb and using other tokens in the plurality of tokens that are not associated with the part of speech that is the noun, the adjective, or the verb.

19. The non-transitory machine-readable medium of claim 14 , wherein the NLP system is structured as a neural network that receives a spoken natural language sentence and generates a translation.

20. The non-transitory machine-readable medium of claim 14 , wherein the inflected form of each token is the same part of speech as the each token.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0480 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 13, 2020
From: TAN, SAMSON MIN RONG; JOTY, SHAFIQ RAYHAN
To: SALESFORCE.COM, INC.
Reel/Frame 052651/0997 →
Continuity (2)
Provisional Application 62945647 · Dec 9, 2019
Related Publication 20210173872A1 · Jun 10, 2021
Cited By (1)
US 12,705,368