Error Detection in Large-Scale Natural Language Understanding Systems Using Transformer Models

Rakesh Chada, Pradeep Natarajan, Darshan Fofadiya, Prathap Ramachandra

TL;DR

This paper tackles the challenge of detecting domain misclassification errors in massive conversational AI systems. They propose an offline system using pre-trained Transformer models (like RoBERTa) combined with production system outputs to identify these "false rejects," significantly improving detection accuracy over baseline methods.

What Problem Does This Paper Address?

Large-scale conversational assistants like Alexa, Siri, and Google Assistant rely on a complex, modular architecture. This involves multiple specialized models for tasks like domain classification, intent recognition, and entity extraction. While this modularity allows for scalability to handle billions of utterances, it creates a significant challenge: pinpointing why and where errors occur. Specifically, this paper focuses on "false rejects" (FRs) – utterances that are incorrectly routed to the wrong domain. Identifying these FRs is crucial for improving the system, but manually sifting through vast amounts of data is infeasible. Furthermore, the asynchronous development of individual domain models exacerbates this problem, making it hard to isolate the source of misclassifications.

Methods

The core of the proposed solution is an offline FR detection system built upon pre-trained Transformer models. Instead of relying solely on the production system's output, they combine two key pieces of information:

  • Utterance Encodings: They leverage the powerful contextual embeddings generated by a pre-trained RoBERTa model for the raw utterance text.
  • N-Best Hypotheses: They incorporate the top N domain classification hypotheses (along with their scores) produced by the actual production system's re-ranker.

These two sources of information are then fed into a fine-tuned Transformer model. The model is trained in a multi-task learning setting on a small, manually annotated dataset of FRs. This multi-task approach aims to improve language representation by allowing the model to learn from related tasks simultaneously. The final model then acts as a binary classifier, predicting whether an utterance is a false reject or not.

Datasets

The paper uses a dataset derived from a large-scale conversational AI system. This dataset is characterized by a significant class imbalance, with a false reject to non-false reject ratio of 1:15. A portion of this dataset was manually annotated by expert annotators to create the training and validation sets for the FR detection models. The authors note that they do not use the true production distribution for confidentiality reasons.

Key Insights and Ideas

  • Pre-trained Transformers are Powerful for Imbalanced Data: The study highlights that even with a small, imbalanced dataset, pre-trained Transformer models like RoBERTa can significantly outperform traditional models (like bi-LSTMs) for error detection tasks. This demonstrates their ability to generalize and capture subtle patterns.
  • Leveraging Production System Output is Key: Incorporating the N-best hypotheses from the production system's re-ranker provides valuable context and leads to substantial performance gains. This suggests that understanding the system's own uncertainty or alternative predictions is crucial for error detection.
  • Multi-task Learning Enhances Robustness: Training the model in a multi-task setting, where it predicts both domain classification and false reject status, further improves performance. This indicates that shared learning representations across related tasks can lead to more robust error detection.
  • Ensembling for Marginal Gains: While not the primary focus, ensembling multiple models provides a small but consistent improvement, a common finding in machine learning.

Key Results

The proposed Transformer-based approach significantly outperforms baseline methods:

  • RoBERTa alone: Achieved an F1 score of 25.2%, a 12.1% absolute improvement over a bi-LSTM baseline.
  • RoBERTa + N-Best Embeddings: Further improved the F1 score to 28.1% (a 3.1% gain).
  • RoBERTa + N-Best Multitask: Reached an F1 score of 30.0% (a 1.9% gain).
  • Ensemble of Multitask Models: Achieved the highest F1 score of 32.2% (an additional 2.2% gain).

These results demonstrate the effectiveness of the proposed methods in identifying false rejects, especially in scenarios with extreme class imbalance.

Limitations and Future Work

  • Offline Analysis: The current system operates offline, meaning it identifies potential errors after they have occurred. This is valuable for data curation and model improvement but doesn't prevent errors in real-time.
  • Latency Constraints: The RoBERTa-large model, while accurate, is too slow for direct use in production. The authors propose a human-in-the-loop system where the offline model flags candidates for human review, which then feeds back into production model training.
  • Future Work: The authors plan to explore even larger Transformer models (e.g., Megatron, T5) to further enhance FR detection performance. They also aim to investigate more sophisticated ways to leverage production system outputs and potentially explore online detection methods.

Summary updated

BibTeX
@inproceedings{chada2021error,
  author = {Rakesh Chada and Pradeep Natarajan and Darshan Fofadiya and Prathap Ramachandra},
  title = {{Error Detection in Large-Scale Natural Language Understanding Systems Using Transformer Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
}
Figure