pytorch-ood: A Unified PyTorch Library for Out-of-Distribution Detection
Abstract
PyTorch-OOD is an open-source Python library for out-of-distribution (OOD) detection and related methods in deep neural networks. It provides a unified PyTorch-based implementation of commonly used OOD detectors, loss functions, datasets, and evaluation utilities. The library is designed to support both research and practical experimentation by providing consistent interfaces for a broad range of post-hoc and training-based OOD detection methods. Implemented approaches include methods based on predictive confidence, energy scores, feature-space statistics, and dedicated OOD training objectives. PyTorch-OOD also provides utilities for benchmarking OOD detection methods, including commonly used datasets and metrics. Its modular design allows detectors to be integrated into existing PyTorch workflows and facilitates reproducible comparison of methods under a common software interface. The project includes documentation, examples, and tests. This Zenodo record archives PyTorch-OOD version 0.4.0 for reproducibility and citation. The actively maintained source code and documentation are available through the project repository.
// Source
Authors: Konstantin Kirchheim, Theo Langer, Frank Ortmeier
Institutions: Otto-von-Guericke-Universität Magdeburg