Does Utterance entails Intent?: Evaluating Natural Language Inference Based Setup for Few-Shot Intent Detection

Ayush Kumar, Vijit Malik, Jithendra VepaInterspeech 2022

TL;DR

This paper introduces NLI-FSL, a novel approach that reframes few-shot intent detection as a Natural Language Inference (NLI) task. By treating utterances as premises and intent class names as hypotheses, NLI-FSL achieves state-of-the-art results, particularly in challenging scenarios with large label spaces and limited training data.

What Problem Does This Paper Address?

Intent Detection (ID) is a fundamental component of conversational AI systems, aiming to understand the user's goal behind an utterance. Traditional supervised ID models require vast amounts of labeled data for each intent. However, in real-world applications, new intents emerge frequently, making it impractical to retrain models from scratch. This is where Few-Shot Intent Detection (FSID) comes in, aiming to classify intents with only a handful of examples. A more realistic challenge is Generalized Few-Shot Intent Detection (GFSID), where the model must distinguish between both novel (few-shot) and existing (seen) intents simultaneously. Existing FSID methods, like prototypical networks and matching-based approaches, struggle with large label spaces and the GFSID setting.

Methods

The core innovation of this paper is the transformation of the intent detection problem into a Natural Language Inference (NLI) task. NLI models determine if a "premise" entails, contradicts, or is neutral to a "hypothesis." NLI-FSL leverages this by:

  1. Data Transformation: For each utterance (premise), the model pairs it with its correct intent class name (hypothesis) labeled as "entailed." It also pairs the utterance with incorrect intent class names, labeled as "not-entailed" (or contradiction). This creates a dataset formatted for NLI.
  2. Fine-tuning a Pre-trained Language Model (PLM): The paper uses a BERT-base model, fine-tuned on this transformed NLI dataset. The model learns to predict the probability of entailment between an utterance and each potential intent class name.

During inference, the utterance is presented to the fine-tuned BERT model along with each possible intent class name. The intent class with the highest entailment probability is selected as the predicted intent. This approach is simple yet effective, avoiding complex meta-learning or generative methods that have shown limitations.

Datasets

The authors evaluate their NLI-FSL method on five benchmark datasets:

  • SNIPS: A dataset of crowd-sourced queries with 7 user intents.
  • ATIS: A domain-specific benchmark for flight reservation queries, with 16 classes (4 novel, 12 seen).
  • BANKING77: A single-domain dataset of online banking queries, with 77 classes (27 novel, 50 seen).
  • CLINC150: A multi-domain intent detection dataset with 150 classes (50 novel, 100 seen).
  • NLUED: (Mentioned in Table 1, but not detailed in the text).

These datasets vary in domain, size, and complexity, allowing for a comprehensive evaluation of the proposed method.

Key Insights and Ideas

  • Intent Class Names Carry Semantics: The paper's central hypothesis is that intent class names themselves contain enough semantic information to infer the user's intent when paired with an utterance. This is a crucial insight that simplifies the problem.
  • NLI as a Unified Framework: Framing ID as NLI provides a powerful and generalizable approach, moving beyond task-specific architectures.
  • GFSID is the Real Challenge: The results strongly suggest that the generalized few-shot intent detection setting (discriminating seen and novel intents) is significantly harder and where NLI-FSL truly shines.
  • Large Label Spaces are Problematic for Baselines: Existing methods struggle to scale effectively when the number of potential intents increases, whereas NLI-FSL shows more robust performance.
  • Entailment vs. Similarity: The authors hypothesize that DNNC's reliance on similarity might be less effective than NLI's focus on true entailment for intent detection.

Key Results

NLI-FSL consistently outperforms several competitive baselines (ProtoBERT, MLMAN, HATT, SMAN, DNNC) across all tested datasets and settings (1-shot and 5-shot FSID/GFSID).

  • FSID Performance: NLI-FSL achieves state-of-the-art results with gains of 2-8% F1 score over baselines in 1-shot and 5-shot FSID.
  • GFSID Performance: The method shows even more significant improvements in the more challenging GFSID setting, with gains up to 20% F1 score in the 1-shot scenario.
  • Robustness: NLI-FSL demonstrates better robustness to increasing numbers of novel classes, showing a smaller performance drop compared to baselines.
  • Large Label Spaces: The method is particularly effective on datasets like BANKING77 and CLINC150, which have a large number of classes.

Limitations and Future Work

  • Computational Intensity: The paper acknowledges that NLI-FSL is compute-intensive due to the need to generate utterance-label pairs for all potential intents during training.
  • Future Work: The authors suggest extending the approach to utilize multilingual language models for cross-lingual few-shot intent detection.

Summary updated

BibTeX
@inproceedings{kumar2022does,
  author = {Ayush Kumar and Vijit Malik and Jithendra Vepa},
  title = {{Does Utterance entails Intent?: Evaluating Natural Language Inference Based Setup for Few-Shot Intent Detection}},
  booktitle = {Interspeech},
  year = {2022},
}
Figure