PViT: Prior-augmented Vision Transformer for Out-of-distribution Detection

Tianhao Zhang, Zhixiang Chen, Lyudmila S. Mihaylova
10/27/2024
cs.CV

Official code: RanchoGoose/PViT (1 star, last commit 2026-04-06).

Abstract

Vision Transformers (ViTs) have achieved remarkable success over various vision tasks, yet their robustness against data distribution shifts and inherent inductive biases remain underexplored. To enhance the robustness of ViT models for image Out-of-Distribution (OOD) detection, we introduce a novel and generic framework named Prior-augmented Vision Transformer (PViT). Taking as input the prior class logits from a pretrained model, we train PViT to predict the class logits. During inference, PViT identifies OOD samples by quantifying the divergence between the predicted class logits and the prior logits obtained from pre-trained models. Unlike existing state-of-the-art(SOTA) OOD detection methods, PViT shapes the decision boundary between ID and OOD by utilizing the proposed prior guided confidence, without requiring additional data modeling, generation methods, or structural modifications. Extensive experiments on the large-scale ImageNet benchmark, evaluated against over seven OOD datasets, demonstrate that PViT significantly outperforms existing SOTA OOD detection methods in terms of FPR95 and AUROC. The codebase is publicly available at https://github.com/RanchoGoose/PViT.

View on arXivView PDF

Code Implementations(1)

RanchoGoose/PViTOfficial100%
10Shell, PythonNov 16, 20236 months ago

Similar Papers

Cite this paper

@article{zhang2024pvit,
  title  = {PViT: Prior-augmented Vision Transformer for Out-of-distribution Detection},
  author = {Tianhao Zhang and Zhixiang Chen and Lyudmila S. Mihaylova},
  year   = {2024},
  eprint = {2410.20631},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.20631v2}
}

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

Discussion