Lune

ACL2021Top-tier venue

Unsupervised Out-of-Domain Detection via Pre-trained Transformers

Keyang Xu, Tongzheng Ren, Shikun Zhang, Yihao Feng, Caiming Xiong

Abstract

Deployed real-world machine learning applications are often subject to uncontrolled and even potentially malicious inputs. Those outof-domain inputs can lead to unpredictable outputs and sometimes catastrophic safety issues. Prior studies on out-of-domain detection require in-domain task labels and are limited to supervised classification scenarios. Our work tackles the problem of detecting out-ofdomain samples with only unsupervised indomain data. We utilize the latent representations of pre-trained transformers and propose a simple yet effective method to transform features across all layers to construct outof-domain detectors efficiently. Two domainspecific fine-tuning approaches are further proposed to boost detection accuracy. Our empirical evaluations of related methods on two datasets validate that our method greatly improves out-of-domain detection ability in a more general scenario. 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

15 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites POEM: Out-of-Distribution Detection with Posterior Sampling
  • SeTAR: Out-of-Distribution Detection with Selective Low-Rank Approximation cites Delving into Out-of-Distribution Detection with Vision-Language Representations
  • A Simple Framework for Contrastive Learning of Visual Representations cites Momentum Contrast for Unsupervised Visual Representation Learning
  • Momentum Contrast for Unsupervised Visual Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. Delving into Out-of-Distribution Detection with Vision-Language RepresentationsYifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun et al.NeurIPS 2022 · 308 citations
  2. POEM: Out-of-Distribution Detection with Posterior SamplingYifei Ming, Ying Fan, Yixuan LiICML 2022 · 151 citations
  3. Predicting Out-of-Distribution Error with the Projection NormYaodong Yu, Zitong Yang, Alexander Wei, Yi Ma et al.ICML 2022 · 51 citations
  4. RODEO: Robust Outlier Detection via Exposing Adaptive Out-of-Distribution SamplesHossein Mirzaei, Mohammad Jafari, Hamid Reza Dehbashi, Ali Ansari et al.ICML 2024 · 13 citations
  5. SeTAR: Out-of-Distribution Detection with Selective Low-Rank ApproximationYixia Li, Boya Xiong, Guanhua Chen, Yun ChenNeurIPS 2024 · 13 citations

Builds on4

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. Don't Stop Pretraining: Adapt Language Models to Domains and TasksSuchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo et al.ACL 2020 · 93 citations
  3. Discriminative Nearest Neighbor Few-Shot Intent Detection by Transferring Natural Language InferenceJian-Guo Zhang, Kazuma Hashimoto, Wenhao Liu, Chien-Sheng Wu et al.EMNLP 2020 · 65 citations
  4. Momentum Contrast for Unsupervised Visual Representation LearningKaiming He, Haoqi Fan, Yuxin Wu, Saining Xie et al.CVPR 2020

Related papers

  1. Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
  2. Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain DetectionRheeya Uppaal, Junjie Hu, Yixuan LiACL 2023 · 9 citations
  3. X-Mahalanobis: Transformer Feature Mixing for Reliable OOD DetectionTong Wei, Bolin Wang, Jiang-Xin Shi, Yu-Feng Li et al.NeurIPS 2025 · 9 citations
  4. Out-of-Distribution Detection by Leveraging Between-Layer Transformation SmoothnessFran Jelenic, Josip Jukic, Martin Tutek, Mate Puljiz et al.ICLR 2024 · 12 citations
  5. SENTRA: Selected-Next-Token Transformer for LLM Text DetectionMitchell Plyler, Yilun Zhang, Alexander Tuzhilin, Saoud Khalifah et al.EMNLP Findings 2025
Dusk over the sea between two cliffs drawn in fine vertical lines