TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/ViM: Out-Of-Distribution with Virtual-logit Matching

ViM: Out-Of-Distribution with Virtual-logit Matching

Haoqi Wang, Zhizhong Li, Litong Feng, Wayne Zhang

2022-03-21CVPR 2022 1Image ClassificationOut-of-Distribution Detection
PaperPDFCodeCode(official)

Abstract

Most of the existing Out-Of-Distribution (OOD) detection algorithms depend on single input source: the feature, the logit, or the softmax probability. However, the immense diversity of the OOD examples makes such methods fragile. There are OOD samples that are easy to identify in the feature space while hard to distinguish in the logit space and vice versa. Motivated by this observation, we propose a novel OOD scoring method named Virtual-logit Matching (ViM), which combines the class-agnostic score from feature space and the In-Distribution (ID) class-dependent logits. Specifically, an additional logit representing the virtual OOD class is generated from the residual of the feature against the principal space, and then matched with the original logits by a constant scaling. The probability of this virtual logit after softmax is the indicator of OOD-ness. To facilitate the evaluation of large-scale OOD detection in academia, we create a new OOD dataset for ImageNet-1K, which is human-annotated and is 8.8x the size of existing datasets. We conducted extensive experiments, including CNNs and vision transformers, to demonstrate the effectiveness of the proposed ViM score. In particular, using the BiT-S model, our method gets an average AUROC 90.91% on four difficult OOD benchmarks, which is 4% ahead of the best baseline. Code and dataset are available at https://github.com/haoqiwang/vim.

Results

TaskDatasetMetricValueModel
Out-of-Distribution DetectionImageNet-1k vs OpenImage-OAUROC97.61ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs OpenImage-OFPR9512.61ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1K vs ImageNet-OAUROC92.55ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1K vs ImageNet-OFPR9536.75ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs iNaturalistAUROC99.41ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs iNaturalistFPR952.6ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs TexturesAUROC98.92ViM (BiT)
Out-of-Distribution DetectionImageNet-1k vs TexturesAUROC95.34ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs TexturesFPR9520.31ViM (ViT-B/16)
Out-of-Distribution DetectionImageNet-1k vs TexturesFPR954.69ViM (BiT-S-R101×1)

Related Papers

Automatic Classification and Segmentation of Tunnel Cracks Based on Deep Learning and Visual Explanations2025-07-18Adversarial attacks to image classification systems using evolutionary algorithms2025-07-17Efficient Adaptation of Pre-trained Vision Transformer underpinned by Approximately Orthogonal Fine-Tuning Strategy2025-07-17Federated Learning for Commercial Image Sources2025-07-17MUPAX: Multidimensional Problem Agnostic eXplainable AI2025-07-17Hashed Watermark as a Filter: Defeating Forging and Overwriting Attacks in Weight-based Neural Network Watermarking2025-07-15Transferring Styles for Reduced Texture Bias and Improved Robustness in Semantic Segmentation Networks2025-07-14FedGSCA: Medical Federated Learning with Global Sample Selector and Client Adaptive Adjuster under Label Noise2025-07-13