WeiPer: OOD Detection using Weight Perturbations of Class Projections

Maximilian Granz, Manuel Heurich, Tim Landgraf
2/3/2026

No official code found. Best implementation: mgranz/weiper (2 stars, last commit 2025-01-05).

Abstract

Recent advances in out-of-distribution (OOD) detection on image data show that pre-trained neural network classifiers can separate in-distribution (ID) from OOD data well, leveraging the class-discriminative ability of the model itself. Methods have been proposed that either use logit information directly or that process the model's penultimate layer activations. With"WeiPer", we introduce perturbations of the class projections in the final fully connected layer which creates a richer representation of the input. We show that this simple trick can improve the OOD detection performance of a variety of methods and additionally propose a distance-based method that leverages the properties of the augmented WeiPer space. We achieve state-of-the-art OOD detection results across multiple benchmarks of the OpenOOD framework, especially pronounced in difficult settings in which OOD samples are positioned close to the training set distribution. We support our findings with theoretical motivations and empirical observations, and run extensive ablations to provide insights into why WeiPer works.

View on arXivView PDF

Code Implementations(1)

mgranz/weiperCommunity65%

This is the official repository of the NeurIPS paper: "WeiPer: OOD Detection using Weight Perturbations of Class Projections"

22Shell, PythonOct 30, 20241 years ago

Similar Papers

Cite this paper

@article{granz2026weiper,
  title  = {WeiPer: OOD Detection using Weight Perturbations of Class Projections},
  author = {Maximilian Granz and Manuel Heurich and Tim Landgraf},
  year   = {2026},
  eprint = {2405.17164},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.17164},
  url    = {https://arxiv.org/abs/2405.17164},
  journal = {NEURIPS 2024 2024}
}

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

Discussion