An Active Learning Pipeline for NLU Error Detection in Conversational Agents

Damian Pascual, Aritz Bercher, Akansha Bhardwaj, Mingbo Cui, Dominic Kohler, Liam Van Der Poel, Paolo RossoACL 2023

TL;DR

This paper introduces an active learning pipeline that significantly reduces the data annotation burden for conversational AI by intelligently prioritizing which user utterances to label. By using a combination of existing NLU models and large language models (LLMs) to detect potential errors, they achieve comparable performance with a fraction of the data, saving considerable time and cost.

What Problem Does This Paper Address?

Building high-performing conversational AI agents hinges on vast amounts of accurately labeled data. However, manually annotating this data is a time-consuming and expensive bottleneck. For agents deployed in real-world scenarios, where they collect massive amounts of user conversations, the key challenge is deciding which of these conversations are most valuable to label next. This paper focuses on the Natural Language Understanding (NLU) component, specifically identifying and prioritizing utterances where the agent might have misclassified the user's intent. This is crucial because misclassified intents can lead to incorrect agent actions, but it's hard to pinpoint these errors automatically, especially when conversations can fail for reasons other than NLU errors.

Methods

The core of the paper is an active learning pipeline designed for offline error detection. It comprises three main stages:

  1. Intent Classification: This is the agent's primary NLU model, which needs to be fast and efficient for real-time use (e.g., running on CPUs). The paper uses a Universal Sentence Encoder (USE) for embeddings followed by a linear Support Vector Classifier (SVC).
  2. Error Detection: This stage leverages two powerful Large Language Models (LLMs) – DistilBERT and DeBERTa-v3-base – which are fine-tuned on the same training data as the production classifier. For each incoming user utterance, the pipeline compares the intent predicted by the production model with the predictions from these two LLMs. If there's a disagreement among the three, the utterance is flagged as potentially problematic. The use of two distinct LLMs helps diversify the error detection process.
  3. Clustering and Topic Modeling: The flagged utterances are then grouped by their predicted intent. Within each group, a clustering and topic modeling approach (inspired by BERTopic) is applied. This involves dimensionality reduction (UMAP), clustering (HDBSCAN), and topic modeling (c-TF-IDF) to identify common themes and patterns within the problematic utterances. The goal is to present human annotators with clusters of similar errors, making analysis more efficient.

The pipeline aims to minimize the proportion of data clustered with low confidence, effectively prioritizing the most informative samples for annotation.

Datasets

The authors evaluated their pipeline on three datasets:

  • ATIS: A public dataset of flight-related queries.
  • SNIPS: A public dataset of user interactions with virtual assistants, where "intent" and "scenario" are combined into 64 classes.
  • AUTO: An internal dataset from the automotive domain, representing real-world conversational data.

Key Insights and Ideas

  • LLMs as Error Detectors: The paper demonstrates that LLMs, even if too slow for real-time inference, can be effectively repurposed offline to help identify potential errors in a production NLU model.
  • Clustering for Annotator Efficiency: Grouping problematic utterances by intent and then by topic significantly aids human annotators. Instead of sifting through random errors, they receive curated sets of similar issues, making it easier to spot patterns and understand the root causes of misclassifications.
  • Prioritization is Key: The core idea is that not all data is equally valuable for annotation. By intelligently selecting which data to label, significant cost and time savings can be achieved without sacrificing model performance.

Key Results

The experiments showed substantial improvements in annotation efficiency:

  • On the AUTO dataset, the pipeline achieved the same performance as training with 100% of the data, but only required labeling 36% of the data.
  • For ATIS, only 25.6% of the data was needed to match full training set performance.
  • For SNIPS, 54.8% of the data was sufficient.
  • In some cases (ATIS and AUTO), the pipeline even outperformed the model trained on the full dataset, using only a fraction of the data.
  • Qualitative analysis revealed specific error patterns, such as misclassifying "flight" queries as "airfare" or "airline" in ATIS, and confusing "delete event" with "set reminder" in SNIPS.

Limitations and Future Work

  • LLM Latency: While LLMs are used for offline detection, their inherent latency makes them unsuitable for real-time inference in production.
  • Focus on Intent Classification: The current pipeline is specifically designed for NLU intent classification errors.
  • Future Work: The authors plan to extend their pipeline to support Named Entity Recognition (NER) error detection, further broadening its applicability to conversational AI systems.

Summary updated

BibTeX
@inproceedings{pascual2023active,
  author = {Damian Pascual and Aritz Bercher and Akansha Bhardwaj and Mingbo Cui and Dominic Kohler and Liam Van Der Poel and Paolo Rosso},
  title = {{An Active Learning Pipeline for NLU Error Detection in Conversational Agents}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure