Beyond Mahalanobis Distance for Textual OOD Detection
Pierre Colombo, Eduardo Dadalto Câmara Gomes, Guillaume Staerman, Nathan Noiry, Pablo Piantanida
Abstract
Deep learning methods have boosted the adoption of NLP systems in real-life applications. However, they turn out to be vulnerable to distribution shifts over time which may cause severe dysfunctions in production systems, urging practitioners to develop tools to detect out-of-distribution (OOD) samples through the lens of the neural network. In this paper, we introduce TRUSTED, a new OOD detector for classifiers based on Transformer architectures that meets operational requirements: it is unsupervised and fast to compute. The efficiency of TRUSTED relies on the fruitful idea that all hidden layers carry relevant information to detect OOD examples. Based on this, for a given input, TRUSTED consists in (i) aggregating this information and (ii) computing a similarity score by exploiting the training distribution, leveraging the powerful concept of data depth. Our extensive numerical experiments involve 51k model configurations, including various checkpoints, seeds, and datasets, and demonstrate that TRUSTED achieves state-of-the-art performances. In particular, it improves previous AUROC over 3 points.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 46f68771-0e58-427f-89e2-dfe0b6568767Cited by top-tier papers6
- What If the Input is Expanded in OOD Detection?Boxuan Zhang, Jianing Zhu, Zengmao Wang, Tongliang Liu et al.NeurIPS 2024 · 19 citations
- Unsupervised Layer-Wise Score Aggregation for Textual OOD DetectionMaxime Darrin, Guillaume Staerman, Eduardo Dadalto Câmara Gomes, Jackie C. K. Cheung et al.AAAI 2024 · 18 citations
- Revisiting Score Propagation in Graph Out-of-Distribution DetectionLongfei Ma, Yiyou Sun, Kaize Ding, Zemin Liu et al.NeurIPS 2024 · 14 citations
- EigenScore: OOD Detection using Posterior Covariance in Diffusion ModelsShirin Shoushtari, Yi Wang, Xiao Shi, M. Salman Asif et al.ICLR 2026 · 5 citations
- Hypothesis Transfer Learning with Surrogate Classification Losses: Generalization Bounds through Algorithmic StabilityAnass Aghbalou, Guillaume StaermanICML 2023 · 3 citations
Builds on19
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- Detecting Out-of-Distribution Examples with Gram MatricesChandramouli Shama Sastry, Sageev OoreICML 2020 · 275 citations
- The MultiBERTs: BERT Reproductions for Robustness AnalysisThibault Sellam, Steve Yadlowsky, Ian Tenney, Jason Wei et al.ICLR 2022 · 106 citations
- Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain DetectionAlexander Podolskiy, Dmitry Lipin, Andrey Bout, Ekaterina Artemova et al.AAAI 2021 · 100 citations
- Detecting Semantic AnomaliesFaruk Ahmed, Aaron C. CourvilleAAAI 2020 · 93 citations
Related papers
- Detection of Out-of-Distribution Samples Using Binary Neuron Activation PatternsBartlomiej Olber, Krystian Radlak, Adam Popowicz, Michal Szczepankiewicz et al.CVPR 2023
- Out-of-Distribution Detection by Leveraging Between-Layer Transformation SmoothnessFran Jelenic, Josip Jukic, Martin Tutek, Mate Puljiz et al.ICLR 2024 · 12 citations
- Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
- Understanding the Feature Norm for Out-of-Distribution DetectionJaewoo Park, Jacky Chen Long Chai, Jaeho Yoon, Andrew Beng Jin TeohICCV 2023 · 27 citations
- A General Framework For Detecting Anomalous Inputs to DNN ClassifiersJayaram Raghuram, Varun Chandrasekaran, Somesh Jha, Suman BanerjeeICML 2021 · 39 citations
