Out-of-Domain Detection for Natural Language Understanding in Dialog Systems

Yinhe Zheng, Guanyi Chen, Minlie Huang · DOI

TL;DR

This paper introduces POG (Pseudo OOD Generation), a novel framework that generates high-quality "fake" out-of-domain (OOD) samples to train more robust Natural Language Understanding (NLU) models. By utilizing an adversarial approach in a latent space and leveraging unlabeled data, the authors significantly reduce the false alarm rate of dialog systems when they encounter unsupported user inputs.

What Problem Does This Paper Address?

Most NLU modules are built on a "closed-world" assumption: they expect that the data they see during deployment will look exactly like the data they were trained on. In reality, users often provide "out-of-domain" (OOD) inputs—requests the system wasn't designed to handle.

If a system tries to force an OOD input into a known category (e.g., treating "How do I fix a leaking sink?" as a request to "Play Music"), it can lead to catastrophic failures or nonsensical behavior. While researchers use Entropy Regularization (ER) to teach models to be "uncertain" about OOD inputs, this technique usually requires a large set of manually labeled OOD examples, which are expensive and difficult to collect. This paper tackles the challenge of improving OOD detection without needing massive, human-labeled OOD datasets.

Methods

The authors propose the Pseudo OOD Generation (POG) model, which consists of three main parts:

  1. Autoencoder: An encoder maps an input utterance into a continuous latent code, and a decoder reconstructs it. This allows the model to work in a smooth mathematical space rather than dealing with discrete, "jittery" text tokens directly.
  2. Adversarial Generation (GAN): A generator creates "fake" latent codes that look like real in-domain (IND) data, while a discriminator tries to tell them apart. This ensures the generated pseudo-OOD samples are "near" the in-domain distribution—making them the most effective "hard examples" for training.
  3. Auxiliary Classifier (AC): This component regularizes the generator. It forces the generated samples to have high entropy (i.e., the model shouldn't be able to assign them a clear intent label).

To handle the fact that text is discrete (and thus non-differentiable for standard backpropagation), the authors use a "soft token" approximation and temperature scaling, allowing the gradients to flow from the classifier back to the generator.

The model is further extended into AEPOG, which uses unlabeled data (a mix of IND and OOD) to "enrich" the autoencoder's latent space, making the generated samples even more representative of real-world noise.

Datasets

The researchers evaluated their model on two primary benchmarks:

  • OSQ Dataset: A public dataset covering 150 in-domain intents and a set of manually labeled "Out-of-Scope" queries.
  • IPA Dataset: A large-scale, real-world Chinese dataset from a commercial intelligent assistant (Bixby). This is particularly challenging because the OOD samples are designed to be very similar to IND samples.
  • Chat Dataset: An additional test set containing "chitchat" or nonsense utterances to see how the model handles completely irrelevant noise.

Key Insights and Ideas

  • The "Hard Example" Philosophy: The most useful OOD samples for training aren't random gibberish; they are utterances that look like real commands but lack a specific supported intent. By generating "near-IND" samples, POG forces the NLU model to learn much sharper decision boundaries.
  • Latent Space vs. Discrete Text: Generating fluent, discrete text with GANs is notoriously difficult. By performing the adversarial training in the latent space of an autoencoder, the authors bypass many of the stability issues found in text-based GANs.
  • Unlabeled Data is a Goldmine: Even if you don't know which unlabeled logs are OOD and which are IND, simply using them to train the autoencoder (AEPOG) provides the model with a better "map" of the language space, leading to superior pseudo-OOD generation.

Key Results

The proposed ER+AEPOG method consistently outperformed all baselines (including popular methods like MSP, ODIN, and DOC).

  • FPR95 Improvement: On the OSQ dataset, the model achieved a significant reduction in the False Positive Rate at 95% True Positive Rate (FPR95), dropping it to 23.70% (compared to ~39% for the standard Maximum Softmax Probability baseline).
  • Real-world Robustness: On the difficult IPA dataset, the model showed a relative improvement of over 11% in FPR90, proving it can handle subtle OOD inputs that "trick" other models.
  • Qualitative Success: The generated samples (e.g., "How much is this payments please") were found to be grammatically plausible but intent-neutral, serving as perfect "boundary" cases for the classifier.

Limitations and Future Work

The authors note a few areas for growth:

  • Text Length: The current study focuses on short dialog utterances. Generating pseudo-OOD samples for long-form documents remains a more complex challenge.
  • System-wide Integration: While this paper focuses on the NLU (intent) module, the authors suggest that similar logic could be applied to other parts of the dialog pipeline, such as Dialogue State Tracking (DST).
  • Language Scope: While tested on English and Chinese, the framework's performance on morphologically rich languages or low-resource languages hasn't been explored yet.

Summary updated

BibTeX
@article{zheng2020out,
  author = {Yinhe Zheng and Guanyi Chen and Minlie Huang},
  title = {{Out-of-Domain Detection for Natural Language Understanding in Dialog Systems}},
  journal = {IEEE ACM Trans. Audio Speech Lang. Process.},
  year = {2020},
  doi = {10.1109/taslp.2020.2983593},
}
Figure