Pseudo Outlier Exposure for Out-of-Distribution Detection using Pretrained Transformers

Jaeyoung Kim, Kyuheon Jung, Dongbin Na, Sion Jang, Eunbin Park +1 more
7/18/2023
cs.CL

No confident code implementation found for this paper.

Abstract

For real-world language applications, detecting an out-of-distribution (OOD) sample is helpful to alert users or reject such unreliable samples. However, modern over-parameterized language models often produce overconfident predictions for both in-distribution (ID) and OOD samples. In particular, language models suffer from OOD samples with a similar semantic representation to ID samples since these OOD samples lie near the ID manifold. A rejection network can be trained with ID and diverse outlier samples to detect test OOD samples, but explicitly collecting auxiliary OOD datasets brings an additional burden for data collection. In this paper, we propose a simple but effective method called Pseudo Outlier Exposure (POE) that constructs a surrogate OOD dataset by sequentially masking tokens related to ID classes. The surrogate OOD sample introduced by POE shows a similar representation to ID data, which is most effective in training a rejection network. Our method does not require any external OOD data and can be easily implemented within off-the-shelf Transformers. A comprehensive comparison with state-of-the-art algorithms demonstrates POE's competitiveness on several text classification benchmarks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kim2023pseudo,
  title  = {Pseudo Outlier Exposure for Out-of-Distribution Detection using Pretrained Transformers},
  author = {Jaeyoung Kim and Kyuheon Jung and Dongbin Na and Sion Jang and Eunbin Park and Sungchul Choi},
  year   = {2023},
  eprint = {2307.09455},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.09455v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.09455.svg)](https://codeofpaper.com/paper/2307.09455)

Discussion