mlsanityData to 14 Oct 2026

Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain Detection

arXiv 2101.03778 ↗First posted 11 Jan 2021cs.CL cs.LGcited by 70

Not on the map. Why?

Abstract (arXiv)

Real-life applications, heavily relying on machine learning, such as dialog systems, demand out-of-domain detection methods. Intent classification models should be equipped with a mechanism to distinguish seen intents from unseen ones so that the dialog agent is capable of rejecting the latter and avoiding undesired behavior. However, despite increasing attention paid to the task, the best practices for out-of-domain intent detection have not yet been fully established. This paper conducts a thorough comparison of out-of-domain intent detection methods. We prioritize the methods, not requiring access to out-of-domain data during training, gathering of which is extremely time- and labor-consuming due to lexical and stylistic variation of user utterances. We evaluate multiple contextual encoders and methods, proven to be efficient, on three standard datasets for intent classification, expanded with out-of-domain utterances. Our main findings show that fine-tuning Transformer-based encoders on in-domain data leads to superior results. Mahalanobis distance, together with utterance representations, derived from Transformer-based encoders, outperforms other methods by a wide margin and establishes new state-of-the-art results for all datasets. The broader analysis shows that the reason for success lies in the fact that the fine-tuned Transformer is capable of constructing homogeneous representations of in-domain utterances, revealing geometrical disparity to out of domain utterances. In turn, the Mahalanobis distance captures this disparity easily. The code is available in our GitHub repo: https://github.com/huawei-noah/noah-research/tree/master/Maha_OOD .

Key facts. Cited by 70 papers in the map (data through 14 Oct 2026). Builds on 25 of its 35 references that are in the map. First posted on arXiv 11 Jan 2021.

Builds on

25 of 35 references.

References · 25

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  4. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  5. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
  6. 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,385
  7. 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,485
  8. 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,328
  9. 2018Deep Anomaly Detection with Outlier Exposurecited by 942
  10. 2018Predictive Uncertainty Estimation via Prior Networkscited by 557
  11. 2019Likelihood Ratios for Out-of-Distribution Detectioncited by 453
  12. 2018Do Deep Generative Models Know What They Don't Know?cited by 443
13 more
  1. 2020Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awarenesscited by 389
  2. 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 386
  3. 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 294
  4. 2020Selective Question Answering under Domain Shiftcited by 238
  5. 2018Cross-Lingual Transfer Learning for Multilingual Task Oriented Dialogcited by 125
  6. 2019Deep Unknown Intent Detection with Margin Losscited by 66
  7. 2019Out-of-domain Detection for Natural Language Understanding in Dialog Systemscited by 62
  8. 2019Out-of-Domain Detection for Low-Resource Text Classification Taskscited by 36
  9. 2019Likelihood Ratios and Generative Classifiers for Unsupervised Out-of-Domain Detection In Task Oriented Dialogcited by 33
  10. 2017Distance-based Confidence Score for Neural Network Classifierscited by 30
  11. 2019Statistical Analysis of Nearest Neighbor Methods for Anomaly Detectioncited by 29
  12. 2020Why is the Mahalanobis Distance Effective for Anomaly Detection?cited by 28
  13. 2019Robustness properties of Facebook's ResNeXt WSL modelscited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2021: 3; 2022: 16; 2023: 20; 2024: 12; 2025: 7; 2026: 12.

70 papers.

Sort:

By area:

  1. 2022Delving into Out-of-Distribution Detection with Vision-Language Representationscited by 216
  2. 2022POEM: Out-of-Distribution Detection with Posterior Samplingcited by 108
  3. 2024Benchmarking Uncertainty Quantification Methods for Large Language Models with LM-Polygraphcited by 105
  4. 2023A Survey of Safety and Trustworthiness of Large Language Models through the Lens of Verification and Validationcited by 93
  5. 2023GL-MCM: Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detectioncited by 36
  6. 2023A Survey on Out-of-Distribution Detection in NLPcited by 31
  7. 2023Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain Detectioncited by 29
  8. 2021How is BERT surprised? Layerwise detection of linguistic anomaliescited by 24
  9. 2022Rainproof: An Umbrella To Shield Text Generators From Out-Of-Distribution Datacited by 21
  10. 2024BadActs: A Universal Backdoor Defense in the Activation Spacecited by 21
  11. 2021GOLD: Improving Out-of-Scope Detection in Dialogues using Data Augmentationcited by 20
  12. 2022Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attackscited by 19
38 more
  1. 2024Robust AI-Generated Text Detection by Restricted Embeddingscited by 18
  2. 2025Token-Level Density-Based Uncertainty Quantification Methods for Eliciting Truthfulness of Large Language Modelscited by 18
  3. 2023How Good Are LLMs at Out-of-Distribution Detection?cited by 17
  4. 2023Unsupervised Layer-wise Score Aggregation for Textual OOD Detectioncited by 15
  5. 2023Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothnesscited by 15
  6. 2022Towards Textual Out-of-Domain Detection without In-Domain Labelscited by 14
  7. 2023Fine-Tuning Deteriorates General Textual Out-of-Distribution Detection by Distorting Task-Agnostic Featurescited by 12
  8. 2022Towards Computationally Feasible Deep Active Learningcited by 11
  9. 2022Estimating Soft Labels for Out-of-Domain Intent Detectioncited by 11
  10. 2022Multi-Level Knowledge Distillation for Out-of-Distribution Detection in Textcited by 11
  11. 2024Your Finetuned Large Language Model is Already a Powerful Out-of-distribution Detectorcited by 11
  12. 2023Uncertainty Estimation of Transformers' Predictions via Topological Analysis of the Attention Matricescited by 8
  13. 2022Keywords and Instances: A Hierarchical Contrastive Learning Framework Unifying Hybrid Granularities for Text Generationcited by 7
  14. 2025Shh, don't say that! Domain Certification in LLMscited by 7
  15. 2025Mysteries of the Deep: Role of Intermediate Representations in Out of Distribution Detectioncited by 7
  16. 2022Holistic Sentence Embeddings for Better Out-of-Distribution Detectioncited by 6
  17. 2023Online Reinforcement Learning in Non-Stationary Context-Driven Environmentscited by 6
  18. 2023Out-of-Domain Intent Detection Considering Multi-Turn Dialogue Contextscited by 6
  19. 2025Uncertainty-aware abstention in medical diagnosis based on medical textscited by 6
  20. 2021Data Invariants to Understand Unsupervised Out-of-Distribution Detectioncited by 5
  21. 2022Self-Supervised Losses for One-Class Textual Anomaly Detectioncited by 5
  22. 2022Learning to Classify Open Intent via Soft Labeling and Manifold Mixupcited by 5
  23. 2023Classical Out-of-Distribution Detection Methods Benchmark in Text Classification Taskscited by 5
  24. 2024Domain Adaptation in Intent Classification Systems: A Reviewcited by 4
  25. 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection taskscited by 4
  26. 2026Benchmarking and Improving Monitors for Out-Of-Distribution Alignment Failure in LLMscited by 4
  27. 2022Beyond Mahalanobis-Based Scores for Textual OOD Detectioncited by 3
  28. 2023SELFOOD: Self-Supervised Out-Of-Distribution Detection via Learning to Rankcited by 3
  29. 2023Toward Stronger Textual Attack Detectorscited by 3
  30. 2024Out-of-Distribution Detection through Soft Clustering with Non-Negative Kernel Regressioncited by 3
  31. 2024Lightweight Model Attribution and Detection of Synthetic Speech via Audio Residual Fingerprintscited by 3
  32. 2026Trust The Typicalcited by 3
  33. 2026An Embarrassingly Simple Detector for Model Extraction Attacks in Large Language Model API Trafficcited by 3
  34. 2023Probing Out-of-Distribution Robustness of Language Models with Parameter-Efficient Transfer Learningcited by 2
  35. 2023A Hybrid Architecture for Out of Domain Intent Detection and Intent Discoverycited by 2
  36. 2023Detecting out-of-distribution text using topological features of transformer-based language modelscited by 2
  37. 2022Contrastive Novelty-Augmented Learning: Anticipating Outliers with Large Language Modelscited by 1
  38. 2023General-Purpose Multi-Modal OOD Detection Frameworkcited by 1

50 most cited of 70 All 70 (JSON)