Research map / Label-efficient and robust learning / OOD and anomaly detection
Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothness
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes BLOOD, a white-box OOD detector for Transformers that scores inputs by the smoothness (squared Frobenius norm of the between-layer Jacobian, estimated stochastically) of intermediate representation transformations, requiring only model weights.
Problem
OOD detection for pre-trained Transformers when training data is unavailable and training cannot be modified (white-box setting), as is typical for third-party models.
Approach
ID inputs undergo smoother between-layer representation transformations than OOD inputs; BLOOD quantifies this via the squared Frobenius norm of the Jacobian between layers, with an unbiased Hutchinson-style estimator using forward-mode Jacobian-vector products.
Key results
- BLOOD_L achieves the best white/black-box AUROC on most text datasets with ELECTRA, e.g., 96.72 on BigPatent vs 78.56 for MSP, and 98.90 on TREC vs 97.26 for MSP.
- On simplified binary datasets, BLOOD_L's AUROC drops (e.g., RoBERTa BP2 79.66 vs MSP 89.74), while other methods improve, suggesting BLOOD is better on more complex tasks.
- On Near-OOD background shift (SST vs Yelp), BLOOD_L with RoBERTa reaches 62.70 AUROC, outperforming all other methods including open-box ones, while semantic shift performance is suboptimal (61.61 vs MSP 69.46).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use the last-layer score instead of averaging scores across all layers (ablation) | BLOOD on text OOD detection · SST-2, Subjectivity, AG-News, and TREC vs OBW | AUROC (%): 50.56 -> 72.83; 52.02 -> 74.66; 77.46 -> 61.95; 69.63 -> 95.30; 74.36 -> 78.11; 74.10 -> 77.41; 65.67 -> 80.28; 97.48 -> | Mixed |
| Use BLOOD_L instead of the strongest reported baseline | BLOOD · SST-2, Subjectivity, AG-News, TREC, BigPatent, AmazonReviews, MovieGenre, and 20NewsGroups vs OBW | AUROC (%): 72.83 vs 85.36; 74.66 vs 93.47; 61.95 vs 82.63; 95.30 vs 96.87; 89.53 vs 97.35; 93.20 vs 98.35; 85.23 vs 95.12; 72.02 vs | Mixed |
| Simplify BigPatent, AmazonReviews, and MovieGenre to two classes | BLOOD_L · BP/BP2, AR/AR2, and MG/MG2 vs OBW | AUROC (%): 79.66; 88.20; 84.78; 71.71; 90.67; 91.41 | Mixed |
| Use BLOOD_L for semantic rather than background shift detection | BLOOD · 20NewsGroups semantic shift and SST-2/Yelp background shift | AUROC (%): 61.61; 62.49; 62.70; 59.35 | Mixed |
| Learn layer weights using a validation set and logistic regression | BLOOD open-box · SST, SUBJ, AGN, TREC, BP, AR, MG, and NG | AUROC (%): 73.94; 82.98; 81.39; 91.73; 93.47; 96.25; 92.46; 89.97; 77.67; 77.30; 82.76; 98.73; 96.54; 91.97; 90.92; 85.19 | Helped |
Surprising findings
- On simplified (binary) datasets BLOOD's performance drops while other white/black-box methods improve, because models learn the task without sharpening OOD transformations.
- Mahalanobis distance (open-box) outperforms BLOOD on most text setups, and on CIFAR the last-layer BLOOD_L performs near chance for CNNs.
Limitations
- Performance is inconsistent: weaker than open-box MD in most text setups and weak on semantic near-OOD shift.
- On CNNs trained from scratch, last-layer BLOOD_L performs near chance (about 50 AUROC) on CIFAR tasks.
- Performance drops on simpler datasets, so gains are dataset-dependent.
Experimental setup
Datasets: SST-2 Subjectivity AG News TREC BigPatent AmazonReviews MovieGenre 20NewsGroups One Billion Word Benchmark Yelp Reviews CIFAR-10 CIFAR-100
Benchmarks: SST-2 Subjectivity AG News TREC BigPatent AmazonReviews MovieGenre 20NewsGroups One Billion Word Benchmark Yelp Reviews CIFAR-10 vs SVHN CIFAR-100 vs SVHN
Metrics: AUROC AUPR-IN FPR@95TPR CLES
Baselines: MSP ENT EGY MC GRAD ASH ReAct ENSM TEMP MD
Builds on: Monte-Carlo dropout Mahalanobis distance Hutchinson's trick energy-based OOD detection ReAct
Closest papers by meaning
- Mysteries of the Deep: Role of Intermediate Representations in Out of Distribution Detection (NeurIPS 2025 · similarity 0.89)
- Splitting & Integrating: Out-of-Distribution Detection via Adversarial Gradient Attribution (ICML 2025 · similarity 0.87)
- The Best of Both Worlds: On the Dilemma of Out-of-distribution Detection (NeurIPS 2024 · similarity 0.87)
- Discriminability-Driven Channel Selection for Out-of-Distribution Detection (CVPR 2024 · similarity 0.87)
- Unsupervised Layer-Wise Score Aggregation for Textual OOD Detection (AAAI 2024 · similarity 0.87)
- Expecting The Unexpected: Towards Broad Out-Of-Distribution Detection (NeurIPS 2024 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
