Research map / Label-efficient and robust learning / OOD and anomaly detection
Revisiting Logit Distributions for Reliable Out-of-Distribution Detection
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 LogitGap, a training-free post-hoc OOD score that uses the gap between the maximum logit and the mean of the remaining (top-N) logits, with an adaptive N chosen from synthetic OOD data.
Problem
Post-hoc out-of-distribution detection for classifiers, especially CLIP-based zero-shot and few-shot settings, where existing logit scores (MaxLogit, MCM) underuse non-maximum logits or lose magnitude information through softmax.
Approach
Score OOD by the average gap between the maximum logit and the remaining logits, restricted to the top-N logits, with N chosen by maximizing the mean-logit difference between ID data and synthetic OOD data (interpolated and noised ID features), requiring no OOD data or training.
Key results
- On ImageNet ID with CLIP ViT-B/16 zero-shot, LogitGap* averages 74.92 FPR95 and 79.41 AUROC versus MCM's 78.83 and 77.15 across NINCO, ImageNet-O and ImageNetOOD.
- On ImageNet-10/ImageNet-20 semantic-hard setting, LogitGap reduces FPR95 to 14.00 from MCM's 22.60 when ImageNet-20 is ID.
- Combined with OE on CIFAR-10 (ResNet-50), LogitGap lowers average FPR95 from 14.90 to 14.52; with MixOE it lowers it from 39.52 to 31.23.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use the maximum-to-rest logit gap instead of MaxLogit | CLIP ViT-B/16 zero-shot OOD detection · ImageNet-100 ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 46.68 -> 44.16 | Helped |
| Adaptively select top-N logits using ID validation data and synthetic OOD samples | LogitGap on CLIP ViT-B/16 · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 75.18 -> 74.92 | Helped |
| Add LogitGap* to CoOp | CoOp, one-shot · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | AUROC: 74.78 -> 77.02 | Helped |
| Add LogitGap* to ID-Like | ID-Like, one-shot · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 79.07 -> 71.68 | Helped |
| Add LogitGap* to ID-Like | ID-Like, one-shot · ImageNet-100 ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 65.12 -> 41.97 | Helped |
| Use adaptive top-N selection instead of fixed top-N (ablation) | LogitGap on ImageNet-100 · ImageNet-100 ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 44.16 -> 44.16 | No clear effect |
| Add LogitGap to OE | OE on ResNet-50 · CIFAR-10 ID; standard OpenOOD OOD benchmarks (AVG) | FPR95: 14.90 -> 14.52 | Helped |
| Add LogitGap to MixOE | MixOE on ResNet-50 · CIFAR-10 ID; standard OpenOOD OOD benchmarks (AVG) | FPR95: 39.52 -> 31.23 | Helped |
| Retain only top-N logits, selected adaptively | LogitGap on CLIP ViT-B/16 · ImageNet-10 ID / ImageNet-20 OOD | FPR95: 3.80 -> 3.00 | Helped |
| Apply a square transformation to LogitGap (ablation) | LogitGap on CLIP ViT-B/16 · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 74.92 -> 74.08 | Helped |
| Apply an exponential transformation to LogitGap (ablation) | LogitGap on CLIP ViT-B/16 · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 74.92 -> 74.48 | Helped |
| Apply a square-root transformation to LogitGap (ablation) | LogitGap on CLIP ViT-B/16 · ImageNet ID; NINCO, ImageNet-O, ImageNetOOD OOD (AVG) | FPR95: 74.92 -> 74.70 | Helped |
Surprising findings
- Variants with exponential, square, or square-root transforms of the gap perform comparably to the original LogitGap.
- For ImageNet-100 zero-shot, the adaptive N equals the fixed N, so LogitGap and LogitGap* are identical in the table.
Limitations
- Design is primarily tailored to visual classification models; not extended to text or speech.
- Adaptive N relies on synthetic OOD samples from feature interpolation and noise, whose fidelity to real OOD data is not established.
- Theoretical guarantee assumes logits bounded in [-1, 1] for CLIP and relies on a binary Gaussian toy model for the OOD analysis.
Experimental setup
Datasets: ImageNet ImageNet-100 ImageNet-10 ImageNet-20 CIFAR-10 CIFAR-100
Benchmarks: NINCO ImageNet-O ImageNetOOD ImageNet-10/ImageNet-20 semantic hard ImageNet-R ImageNet-A ImageNet-Sketch OpenOOD CIFAR-10 benchmark MNIST SVHN Textures Places365
Metrics: FPR95 AUROC AUPR
Baselines: MCM MaxLogit Energy GL-MCM TAG CoOp ID-Like MSP ODIN GEN Mahalanobis ReAct
Builds on: MaxLogit MCM CoOp ID-Like GL-MCM
Closest papers by meaning
- Leveraging Perturbation Robustness to Enhance Out-of-Distribution Detection (CVPR 2025 · similarity 0.89)
- Image Background Serves as Good Proxy for Out-of-distribution Data (ICLR 2024 · similarity 0.88)
- Double Descent Meets Out-of-Distribution Detection: Theoretical Insights and Empirical Analysis on the Role of Model Complexity (NeurIPS 2025 · similarity 0.88)
- A Systematic Analysis of Out-of-Distribution Detection Under Representation and Training Paradigm Shifts (NeurIPS 2026 · similarity 0.88)
- Splitting & Integrating: Out-of-Distribution Detection via Adversarial Gradient Attribution (ICML 2025 · similarity 0.88)
- Fast Decision Boundary based Out-of-Distribution Detector (ICML 2024 · similarity 0.88)
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.
