acceptodds
Published as a conference paper at NeurIPS 2026

Strengthen Out-of-Distribution Detection via Adaptive Mahalanobis Gap

Kunpeng Sui, Rundong He, Jie Su

Abstract

Deep neural networks have achieved significant success on in-distribution (ID) tasks, but out-of-distribution (OOD) samples during inference can lead to unreliable predictions. To address this issue, distance-based methods exploit the geometric structure of feature space for OOD detection. However, methods based on static information geometry fail to address geometry distorted by ill-distributed samples. Although prior work reduces the misclassification of OOD samples as ID by adjusting the residual space with real-time features, it fails to address the misclassification of ID samples as OOD. In addition, existing distance-based methods ignore class-specific characteristics when computing deviation feature and rely on the nearest prototype for uncertainty estimation, leading to suboptimal OOD detection performance. To address these issues, we propose Adaptive Mahalanobis Gap (AMG). Specifically, we first strengthen the principal space along real-time feature directions to reduce the misclassification of ID samples as OOD. Subsequently, we incorporate class variance and prototype norms to mitigate bias of deviation feature from class-wise distributional differences. Finally, we introduce the Mahalanobis gap scoring for uncertainty scoring to overcome bias from single-prototype reliance. Experiments on CIFAR-10/100 and ImageNet-1k show that AMG consistently outperforms state-of-the-art methods in FPR@95 and AUROC. Our code is available at https://anonymous.4open.science/r/AMG_AR.

Keywords:
Sydney

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_hgGdOpenReview ↗
Rating
4
Clarity
4
Confidence
5
Originality
2
Quality
3
Significance
3
Read review
Summary

This paper proposes a new Mahalanobis-distance-based score function for out-of-distribution (OOD) detection. Existing Mahalanobis-based methods mainly rely on a fixed feature-space geometry, particularly a fixed covariance matrix. Recent work, DCC, improves this formulation by dynamically regularizing the covariance through residual-space projection. Building on this idea, the present paper further regularizes the covariance using both the principal and residual subspaces. In addition, it introduces Mahalanobis Gap Scoring (MGS), a theoretically justified scoring mechanism designed to improve OOD separability. The proposed method is evaluated on CIFAR and ImageNet benchmarks under both near-OOD and far-OOD settings.

Strengths and weaknesses

Quality: The proposed Mahalanobis distance is grounded in the established framework of dynamic covariance calibration, which is reasonable. The Mahalanobis gap scoring (MGS) method is designed to achieve a lower false positive rate (FPR), as suggested by Theorem 1. However, the reduction in FPR depends on UFPRU_{FPR} satisfying certain conditions. The authors do not clarify whether these conditions are actually satisfied by the proposed MGS, leaving the theoretical guarantee

Clarity: The paper is well presented. The problem formulation and Figure 1 clearly convey the motivation, and the proposed method is easy to follow.

Significance: The design of the new Mahalanobis distance-based score is incremental. Compared with DCC, it additionally incorporates an adjustment in the principal space. However, the Mahalanobis Gap Scoring (MGS) strategy itself is novel. If the authors could extend MGS to other distance-based scores, it may have broader applicability and practical value.

Originality: The proposed Mahalanobis distance-based score is not new. The main originality of the paper appears to lie in the MGS component. However, the current analysis of MGS is insufficient and should be further strengthened.

Questions

Q1: What is the dimension of principal and residual space?

Q2: What is the computational cost of the proposed method? It would also be helpful to compare the efficiency of the proposed method with existing approaches to demonstrate whether it is practical for real-world deployment.

Q3: In Eq. 16, dMd_M appears to refer to the proposed Mahalanobis distance. Can Theorem 1 be generalized to other distance functions, such as Euclidean distance or the vanilla Mahalanobis distance? In other words, is it possible to replace dMd_M with alternative distance metrics while preserving the theoretical guarantee?

Limitations

No, I think the computing cost should also be one of the limitations

Paper formatting concerns

No major issues

Final justification

Most of my concerns are solved. The main remaining limitation is the distinction between theory and practical methods. Since this paper does not mainly focus on the theoretical part and, from the experiments, the method seems effective, I feel the limitation is not sufficient to reject the paper. But I think the discussion of the distinction should be included in the revised paper, and as I commented, it is better to include the performance of MGS with DCC and Mahalanobis++ in the final paper.

1 comment

W1. However, the reduction in FPR depends on UFPRU_{\mathrm{FPR}} satisfying certain conditions. The authors do not clarify whether these conditions are actually satisfied by the proposed MGS, leaving the theoretical guarantee.

Thank you for highlighting this issue. We agree that Theorem 1 provides a conditional rather than unconditional guarantee. Specifically, the non-increase of FPR holds when the thresholds are compatible, UFPR>0U_{\mathrm{FPR}}>0, and 0<λgap<UFPR0<\lambda_{\mathrm{gap}}<U_{\mathrm{FPR}}.

The value of Theorem 1 is to characterize a sufficient safe regime in which introducing the MGS term cannot increase FPR relative to nearest-prototype scoring. It also clarifies how the gap weight and decision thresholds jointly affect the rejection of OOD samples, thereby providing theoretical guidance for parameter selection.

In our current experiments, λgap\lambda_{\mathrm{gap}} is fixed before testing and is not selected by explicitly enforcing the population-level bound UFPRU_{\mathrm{FPR}}. Therefore, the empirical reduction in FPR and the theoretical result should be viewed as complementary evidence: the experiments demonstrate the practical effectiveness of MGS, while Theorem 1 identifies conditions under which its FPR behavior is theoretically controlled. We will revise the manuscript to make this scope and distinction clearer.

W2&Q3. If the authors could extend MGS to other distance-based scores, it may have broader applicability and practical value. In Eq. 16, dMd_M appears to refer to the proposed Mahalanobis distance. Can Theorem 1 be generalized to other distance functions, such as Euclidean distance or the vanilla Mahalanobis distance? In other words, is it possible to replace dMd_M with alternative distance metrics while preserving the theoretical guarantee?

Thank you for this insightful question. We clarify that the proof structure of Theorem 1 is not specific to the covariance construction of our proposed Mahalanobis distance. Instead, it relies on ordered class-conditional dissimilarities, the non-negativity of the gap term, threshold-compatible decision thresholds, and a positive safe upper bound on the gap weight.

More generally, let d(⋅,⋅)d(\cdot,\cdot) be a class-conditional dissimilarity function for which a smaller value indicates greater proximity. For a test feature f(x)f(x) and class prototypes μ1,…,μC\mu_1,\ldots,\mu_C, define qc=d(f(x),μc)q_c=d(f(x),\mu_c) and sort these values as q(1)≤q(2)≤⋯≤q(C)q_{(1)}\leq q_{(2)}\leq\cdots\leq q_{(C)}.

The generalized gap score is defined as Gd(x)=1C−1∑j=2C(q(j)−q(1))G_d(x)=\frac{1}{C-1}\sum_{j=2}^{C}(q_{(j)}-q_{(1)}).

The corresponding nearest-prototype score and gap-enhanced score are defined as Sneard(x)=−q(1)S_{\mathrm{near}}^{d}(x)=-q_{(1)} and Sλd(x)=−q(1)+λgapGd(x)S_{\lambda}^{d}(x)=-q_{(1)}+\lambda_{\mathrm{gap}}G_d(x), respectively.

Because q(1)q_{(1)} is the minimum class-conditional dissimilarity, each difference q(j)−q(1)q_{(j)}-q_{(1)} is non-negative, and therefore Gd(x)≥0G_d(x)\geq0. Consequently, the same set-inclusion argument used in Theorem 1 remains applicable. Specifically, if the decision thresholds are threshold-compatible, UFPRd>0U_{\mathrm{FPR}}^{d}>0, and the gap weight satisfies 0<λgap<UFPRd0<\lambda_{\mathrm{gap}}<U_{\mathrm{FPR}}^{d}, then the FPR of the generalized gap-enhanced score is no greater than that of the corresponding nearest-prototype score.

Therefore, the sufficient FPR guarantee is not inherently restricted to our adaptive Mahalanobis formulation. It can be extended to other prototype-based dissimilarities satisfying the same conditions, including Euclidean distance and vanilla Mahalanobis distance. Similarity functions can also be used after being converted into dissimilarities. For example, cosine similarity can be converted into cosine distance as dcos(f,μ)=1−cos⁡(f,μ)d_{\mathrm{cos}}(f,\mu)=1-\cos(f,\mu).

We emphasize, however, that this is a generalization of the theoretical proof structure. Our current experiments validate MGS only with the proposed adaptive Mahalanobis formulation, and we do not claim that every alternative dissimilarity will yield the same empirical improvement. We will clarify this distinction in the revised manuscript. A systematic evaluation of MGS with Euclidean, vanilla Mahalanobis, cosine, and learned dissimilarities is an important direction for extending its practical applicability.

W3. However, the current analysis of MGS is insufficient and should be further strengthened.

Thank you for this valuable suggestion. We agree that the motivation and role of MGS should be explained more clearly. We will strengthen the analysis from the following three perspectives.

What does MGS measure?
MGS measures the relative separation between the nearest class prototype and the remaining prototypes. For sorted distances d(1)≤⋯≤d(C)d_{(1)}\leq\cdots\leq d_{(C)}, it is defined as MGS(x)=1C−1∑j=2C(d(j)−d(1))\mathrm{MGS}(x)=\frac{1}{C-1}\sum_{j=2}^{C}(d_{(j)}-d_{(1)}). Unlike nearest-distance scoring, it captures the full class-distance structure.

How does MGS help?
The final score is S(x)=−d(1)+λgapMGS(x)S(x)=-d_{(1)}+\lambda_{\mathrm{gap}}\mathrm{MGS}(x). The first term measures proximity to the nearest ID prototype, while MGS measures how distinctly the sample is associated with that class. On CIFAR-100, adding MGS reduces FPR@95 from 28.48% to 27.43% and improves AUROC from 92.50% to 93.20%.

Why is MGS necessary?
A nearest-distance score alone may be insufficient because two samples can have similar nearest-prototype distances but very different relationships to the remaining classes. An ID sample is generally expected to exhibit a more distinctive class association, with one relatively close prototype and larger distances to the other prototypes. In contrast, an OOD sample often exhibits a less discriminative and flatter class-distance profile. MGS captures this relative class-separation information, which is discarded by nearest-distance scoring.

Q1. What is the dimension of principal and residual space?

Thank you for this question. Let DD denote the dimensionality of the backbone feature. The principal and residual subspaces have dimensions KK and D−KD-K, respectively. Following DCC, we set K=300K=300 for DenseNet, K=50K=50 for WRN, and K=512K=512 for the ImageNet setting. We will explicitly report both KK and D−KD-K for each backbone in the revised manuscript.

Q2. What is the computational cost of the proposed method? It would also be helpful to compare the efficiency of the proposed method with existing approaches to demonstrate whether it is practical for real-world deployment.

Thank you for raising this practical concern. We additionally report the wall-clock runtime and OOD detection performance on CIFAR-100 under the same hardware, backbone, batch size, and evaluation settings.

MethodRuntime ↓Relative to DCC ↓FPR@95 ↓AUROC ↑
DCC10 min 17 s1.00×29.8492.40
AMG (DCC-style Implementation)11 min 59 s1.17×27.4393.20
AMG (Optimized Implementation)8 min 30 s0.83×27.4093.20

We provide two implementations of AMG. The first follows the direct matrix-inversion procedure used by the original DCC implementation. For each test feature ff, let fA,fB∈RDf_A,f_B\in\mathbb{R}^{D} denote its principal- and residual-subspace components, respectively. AMG constructs the sample-dependent covariance matrix as

Σ′(f)=Σ+αfAfA⊤−βfBfB⊤\Sigma'(f)=\Sigma+\alpha f_Af_A^\top-\beta f_Bf_B^\top

where Σ∈RD×D\Sigma\in\mathbb{R}^{D\times D} is the base covariance matrix and α,β>0\alpha,\beta>0 are the calibration coefficients. The DCC-style implementation directly computes

M(f)=(Σ′(f))−1=(Σ+αfAfA⊤−βfBfB⊤)−1M(f)=\left(\Sigma'(f)\right)^{-1}=\left(\Sigma+\alpha f_Af_A^\top-\beta f_Bf_B^\top\right)^{-1}

for every test sample. Consequently, it performs a full D×DD\times D matrix inversion per sample, with approximately O(D3)O(D^3) per-sample complexity for this inverse-computation component. This implementation requires 11 min 59 s, corresponding to 1.17× the runtime of DCC.

We further provide a mathematically equivalent implementation based on the Woodbury low-rank inverse identity. The key observation is that Σ′(f)\Sigma'(f) differs from the base covariance Σ\Sigma by only two rank-one terms. Defining

U(f)=[fA,fB]∈RD×2,R=diag⁡(α,−β)U(f)=[f_A,f_B]\in\mathbb{R}^{D\times2},\qquad R=\operatorname{diag}(\alpha,-\beta)

gives

Σ′(f)=Σ+U(f)RU(f)⊤\Sigma'(f)=\Sigma+U(f)RU(f)^\top

We precompute Σ−1\Sigma^{-1} once before test-time scoring and obtain the sample-dependent precision matrix as

M(f)=Σ−1−Σ−1U(f)(R−1+U(f)⊤Σ−1U(f))−1U(f)⊤Σ−1M(f)=\Sigma^{-1}-\Sigma^{-1}U(f)\left(R^{-1}+U(f)^\top\Sigma^{-1}U(f)\right)^{-1}U(f)^\top\Sigma^{-1}

Because U(f)U(f) contains only two update directions, the inner matrix R−1+U(f)⊤Σ−1U(f)R^{-1}+U(f)^\top\Sigma^{-1}U(f) has size 2×22\times2. Therefore, the optimized implementation replaces a full D×DD\times D inversion for every test sample with a one-time O(D3)O(D^3) computation of Σ−1\Sigma^{-1} followed by approximately O(D2)O(D^2) computation per sample.

This optimization changes only the numerical procedure used to compute the inverse covariance. It does not modify the definitions of ACC, CDS, MGS, the calibrated Mahalanobis distance, or the final OOD score. The two implementations are therefore mathematically equivalent up to minor floating-point differences. Accordingly, AUROC remains unchanged at 93.20%, while FPR@95 changes only marginally from 27.43% to 27.40%.

The optimized implementation reduces the runtime from 11 min 59 s to 8 min 30 s, corresponding to a 29.1% reduction relative to the DCC-style implementation. It is also 17.3% faster than DCC while retaining the performance improvement of AMG.

Reviewer_bSJrOpenReview ↗
Rating
5
Clarity
4
Confidence
4
Originality
3
Quality
4
Significance
3
Read review
Summary

This paper proposes a post-hoc OOD detection method, Adaptive Mahalanobis Gap (AMG). The method enhances the discriminative robustness of the feature space by suppressing noise through the contraction of less informative feature dimensions, and mitigating biases arising from class-dependent distributional variations. Furthermore, the authors introduce a novel mahalanobis gap scoring mechanism for OOD assessment. Extensive experiments across benchmarks of varying scales demonstrate consistent performance improvements over existing approaches.

Strengths and weaknesses

Strengths:

  1. The proposed method is novel and effective. By improving the discriminative structure of the in-distribution feature space and introducing Mahalanobis Gap Scoring to exploit global feature relationships, it achieves more reliable post-hoc OOD detection.

  2. The paper is clearly written, making the core ideas and motivations easy to understand.

  3. Theoretical analysis and extensive experimental results convincingly demonstrate the effectiveness of the proposed approach.

Weaknesses:

  1. The paper lacks a comparison and analysis of computational overhead. In particular, runtime and efficiency evaluations across benchmarks of different scales would provide a more complete assessment of the method's practical applicability.
Questions

Compared with existing methods, does the proposed method exhibit superior robustness when the number of ID samples is limited?

Limitations

yes

Paper formatting concerns

None

Final justification

The authors’ rebuttal has addressed my concerns by supplementing an overhead analysis of distance-based methods and discussing applicability under limited ID data, which further enriches the manuscript. Overall, I consider the proposed method, especially the Mahalanobis Gap Scoring with finer-grained distance representations, to be novel and theoretically grounded. Therefore, I maintain my positive evaluation.

1 comment

W1. The paper lacks a comparison and analysis of computational overhead. In particular, runtime and efficiency evaluations across benchmarks of different scales would provide a more complete assessment of the method's practical applicability.

Thank you for raising this practical concern. We additionally report the wall-clock runtime and OOD detection performance on CIFAR-100 under the same hardware, backbone, batch size, and evaluation settings.

MethodRuntime ↓Relative to DCC ↓FPR@95 ↓AUROC ↑
DCC10 min 17 s1.00×29.8492.40
AMG (DCC-style Implementation)11 min 59 s1.17×27.4393.20
AMG (Optimized Implementation)8 min 30 s0.83×27.4093.20

We provide two implementations of AMG. The first follows the direct matrix-inversion procedure used by the original DCC implementation. For each test feature ff, let fA,fB∈RDf_A,f_B\in\mathbb{R}^{D} denote its principal- and residual-subspace components, respectively. AMG constructs the sample-dependent covariance matrix as

Σ′(f)=Σ+αfAfA⊤−βfBfB⊤\Sigma'(f)=\Sigma+\alpha f_Af_A^\top-\beta f_Bf_B^\top

where Σ∈RD×D\Sigma\in\mathbb{R}^{D\times D} is the base covariance matrix and α,β>0\alpha,\beta>0 are the calibration coefficients. The DCC-style implementation directly computes

M(f)=(Σ′(f))−1=(Σ+αfAfA⊤−βfBfB⊤)−1M(f)=\left(\Sigma'(f)\right)^{-1}=\left(\Sigma+\alpha f_Af_A^\top-\beta f_Bf_B^\top\right)^{-1}

for every test sample. Consequently, it performs a full D×DD\times D matrix inversion per sample, with approximately O(D3)O(D^3) per-sample complexity for this inverse-computation component. This implementation requires 11 min 59 s, corresponding to 1.17× the runtime of DCC.

We further provide a mathematically equivalent implementation based on the Woodbury low-rank inverse identity. The key observation is that Σ′(f)\Sigma'(f) differs from the base covariance Σ\Sigma by only two rank-one terms. Defining

U(f)=[fA,fB]∈RD×2,R=diag⁡(α,−β)U(f)=[f_A,f_B]\in\mathbb{R}^{D\times2},\qquad R=\operatorname{diag}(\alpha,-\beta)

gives

Σ′(f)=Σ+U(f)RU(f)⊤\Sigma'(f)=\Sigma+U(f)RU(f)^\top

We precompute Σ−1\Sigma^{-1} once before test-time scoring and obtain the sample-dependent precision matrix as

M(f)=Σ−1−Σ−1U(f)(R−1+U(f)⊤Σ−1U(f))−1U(f)⊤Σ−1M(f)=\Sigma^{-1}-\Sigma^{-1}U(f)\left(R^{-1}+U(f)^\top\Sigma^{-1}U(f)\right)^{-1}U(f)^\top\Sigma^{-1}

Because U(f)U(f) contains only two update directions, the inner matrix R−1+U(f)⊤Σ−1U(f)R^{-1}+U(f)^\top\Sigma^{-1}U(f) has size 2×22\times2. Therefore, the optimized implementation replaces a full D×DD\times D inversion for every test sample with a one-time O(D3)O(D^3) computation of Σ−1\Sigma^{-1} followed by approximately O(D2)O(D^2) computation per sample.

This optimization changes only the numerical procedure used to compute the inverse covariance. It does not modify the definitions of ACC, CDS, MGS, the calibrated Mahalanobis distance, or the final OOD score. The two implementations are therefore mathematically equivalent up to minor floating-point differences. Accordingly, AUROC remains unchanged at 93.20%, while FPR@95 changes only marginally from 27.43% to 27.40%.

The optimized implementation reduces the runtime from 11 min 59 s to 8 min 30 s, corresponding to a 29.1% reduction relative to the DCC-style implementation. It is also 17.3% faster than DCC while retaining the performance improvement of AMG.

Q1. Compared with existing methods, does the proposed method exhibit superior robustness when the number of ID samples is limited?

Thank you for this important question. To evaluate the performance of AMG when ID training data are limited, we conduct an additional experiment on CIFAR-10 using only 10% of the original ID training samples, while keeping the backbone and evaluation protocol identical for all compared methods.

Under this limited-ID setting, AMG achieves a mean FPR@95 of 14.58% and a mean AUROC of 97.10%, outperforming DCC by 2.02 percentage points in FPR@95 and 0.85 percentage points in AUROC. AMG also outperforms MA++ by 4.67 percentage points in FPR@95 and 1.73 percentage points in AUROC.

These results demonstrate that AMG maintains stronger OOD detection performance than the compared Mahalanobis-based methods when only a small fraction of ID training samples is available. We attribute this advantage to the adaptive covariance regularization, which improves covariance estimation under limited samples, together with MGS, which exploits the relative distance structure across all class prototypes.

CIFAR-10 OOD Detection Results

FPR@95 ↓

MethodSVHNTextureLSUN-ResizeLSUNiSUNPlaces365Mean
Mahalanobis++12.5724.795.730.366.9965.0519.25
DCC11.6817.544.710.546.3958.7716.60
Ours12.1116.284.342.036.1346.5714.58

AUROC ↑

MethodSVHNTextureLSUN-ResizeLSUNiSUNPlaces365Mean
Mahalanobis++97.3493.7498.8299.8598.6183.8895.37
DCC97.5896.0199.0099.8198.7586.3596.25
Ours97.8496.9399.1499.5898.8390.2797.10
Reviewer_iRqyOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper proposes a novel technique of out-of-distribution sample detection, namely, Adaptive Mahalanobis Gap. Existing OOD detection schemes fails to consider the possibility of misclassifying the in-distribution (ID) samples as OOD, and they also fail to capture the global inter-class structure by considering only the nearest class-prototype while quantifying uncertainty. The paper addresses these issues and proposes Adaptive Mahalanobis Gap by dynamically reinforcing the principal subspace along real-time feature directions and simultaneously controlling the residual subspace. Further, a Class-aware Deviation Scaling method is proposed by incorporating variance and norm-based scaling in the Mahalanobis distance. The paper also presents Mahalanobis Gap Scoring that accounts for the global distance structure among the prototypes. It has also been proved that the proposed Mahalanobis Gap Scoring performs better than the nearest prototype score, in terms of the False Positive Rate. Finally, experiments have been performed to compare the downstream performance and robustness of the proposed OOD detection algorithm with various state-of-the-art algorithms. The experiments has been performed considering benchmark datasets such as CIFAR and ImageNet as ID data and the corresponding standard OOD datasets as test data.

Strengths and weaknesses

The proposed technique addresses some shortcomings of the existing methodologies in the literature, such as, ignoring the global distance structure of the feature space and the bias caused by over-reliance on a single prototype. The proposed methods seem sound. However, Section 4.3 seems to be improperly arranged with the order of Theorem 1 and the definition of MGS(x) seeming to get swapped, some of the notations and terminologies, such as λgap\lambda_{gap}, and "threshold compatible" not being defined properly. My major concern is however that the results of the experiments are not overwhelmingly in favor of the proposed method, which makes me wonder if there is any shortcoming that still is unaddressed or if there is any new concern that should be investigated.

Questions
  1. The experiments provide the FPR and AUROC as the evaluation metric to compare downstream performances in classification problem. However, I am curious to know how the proposed scoring actually performs in OOD detection compared to the existing ones.
  2. Although the proposed one is performing better than other on an average, for individual datasets is not an uncontested winner in any of the OOD detection tables presented. Moreover, in table 1, ReAct is best in 3 datasets, while the proposed one is best in 3 datasets, while the proposed on is best in 1 dataset only. Similar results can be seen in table 9 and 10, where DCC performs better, if not competitive. Is there any intuition or insight behind this as in why those are performing better, so that this can be addressed? Also, is there any specific reason that some of the algorithms are omitted from some of the tables?
  3. The cross validated value of λgap\lambda_{gap} might not satisfy the condition 0<λgap<UFPR0<\lambda_{gap}<U_{FPR}. What would be a suggestion in that situation? Again, is the UFPRU_{FPR} easily computable to check if the cross-validated value satisfies the condition or not?
Limitations

Firstly, the test-time OOD detection is not yet addressed by the proposed method, which has already been discussed in the paper. Further, this methodology has been proposed in classification setting only, and the steps of the algorithm limits its application to classification problems only and restricts it to be applied on directly to regression problems.

Paper formatting concerns

N/A.

Final justification

The authors have provided satisfactory answers to my questions. The proposed methodology seems sound and performing well on an average. Therefore, I am maintaining my old positive rating.

1 comment

W1. The proposed methods seem sound. However, Section 4.3 seems to be improperly arranged with the order of Theorem 1 and the definition of MGS(x) seeming to get swapped, some of the notations and terminologies, such as λgap\lambda_{\mathrm{gap}} , and "threshold compatible" not being defined properly.

Thank you for pointing out these presentation issues. We agree that the current organization of Section 4.3 is unclear because Theorem 1 appears before the formal definitions of MGS⁡(x)\operatorname{MGS}(x), λgap\lambda_{\mathrm{gap}}, and “threshold-compatible.”

We will reorganize this section by first defining the Mahalanobis gap score and the final scoring function, then explaining that λgap\lambda_{\mathrm{gap}} controls the contribution of the gap term, and finally defining “threshold-compatible” before presenting Theorem 1. This revision will make the logical flow and the conditions of the theorem clearer.

Q1.The experiments provide the FPR and AUROC as the evaluation metric to compare downstream performances in classification problem. However, I am curious to know how the proposed scoring actually performs in OOD detection compared to the existing ones.

Thank you for this question. We would like to clarify that AUROC and FPR@95 are standard evaluation metrics for OOD detection, rather than metrics for downstream multi-class classification performance.

In our setting, OOD detection is formulated as a binary discrimination task: each test sample is classified as either in-distribution (ID) or out-of-distribution (OOD) according to its OOD score. AUROC evaluates the overall separability between the ID and OOD score distributions across all possible thresholds, while FPR@95 measures the proportion of OOD samples incorrectly accepted as ID when 95% of ID samples are retained.

Therefore, the reported AUROC and FPR@95 directly evaluate the effectiveness of the proposed scoring function in distinguishing ID from OOD samples. They do not measure the original semantic classification accuracy of the backbone network.

Q2.Although the proposed one is performing better than other on an average, for individual datasets is not an uncontested winner in any of the OOD detection tables presented. Moreover, in table 1, ReAct is best in 3 datasets, while the proposed one is best in 3 datasets, while the proposed on is best in 1 dataset only. Similar results can be seen in table 9 and 10, where DCC performs better, if not competitive. Is there any intuition or insight behind this as in why those are performing better, so that this can be addressed? Also, is there any specific reason that some of the algorithms are omitted from some of the tables?

Thank you for raising this concern. We clarify that our experimental comparisons strictly follow the evaluation protocol and reported results of DCC. Specifically, for each dataset and experimental setting, we use the same set of competing methods and the corresponding results reported by DCC to ensure a direct and fair comparison.

Therefore, the differences in the compared methods across tables originate from the original experimental settings of DCC, where different baselines were reported for different datasets or benchmarks, rather than from a selective omission of competing methods in our paper. We agree that this was not sufficiently clear in the current presentation and will explicitly state this in the experimental setup and table captions.

We emphasize that our claim is based on average performance rather than per-dataset superiority. While AMG does not outperform DCC on every dataset, it improves the mean FPR@95 on ImageNet-1k and remains competitive across diverse OOD datasets. Performance drops on certain datasets (e.g., Texture, ImageNet-O) are likely due to more extreme distribution shifts. Notably, existing SOTA methods(including DCC) also do not achieve the best results across all datasets. Since all methods are evaluated by averaging over multiple OOD datasets, which is the standard protocol, we argue that consistent average improvements are more meaningful than per-dataset gains.

Q3. The cross validated value of λgap\lambda_{\mathrm{gap}} might not satisfy the condition 0<λgap<UFPR0<\lambda_{\mathrm{gap}}<U_{\mathrm{FPR}} . What would be a suggestion in that situation? Again, is the UFPRU_{\mathrm{FPR}} easily computable to check if the cross-validated value satisfies the condition or not?

Thank you for raising this important practical question. The condition 0<λgap<UFPR0<\lambda_{\mathrm{gap}}<U_{\mathrm{FPR}} is a sufficient condition for guaranteeing that MGS does not increase FPR, rather than a necessary condition for its empirical effectiveness. If λgap\lambda_{\mathrm{gap}} does not satisfy this condition, MGS may still improve empirical OOD detection performance, but the non-increase of FPR is no longer guaranteed by Theorem 1.

The exact population value of UFPRU_{\mathrm{FPR}} depends on the unknown test-time OOD distribution and therefore cannot generally be computed before deployment. When a held-out OOD validation set and fixed decision thresholds are available, an empirical estimate of UFPRU_{\mathrm{FPR}} can be computed from the nearest-prototype distances and MGS values already obtained during scoring. Such an estimate can provide an empirical diagnostic, but it cannot certify the condition for unseen OOD distributions.

In our experiments, λgap\lambda_{\mathrm{gap}} is fixed before testing and is not explicitly constrained by UFPRU_{\mathrm{FPR}}. Therefore, the reported FPR reduction provides empirical evidence for the effectiveness of MGS, while Theorem 1 characterizes a sufficient regime under which its FPR behavior is theoretically controlled.

Comments on the paper

1 comment
Meta-review

The paper proposes Adaptive Mahalanobis Gap (AMG), an out-of-distribution (OOD) detection method designed to overcome the limitations of traditional Mahalanobis distance approaches. AMG regularizes the feature space by reinforcing the principal subspace along feature directions while suppressing noise by contracting the residual subspace, using on recent covariance regularization frameworks.

To further refine distance estimation, the authors also introduce class-aware Deviation scaling, incorporating variance and norm-based scaling into the Mahalanobis metric to reduce class-specific variance biases. They also introduce Mahalanobis Gap Scoring (MGS), a novel scoring mechanism that accounts for the global distance structure across all class prototypes rather than relying solely on the single nearest prototype. The authors provide theoretical backing showing that MGS improves OOD separability and achieves superior false positive rates compared to nearest-prototype scoring.

Extensive empirical evaluations across benchmark datasets, including CIFAR and ImageNet under near-OOD and far-OOD settings, demonstrate that AMG is competitive.

After the round of reviews, the paper is borderline a strong rebuttal could be a good basis for further discussions. There are several points I would suggest the authors to focus on.

  • experiment methodology: the authors do not compare to a strong baseline [30], which is also based on Mahalanobis distance and cited by the authors (why has it not been included?). [30] also uses the openOOD dataset benchmark. it would be great to have results on these datasets.

  • some reviewers point missing algorithms on some tables and lack of consistency of the performance of the proposed model. It would be great to have these methods in the paper and have a better rationale on why performance varies.

  • It would be interesting to have comparisons of computational overhead as well as the impact of the dimensionality of the features for the proposed model.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.