AP-OOD: Attention Pooling for Out-of-Distribution Detection
About
Out-of-distribution (OOD) detection, which maps high-dimensional data into a scalar OOD score, is critical for the reliable deployment of machine learning models. A key challenge in recent research is how to effectively leverage and aggregate token embeddings from language models to obtain the OOD score. In this work, we propose AP-OOD, a novel OOD detection method for natural language that goes beyond simple average-based aggregation by exploiting token-level information. AP-OOD is a semi-supervised approach that flexibly interpolates between unsupervised and supervised settings, enabling the use of limited auxiliary outlier data. Empirically, AP-OOD sets a new state of the art in OOD detection for text: in the unsupervised setting, it reduces the FPR95 (false positive rate at 95% true positives) from 27.84% to 4.67% on XSUM summarization, and from 77.08% to 70.37% on WMT15 En-Fr translation.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| OOD Detection | WMT15 En-Fr (ID) IT (OOD) (test) | AUROC97.41 | 18 | |
| OOD Detection | Koran OOD WMT15 En-Fr ID (test) | AUROC97.98 | 18 | |
| OOD Detection | WMT15 Subtitles OOD En-Fr ID (test) | AUROC95.41 | 18 | |
| OOD Detection | ndd2015 (OOD) WMT15 En-Fr (ID) (test) | AUROC92.32 | 18 | |
| OOD Detection | ndt2015 OOD WMT15 En-Fr ID (test) | AUROC0.9189 | 18 | |
| OOD Detection | WMT15 En-Fr nt2014 OOD ID (test) | AUROC89.91 | 18 | |
| OOD Detection | Medical (OOD) WMT15 En-Fr (ID) (test) | AUROC81.44 | 18 | |
| Input OOD Detection | CNN/DM | AUROC99.89 | 14 | |
| Output OOD Detection | NEWSROOM | AUROC99.73 | 10 | |
| Output OOD Detection | AUROC100 | 10 |