MaRS: Robust Out-of-Distribution Detection via Mahalanobis Residual Scoring
Foundation models provide highly descriptive representations for medical images, yet their reliability degrades under distribution shifts arising from changes in patients, devices, or acquisition conditions. Reliable out-of-distribution (OOD) detection is therefore essential for safe deployment. Recent post-hoc detectors efficiently exploit frozen embeddings (e.g., kNN), whereas reconstruction-based OOD detection in latent feature space has seen limited adoption due to inconsistent performance. In this work, we show that the limitation of reconstruction-based methods in latent space does not stem from poor reconstruction quality, but from how reconstruction errors are scored. Standard L2 residual norms collapse the anisotropic residual structure, thereby suppressing informative deviations. To address this limitation, we introduce MaRS (Mahalanobis Residual Scoring), a label-free OOD detector that learns an in-distribution manifold using a lightweight autoencoder and measures deviation via a Mahalanobis distance on reconstruction residuals, yielding variance-aware OOD scores. Across three imaging modalities, multiple types of distribution shift, and different model families and scales, MaRS outperforms established confidence-, distance-, and reconstruction-based baselines, while remaining fully post-hoc and lightweight. The code is available at https://github.com/francescodisalvo05/mars.
Code (0)
등록된 구현이 없습니다.
Tasks
Out-of-Distribution DetectionSimilar Papers 제목 키워드 기반
Learning Hyperspherical Time-Frequency Representations for Time-Series Out-of-Distribution Detection
Out-of-distribution (OOD) detection for time-series data remains comparatively underexplored compared to vision and language, with a limited principled understanding of how supervised time-series representations can be l…
Out-of-Distribution DetectionRepresentation LearningContrastive LearningIs Complex Training Necessary for Long-Tailed OOD Detection? A Re-think from Feature Geometry
Long-tailed out-of-distribution (LT-OOD) detection is often addressed with specialized training, including auxiliary out-of-distribution (OOD) data, abstention heads, contrastive objectives, energy losses, or gradient-co…
Leveraging the Mahalanobis Distance to enhance Unsupervised Brain MRI Anomaly Detection
Unsupervised Anomaly Detection (UAD) methods rely on healthy data distributions to identify anomalies as outliers. In brain MRI, a common approach is reconstruction-based UAD, where generative models reconstruct healthy …
Anomaly DetectionUnsupervised Anomaly DetectionStructCore: Structure-Aware Image-Level Scoring for Training-Free Unsupervised Anomaly Detection
Max pooling is the de facto standard for converting anomaly score maps into image-level decisions in memory-bank-based unsupervised anomaly detection (UAD). However, because it relies on a single extreme response, it dis…
Unsupervised Anomaly DetectionBounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection
Out-of-distribution (OOD) detection aims to identify inputs that differ from the training distribution in order to reduce unreliable predictions by deep neural networks. Among post-hoc feature-space approaches, OOD detec…
Out-of-Distribution Detection