ELVIA.Evidence Atlas
← Back to analysis

AI context

ELVIA analysis of: Mahalanobis++: Improving OOD Detection via Feature Normalization — Problem 1: Cache-dependent normalized-relative score mixes feature coordinates

Original paper: Maximilian Müller; Matthias Hein. Mahalanobis++: Improving OOD Detection via Feature Normalization. Proceedings of the 42nd International Conference on Machine Learning, vol. 267, 2025. https://proceedings.mlr.press/v267/muller25a.html
Source version: Published ICML 2025 proceedings PDF (PMLR 267)
Source location: Paper p. 7 and Appendix G p. 34; NINCO/detection_methods.py:548–662; evaluate.py:28–37,109,217,244,274–287,416; README:100.

Question: What does the recorded analysis establish about “Cache-dependent normalized-relative score mixes feature coordinates”?
Bounded finding:
An empty-cache relative-first call normalizes the training array before both fits and avoids this branch. Correct pre-existing global caches also avoid it. The primary Mahalanobis++ function never uses the global Gaussian and is coherent on the inspected path. The separate CIFAR implementation, `OpenOOD/openood/postprocessors/rmdsn_postprocessor.py`, normalizes all training features at line 39 before both fits (lines 46–71), so this particular defect does not apply there.
The confirmed result is nevertheless Major for the released normalized-relative variant: a routine cache state changes its stated mathematical estimator and can reverse OOD rankings. That dependency is substantive without requiring failure of the primary method or all empirical conclusions. The retrieved source does not identify the historical cache state or prove that any published FPR value is wrong.
A precise correction is to normalize training features unconditionally before either fit, and to rebuild affected global statistics and dependent cached scores after distinguishing their provenance. This restores the specified estimator algebraically on the example. A repaired author implementation and benchmark rerun were not executed; historical numerical impact remains Needs Evidence.
The mixed fit reverses sample ordering and is not the stated normalized-relative estimator. Substantive defect in a promoted normalized variant and its released evaluation dependency; whole-paper failure or measured benchmark loss is not asserted.

Recorded check:
In `NINCO/detection_methods.py`, `evaluate_Relative_Mahalanobis_norm`, lines 548–662, training normalization is conditional on missing class-statistic caches. A later, separately conditioned global fit can consequently use raw features while the class fit and test features are normalized.
Test features are normalized at lines 569–570. Lines 572–580 load `mean_norm.npy` and `prec_norm.npy`. Training normalization at line 585 lies inside the branch at line 583 that runs only if these class statistics are incomplete. Global caches are checked separately at lines 607–617; on a miss, lines 623–629 estimate their mean and covariance directly from the current training array.
This state occurs in the documented workflow. README line 100 recommends `–method all`. `NINCO/evaluate.py`, lines 28–37, places `Mahalanobis_norm` before `Relative_Mahalanobis_norm`; line 416 selects this list. The loop at line 244 passes the same stored raw training array (assigned at line 109) and per-model cache path (line 217) to the two functions at lines 274–287. The first function normalizes by local rebinding at `detection_methods.py`:453 and saves the class caches at lines 468–469. It does not modify the caller’s raw array in place. The relative call then skips training normalization and, if its global caches are absent, fits a raw global Gaussian under normalized-cache filenames.
Take 1,000 classes with three raw training features each. In 500 classes use \[A=\{(2,0),(0,2),(-2,0)\};\] in the other 500 use \[B=\{(2,0),(0,-2),(-2,0)\}.\] All 3,000 vectors are nonzero, every class is nonempty, and the construction respects the source’s hard-coded 1,000-class loop. It tests the finite-feature estimator, which is defined without requiring the empirical features to be exactly Gaussian.
After normalization, the two distinct class means are \[\mu_A=(0,1/3),\qquad \mu_B=(0,-1/3),\] and direct centered sums give \[C=\operatorname{diag}(2/3,2/9),\qquad
 g=0,\qquad G=\operatorname{diag}(2/3,1/3).\] The raw global covariance is \(G_{\rm raw}=4G\), with the same zero mean. All three covariance matrices are positive definite. Let \(u=(0,1)\) and \(v=(4/5,3/5)\); both already have unit norm. Exact arithmetic yields:
Quantity | \(u | v\)
Minimum normalized class distance | \(2 | 32/25\)
Correct normalized global distance | \(3 | 51/25\)
Raw-global distance at normalized test point | \(3/4 | 51/100\)
Correct relative score | \(1 | 19/25\)
Mixed-coordinate relative score | \(-5/4 | -77/100\)
Thus the correct method ranks \(u\) above \(v\), but the mixed fit ranks \(u\) below \(v\). The discrepancy is not a common additive offset or an increasing transformation that would leave ranking metrics unchanged. The independent check verified these fractions symbolically and separately fitted the covariance matrices from the explicit 3,000-row synthetic array. Neither computation called author code.

Case-wide limitations:
- Limitations: No author-code execution, model evaluation, dataset download, or software installation.
- Limitations: Historical experimental source version, training-feature caches, and cache generation order are unknown.
- Limitations: Reported performance was checked arithmetically; benchmark FPR/AUC was not reproduced.
- Limitations: Optional OpenReview attachments could not be fully discovered because the staged lookup recorded HTTP 403.
- Limitations: Pretraining-data overlap, covariance conditioning, zero-vector incidence, and all repository members were not exhaustively audited.
- Limitations: Original-source visual inspection was selective; all final report pages are checked separately.
- P1 — Cache-dependent normalized-relative score mixes feature coordinates — Counterevidence: Relative-first empty-cache execution and correct existing global caches avoid the defect; primary Maha++ and OpenOOD CIFAR relative code are unaffected by this branch. Historical table impact is unknown.
- P2 — Gaussian variance expansion omits the rotated mean — Counterevidence: Appendix B explicitly states rotated mean Uᵀmu, restoring the valid argument when subsequent mu_i means those coordinates.
- P3 — Universal comparator wording and model-win count exceed displayed results — Counterevidence: Appendix explicitly discloses exceptions; 41/44 counterpart improvements and average advantage remain supported.
- The original report's complete scope, counterevidence and unresolved questions are retained below.
- This import checks publication format and identity; it does not repeat scientific review.
- Independent human scientific review is pending; author adoption has not been requested.
Source problem ID: p1
Source report index: 1

Original source excerpts (verbatim):
We show below that Mahalanobis++ outperforms KNN and cosine similarity in all considered cases and, in particular, improves OOD detection consistently across tasks, architectures, training methods and OOD datasets as post-hoc method.
Source: Published ICML 2025 proceedings PDF (PMLR 267)
Locator: PDF p. 6
Source PDF SHA-256: 3b739c3c30667dddc1abc7d0d22ec6492aaa007089486ca8e6a888e0fe357420

Review status: Independent review pending
Case: icml2025-0280-mahalanobis-improving-ood-detection-via-feature-normalization
Revision: 1
Record created: 2026-10-26T04:21:21.357774+00:00
Permalink: https://elvia-atlas.org/atlas/cases/icml2025-0280-mahalanobis-improving-ood-detection-via-feature-normalization.html#problem-1
Versioned public record: https://elvia-atlas.org/atlas/evidence/icml2025-0280-mahalanobis-improving-ood-detection-via-feature-normalization/records/icml2025-0280-mahalanobis-improving-ood-detection-via-feature-normalization.r1.json
Canonical record SHA-256: fd44ad3042af4182a02b340cbf7e0d9513a7f01065c1ae43cea2957240e544ed
The page follows the latest revision; the versioned record identifies this snapshot.