Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothness

Fran Jelenić, Josip Juki'c, Martin Tutek, Mate Puljiz, Jan vSnajder
10/1/2023

No official code found. Best implementation: fjelenic/between-layer-ood (0 stars, Apache-2.0, last commit 2024-07-08).

Abstract

Effective out-of-distribution (OOD) detection is crucial for reliable machine learning models, yet most current methods are limited in practical use due to requirements like access to training data or intervention in training. We present a novel method for detecting OOD data in Transformers based on transformation smoothness between intermediate layers of a network (BLOOD), which is applicable to pre-trained models without access to training data. BLOOD utilizes the tendency of between-layer representation transformations of in-distribution (ID) data to be smoother than the corresponding transformations of OOD data, a property that we also demonstrate empirically. We evaluate BLOOD on several text classification tasks with Transformer networks and demonstrate that it outperforms methods with comparable resource requirements. Our analysis also suggests that when learning simpler tasks, OOD data transformations maintain their original sharpness, whereas sharpness increases with more complex tasks.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothness

00Python, Jupyter NotebookSep 27, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{jeleni2023outofdistribution,
  title  = {Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothness},
  author = {Fran Jelenić and Josip Juki'c and Martin Tutek and Mate Puljiz and Jan vSnajder},
  year   = {2023},
  eprint = {2310.02832},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2310.02832},
  journal = {ICLR 2023 2023}
}

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/2310.02832.svg)](https://codeofpaper.com/paper/2310.02832)

Discussion