IP Library Granted Patent US 12,340,792
Granted Patent B2
US 12,340,792 · App. 17/534,008 · Granted Jun 24, 2025

Systems and methods for few-shot intent classifier models

Inventors: Jin Qu (San Mateo, CA); Wenhao Liu (Redwood City, CA); Kazuma Hashimoto (Menlo Park, CA); Caiming Xiong (Menlo Park, CA)
Assignee: Salesforce, Inc.
G10L15/063G10L15/16G10L2015/0636G10L2015/0638
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,340,792
App. No.
17/534,008
Granted
Jun 24, 2025
Kind
B2
Abstract

Some embodiments of the current disclosure disclose methods and systems for training for training a natural language processing intent classification model to perform few-shot classification tasks. In some embodiments, a pair of an utterance and a first semantic label labeling the utterance may be generated and a neural network that is configured to perform natural language inference tasks may be utilized to determine the existence of an entailment relationship between the utterance and the semantic label. The semantic label may be predicted as the intent class of the utterance based on the entailment relationship and the pair may be used to train the natural language processing intent classification model to perform few-shot classification tasks.

Claims (60)

1. A method for few-shot intent classification of an input natural language utterance, the method comprising:

receiving, via a communication interface, a training dataset containing a plurality of utterances and a plurality of pre-defined intent labels;

transforming the training dataset into a plurality of utterance-label pairs by pairing an utterance of the plurality of utterances with each of the plurality pre-defined intent labels, wherein each of the plurality of utterance-label pairs includes the utterance and a pre-defined intent label of the plurality of pre-defined intent labels;

generating a transformed entailment label for each of the plurality of utterance-label pairs, wherein the transformed entailment label indicates an entailment relationship between the utterance and the pre-defined intent label in an utterance-label pair;

inputting the plurality of utterance-label pairs to a classifier;

generating, using the classifier, an entailment probability distribution for each of the plurality of utterance-label pairs;

comparing the entailment probability distribution with the corresponding transformed entailment label for each of the plurality utterance-label pair;

computing a training objective based on the comparison of the entailment probability distribution with the corresponding transformed entailment label for each of the plurality of utterance-label pair; and

updating the classifier based on the training objective via backpropagation.

2. The method of claim 1 , wherein the training dataset contains less than a pre-defined number of utterances corresponding to the pre-defined intent label.

3. The method of claim 1 , wherein the entailment probability distribution indicates the probability a respective utterance and a respective pre-defined intent label in a respective input utterance-label pair match with each other.

4. The method of claim 1 , wherein the input utterance-label pair is formed by concatenating the utterance and the pre-defined intent label separated by a special token.

5. The method of claim 1 , wherein the transformed entailment label is selected from a group of a first label indicating the pre-defined intent label entails the first utterance, a second label indicating that the pre-defined intent label contradicts the utterance, and a third label indicating that the pre-defined intent label is irrelevant to the utterance.

6. The method of claim 1 , wherein the transformed entailment label is a binary label indicating whether the pre-defined intent label entails the utterance.

7. The method of claim 1 , wherein the transformed entailment label is generated in a form of an entailment probability distribution indicating a likelihood that the input utterance-label pair corresponds to the transformed entailment label.

8. The method of claim 7 , wherein the training objective is computed as a binary cross-entropy between the entailment probability distribution and a binary ground-truth label derived from the pre-defined intent label from the training dataset.

9. The method of claim 1 , further comprising:

receiving, via the communication interface, another utterance;

generating a plurality of utterance-label pairs by combining the other utterance with each of the pre-defined intent labels, respectively;

generating, for each utterance-label pair, by the updated classifier, a respective entailment probability distribution score; and

selecting an utterance-label pair having a highest entailment probability distribution score among the plurality of utterance-label pairs.

10. The method of claim 9 , further comprising:

determining whether the highest entailment probability distribution score is greater than a pre-defined threshold;

outputting another intent from the selected utterance-label pair in response to the other utterance when the highest entailment probability distribution score is greater than the pre-defined threshold; and

outputting an out-of-scope label in response to the other utterance when the highest entailment probability distribution score is no greater than the pre-defined threshold.

11. A system for few-shot intent classification of an input natural language utterance, the system comprising:

a communication interface receiving a training dataset containing a plurality of utterances and a plurality of pre-defined intent labels;

a memory storing a plurality of processor-executable instructions; and

a processor reading from the memory and executing the instructions to perform operations comprising:

transforming the training dataset into a plurality of utterance-label pairs by pairing an utterance of the plurality of utterances with each of the plurality pre-defined intent labels, wherein each of the plurality of utterance-label pairs includes the utterance and a pre-defined intent label of the plurality of pre-defined intent labels;

generating a transformed entailment label for each of the plurality of utterance-label pairs, wherein the transformed entailment label indicates an entailment relationship between the utterance and the pre-defined intent label in an utterance-label pair;

inputting the plurality of utterance-label pairs to a classifier;

generating, using the classifier, an entailment probability distribution for each of the plurality of utterance-label pairs;

comparing the entailment probability distribution with the corresponding transformed entailment label for each of the plurality utterance-label pair;

computing a training objective based on the comparison of the entailment probability distribution with the corresponding transformed entailment label for each of the plurality of utterance-label pair; and

updating the classifier based on the training objective via backpropagation.

12. The system of claim 11 , wherein the training dataset contains less than a pre-defined number of utterances corresponding to the pre-defined intent label.

13. The system of claim 11 , wherein the entailment probability distribution indicates the probability a respective utterance and a respective pre-defined intent label in a respective input utterance-label pair match with each other.

14. The system of claim 11 , wherein the input utterance-label pair is formed by concatenating the utterance and the pre-defined intent label separated by a special token.

15. The system of claim 11 , wherein the transformed entailment label is selected from a group of a first label indicating the pre-defined intent label entails the utterance, a second label indicating that the pre-defined intent label contradicts the utterance, and a third label indicating that the pre-defined intent label is irrelevant to the utterance.

16. The system of claim 11 , wherein the transformed entailment label is a binary label indicating whether the pre-defined intent label entails the utterance.

17. The system of claim 11 , wherein the transformed entailment label is generated in a form of an entailment probability distribution indicating a likelihood that the input utterance-label pair corresponds to the transformed entailment label.

18. The system of claim 17 , wherein the training objective is computed as a binary cross-entropy between the entailment probability distribution and a binary ground-truth label derived from the pre-defined intent label from the training dataset.

19. The system of claim 11 , further comprising:

receiving, via the communication interface, another utterance;

generating a plurality of utterance-label pairs by combining the other utterance with each of the pre-defined intent labels, respectively;

generating, for each utterance-label pair, by the updated classifier, a respective entailment probability distribution score; and

selecting an utterance-label pair having a highest entailment probability distribution score among the plurality of utterance-label pairs;

determining whether the highest entailment probability distribution score is greater than a pre-defined threshold;

outputting another intent from the selected utterance-label pair in response to the other utterance when the highest entailment probability distribution score is greater than the pre-defined threshold; and

outputting an out-of-scope label in response to the other utterance when the highest entailment probability distribution score is no greater than the pre-defined threshold.

20. A non-transitory processor-readable storage medium storing a plurality of processor-executable instructions for few-shot intent classification of an input natural language utterance, the instructions being executed by a processor to perform operations comprising:

receiving, via a communication interface, a training dataset containing a plurality of utterances and a plurality of pre-defined intent labels;

transforming the training dataset into a plurality of utterance-label pairs by pairing an utterance of the plurality of utterances with each of the plurality pre-defined intent labels, wherein each of the plurality of utterance-label pairs includes the utterance and a pre-defined intent label of the plurality of pre-defined intent labels;

generating a transformed entailment label for each of the plurality of utterance-label pairs, wherein the transformed entailment label indicates an entailment relationship between the utterance and the pre-defined intent label in an utterance-label pair;

inputting the plurality of utterance-label pairs to a classifier;

generating, using the classifier, an entailment probability distribution for each of the plurality of utterance-label pairs;

comparing the entailment probability distribution with the corresponding transformed entailment label for each of the plurality utterance-label pair;

computing a training objective based on the comparison of the entailment probability distribution with the corresponding generated transformed entailment label for each of utterance-label pair; and

updating the classifier based on the training objective via backpropagation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 11, 2022
From: QU, JIN; LIU, WENHAO; HASHIMOTO, KAZUMA; XIONG, CAIMING
To: SALESFORCE.COM, INC.
Reel/Frame 058994/0552 →
Continuity (2)
Provisional Application 63189632 · May 17, 2021
Related Publication 20220366893A1 · Nov 17, 2022
References Cited (82)
US 8015006B2 · Kennewick · 2011 [cited by examiner]
US 10147428B1 · Shastry · 2018 [cited by examiner]
US 10652180B1 · Schwartz · 2020 [cited by examiner]
US 11043205B1 · Su · 2021 [cited by examiner]
US 11081104B1 · Su · 2021 [cited by examiner]
US 11410653B1 · Mahar · 2022 [cited by examiner]
US 11488256B1 · Schaps · 2022 [cited by examiner]
US 11527237B1 · Sarikaya · 2022 [cited by examiner]
US 11580968B1 · Gupta · 2023 [cited by examiner]
US 11640505B2 · Gao · 2023 [cited by examiner]
US 11657104B2 · Altaf · 2023 [cited by examiner]
US 11769491B1 · Bafna · 2023 [cited by examiner]
US 12219154B2 · Shastry · 2025 [cited by examiner]
US 20030200262A1 · Enomoto · 2003 [cited by examiner]
US 20120215477A1 · Tuck · 2012 [cited by examiner]
US 20160225370A1 · Kannan · 2016 [cited by examiner]
US 20170220668A1 · Patton · 2017 [cited by examiner]
US 20170262269A1 · Onda · 2017 [cited by examiner]
US 20170351706A1 · Kong · 2017 [cited by examiner]
US 20180232435A1 · Papangelis · 2018 [cited by examiner]
US 20180233143A1 · Papangelis · 2018 [cited by examiner]
US 20180358001A1 · Amid · 2018 [cited by examiner]
US 20190066694A1 · Hirzel · 2019 [cited by examiner]
US 20190103095A1 · Singaraju · 2019 [cited by examiner]
US 20190156192A1 · Dasgupta · 2019 [cited by examiner]
US 20190385610A1 · Steelberg · 2019 [cited by examiner]
US 20200051549A1 · Chen · 2020 [cited by examiner]
US 20200066278A1 · Steelberg · 2020 [cited by examiner]
US 20200075019A1 · Steelberg · 2020 [cited by examiner]
US 20200241524A1 · Britto Mattos Lima · 2020 [cited by examiner]
US 20200342032A1 · Subramaniam · 2020 [cited by examiner]
US 20200380382A1 · Seo · 2020 [cited by examiner]
US 20210035563A1 · Cartwright · 2021 [cited by examiner]
US 20210082424A1 · Johnson · 2021 [cited by examiner]
US 20210174252A1 · Jeong · 2021 [cited by examiner]
US 20210193118A1 · Lee · 2021 [cited by examiner]
US 20210256386A1 · Wieman · 2021 [cited by examiner]
US 20210264557A1 · Mao · 2021 [cited by examiner]
US 20210295833A1 · Rastrow · 2021 [cited by examiner]
US 20210312906A1 · Kuo · 2021 [cited by examiner]
US 20210365279A1 · Chirakkil · 2021 [cited by examiner]
US 20210390951A1 · Gadde · 2021 [cited by examiner]
US 20220044365A1 · Zhang · 2022 [cited by examiner]
US 20220058347A1 · Singaraju · 2022 [cited by examiner]
US 20220059077A1 · Thomson · 2022 [cited by examiner]
US 20220059094A1 · Thomson · 2022 [cited by examiner]
US 20220084510A1 · Peng · 2022 [cited by examiner]
US 20220093088A1 · Rangarajan Sridhar · 2022 [cited by examiner]
US 20220101116A1 · Sheikholeslami · 2022 [cited by examiner]
US 20220139384A1 · Wu · 2022 [cited by examiner]
US 20220164547A1 · Tan · 2022 [cited by examiner]
US 20220171947A1 · Xu · 2022 [cited by examiner]
US 20220180858A1 · Aharoni · 2022 [cited by examiner]
US 20220198781A1 · Monka · 2022 [cited by examiner]
US 20220207305A1 · Mosayyebpour Kaskari · 2022 [cited by examiner]
US 20220222435A1 · Lin · 2022 [cited by examiner]
US 20220230000A1 · Jalaluddin · 2022 [cited by examiner]
US 20220237378A1 · El Asri · 2022 [cited by examiner]
US 20220245353A1 · Turkkan · 2022 [cited by examiner]
US 20220269938A1 · Linck · 2022 [cited by examiner]
US 20220277741A1 · Chaudhary · 2022 [cited by examiner]
US 20220277764A1 · Ciliberti · 2022 [cited by examiner]
US 20220300761A1 · Zhang · 2022 [cited by examiner]
US 20220309247A1 · Jacob · 2022 [cited by examiner]
US 20220310065A1 · Rosenberg · 2022 [cited by examiner]
US 20220310084A1 · Brdiczka · 2022 [cited by examiner]
US 20220374602A1 · Park · 2022 [cited by examiner]
US 20220399116A1 · Luethy · 2022 [cited by examiner]
US 20220406415A1 · Lambrinoudis · 2022 [cited by examiner]
US 20230004988A1 · Bhatt · 2023 [cited by examiner]
US 20230015665A1 · Olabiyi · 2023 [cited by examiner]
US 20230025317A1 · Miao · 2023 [cited by examiner]
US 20230080553A1 · Dharmasiri · 2023 [cited by examiner]
US 20230096821A1 · Huang · 2023 [cited by examiner]
US 20230114591A1 · Shastry · 2023 [cited by examiner]
US 20230141398A1 · Bahdanau · 2023 [cited by examiner]
US 20230153527A1 · Puri · 2023 [cited by examiner]
US 20230281394A1 · Kuroda · 2023 [cited by examiner]
US 20230326167A1 · Mosayyebpour Kaskari · 2023 [cited by examiner]
US 20230334325A1 · Li · 2023 [cited by examiner]
US 20240076744A1 · Blidner · 2024 [cited by examiner]
US 20240184997A1 · Shou · 2024 [cited by examiner]
Cited By (1)
US 12,682,257