MLLGFeb 12, 2025

A Bayesian Nonparametric Perspective on Mahalanobis Distance for Out of Distribution Detection

Stanford
arXiv:2502.08695v11 citationsh-index: 37
Originality Incremental advance
AI Analysis

This work addresses OOD detection for machine learning systems, offering an incremental improvement by extending existing methods through Bayesian nonparametric approaches.

The paper tackles out-of-distribution (OOD) detection by establishing a formal link between Bayesian nonparametric models and the relative Mahalanobis distance score (RMDS), proposing generalized models that improve performance on the OpenOOD benchmark, particularly in scenarios with varying covariance structures and limited data per class.

Bayesian nonparametric methods are naturally suited to the problem of out-of-distribution (OOD) detection. However, these techniques have largely been eschewed in favor of simpler methods based on distances between pre-trained or learned embeddings of data points. Here we show a formal relationship between Bayesian nonparametric models and the relative Mahalanobis distance score (RMDS), a commonly used method for OOD detection. Building on this connection, we propose Bayesian nonparametric mixture models with hierarchical priors that generalize the RMDS. We evaluate these models on the OpenOOD detection benchmark and show that Bayesian nonparametric methods can improve upon existing OOD methods, especially in regimes where training classes differ in their covariance structure and where there are relatively few data points per class.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes