MahaVar: OOD Detection via Class-wise Mahalanobis Distance Variance under Neural Collapse
Donghwan Kim, Hyunsoo Yoon
NeurIPS 2026
Abstract. Out-of-distribution (OOD) detection is a critical component for ensuring the reliability of deep neural networks in safety-critical applications. In this work, we present a key empirical observation: for in-distribution (ID) samples, class-wise Mahalanobis distances exhibit a pronounced sharp minimum structure, where the distance to the nearest class is small while distances to all other classes remain large, resulting in high variance across classes. In contrast, OOD samples tend to exhibit a less pronounced sharp minimum structure, producing comparatively lower variance across classes. We further provide a theoretical analysis grounding this observation in Neural Collapse geometry: under relaxed Neural Collapse assumptions on within-class compactness and inter-class separation, ID samples are shown to structurally exhibit high class-wise distance variance, offering a theoretical basis for its use as an OOD score. Motivated by this observation and its theoretical backing, we propose MahaVar, a simple and effective post-hoc OOD detector that augments the Mahalanobis distance with a class-wise distance variance term. Following the OpenOOD v1.5 benchmark protocol, MahaVar achieves state-of-the-art performance on CIFAR-100 and ImageNet, with consistent improvements in both AUROC and FPR@95 over existing Mahalanobis-based methods across all benchmarks.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:42 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper introduces MahaVar, a post-hoc OOD detector that adds a second term to the Mahalanobis score. The motivating observation is that ID samples have higher class-wise distance variance than OOD samples, which is grounded in a relaxed Neural Collapse assumption (weaken NC1). From there, the paper derived bounds on the ID distance variance interms of inter-class distance and class number C, which lead to sufficient condition under with ID variance is higher than OOD variance. Empirically it follows OpenOOD protocal on CIFAR / ImageNet to demonstrate SOTA.
Strengths: The method is a very simple and cheap drop-in, that demonstrated consistent gain over Mahalanobis. Evaluation is thorough and reproducible. By connecting to NC, the paper also grounds their method in theory under well-established NC assumptions.
Weaknesses: Several were raised by the reviewers, including 1) Originality -- all three reviewers rated originality 2/4; in particular, the core intuition of the paper follows a prior art NCDD. 2) theory - method mismatch, 3) assumption too strong, 4) missing baselines, 5) framing i.e. good in Mahalanobis family but not necessarily SOTA. While I don't find any of those to be necessarily blocking the acceptance, I do strongly recommend the authors to address as many as possible to make this a strong submission.
Final justification
Both Reviewer TqMp and ror3 are satisfied with the author responses and put their final recommendation at Borderline Accept.
Reviewer Ubis holds a Reject on the basis of missing / inappropriate baselines. After reading through the discussion I believe that the authors have tried their best in adding comparison requested by the reviewer, even though a few of those were not exactly in scope for comparison (not peer reviewed until close to the submission deadline), and during this process the authors went into great details to identify missing details that moved the performance. I would trust that the authors have gained enough insights into the comparison experiments and can add them appropriately in the final version. Hence I maintain my original rating of acceptance (poster).
Read meta-review
Meta-review
This paper introduces MahaVar, a post-hoc OOD detector that adds a second term to the Mahalanobis score. The motivating observation is that ID samples have higher class-wise distance variance than OOD samples, which is grounded in a relaxed Neural Collapse assumption (weaken NC1). From there, the paper derived bounds on the ID distance variance interms of inter-class distance and class number C, which lead to sufficient condition under with ID variance is higher than OOD variance. Empirically it follows OpenOOD protocal on CIFAR / ImageNet to demonstrate SOTA.
Strengths: The method is a very simple and cheap drop-in, that demonstrated consistent gain over Mahalanobis. Evaluation is thorough and reproducible. By connecting to NC, the paper also grounds their method in theory under well-established NC assumptions.
Weaknesses: Several were raised by the reviewers, including 1) Originality -- all three reviewers rated originality 2/4; in particular, the core intuition of the paper follows a prior art NCDD. 2) theory - method mismatch, 3) assumption too strong, 4) missing baselines, 5) framing i.e. good in Mahalanobis family but not necessarily SOTA. While I don't find any of those to be necessarily blocking the acceptance, I do strongly recommend the authors to address as many as possible to make this a strong submission.
Final justification
Both Reviewer TqMp and ror3 are satisfied with the author responses and put their final recommendation at Borderline Accept.
Reviewer Ubis holds a Reject on the basis of missing / inappropriate baselines. After reading through the discussion I believe that the authors have tried their best in adding comparison requested by the reviewer, even though a few of those were not exactly in scope for comparison (not peer reviewed until close to the submission deadline), and during this process the authors went into great details to identify missing details that moved the performance. I would trust that the authors have gained enough insights into the comparison experiments and can add them appropriately in the final version. Hence I maintain my original rating of acceptance (poster).
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces MahaVar, a post-hoc method for out-of-distribution (OOD) detection. Its main novelty is augmenting the standard Mahalanobis score with a term based on the intra-class variance of the Mahalanobis distance. The authors show empirically through an extensive study that this augmented score yields better OOD detection across standard benchmarks and several vision backbones, and they provide a theoretical justification for the augmentation grounded in the Neural Collapse framework.
Strengths and weaknesses
Quality
The paper propose and extensive reproducible benchmark of mahavar against standard baselines on several OOD detection tasks following the OpenOOD framework. This empirical study is the main evidence upon which the relevance of mahavar score is enforced. I have some reserve on that front, despite the strong results presented on Table 1 that aggregates performances across several models on the Imagenet domain. The per-model results seem less uniform than what is presented in Table 1, especially for the ResNet case (same concerns for cifarX results).
Clarity
Overall the paper is well written, well articulated and easy to follow. Claims and contribution are clearly highlighted. There is nonetheless a slight tendency to sometimes overly lean on the appendix to support some paper experimental results (e.g. paragraph ablation study).
Significance
The work is well motivated and is deeply rooted in a vast literature. The span of this literature has not really be exhaustively documented in the related work section. The experiments are easily reproducible by any practitioner. Nonetheless, I understand the rationale behind using the variance term as an augmentation for the mahalanobis distance but I am wondering about the pertinence of ensembling it through a sum: do these two quantities have commensurable values ? Is the new score completely steered by the variance ?
Moreover, the theoretical justification seems a bit disconnected from the empirical evidence. It would have been really interesting to see wether the assumptions made are actually respected on real world datasets. Also, it would be interesting to understand the discrepencies observed across models and domains through this lens.
Originality
The originality from the proposed method is moderate. The augmentation of the mahalanobis distance is attractive but as explained the proposed way to do it is not well motivated. The performance gain is clear on a given aggreagation on a given domain but that do not transpose well to all setup and there is no clear guidelines on when the augmentation is likely to enhance mahalanobis performance.
A minor format feedbacks: figures are not formatted for camera ready, there is no need to use double titles and key message from figure 1 and 2 could be easily condensed into one smaller figure.
Questions
-
What is the rationale behind the current way of augmenting the mahalanobis distance (sum) ? Is there a better way to perform the ensembling ?
-
Is the OOD signal mainly present in the variance term ?
-
To what extent the theoretical grounding based on neural collapse can be used to derived guidelines onto when mahavar should be used ?
Limitations
Limitations are not explicitly addressed in the paper.
Final justification
The rebuttal answer answered my main concerns that were focused on the justification of the additive aggregation and the justification to even keep a distance score in the final score.
Formatting concerns
none
4 comments
Additional Comment
In response to the Originality concern and Q1 above, we would like to refine our earlier statement that "the additive form is a reasonable choice, not one endorsed by the theory itself." That remains true in the sense that our results do not single out the additive form as the uniquely optimal combination among possible alternatives; what we can now add is a precise theoretical characterization of when and why the additive form we chose succeeds.
For any , the identity underlying Corollary 4.4's proof holds unconditionally, with no assumption on :
where projects onto . Writing , for any pair , define
so that .
Theorem 4.3's setting. Its hypothesis says precisely that is not closely aligned with any single class mean, i.e. is angularly far from every rather than close to one of them. In other words, whenever an OOD sample satisfies Theorem 4.3's condition, the min-distance term is already correct, and the variance term reinforces a comparison it did not need to fix.
Under this hypothesis the theorem's own bound gives . The same hypothesis also constrains : since and , we have
As gives , the right-hand side is itself at least . Expanding shows . Since , we have , so and the whole expression exceeds . Combined with , which follows directly from the within-class deviation bound in Assumption 4.1, this gives , so holds as well.
Corollary 4.4's setting (No assumption). Here is unconstrained as in Corollary 4.4, so can be positive, i.e. the min-distance term can genuinely fail because happens to sit closer to some class mean than does. We set aside Corollary 4.4's assumption that 's deviation lies in , i.e. we do not fix , and instead treat as general. Applying the identity above to both samples,
so reduces to the single condition , independent of . On average, this ordering holds in practice: exceeds across 22 of 22 backbone/dataset combinations with . Whenever it holds, a finite threshold
exists such that restores the correct ordering, even in the case. This is the sense in which the two terms are complementary by construction: they fail under different, non-overlapping geometric conditions, and is exactly the condition under which the variance term can compensate for a min-distance failure. On average, this ordering holds in practice: exceeds across 22 of 22 backbone/dataset combinations with (ResNet-18, ResNet-50, Swin-B).
I thank the authors for this reply. I found this reply satisfying and would like to ask the authors to incorporate the new results and analysis. I am increasing the score to 4.
Response to Reviewer TqMp
We sincerely thank the reviewer for the increased score and for the time and care taken throughout this discussion. We will faithfully incorporate everything discussed in this thread into the camera-ready version. We are grateful for the reviewer's thorough and constructive engagement with our work.
- Rating
- 2/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes MahaVar, which augments Mahalanobis distance-based OOD detection with the variance of distances across class centroids as a complementary scoring signal. The combined score is evaluated on OpenOOD v1.5 benchmarks with claims of state-of-the-art performance.
Strengths and weaknesses
- The intuition is sound: OOD samples should exhibit less stable (higher variance) distances across class centroids compared to ID samples that cluster near one class.
- Simple, training-free, and compatible with any pretrained classifier.
- Consistent improvement over vanilla Mahalanobis distance across all tested configurations.
- Systematic ablation over combination weights and feature layers.
-
Incorrect state-of-the-art claims. The paper's central claim is critically undermined by the omission of recent high-performing methods. Catalyst (CVPR 2026), DAVIS, and AdaSCALE achieve FPR95 values 2–4× lower than MahaVar on comparable benchmarks. On CIFAR-10 with ResNet-18, MahaVar reports an FPR95 of 46.09%, while Catalyst and DAVIS achieve approximately 10–13%. On CIFAR-100 with ResNet-18, MahaVar yields 68.50% compared to roughly 33–35% from these methods. On ImageNet with ResNet-50, MahaVar sits at around 41.60%, whereas the omitted baselines reach approximately 17%. These are not marginal differences, they represent fundamentally different tiers of detection reliability. Claiming SOTA while omitting methods that halve (or quarter) your error rate is a serious scholarly misrepresentation, regardless of whether evaluation protocols differ slightly.
-
Underwhelming absolute performance. An FPR95 of 68.50% on CIFAR-100 means the detector incorrectly accepts more than two-thirds of OOD samples at 95% TPR. This is far from practically deployable and suggests the distance-based paradigm itself may be limited for near-OOD detection, a discussion entirely absent from the paper.
-
Incremental contribution without sufficient depth. Computing variance over distances is a natural one-line extension any practitioner might attempt. To elevate this beyond a technical note, the paper would need either (i) rigorous theoretical analysis showing under what distributional assumptions variance provably separates ID/OOD, or (ii) significantly stronger empirical results. It provides neither. The "theoretical motivation" in Section 3.2 is informal and offers no guarantees.
-
Failure to contextualize within the broader landscape. Recent activation-shaping methods (Catalyst, DAVIS) exploit pre-pooling feature statistics (channel-wise variance, maximum activations) that are conceptually related to MahaVar's variance signal but operate far more effectively. The paper neither acknowledges this connection nor explains why a post-hoc distance-based approach should be preferred when simpler logit/activation methods dominate. Without this positioning, the contribution feels orphaned from current research trends.
-
Hyperparameter sensitivity with impractical tuning requirements. The combination weights and require an OOD validation set, a strong assumption that is rarely satisfied in real deployment. Despite this advantage over tuning-free methods, MahaVar still underperforms them substantially, which further weakens the practical case.
- The paper would benefit from explicitly framing contributions as improvements within the Mahalanobis family rather than absolute SOTA claims.
Questions
-
How does MahaVar compare directly against Catalyst, DAVIS, and AdaSCALE? Can you compare these baselines within your OpenOOD protocol?
-
Can you provide any formal guarantee (even asymptotic) for when variance-based scoring succeeds or fails?
-
What is the computational overhead of covariance estimation and per-sample variance computation relative to activation-shaping methods?
Limitations
Yes
Formatting concerns
No
6 comments
Rebuttal
We thank the reviewer for taking the time to provide such a thorough review. Below, we respond to each of the raised concerns.
W1 / W2 / Q1
We thank the reviewer for pointing to Catalyst [1], DAVIS [2], and AdaSCALE [3]. As requested in Q1, we evaluated all three under our own OpenOOD v1.5 protocol on the same backbones as Table 1 (ResNet-50, Swin-B, ViT-B).
For DAVIS we hold SCALE as the downstream score, matching the SCALE baseline already reported in our paper, and additionally evaluate DAVIS with KNN, the pairing DAVIS itself reports as best-performing on modern architectures (their Table 1), to rule out omitting their strongest configuration. For Catalyst we evaluate both the standalone elastic-scaling variants (, , ) and their combination with ReAct, following the configurations reported in the Catalyst paper. Catalyst is evaluated only on ResNet-50: its own paper states that extending it to transformers "requires substantial research and engineering" (their Sec. 5). DAVIS is evaluated on ResNet-50 and Swin-B only: its own paper states it is "not directly applicable" to ViT due to the absence of a spatial aggregation operation (their Sec. 5). AdaSCALE, being gradient-based rather than spatial-statistic-based, is architecture-agnostic and evaluated on all three.
For AdaSCALE we use the hyperparameters from its official implementation. For DAVIS and Catalyst we use the same small-grid search protocol as our own paper, tuned on ID-val and OOD-val (OpenImage-O). Due to the large number of baseline configurations on ResNet-50, we report only the average here; full per-dataset results are already computed and can be provided immediately if the reviewer would like to see them.
ResNet-50 (Avg, AUROC/FPR@95)
| Method | Avg (AUROC/FPR@95) |
|---|---|
| DAVIS(m)+SCALE | 90.06/39.39 |
| DAVIS(μ,σ)+SCALE | 89.75/39.38 |
| DAVIS(m)+KNN | 40.78/98.04 |
| DAVIS(μ,σ)+KNN | 46.42/97.54 |
| Cat(μ) | 87.58/46.13 |
| Cat(σ) | 87.96/43.47 |
| Cat(m) | 88.17/43.13 |
| Cat(μ)+ReAct | 88.36/45.31 |
| Cat(σ)+ReAct | 88.02/44.41 |
| Cat(m)+ReAct | 89.24/40.26 |
| AdaSCALE-A | 89.21/47.18 |
| AdaSCALE-L | 90.11/42.32 |
| MahaVar | 88.15/41.60 |
Swin-B
| OOD | DAVIS(m)+SCALE | DAVIS(μ,σ)+SCALE | DAVIS(m)+KNN | DAVIS(μ,σ)+KNN | AdaSCALE-A | AdaSCALE-L | MahaVar |
|---|---|---|---|---|---|---|---|
| iNaturalist | 66.63/84.85 | 75.35/61.03 | 86.35/79.46 | 89.82/70.81 | 86.28/54.25 | 85.42/61.42 | 97.06/15.33 |
| NINCO | 51.02/94.50 | 59.62/82.68 | 78.55/80.98 | 81.44/80.06 | 79.88/70.11 | 79.80/71.32 | 88.77/55.22 |
| OpenImage | 65.63/82.52 | 70.22/65.00 | 85.55/73.73 | 89.68/63.28 | 83.00/62.05 | 82.44/66.90 | 94.12/33.58 |
| SSB-Hard | 47.05/95.99 | 53.13/89.68 | 67.29/89.89 | 70.44/88.65 | 70.99/81.78 | 71.10/82.39 | 77.28/70.26 |
| Texture | 84.41/58.48 | 88.01/35.94 | 74.69/88.14 | 83.71/73.42 | 78.23/60.96 | 77.38/62.91 | 88.53/50.71 |
| Avg | 62.95/83.27 | 69.27/66.87 | 78.49/82.44 | 83.02/75.24 | 79.67/65.83 | 79.23/68.99 | 89.15/45.02 |
ViT-B
| OOD | AdaSCALE-A | AdaSCALE-L | MahaVar |
|---|---|---|---|
| iNaturalist | 84.88/59.30 | 79.96/74.87 | 96.49/18.47 |
| NINCO | 76.60/73.53 | 75.49/76.23 | 87.54/57.98 |
| OpenImage | 83.57/60.61 | 80.95/66.95 | 93.09/40.65 |
| SSB-Hard | 68.19/85.78 | 67.24/87.17 | 73.06/73.75 |
| Texture | 80.41/60.21 | 76.66/66.38 | 89.17/53.88 |
| Avg | 78.73/67.89 | 76.06/74.32 | 87.87/48.95 |
On W1. The reviewer states that MahaVar's ImageNet/ResNet-50 FPR95 (41.60%) is roughly 2.4x the omitted baselines' (~17%). Under matched protocol, the largest observed gap on ResNet-50 is 2.22pp (DAVIS$(\mu,\sigma)$+SCALE, 41.60 vs 39.38), not a multi-fold difference. This gap is consistent with what our own paper already reports for SCALE and ASH-S on ResNet-50 (Sec. 5): methods that shape penultimate or pre-pooling activations hold a modest edge specifically on this backbone.
This edge does not transfer. On Swin-B, MahaVar's FPR@95 is 20.8 to 38.3pp lower than every DAVIS and AdaSCALE variant, including a 30.2pp reduction against DAVIS's own best-reported pairing +KNN. On ViT-B, MahaVar's FPR@95 is 18.9 to 25.4pp lower than AdaSCALE; Catalyst and DAVIS report no valid configuration at all, a limitation both papers state themselves. We agree Catalyst, DAVIS, and AdaSCALE were missing from Related Work and will add them with this architecture-conditional comparison.
On W2. We agree the absolute FPR@95 values are high. This is not specific to CIFAR-100 or to MahaVar: across the ImageNet experiments above, average FPR@95 exceeds 40% for nearly every configuration, and reaches 60-80% for most methods on Swin-B and ViT-B. A subset of baselines reach somewhat lower values on ResNet-50 specifically, as discussed in W1. Whether these numbers support real-world deployment is a field-wide question, not specific to any single method. We will state this explicitly in Limitations (Appendix E).
W3 / Q2
We agree that computing a variance statistic is simple by itself. Section 3.2 is an informal motivating observation, not our theoretical contribution. The formal treatment is Theorem 4.2 ~ Corollary 4.4 in Section 4.
On (i), Theorem 4.3 directly answers the question the reviewer poses for variance itself. Under the relaxed Neural Collapse framework (Assumption 4.1), it gives an explicit cosine-similarity condition under which class-wise distance variance provably separates ID from OOD.
On (ii), our variance-only ablation already shows this: it underperforms Mahalanobis++ substantially across all three benchmarks, while the full combination achieves the best AUROC/FPR95 in each case (see our response to Reviewer ror3, W2).
This also directly answers Q2. The same condition in Theorem 4.3 characterizes both regimes: separation is guaranteed when the threshold holds, and no guarantee remains once it is violated. A violation corresponds to an OOD sample that is semantically close to some class, i.e. near-OOD. Our results above confirm this pattern: SSB-Hard is where the condition is most severely violated, and every evaluated method, including MahaVar, attains its lowest performance there.
W4
We agree Catalyst and DAVIS were missing from Related Work, and the "operate far more effectively" claim is directly addressed by the experiments in W1 above.
On the connection itself: DAVIS's variance is computed over spatial positions within a channel, and Catalyst's variant over channel-wise activations; neither uses class identity. MahaVar's variance is computed over distances to class centroids, a class-indexed quantity neither statistic captures. We will clarify this distinction in Related Work.
On preferring a distance-based approach: W1 already shows this choice pays off empirically. MahaVar also operates on the standard penultimate embedding alone; unlike Catalyst and DAVIS, it requires no architecture-specific modification to run on all three backbones.
W5
We agree requires a validation set. We first note is not part of the proposed method; it appears only in a higher-moment ablation in Appendix D.3, not in the main score. MahaVar has a single hyperparameter, .
The baselines the reviewer raised also require hyperparameters, each validated as described in their own papers. DAVIS and Catalyst each require a categorical choice among several feature or scaling variants. Catalyst's three variants (, , ) all carry a continuous clamp threshold; DAVIS's variant carries a continuous weight , while its variant has none. DAVIS further requires choosing a downstream score pairing that depends on backbone. Both DAVIS and Catalyst are tuned via a synthetic Gaussian-noise proxy in their original papers, which is a different resource from ours, but the underlying need for some tuning set does not go away.
AdaSCALE has seven hyperparameters, tuned via OpenOOD's automatic parameter search on real OOD validation AUROC, a similar resource to what our own method uses. MahaVar's is a single scalar per backbone with a narrow, low-sensitivity optimal range (Appendix D.4).
Q3
Since MahaVar's class means and inverse covariance are precomputed and stored, per-sample inference requires only the covariance-free variance of the already-computed Mahalanobis distances. We measured per-sample latency under matched hardware and protocol (batch=1, 500+ iterations):
| Method | Latency (ms) |
|---|---|
| Catalyst(m) | 0.1146 ± 0.0040 |
| Mahalanobis++ | 0.1275 ± 0.0052 |
| MahaVar (ours) | 0.1393 ± 0.0027 |
| ASH-S | 0.2050 ± 0.0047 |
| SCALE | 0.2053 ± 0.0044 |
| DAVIS(m)+SCALE | 0.2145 ± 0.0051 |
| AdaSCALE-A | 7.9448 ± 0.8132 |
MahaVar adds 0.012ms over Mahalanobis++, confirming the negligible-overhead claim in Appendix C. It is slightly slower than Catalyst(m) but faster than ASH-S, SCALE, and DAVIS(m)+SCALE, all within the same single-pass, sub-millisecond regime. The one outlier is AdaSCALE, roughly 57x slower, consistent with its use of gradient-based input perturbation, which requires an additional forward and backward pass per sample rather than a single forward pass.
Covariance estimation is a one-time cost computed once over the full training set (1,281,167 images): 12.9 seconds wall-clock, negligible relative to model training time and not repeated at inference.
We appreciate the opportunity to address these points and welcome any further questions the reviewer may have.
[1] Hassan et al. "Catalyst: Out-of-Distribution Detection via Elastic Scaling." CVPR 2026.
[2] Hassan et al. "DAVIS: OOD Detection via Dominant Activations and Variance for Increased Separation." arXiv:2601.22703, 2026.
[3] Regmi. "AdaSCALE: Adaptive Scaling for OOD Detection." ICML 2026.
Reminder: Follow-up on Rebuttal
Thank you for taking the time to review our submission. Our response to the points raised is now posted in full. With the discussion period ending tomorrow, we wanted to reach out and see if it addresses your concerns, or if there is anything we can clarify further. We appreciate your consideration.
Thank you to the authors for responding to my concerns.
I checked the FPR95 and AUROC values reported in the respective papers for Catalyst, ADAScale, and DAVIS. There are other strong recent papers, such as OptFS and CADRef, but I focused on Catalyst, ADAScale, and DAVIS because they are recent contributions. My comments below are based on the authors’ rebuttal and comparisons with these papers.
Swin B results: The original DAVIS manuscript reports 16.01/96.42 on iNaturalist for DAVIS (μ, σ) + KNN, whereas this paper reports 70.71/89.82. I compared the DAVIS (μ, σ) + KNN results across datasets and found substantial discrepancies. Similarly, ADAScale reports 32.82/90.73 on iNaturalist, whereas this paper reports 54.25/86.28. I observed similar gaps for ADAScale on OpenImage and NINCO. I did not compare every column, but even these two comparisons reveal substantial discrepancies. In the original DAVIS manuscript, DAVIS accounts for most of the performance gain on Swin B. This raises the question of whether the baselines were reproduced faithfully.
ViT B results: Again, ADAScale reports substantially better results on iNaturalist, NINCO, Texture, and OpenImage in the original paper. These gaps are not minor rounding differences. Please compare the results carefully with the original manuscript.
ResNet 50 results: I am not sure which OOD datasets were used for comparison. As in most papers, I would prefer a clear distinction between far OOD and near OOD datasets. It is understandable that one method may not be universally superior across all settings. In the original DAVIS paper, DAVIS (μ, σ) + SCALE has an average of 22.80/95.03 across iNaturalist, SUN, Places, Texture, and OpenImage. AdaScale A has an average performance of 17.84/96.14 across iNaturalist, Places, Texture, and OpenImage. An apple to apple comparison would position this paper more clearly. I compared these methods because they are recent and provide extensive evaluations.
W1: This advantage does not transfer. I compared the results on the matching datasets, namely iNaturalist, Texture, OpenImage O, SSB hard, and NINCO, for DAVIS (μ, σ) + KNN and MahaVar. DAVIS (μ, σ) + KNN achieves 37.34, whereas MahaVar achieves 45.02. Therefore, the claim of a 30.2 percentage point reduction compared with DAVIS’s own best reported pairing with KNN is misleading.
W2: The response is not correct. I have verified the reported values carefully.
W3: Thank you for the clarification.
W4: The missing related work is not limited to Catalyst, DAVIS, and ADAScale. Other recent works, including CADRef, OptFS, and CIDER, should also be discussed. Regarding the distance to the C class centroid, CIDER uses a similar approach. I believe a more comprehensive literature review is required.
Hyperparameters: My concern is not hyperparameter tuning itself, but the use of an OOD validation split for tuning. A better option would be to use Gaussian noise or other self generated data to select hyperparameters.
CIDER: https://arxiv.org/abs/2203.04450 CADRef: https://arxiv.org/abs/2503.00325 OptFS: https://arxiv.org/abs/2402.00865
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper claims that the Mahalanobis distance with its variance
is a good criterion for OOD detection. (Due to the limitation of Openreview's latex compiler I split the formula into 2 lines)
Empirical and theoretical results support the claim.
Strengths and weaknesses
Strength
- This is a new and simple criterion.
- Both empirical and theoretical evidences support the proposed criterion.
Weaknesses
-
Although the proposed criterion is not totally equivalent, the intuition that "ID features tend to lie closer to their ground-truth class centroid, whereas OOD features are more or less equally distant from all class centroids." is not original [1]. The main contribution of this paper is offering a theoretical support for this intuition.
-
The criterion is not the direct result of the theoretical derivation: the core theoretical result is , the criterion is designed on this conclusion.
-
About centering: in theoretical derivation, , but in practice, .
-
The assumption of Theorem 4.3: assuming the OOD is not similar to any in-distribution class is strong.
-
The assumption of Corollary 4.4: assuming is in the span of the class mean is too strong.
[1] Pokhrel, Sandesh, et al. "NCDD: nearest centroid distance deficit for out-of-distribution detection in gastrointestinal vision." MIUA 2025.
Questions
See Weaknesses
Limitations
Yes
Final justification
My problems are partially solved so I keep my score.
Formatting concerns
N / A
7 comments
Rebuttal
Thank you for the valuable feedback. We believe the points raised are important, and we address them individually below.
W1
We thank the reviewer for raising this point, and would like to clarify the specific gap our observation addresses relative to prior work, including NCDD [1].
We agree that the general intuition, ID samples cluster closer to their own class centroid while OOD samples are comparably distant from all centroids, is discussed in prior work. Prior work discusses the overall distance structure between ID and OOD samples, in particular characterizing OOD samples as maintaining roughly similar distances across all class centroids. However, the corresponding structure on the ID side has not been established: specifically, whether the non-nearest distances plateau immediately starting at the second-nearest class. This is a distinct claim from the magnitude of the nearest distance alone. Figure 1 provides direct evidence for this specific structure, showing that for ID samples, the sorted class-wise distance jumps sharply after the nearest class and plateaus from the second-nearest class onward. This distance-rank characterization has not been previously shown.
To further verify that this structure carries a genuinely different, complementary signal, we tested two controlled combinations of the nearest distance with (i) the sum of non-nearest distances and (ii) the difference between the nearest and second-nearest distances, under the same L2-normalized Mahalanobis features and validation protocol as MahaVar.
First, we adapted NCDD's core scoring idea into our pipeline,
and performed a grid search over
on ImageNet with ResNet-50.
Second, we tested a two-term gap score restricted to only the nearest and second-nearest distances,
using the same grid.
In both cases, the validation-selected converged to 0, and the resulting scores were numerically identical to Mahalanobis++ (AUROC 86.94 / FPR@95 45.46, Table 3). This indicates that neither the sum of all non-nearest distances nor the gap between the two closest classes alone carries information beyond the nearest-class distance already used by Mahalanobis++. In the same setting, our variance term, which aggregates information across all classes rather than one or two, is selected with a non-trivial weight () and yields a clear improvement (AUROC 88.15 / FPR@95 41.60, Table 3).
We will revise the corresponding statement in the Introduction (L74) to precisely scope this contribution to the distance-rank characterization above, rather than the general asymmetry.
W2
We would like to clarify the intended role of the theoretical result. Theorem 4.3 and Corollary 4.4 establish that the variance term carries meaningful discriminative signal, in particular that it retains separability in near-OOD cases where the nearest-class distance alone becomes uninformative. We do not claim, nor does the theory claim, that variance alone constitutes an optimal standalone OOD score.
To make this explicit, we report the performance of the variance term used in isolation, , without the nearest-class distance term, across all three benchmarks (ResNet-18 for CIFAR-10/100, ResNet-50 for ImageNet):
| Setting | Var Only | Mahalanobis++ | MahaVar |
|---|---|---|---|
| CIFAR-10 (C=10) | 83.81 / 51.55 | 90.36 / 50.21 | 90.91 / 46.09 |
| CIFAR-100 (C=100) | 73.68 / 80.70 | 82.01 / 70.72 | 83.06 / 68.50 |
| ImageNet (C=1000) | 67.99 / 73.97 | 86.94 / 45.46 | 88.15 / 41.60 |
This confirms that the two terms are complementary rather than substitutable: the nearest-class distance provides a strong signal across the bulk of samples, whereas the variance term additionally recovers discriminative power that the nearest-class distance alone does not capture. Consequently, combining both consistently achieves the best performance across all three settings. In light of this, we will add a discussion of this complementary relationship together with this ablation to the Limitations section (Appendix E), clarifying that MahaVar is designed as a combination motivated by two distinct regimes of discriminative signal rather than a claim that variance alone is sufficient.
W3
We thank the reviewer for pointing out this discrepancy between the centered formulation used in the theoretical derivation and the non-centered normalization used in practice. We had already investigated this gap in Appendix D.7, where we compare the centered and non-centered variants of both Mahalanobis++ and MahaVar across all three backbone architectures on ImageNet (Table 13).
The results show that centering does not uniformly help in practice. For Swin-B and ViT-B, centering yields performance nearly identical to the non-centered variant (e.g., MahaVar AUROC 89.15 vs. 89.18 on Swin-B and 87.87 vs. 87.82 on ViT-B) since is small (2.03 and 1.67 respectively). For ResNet-50, however, centering substantially degrades performance (MahaVar AUROC drops from 88.15 to 85.21). We attribute this to the non-negative feature geometry induced by the terminal ReLU activation, reflected in a much larger global mean norm (). This is precisely why we adopt the non-centered L2 normalization in the practical implementation of MahaVar despite the theoretical motivation for centering. We already note in Appendix D.7 that a full theoretical treatment of the setting, along with a deeper understanding of the performance degradation observed for ResNet, is left as future work.
To improve visibility, we will revise the description in Section 4 to more clearly surface this centering discrepancy and point to the discussion in Appendix D.7.
W4
We agree that the condition in Theorem 4.3, requiring the OOD sample to maintain sufficiently low cosine similarity to every class mean, is a non-trivial condition. However, we would like to clarify that this is not unique to our work: essentially all representation-based distance-driven OOD detectors including Mahalanobis [2] and KNN [3] implicitly rely on the same premise that OOD samples are separated from ID class regions in feature space. Without this separation none of these methods, including the baselines compared in this paper, could function in principle. Under a precisely quantified cosine similarity threshold, we further show that the variance term still provides a meaningful discriminative signal in practice, which we demonstrate in the following case.
SSB-Hard is the near-OOD benchmark where the condition in Theorem 4.3 is most severely violated, and accordingly it is the setting where nearly all methods in Table 1, including MahaVar, achieve their lowest performance. Even so, MahaVar achieves the best AUROC among all evaluated baselines on SSB-Hard (73.02 vs. 71.67 for NNGuide, 71.50 for Mahalanobis++, and 66.29 for KNN), indicating that even under the most adverse condition relative to our assumption, MahaVar remains competitive with and outperforms other distance-based methods operating under the same implicit assumption.
W5
We agree that the assumption underlying Corollary 4.4 (that the within-class deviation lies exactly in span()) is stronger than the condition in Theorem 4.3. We would like to clarify the intended role of this result. Corollary 4.4 is presented as a sufficient rather than necessary condition: it illustrates a special case, obtained by adding structure on top of Theorem 4.3's more general and weaker condition, under which a universal guarantee becomes available, holding for every OOD sample rather than only those satisfying a similarity threshold. In this sense, Corollary 4.4 serves as an existence proof that the variance term can provide a provably meaningful and universal discriminative signal beyond what the nearest-class distance alone captures.
In the proof of Corollary 4.4, the class-wise distance variance admits a closed form, , where and denotes the orthogonal projection onto . This term is what ultimately drives the difference in variance between ID and OOD samples, and the assumption in Corollary 4.4 corresponds to forcing for ID samples, which is what yields the universal guarantee. Additionally, we directly measured on real features. On average holds across all ID/OOD pairs except for ViT. There, the feature dimension is smaller than the number of classes (). This causes the class-mean subspace to span nearly the entire feature space, making this diagnostic uninformative in that setting. We will revise the surrounding text to make this distinction explicit.
We thank the reviewer again for their time and hope these clarifications resolve the concerns raised.
[1] Pokhrel, Sandesh, et al. "NCDD: nearest centroid distance deficit for out-of-distribution detection in gastrointestinal vision." MIUA 2025.
[2] Lee, Kimin, et al. "A simple unified framework for detecting out-of-distribution samples and adversarial attacks." NeurIPS 31 (2018).
[3] Sun, Yiyou, et al. "Out-of-distribution detection with deep nearest neighbors." ICML. PMLR, 2022.
W1
Thank you for clarifying the substantive innovative findings of this article.
W2
Thank you for the ablation on var, but this does not affect my statement: the effectiveness of the two complementary terms in the final criterion is empirically checked.
We would like to clarify the intended role of the theoretical result. Theorem 4.3 and Corollary 4.4 establish that the variance term carries meaningful discriminative signal, in particular that it retains separability in near-OOD cases where the nearest-class distance alone becomes uninformative. We do not claim, nor does the theory claim, that variance alone constitutes an optimal standalone OOD score.
I have a question about this point. If var on its own is an effective criterion for only a small subset of the data, could you identify concrete examples of such cases? More broadly, is there any evidence beyond the empirical results—for instance, a theoretical argument—that var and the original criterion are genuinely complementary?
W3
I agree with placing the currently unexplainable phenomenon in future work, and I thank the authors for honestly pointing this out.
W4
I agree that this is a commonality among similar works (and possibly also a common weakness).
W5
In this sense, Corollary 4.4 serves as an existence proof that the variance term can provide a provably meaningful and universal discriminative signal beyond what the nearest-class distance alone captures.
However, based on your Var-Only experiment in W2, the assumption here is indeed too idealized. I admit the theory is quite elegant, but it is disconnected from actual OOD tasks.
Further Clarifications for Reviewer ror3 (1)
We thank the reviewer again for pushing us on this point; working through the pointwise argument clarified the mechanism for us as well.
W2
We would like to make the complementarity claim precise with a pointwise argument, and then ground it in a concrete instance.
For any , the identity underlying Corollary 4.4's proof holds unconditionally, with no assumption on :
where projects onto . Writing , for any pair , define
so that .
Theorem 4.3's setting. Its hypothesis says precisely that is not closely aligned with any single class mean, i.e. is angularly far from every rather than close to one of them. In other words, whenever an OOD sample satisfies Theorem 4.3's condition, the min-distance term is already correct, and the variance term reinforces a comparison it did not need to fix.
Under this hypothesis the theorem's own bound gives . The same hypothesis also constrains : since and , we have
As gives , the right-hand side is itself at least . Expanding shows . Since , we have , so and the whole expression exceeds . Combined with , which follows directly from the within-class deviation bound in Assumption 4.1, this gives , so holds as well.
Corollary 4.4's setting (No assumption). Here is unconstrained as in Corollary 4.4, so can be positive, i.e. the min-distance term can genuinely fail because happens to sit closer to some class mean than does. We set aside Corollary 4.4's assumption that 's deviation lies in , i.e. we do not fix , and instead treat as general. Applying the identity above to both samples,
so reduces to the single condition , independent of . On average, this ordering holds in practice: exceeds across 22 of 22 backbone/dataset combinations with . Whenever it holds, a finite threshold
exists such that restores the correct ordering, even in the case. This is the sense in which the two terms are complementary by construction: they fail under different, non-overlapping geometric conditions, and is exactly the condition under which the variance term can compensate for a min-distance failure.
We can also exhibit this mechanism directly. Using the same tuned for Table 3 (ResNet-50, ImageNet), we computed the min-distance-only threshold at 95% ID TPR and the corresponding combined-score threshold , both calibrated on the same ID test split. On SSB-Hard, min-distance alone misclassifies 42,245 OOD samples as ID; 1,709 of these (4.05%) are correctly rejected once the variance term is added. On NINCO, 364 of 3,961 such cases (9.19%) are similarly recovered. Three representative instances in SSB-Hard:
| idx | ||||||
|---|---|---|---|---|---|---|
| 46003 | 202.04 | 204.19 | 755.38 | 37.77 | -164.27 | -140.80 |
| 2274 | 201.12 | 204.19 | 741.04 | 37.05 | -164.07 | -140.80 |
| 17212 | 203.54 | 204.19 | 795.84 | 39.79 | -163.75 | -140.80 |
In each case , so the min-distance term alone accepts the sample as ID, but the class-wise variance is large enough that pushes the combined score below , correctly rejecting it. This is a direct realization of the regime described above.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We appreciate the reviewer's insightful questions, which have helped us identify several places where our presentation can be improved. We respond point by point below.
We agree that the dataset-level averages in Table 1/2 do not fully capture per-dataset variation. As already noted for Texture (L298-299), MahaVar does not achieve a uniform improvement across every individual OOD dataset within each benchmark. This pattern appears in the ResNet-based settings the reviewer points to: for ImageNet with ResNet-50 (Table 3), the margin on Texture is marginal, and for CIFAR-10 with ResNet-18 (Table 6), MahaVar underperforms Mahalanobis++ on SVHN. We will add an explicit statement to the Limitations section (Appendix E) clarifying that MahaVar's gains, while consistent on average, are not guaranteed to hold uniformly across every individual OOD dataset.
We agree that the current ablation study paragraph in Section 5 leans heavily on Appendix references without surfacing the underlying numbers. As NeurIPS allows an additional page upon acceptance, we will use this space to incorporate the key quantitative results from Appendix D (e.g., the variance/L2-normalization contributions in D.2 and the skewness term results in D.3) directly into the ablation study paragraph, improving readability without relying on readers to cross-reference the appendix for the main findings.
On related work coverage, we agree the span of literature could be more exhaustive. We will expand related work to include training-based OOD methods in more depth, as well as recent post-hoc methods such as Catalyst [1] and DAVIS [2].
On the pertinence of the sum-based ensembling and whether the two quantities are commensurable, we would like to clarify with additional evidence. First, the score is not dominated by the variance term. We report below the performance of the variance term used in isolation, without the nearest-class distance term, and it underperforms Mahalanobis++ [3] substantially across all three benchmarks:
This confirms that the nearest-class distance still provides the dominant signal, with variance acting as a corrective term rather than functioning alone. Second, we do not assume the two quantities are commensurable in raw scale. The consistently small optimal α selected across backbones (Table 10) indicates that α itself absorbs the scale mismatch between the two terms rather than treating them as directly comparable quantities.
On whether the theoretical assumptions are respected on real data, Assumption 4.1 is intended as an idealized geometric model characterizing the underlying trend, rather than an exact description of any specific feature space, in the same spirit as the Gaussian assumption underlying the original Mahalanobis detector. Consistent with this trend, the empirical prevalence of Neural Collapse across diverse architectures and classification tasks is documented in the literature, as reviewed in NCI [4] Appendix 13 (originally sourced from [5]), which we already cite in our Related Work (L146-148) as the basis for adopting the relaxed Neural Collapse framework. This literature primarily covers CNN-based architectures, consistent with our ResNet-18 and ResNet-50 settings. For Transformer-based backbones (especially ViT-B), we separately analyze in Appendix A why the ETF structure is expected to weaken, since the feature dimension is smaller than the number of classes (D<C−1).
On motivation, we would like to explain how the two terms are designed to be complementary rather than independently motivated. Theorem 4.3 and Corollary 4.4 show theoretically that variance can carry a meaningful discriminative signal. However, used alone, it does not outperform the strong signal already provided by the nearest-class distance, as shown above where the variance term alone underperforms Mahalanobis++ substantially. Combining the two terms consistently yields the best performance across all settings, confirming that they capture complementary information rather than one subsuming the other.
On transfer across setups, we acknowledge as discussed above that the improvement is a net gain rather than a uniform one across every individual dataset.
On guidelines for when the augmentation is expected to help, we propose the following practical rule based on feature dimension relative to the number of classes:
The gain shrinks as D/C drops below 1 consistent with the incomplete ETF formation discussed in Appendix A. Beyond this ratio one could in principle check for a given ID dataset how closely NC1 and NC2 are satisfied using the diagnostic statistics of Papyan et al. [5]: the within-class variability collapse metric Tr(ΣWΣB†)/C for NC1 and the coefficient of variation of centered class-mean norms Stdc(∣∣μc−μG∣∣2)/Avgc(∣∣μc−μG∣∣2) together with the standard deviation of pairwise cosine similarities for NC2. However, this guideline can only assess how well the ID data satisfies the underlying assumptions; it says nothing about which OOD samples will be encountered at test time, since these are arbitrary and unknown in advance. Consequently, no single threshold on such diagnostics can guarantee when the augmentation will help. We will add this guideline, together with the D/C-based rule of thumb, this diagnostic discussion, and its limitation regarding OOD unpredictability, to Appendix A alongside the existing description of the ViT-B dimensionality issue.
On the rationale behind the additive form and whether a better ensembling scheme exists: our theoretical results (Theorem 4.3 and Corollary 4.4) establish that variance carries a discriminative signal. They do not, however, prescribe how to combine it with the nearest-class distance. The additive form is a reasonable choice, not one endorsed by the theory itself. Motivated by this question, we explored a ratio-based alternative: S(x)=Varc[dc(x)]/d(1)(x)
CIFAR-10
CIFAR-100
ImageNet (ResNet-50)
This form is hyperparameter-free and performs on par with, and in some cases marginally better than, the tuned additive form. This is a genuinely new finding prompted by the reviewer's question, and we had not previously evaluated this form. We do not propose to adopt it as the main method at this stage, for two reasons. First, it is potentially prone to numerical instability when d(1)(x) approaches zero, a regime our current theoretical framework does not characterize. Second, establishing an ID/OOD separation guarantee analogous to Theorem 4.3 and Corollary 4.4 for this ratio form would require a separate theoretical derivation beyond the current scope of this work. We view this as a promising direction and will report it, along with these open questions, as future work in the revised manuscript.
The Limitations of this work are already discussed in Appendix E; we will add a pointer from the main text to make this more visible. We will also revise the figure captions and formatting throughout the paper for the camera-ready version, including removing duplicate titles and consolidating figures where appropriate, as suggested by the reviewer.
We hope the responses above adequately address the reviewer's concerns and are glad to discuss further if useful.
[1] Hassan, Abid, et al. "Catalyst: Out-of-Distribution Detection via Elastic Scaling." CVPR 2026.
[2] Hassan, Abid, et al. "DAVIS: OOD Detection via Dominant Activations and Variance for Increased Separation." arXiv preprint arXiv:2601.22703 (2026).
[3] Müller, Maximilian, and Matthias Hein. "Mahalanobis++: Improving OOD Detection via Feature Normalization." ICML. PMLR, 2025.
[4] Liu, Litian, and Yao Qin. "Detecting out-of-distribution through the lens of neural collapse." CVPR 2025.
[5] Papyan, Vardan, X. Y. Han, and David L. Donoho. "Prevalence of neural collapse during the terminal phase of deep learning training." PNAS 117.40 (2020): 24652-24663.