MM++: Unsupervised Scale-Invariant Multilayer OOD Detection via Top-K Gated Feature Fusion
This work addresses the need for practical OOD detection that works out-of-the-box with any pre-trained classifier, but the improvements are incremental over existing Mahalanobis-based methods.
MM++ introduces a fully unsupervised, post-hoc OOD detection method that fuses selected intermediate layers with the terminal representation using a regularized tied covariance matrix, achieving robust performance across architectures for both near- and far-OOD detection without auxiliary data or fine-tuning.
We introduce MM++ (Multilayer Mahalanobis++), a fully unsupervised, strictly post-hoc, and scale-invariant framework for Out-of-Distribution (OOD) detection. To address the trade-off between scale invariance and hierarchical expressivity, MM++ constructs a principled joint feature space. It first identifies discriminative intermediate layers by measuring entropy density drops, which mark the boundaries of sharp semantic compression. By fusing these selected layers with the terminal representation, the framework captures latent cross-layer correlations while mitigating early-layer noise. Crucially, a Ledoit-Wolf regularized tied covariance matrix stabilizes this unified space, enabling reliable distance estimation. Requiring no auxiliary OOD data, classifier fine-tuning, or architectural modifications, MM++ delivers robust performance across distinct architectures for both near- and far-OOD detection.