IP Library › Granted Patent US 12,014,146
Granted Patent B2
US 12,014,146 · App. 18/364,298 · Granted Jun 18, 2024

Techniques for out-of-domain (OOD) detection

Inventors: Thanh Long Duong (Seabrook, AU); Mark Edward Johnson (Castle Cove, AU); Vishal Vishnoi (Redwood City, CA); Crystal C. Pan (Palo Alto, CA); Vladislav Blinov (Melbourne, AU); Cong Duy Vu Hoang (Wantima South, AU); Elias Luqman Jalaluddin (Seattle, WA); Duy Vu (Melbourne, AU); Balakota Srinivas Vinnakota (Sunnyvale, CA)
Assignee: Oracle International Corporation
G06F40/30G06F40/289G06N20/00H04L51/02G06F40/205
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,014,146
App. No.
18/364,298
Granted
Jun 18, 2024
Kind
B2
Abstract

The present disclosure relates to techniques for identifying out-of-domain utterances. One particular technique includes receiving an utterance and a target domain of a chatbot, generating a sentence embedding for the utterance, obtaining an embedding representation for each cluster of in-domain utterances associated with the target domain, predicting, using a metric learning model, a first probability that the utterance belongs to the target domain based on a similarity or difference between the sentence embedding and each embedding representation for each cluster, predicting, using an outlier detection model, a second probability that the utterance belongs to the target domain based on a determined distance or density deviation between the sentence embedding and embedding representations for neighboring clusters, evaluating the first probability and the second probability to determine a final probability, and classifying the utterance as in-domain or out-of-domain for the chatbot based on the final probability.

Claims (40)

1. A computer-implemented method comprising:

accessing an utterance and a target domain of a chatbot;

generating a sentence embedding for the utterance;

predicting a first probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a distance or density deviation between the sentence embedding and an embedding representation for a cluster of a plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

predicting a second probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a similarity or difference between the sentence embedding and an embedding representation for a cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

determining, based on the first probability and the second probability, a final probability as to whether the utterance belongs to the target domain of the chatbot; and

classifying the utterance as in-domain or out-of-domain for the chatbot based on the final probability.

2. The method of claim 1 , wherein an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot is an average of sentence embeddings for each in-domain utterance in the given cluster.

3. The method of claim 1 , wherein the first probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into an outlier detection model constructed with a distance or density algorithm for outlier detection.

4. The method of claim 3 , wherein the outlier detection model is configured to calculate the distance or density deviation.

5. The method of claim 1 , wherein the second probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into a metric learning model having learned model parameters configured to provide a probability as to whether the utterance belongs to the target domain.

6. The method of claim 5 , wherein the metric learning model is configured to calculate the similarity or difference.

7. The method of claim 1 , wherein the sentence embedding for the utterance is generated using an embedding model that maps natural language elements including sentences, words, and n-grams into arrays of numbers, and wherein each natural language element of the natural language elements is represented as a single point in a vector space.

8. A computer-program product tangibly embodied in a non-transitory machine-readable storage medium, including instructions configured to cause one or more data processors to perform actions including:

accessing an utterance and a target domain of a chatbot;

generating a sentence embedding for the utterance;

predicting a first probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a distance or density deviation between the sentence embedding and an embedding representation for a cluster of a plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

predicting a second probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a similarity or difference between the sentence embedding and an embedding representation for a cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

determining, based on the first probability and the second probability, a final probability as to whether the utterance belongs to the target domain of the chatbot; and

classifying the utterance as in-domain or out-of-domain for the chatbot based on the final probability.

9. The computer-program product of claim 8 , wherein an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot is an average of sentence embeddings for each in-domain utterance in the given cluster.

10. The computer-program product of claim 8 , wherein the first probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into an outlier detection model constructed with a distance or density algorithm for outlier detection.

11. The computer-program product of claim 10 , wherein the outlier detection model is configured to calculate the distance or density deviation.

12. The computer-program product of claim 8 , wherein the second probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into a metric learning model having learned model parameters configured to provide a probability as to whether the utterance belongs to the target domain.

13. The computer-program product of claim 12 , wherein the metric learning model is configured to calculate the similarity or difference.

14. The computer-program product of claim 8 , wherein the sentence embedding for the utterance is generated using an embedding model that maps natural language elements including sentences, words, and n-grams into arrays of numbers, and wherein each natural language element of the natural language elements is represented as a single point in a vector space.

15. A system comprising:

one or more data processors; and

a non-transitory computer readable storage medium containing instructions which, when executed on the one or more data processors, cause the one or more data processors to perform actions including:

accessing an utterance and a target domain of a chatbot;

generating a sentence embedding for the utterance;

predicting a first probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a distance or density deviation between the sentence embedding and an embedding representation for a cluster of a plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

predicting a second probability as to whether the utterance belongs to the target domain of the chatbot based on the sentence embedding for the utterance and a similarity or difference between the sentence embedding and an embedding representation for a cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot;

determining, based on the first probability and the second probability, a final probability as to whether the utterance belongs to the target domain of the chatbot; and

classifying the utterance as in-domain or out-of-domain for the chatbot based on the final probability.

16. The system of claim 15 , wherein an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot is an average of sentence embeddings for each in-domain utterance in the given cluster.

17. The system of claim 15 , wherein the first probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into an outlier detection model constructed with a distance or density algorithm for outlier detection.

18. The system of claim 17 , wherein the outlier detection model is configured to calculate the distance or density deviation.

19. The system of claim 15 , wherein the second probability is predicted by inputting the sentence embedding for the utterance and an embedding representation for a given cluster of the plurality of clusters of in-domain utterances associated with the target domain of the chatbot into a metric learning model having learned model parameters configured to provide a probability as to whether the utterance belongs to the target domain.

20. The system of claim 19 , wherein the metric learning model is configured to calculate the similarity or difference.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 3, 2023
From: DUONG, THANH LONG; JOHNSON, MARK EDWARD; VISHNOI, VISHAL; PAN, CRYSTAL C.; BLINOV, VLADISLAV; HOANG, CONG DUY VU; JALALUDDIN, ELIAS LUQMAN; VU, DUY; VINNAKOTA, BALAKOTA SRINIVAS
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 064485/0209 →
Continuity (3)
Continuation 17217909 · Mar 30, 2021
Provisional Application 63002139 · Mar 30, 2020
Related Publication 20230376696A1 · Nov 23, 2023