Skip to main content
QUICK REVIEW

[Paper Review] Are Pretrained Transformers Robust in Intent Classification? A Missing Ingredient in Evaluation of Out-of-Scope Intent Detection

Jianguo Zhang, Kazuma Hashimoto|arXiv (Cornell University)|Jun 8, 2021
Adversarial Robustness in Machine LearningComputer Science8 citations
TL;DR

This paper investigates the robustness of pre-trained Transformers in few-shot intent classification, revealing that they perform poorly on in-domain out-of-scope (ID-OOS) examples—semantically similar but unsupported intents—despite strong performance on in-scope and out-of-domain OOS cases. The authors construct two new datasets (CLINC-Single-Domain-OOS and BANKING77-OOS) and demonstrate that models, including BERT, RoBERTa, and ToD-BERT, exhibit high confidence in misclassifying ID-OOS examples as in-scope, even after masking overlapping keywords, indicating a critical gap in evaluation and model robustness.

ABSTRACT

Pre-trained Transformer-based models were reported to be robust in intent classification. In this work, we first point out the importance of in-domain out-of-scope detection in few-shot intent recognition tasks and then illustrate the vulnerability of pre-trained Transformer-based models against samples that are in-domain but out-of-scope (ID-OOS). We construct two new datasets, and empirically show that pre-trained models do not perform well on both ID-OOS examples and general out-of-scope examples, especially on fine-grained few-shot intent detection tasks. To figure out how the models mistakenly classify ID-OOS intents as in-scope intents, we further conduct analysis on confidence scores and the overlapping keywords, as well as point out several prospective directions for future work. Resources are available on https://github.com/jianguoz/Few-Shot-Intent-Detection.

Motivation & Objective

  • To investigate the robustness of pre-trained Transformers in few-shot intent classification, particularly regarding in-domain out-of-scope (ID-OOS) examples.
  • To address the lack of evaluation on semantically similar, in-domain OOS examples, which are common in real-world dialog systems.
  • To construct and release two new datasets—CLINC-Single-Domain-OOS and BANKING77-OOS—specifically for ID-OOS and general OOS intent detection in fine-grained few-shot scenarios.
  • To analyze why models fail to detect ID-OOS examples despite high confidence scores, focusing on keyword overlap and confidence distributions.
  • To identify critical shortcomings in current evaluation protocols and suggest directions for future work in robust OOS detection.

Proposed method

  • Constructed two new datasets: CLINC-Single-Domain-OOS and BANKING77-OOS, by extracting semantically related but unsupported intents from in-scope classes to form ID-OOS examples.
  • Evaluated five pre-trained models—BERT, RoBERTa, ALBERT, ELECTRA, and ToD-BERT—using a confidence-based OOS detection method with a threshold tuned on the development set.
  • Applied a masked language modeling approach by replacing top-5 overlapping unigrams in ID-OOS examples with [MASK] tokens to assess the impact of keyword overlap on misclassification.
  • Reported standard metrics: in-scope accuracy (A_in), OOS recall (R_oos), and OOS precision (P_oos), with threshold optimization to maximize the harmonic mean of A_in and R_oos.
  • Conducted ablation and analysis on confidence score distributions and confusion matrices to identify patterns in misclassification.
  • Compared results across few-shot (5-shot) and full-shot settings to assess the impact of training data scale on ID-OOS detection.

Experimental results

Research questions

  • RQ1Are pre-trained Transformers robust in intent classification when faced with in-domain out-of-scope (ID-OOS) examples that are semantically similar to in-scope intents?
  • RQ2How does the performance of pre-trained models on ID-OOS detection compare to their performance on out-of-domain OOS (OOD-OOS) and in-scope examples?
  • RQ3To what extent does keyword overlap between ID-OOS and in-scope intents contribute to model misclassification, even after masking?
  • RQ4Why do models assign high confidence scores to ID-OOS examples despite their incorrect classification?
  • RQ5Can existing few-shot learning methods with contrastive learning improve OOS detection performance on ID-OOS examples?

Key findings

  • Pre-trained models exhibit significantly lower in-scope accuracy on ID-OOS examples compared to OOD-OOS examples, with the performance gap widening as model complexity increases.
  • OOS recall and precision are substantially lower for ID-OOS detection than for OOD-OOS, indicating poor generalization to semantically similar but unsupported intents.
  • Even after masking the top-5 overlapping unigrams between ID-OOS and in-scope intent pairs, models still assign high confidence scores (e.g., 0.84 and 0.86) to incorrect in-scope classes, suggesting reliance on contextual cues beyond keywords.
  • RoBERTa performs better than other models in general, but still fails to distinguish ID-OOS examples from in-scope ones, especially in fine-grained, high-variety domains like BANKING77.
  • ToD-BERT, pre-trained on task-oriented dialog data, underperforms on ID-OOS detection, indicating that domain-specific pretraining does not guarantee robustness to OOS intent detection.
  • Contrastive learning methods do not yield significant improvements in OOS detection, suggesting that current few-shot learning techniques are insufficient for handling ID-OOS challenges.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.