Unsupervised Layer-wise Score Aggregation for Textual OOD Detection
Not on the map. Why?
Abstract (arXiv)
Out-of-distribution (OOD) detection is a rapidly growing field due to new robustness and security requirements driven by an increased number of AI-based systems. Existing OOD textual detectors often rely on an anomaly score (e.g., Mahalanobis distance) computed on the embedding output of the last layer of the encoder. In this work, we observe that OOD detection performance varies greatly depending on the task and layer output. More importantly, we show that the usual choice (the last layer) is rarely the best one for OOD detection and that far better results could be achieved if the best layer were picked. To leverage this observation, we propose a data-driven, unsupervised method to combine layer-wise anomaly scores. In addition, we extend classical textual OOD benchmarks by including classification tasks with a greater number of classes (up to 77), which reflects more realistic settings. On this augmented benchmark, we show that the proposed post-aggregation methods achieve robust and consistent results while removing manual feature selection altogether. Their performance achieves near oracle's best layer performance.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 78 of its 119 references that are in the map. First posted on arXiv 20 Feb 2023.
Builds on
78 of 119 references.
References · 78
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2020The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalizationcited by 1,842
- 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
38 more
- 2020Energy-based Out-of-distribution Detectioncited by 1,296
- 2018XNLI: Evaluating Cross-lingual Sentence Representationscited by 913
- 2021Generalized Out-of-Distribution Detection: A Surveycited by 796
- 2022Out-of-Distribution Detection with Deep Nearest Neighborscited by 596
- 2019On the Cross-lingual Transferability of Monolingual Representationscited by 575
- 2021Datasets: A Community Library for Natural Language Processingcited by 526
- 2020GoEmotions: A Dataset of Fine-Grained Emotionscited by 479
- 2019Likelihood Ratios for Out-of-Distribution Detectioncited by 451
- 2020Efficient Intent Detection with Dual Sentence Encoderscited by 419
- 2022ViM: Out-Of-Distribution with Virtual-logit Matchingcited by 404
- 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 378
- 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 293
- 2019PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identificationcited by 262
- 2021MOS: Towards Scaling Out-of-distribution Detection for Large Semantic Spacecited by 233
- 2020Why Normalizing Flows Fail to Detect Out-of-Distribution Datacited by 220
- 2019Input complexity and out-of-distribution detection with likelihood-based generative modelscited by 186
- 2020Contrastive Training for Improved Out-of-Distribution Detectioncited by 186
- 2021Zero-Shot Out-of-Distribution Detection Based on the Pre-trained Model CLIPcited by 151
- 2022MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languagescited by 142
- 2018Out-of-Distribution Detection Using an Ensemble of Self Supervised Leave-out Classifierscited by 126
- 2021XLM-T: Multilingual Language Models in Twitter for Sentiment Analysis and Beyondcited by 114
- 2022Is Out-of-Distribution Detection Learnable?cited by 109
- 2021MOOD: Multi-level Out-of-distribution Detectioncited by 94
- 2021Types of Out-of-Distribution Texts and How to Detect Themcited by 80
- 2018Extended Isolation Forestcited by 78
- 2021Contrastive Out-of-Distribution Detection for Pretrained Transformerscited by 70
- 2021Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain Detectioncited by 67
- 2021Understanding Softmax Confidence and Uncertaintycited by 62
- 2021Just Say No: Analyzing the Stance of Neural Dialogue Generation in Offensive Contextscited by 56
- 2019Affect-Driven Dialog Generationcited by 50
- 2020Feature Space Singularity for Out-of-Distribution Detectioncited by 49
- 2018Generalization Error in Deep Learningcited by 46
- 2020X-Stance: A Multilingual Multi-Target Dataset for Stance Detectioncited by 42
- 2021A Novel Estimator of Mutual Information for Learning to Disentangle Textual Representationscited by 37
- 2020Hierarchical Pre-training for Sequence Labelling in Spoken Dialogcited by 36
- 2020What's so special about BERT's layers? A closer look at the NLP pipeline in monolingual and multilingual modelscited by 35
- 2021InfoLM: A New Metric to Evaluate Summarization & Data2Text Generationcited by 33
- 2020Guiding attention in Sequence-to-sequence models for Dialogue Act predictioncited by 26
50 most cited of 78 All 78 (JSON)
Built on by
Citing papers per year: 2023: 3; 2024: 9; 2025: 1; 2026: 2.
15 papers.
Sort:
By area:
- 2024On Large Language Model Continual Unlearningcited by 51
- 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domaincited by 39
- 2023Towards More Robust NLP System Evaluation: Handling Missing Scores in Benchmarkscited by 14
- 2024A Layer Selection Approach to Test Time Adaptationcited by 7
- 2023Hypothesis Transfer Learning with Surrogate Classification Losses: Generalization Bounds through Algorithmic Stabilitycited by 4
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection taskscited by 4
- 2024What If the Input is Expanded in OOD Detection?cited by 4
- 2023Toward Stronger Textual Attack Detectorscited by 3
- 2025When Should Dense Retrievers Be Updated in Evolving Corpora? Detecting Out-of-Distribution Corpora Using GradNormIRcited by 3
- 2024Improving Out-of-Distribution Detection by Combining Existing Post-hoc Methodscited by 2
- 2024Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanismcited by 1
- 2024Signature Isolation Forestcited by 1
3 more
- 2024Combine and Conquer: A Meta-Analysis on Data Shift and Out-of-Distribution Detectioncited by 1
- 2026SCOPE: A Lightweight-training LLM Framework for Air Traffic Control Readback Monitoringcited by 0
- 2026Layer Selection in VLMs for Zero-Shot OOD Detection via Multi-Resolution Entropy Estimationcited by 0
- 2026Layer Selection in VLMs for Zero-Shot OOD Detection via Multi-Resolution Entropy Estimation8 Sep 2026
- 2026SCOPE: A Lightweight-training LLM Framework for Air Traffic Control Readback Monitoring28 May 2026
- 2025When Should Dense Retrievers Be Updated in Evolving Corpora? Detecting Out-of-Distribution Corpora Using GradNormIR2 Jun 2025
- 2024What If the Input is Expanded in OOD Detection?24 Oct 2024
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection tasks17 Oct 2024
- 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domain28 Jul 2024
- 2024On Large Language Model Continual Unlearning14 Jul 2024
- 2024Improving Out-of-Distribution Detection by Combining Existing Post-hoc Methods9 Jul 2024
- 2024Combine and Conquer: A Meta-Analysis on Data Shift and Out-of-Distribution Detection23 Jun 2024
- 2024A Layer Selection Approach to Test Time Adaptation4 Apr 2024
- 2024Signature Isolation Forest7 Mar 2024
- 2024Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism20 Feb 2024
- 2024On Large Language Model Continual Unlearningcited by 51
- 2024On Large Language Model Continual Unlearning14 Jul 2024
- 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domaincited by 39
- 2023Towards More Robust NLP System Evaluation: Handling Missing Scores in Benchmarkscited by 14
- 2024A Layer Selection Approach to Test Time Adaptationcited by 7
- 2023Hypothesis Transfer Learning with Surrogate Classification Losses: Generalization Bounds through Algorithmic Stabilitycited by 4
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection taskscited by 4
- 2024What If the Input is Expanded in OOD Detection?cited by 4
- 2023Toward Stronger Textual Attack Detectorscited by 3
- 2025When Should Dense Retrievers Be Updated in Evolving Corpora? Detecting Out-of-Distribution Corpora Using GradNormIRcited by 3
- 2024Improving Out-of-Distribution Detection by Combining Existing Post-hoc Methodscited by 2
- 2024Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanismcited by 1
- 2024Signature Isolation Forestcited by 1
- 2024Combine and Conquer: A Meta-Analysis on Data Shift and Out-of-Distribution Detectioncited by 1
12 most cited of 14 All 14 (JSON)
- 2026Layer Selection in VLMs for Zero-Shot OOD Detection via Multi-Resolution Entropy Estimation8 Sep 2026
- 2026SCOPE: A Lightweight-training LLM Framework for Air Traffic Control Readback Monitoring28 May 2026
- 2025When Should Dense Retrievers Be Updated in Evolving Corpora? Detecting Out-of-Distribution Corpora Using GradNormIR2 Jun 2025
- 2024What If the Input is Expanded in OOD Detection?24 Oct 2024
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection tasks17 Oct 2024
- 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domain28 Jul 2024
- 2024Improving Out-of-Distribution Detection by Combining Existing Post-hoc Methods9 Jul 2024
- 2024Combine and Conquer: A Meta-Analysis on Data Shift and Out-of-Distribution Detection23 Jun 2024
- 2024A Layer Selection Approach to Test Time Adaptation4 Apr 2024
- 2024Signature Isolation Forest7 Mar 2024
- 2024Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism20 Feb 2024
- 2023Toward Stronger Textual Attack Detectors21 Oct 2023
12 newest of 14 All 14 (JSON)