AP-OOD: Attention Pooling for Out-of-Distribution Detection

Abstract

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.77% to 5.91% on XSUM summarization, and from 75.19% to 68.13% on WMT15 En–Fr translation.

Cite

Text

Hofmann et al. "AP-OOD: Attention Pooling for Out-of-Distribution Detection." International Conference on Learning Representations, 2026.

Markdown

[Hofmann et al. "AP-OOD: Attention Pooling for Out-of-Distribution Detection." International Conference on Learning Representations, 2026.](https://mlanthology.org/iclr/2026/hofmann2026iclr-apood/)

BibTeX

@inproceedings{hofmann2026iclr-apood,
  title     = {{AP-OOD: Attention Pooling for Out-of-Distribution Detection}},
  author    = {Hofmann, Claus and Huber, Christian and Lehner, Bernhard and Klotz, Daniel and Hochreiter, Sepp and Zellinger, Werner},
  booktitle = {International Conference on Learning Representations},
  year      = {2026},
  url       = {https://mlanthology.org/iclr/2026/hofmann2026iclr-apood/}
}