Abstract

Foundation models provide highly descriptive representations for medical images, yet their reliability degrades under distribution shifts arising from changes in patients, devices, or acquisition conditions. Reliable out-of-distribution (OOD) detection is therefore essential for safe deployment. Recent post-hoc detectors efficiently exploit frozen embeddings (e.g., kNN), whereas reconstruction-based OOD detection in latent feature space has seen limited adoption due to inconsistent performance. In this work, we show that the limitation of reconstruction-based methods in latent space does not stem from poor reconstruction quality, but from how reconstruction errors are scored. Standard L2 residual norms collapse the anisotropic residual structure, thereby suppressing informative deviations. To address this limitation, we introduce MaRS (Mahalanobis Residual Scoring), a label-free OOD detector that learns an in-distribution manifold using a lightweight autoencoder and measures deviation via a Mahalanobis distance on reconstruction residuals, yielding variance-aware OOD scores. Across three imaging modalities, multiple types of distribution shift, and different model families and scales, MaRS outperforms established confidence-, distance-, and reconstruction-based baselines, while remaining fully post-hoc and lightweight. The code is available at github.com/francescodisalvo05/mars.

Links to Paper and Supplementary Materials

Main Paper (Open Access Version): https://papers.miccai.org/miccai-2026/paper/0289_paper.pdf

SharedIt Link: Not yet available

SpringerLink (DOI): Not yet available

Supplementary Material: Not Submitted

Link to the Code Repository

https://github.com/francescodisalvo05/mars

Link to the Dataset(s)

MIDOG: https://github.com/remic-othr/OpenMIBOOD X-Ray (Pediatric): PneumoniaMNIST from https://medmnist.com/ X-Ray (Adult): ChestMNIST from https://medmnist.com/ Derma: DermaMNIST from https://medmnist.com/

BibTex

@InProceedings{DiFra_MaRS_MICCAI2026,
        author = { Di Salvo, Francesco AND Doerrich, Sebastian AND Ledig, Christian},
        title = { { MaRS: Robust Out-of-Distribution Detection via Mahalanobis Residual Scoring } },
        booktitle = {Medical Image Computing and Computer Assisted Intervention -- MICCAI 2026},
        year = {2026},
        publisher = {Springer Nature Switzerland},
        volume = {LNCS 16882},
        month = {September},
        page = {pending}
}


Reviews

Review #1

  • Please describe the contribution of the paper

    MaRS is an unsupervised method to detect out-of-distribution (OOD) samples. It starts by training a lightweight undercomplete autoencoder for reconstruction on frozen features extracted with a deep-learning model. The difference between reconstructed and original features is then computed and modelled as a multivariate Gaussian distribution by estimating the covariance matrix. The Mahalanobis distance is then used as an OOD score, with the intuition that points that are off the normal-data manifold break correlations in the residual space.

    MaRS is evaluated against strong baselines on MIDOG from OpenMIBOOD, covariate shift on X-ray images, and semantic shift on dermatoscopy images. Its performance in terms of AUROC and FPR@95 is found to be very competitive. Ablation studies investigate the effect of the feature extractor backbone (ViT vs DINOv3) and the role of normalization.

  • Please list the major strengths of the paper: you should highlight a novel formulation, an original way to use data, demonstration of clinical feasibility, a novel application, a particularly strong evaluation, or anything else that is a strong aspect of this work. Please provide details, for instance, if a method is novel, explain what aspect is novel and why this is interesting.

    The paper addresses an important problem in medical image analysis with an approach that is built logically. The intuition that anisotropies in the (reconstructed) feature manifold may be helpful for OOD detection is very reasonable and nicely exploited. An analysis of the different eigenvalues is presented as evidence of the underlying hypothesis. Results are formulated in terms of AUROC over multiple runs, which is the right direction to assess consistency in this case. Several types of distribution shifts are analyzed in the different datasets, thus helping to understand performance across application scenarios. Claims are formulated appropriately to the study by stating that “MaRS consistently outperforms latent-space and reconstruction-based baselines”, leaving the judgement on the state of the art to future systematic evaluations or community experience.

  • Please list the major weaknesses of the paper. Please provide details: for instance, if you state that a formulation, way of using data, demonstration of clinical feasibility, or application is not novel, then you must provide specific references to prior work.

    1.The selection of datasets used for experiments leaves several open questions and is not fully aligned with the goals stated in the introduction. In fact, despite the mention of OpenMIBOOD, MaRS is benchmarked on MIDOG only, leaving out PhaKIR and OASIS-3 without justification. Instead, the authors choose to report results on two datasets from the MedMNIST+ collection with OOD tasks engineered by separating a label subset. This is also somewhat incomplete, as MedMNIST+ has many more datasets, and is described in a rather confused way towards the end of the “Datasets” paragraph of section 3.1.On the one hand, results on incomplete subsets raise the question of whether they hold for the missing entries. This question persists in the ablation studies which are restricted to one of the three benchmarks and the other two respectively. On the other hand, the stated goal is detecting “changes in patient populations, imaging devices, acquisition protocols, and artefacts”. X-ray results address population and part of MIDOG addresses target scanners, but the rest of MIDOG and dermatoscopy address semantic shifts. 2.While running experiments with three different seeds goes in the right direction, the statistical analysis needs better reporting. For a start, runs are not reported individually (e. g. with median [min, max]). Most critically, the details of the Wilcoxon signed-rank test are not specified. Since 3 metric pairs at the dataset-split level would be insufficient for statistical significance, it seems that the test has been performed at the image or pixel level, but the specification is missing. It would also be helpful to report the type of averaging for the metrics in general. Finally, the comment on Mahalanobis++ being deterministic was insufficient for me to understand how the comparison is performed in that case. 3.The comparison between confidence-based and reconstruction-based methods could be considered unfair, since reconstruction trains small multilayer models while confidence-based methods are limited to a linear head. A small ablation would have been helpful to reduce this confounder. 4.While the authors comment on the stability of the estimation of the covariance matrix in the case of Mahalanobis++ in section 3.3 Backbone size / Results, the justification that follows does not state clearly why the same estimation is expected not to be an issue in the case of MaRS. Because of the many parameters that are being estimated, it would be helpful to relate “high-dimensional variability” and “preserving directions most sensitive to distributional shifts” to quantitative measures.

  • Please rate the clarity and organization of this paper

    Satisfactory

  • Please comment on the reproducibility of the paper. Please be aware that providing code and data is a plus, but not a requirement for acceptance.

    The authors claimed to release the source code and/or dataset upon acceptance of the submission.

  • Based on your review and your understanding of the MICCAI Scientific Code of Ethics, do you believe this submission may involve a potential ethics concern or violation?

    N/A

  • Optional: If you have any additional comments to share with the authors, please provide them here. Please also refer to our Reviewer’s guide on what makes a good review and pay specific attention to the different assessment criteria for the different paper categories: https://conferences.miccai.org/2026/en/REVIEWER-GUIDELINES.html
    • Please be consistent with the usage of the name “MaRS” or “MahRS” across the paper. I refrain from quoting exact positions as I believe a “find and replace” will yield the best results.
    • Consider rewriting parts of the introduction to make the interplay between reconstruction and latent spaces or foundation models crystal clear early on, by stating explicitly and at the beginning that the reconstruction considered in this work is performed on extracted features. I found it quite confusing in my first read; luckily figure 1 considerably helped to understand the basic approach. Likewise, the comment “all operating directly in latent feature space” in section 3.1 “Methods” could be interpreted as applying only on distance-based baselines, hiding that confidence-based methods are also based on frozen representations.
    • The description of the normalization ablation could be easily improved by specifying if the backbone’s final LayerNorm was included or removed for the prior experiments, and if it is reintroduced with trained mean and variance or a simple normalization of features to zero mean and unit variance is applied.
    • It would be nice to verify explicitly if the reconstruction residuals are actually centered around zero on in-distribution held-out data, since that might impact the interpretation of the multivariate Gaussian distribution.
    • In the last paragraph of section 2.3 it is claimed that subtracting the learned projection makes a single covariance matrix sufficient. This is shown only indirectly and for the data at hand, while it might not hold for datasets with more complicated topologies. I recommend a minor adjustment to a more precise formulation.
    • The second paragraph of the discussion section 4 should be probably called “conclusions” instead of “discussion” again. Also, the meaning of “data sparsity” at the very end is not clear from the context.
  • Rate the paper on a scale of 1-6, 6 being the strongest (6-4: accept; 3-1: reject). Please use the entire range of the distribution. Spreading the score helps create a distribution for decision-making.

    (4) Weak Accept — marginally above the acceptance threshold, but would not mind if rejected, dependent on rebuttal

  • Please justify your recommendation. What were the major factors that led you to your overall score for this paper?

    The method presented in the submission addresses an important problem, is logically built, and is interesting for discussion as it is simple but competitive, although the observed performance is not revolutionary. The concerns about the choice of datasets and the statistical analysis need to be addressed in the rebuttal to ensure results are solid, and the discussion of the types of OOD shifts addressed should be aligned with results.

  • Reviewer confidence

    Confident but not absolutely certain (3)

  • [Post rebuttal] After reading the authors’ rebuttal, please state your final opinion of the paper.

    Accept

  • [Post rebuttal] Please justify your final decision from above.

    The rebuttal has limited space to answer a wide range of concerns, and it is successful in addressing a few to different degrees. For example, difficulties in accessing OASIS-3 are well noted, and the description of the Wilcoxon test is provided and acceptable, although pairing random seeds in runs with different methods is not perfectly clean. On the other hand, the justification of excluding endoscopy images compared to pathology or X-rays could be subject to debate, and the discussion on Maha++ does not address the different comparison because of its deterministic nature. Overall, the rebuttal sheds some light on a few of the open questions, which confirms my initial assessment. The paper could be accepted, but still has several minor weaknesses that are outweighed by its merits only by a small margin.



Review #2

  • Please describe the contribution of the paper

    This paper introduces MaRS, a post-hoc out-of-distribution detection method for medical imaging that operates on reconstruction residuals from a lightweight autoencoder trained on in-distribution representations. The central contribution is the identification that standard L2-based reconstruction error scoring collapses the anisotropic residual structure, thereby discarding information relevant to OOD detection. To address this, the authors propose replacing L2 scoring with Mahalanobis distance on residuals, yielding a variance-aware OOD score. The method is evaluated across three imaging modalities including histopathology, dermatoscopy, and X-ray, with ablation studies on different design choices.

  • Please list the major strengths of the paper: you should highlight a novel formulation, an original way to use data, demonstration of clinical feasibility, a novel application, a particularly strong evaluation, or anything else that is a strong aspect of this work. Please provide details, for instance, if a method is novel, explain what aspect is novel and why this is interesting.

    1.The paper is well written and easy to follow. The problem of OOD detection in medical imaging is well motivated, and the core argument that the failure of reconstruction-based methods stems from scoring rather than reconstruction quality is presented clearly.

    2.Evaluation spans three imaging modalities

    3.The paper includes ablation studies on key design choices, which helps isolate the contribution of individual components.

  • Please list the major weaknesses of the paper. Please provide details: for instance, if you state that a formulation, way of using data, demonstration of clinical feasibility, or application is not novel, then you must provide specific references to prior work.

    1.While the paper reports mean FPR, this aggregation may obscure clinically relevant variability across datasets. In safety-critical medical imaging applications, per-dataset FPR values would allow readers to assess whether the aggregate gains of MaRS reflect consistent improvements or are driven by strong performance on a subset of datasets. Given the importance of FPR in deployment contexts, reporting per-dataset FPR alongside the existing mean would substantially strengthen the empirical evaluation. 2.The performance gain by MaRS over other approaches like Mahalanobis++ and Residual (Table 1) is modest. However, MaRS introduces two sources of additional computational cost: the training and inference overhead of the autoencoder, and the estimation of the full covariance matrix over residuals required for Mahalanobis scoring. It is therefore unclear whether this marginal gain justifies adoption over computationally cheaper alternatives. 3.The authors justify using pre-normalization features for MaRS by arguing that LayerNorm suppresses variance anisotropy, and that preserving this structure benefits Mahalanobis-based scoring. However this argument applies equally to Mahalanobis++ which also relies on a covariance matrix to capture anisotropic structure. Figure 3 shows that Mahalanobis++ performance decreases under pre-normalization, while MaRS improves. If anisotropy preservation were the primary explanatory factor, both methods should benefit from pre-norm features given their shared reliance on covariance estimation. The authors do not account for this asymmetry, leaving their justification incomplete.

  • Please rate the clarity and organization of this paper

    Good

  • Please comment on the reproducibility of the paper. Please be aware that providing code and data is a plus, but not a requirement for acceptance.

    The authors claimed to release the source code and/or dataset upon acceptance of the submission.

  • Based on your review and your understanding of the MICCAI Scientific Code of Ethics, do you believe this submission may involve a potential ethics concern or violation?

    N/A

  • Optional: If you have any additional comments to share with the authors, please provide them here. Please also refer to our Reviewer’s guide on what makes a good review and pay specific attention to the different assessment criteria for the different paper categories: https://conferences.miccai.org/2026/en/REVIEWER-GUIDELINES.html

    The method is referred to as MahRS in the experimental table while rest of the paper uses MaRS. This inconsistency should be resolved for clarity and consistency throughout the manuscript.

  • Rate the paper on a scale of 1-6, 6 being the strongest (6-4: accept; 3-1: reject). Please use the entire range of the distribution. Spreading the score helps create a distribution for decision-making.

    (2) Reject — should be rejected, independent of rebuttal

  • Please justify your recommendation. What were the major factors that led you to your overall score for this paper?

    While this is an interesting read, the paper only introduces incremental upgrades to existing methods. See the weakness section for further details.

  • Reviewer confidence

    Very confident (4)

  • [Post rebuttal] After reading the authors’ rebuttal, please state your final opinion of the paper.

    Reject

  • [Post rebuttal] Please justify your final decision from above.

    1) The authors claim that covariance estimation on reconstruction residuals is more informative for OOD detection than on raw embeddings. However, the gains for MIDOG –CS/Near-OOD/far-OOD/X-Ray/Derma are 0.87, -0.37, -0.01, 1.09, 2.Additionally, in the reported FPR, the method only shows clear performance gain on MIDOG-CS/X-ray (2/4). As the performance gain is marginal, to show the method’s competitive advantage, a more rigorous analysis is required.

    2) The claim that anisotropy of variance in raw embeddings is not necessarily aligned with OOD-relevant direction needs more concrete evidence.

    Though the application of Mahalanobis in reconstruction residuals is novel, the paper fails to show clear competitive advantage, and contributions are clearly incremental. Therefore, my overall recommendation is reject.



Review #3

  • Please describe the contribution of the paper

    This paper proposes a label-free OOD detection method based on Mahalanobis distance. The approach is post hoc and operates on frozen model features. The focus on the paper is primarilty in detection ood samples in medical domain which could arise either due to chnage in machine, population etc..

  • Please list the major strengths of the paper: you should highlight a novel formulation, an original way to use data, demonstration of clinical feasibility, a novel application, a particularly strong evaluation, or anything else that is a strong aspect of this work. Please provide details, for instance, if a method is novel, explain what aspect is novel and why this is interesting.
    • The paper is mathematically sound and based on simple PCA and Mahalanobis metric concepts
    • The paper is evaluated across multiple datasets
  • Please list the major weaknesses of the paper. Please provide details: for instance, if you state that a formulation, way of using data, demonstration of clinical feasibility, or application is not novel, then you must provide specific references to prior work.
    • While the paper does compare with different OOD methods, none of the compared methods are state-of-the-art in the medical domain, which makes it challenging to establish the merit of the proposed method in the context of medical data. For example, the OpenMIBOOD (2025) dataset while mentioned, is not evaluated.

    • It is not clear how part 1 of Figure 1 is related to the proposed approach in the paper. The experimental section in the paper talks about DinoV2 and other unsupervised models. Where does the decoder component come in these cases? The setup should be more clearly defined.

    There are some minute writing. Unnecessary dashes at the end of words such as “reconstructions” and “residual” are present in the Introduction section. Similar dashes appear at several other places in the paper.

  • Please rate the clarity and organization of this paper

    Satisfactory

  • Please comment on the reproducibility of the paper. Please be aware that providing code and data is a plus, but not a requirement for acceptance.

    The submission does not mention open access to source code or data, but provides a clear and detailed description of the algorithm to ensure reproducibility.

  • Based on your review and your understanding of the MICCAI Scientific Code of Ethics, do you believe this submission may involve a potential ethics concern or violation?

    N/A

  • Optional: If you have any additional comments to share with the authors, please provide them here. Please also refer to our Reviewer’s guide on what makes a good review and pay specific attention to the different assessment criteria for the different paper categories: https://conferences.miccai.org/2026/en/REVIEWER-GUIDELINES.html

    N/A

  • Rate the paper on a scale of 1-6, 6 being the strongest (6-4: accept; 3-1: reject). Please use the entire range of the distribution. Spreading the score helps create a distribution for decision-making.

    (3) Weak Reject — marginally below the acceptance threshold, but would not mind if accepted, dependent on rebuttal

  • Please justify your recommendation. What were the major factors that led you to your overall score for this paper?

    While the paper is well written, the method’s efficacy is not well established. The improvements are not significant, and comparisons with strong baselines are lacking, making the claim weaker.

  • Reviewer confidence

    Confident but not absolutely certain (3)

  • [Post rebuttal] After reading the authors’ rebuttal, please state your final opinion of the paper.

    N/A

  • [Post rebuttal] Please justify your final decision from above.

    N/A



Author Feedback

We thank the reviewers for their thoughtful feedback. We are encouraged that they recognized the importance of OOD detection (R1,R2), the soundness of our formulation (R1,R3), the usefulness of anisotropic residual structure for this task (R1), and the clarity of our work (R1,R2,R3). We also appreciate the positive assessment of extensive evaluation (R1,R2,R3), strong baselines (R1), and ablations on backbone choice and normalization (R1,R2). We address major concerns below.

[R2] What is novel beyond standard Mahalanobis scoring? We respectfully clarify that MaRS is not a simple re-use of Mahalanobis scoring. Our work shows that covariance estimation on reconstruction residuals is more informative for OOD detection than on raw embeddings. Specifically, Sec. 3.2 quantitatively demonstrates that after subtracting the learned ID projection, the OOD signal concentrates in anisotropic low-variance residual directions, making Mahalanobis scoring effective. This leads to a label-free method that replaces class-conditional statistics with global ID residual covariance and significantly outperforms the class-dependent Mahalanobis++ (Maha++).

[R1,R2] Why does pre-LayerNorm help MaRS but not Maha++? Because MaRS and Maha++ estimate covariance in fundamentally different spaces. Maha++ estimates covariance directly on embeddings, where variance mixes semantic and class variation. In raw embeddings, this anisotropy is not necessarily aligned with OOD-relevant directions. MaRS instead subtracts the learned ID manifold projection and estimates covariance on reconstruction residuals. There, low-variance directions reflect stable ID reconstruction behavior, so deviations along them are informative OOD signals (Fig. 2). LayerNorm suppresses this residual variance structure, explaining why MaRS benefits from pre-normalization whereas Maha++ does not. We thank the reviewers for allowing us to clarify this important distinction.

[R1,R3] Could you clarify the dataset choice? Yes, we did not categorically exclude OpenMIBOOD, but limited our evaluation to MIDOG (from OpenMIBOOD) due to access and scope constraints. OASIS-3 is access-restricted and approval was not available in time. PhaKIR focuses on surgical endoscopy, whereas our evaluation targets broad, established 2D imaging modalities where off-the-shelf foundation-model embeddings are commonly utilized. We therefore focused on histopathology, chest X-ray, and dermatoscopy, including diverse distribution shifts.

[R1,R2] Are the FPR95 gains consistent, and how was significance tested? MaRS consistently outperforms the strongest unsupervised reference method (Residual), while also improving over Maha++ on several settings. Following Table 1, FPR95 (lower is better) for MaRS/Maha++/Residual is: MIDOG-CS 30/32/35, nearOOD 53/52/57, farOOD 0/0/0, X-Ray 36/40/40, Derma 94/94/95.The Wilcoxon test was computed on the 15 paired aggregate results from 5 dataset splits and 3 runs, yielding p=0.018.We reiterate that MaRS is fully unsupervised and does, in contrast to Maha++, not rely on the availability of class labels.

[R2] Does MaRS justify its computational cost over Mahalanobis++? Yes, MaRS is computationally lightweight. AE training is one-time and takes only a few minutes on cached embeddings using our small two-layer MLP encoder-decoder. At inference, MaRS adds only minimal overhead from one embedding-level AE forward pass. It then computes a single Mahalanobis score in residual space using one global ID residual covariance. In contrast, Maha++ computes Mahalanobis distances to all class-specific means using a shared embedding covariance. Thus, MaRS is label-free and avoids class-dependent computation, thereby scaling more favorably as the number of classes increases.

[R3] What does decoder mean in Fig. 1? The decoder in Fig. 1 is part of our proposed autoencoder module and reconstructs feature embeddings, not images, as detailed in the caption.




Meta-Review

Meta-review #1

  • Your recommendation

    Invite for Rebuttal

  • Please justify your decision. In case you deviate from the reviewers’ recommendations, explain in detail the reasons why. In case of an invitation for rebuttal, clarify which points are important to address in the rebuttal.

    Please prioritize addressing the key issues raised by the reviewers, including justifying the dataset choices and missing benchmarks (e.g., OpenMIBOOD), reporting per-dataset metrics (especially FPR) with clearer statistical details, and clarifying whether the observed gains justify the additional computational cost, including the pre-normalization versus Mahalanobis++ discrepancy.

  • After you have reviewed the rebuttal and updated reviews, please provide your recommendation based on all reviews and the authors’ rebuttal.

    Accept

  • Please justify your recommendation.

    This paper introduces MaRS, a post-hoc out-of-distribution detection method for medical imaging that operates on reconstruction residuals from a lightweight autoencoder trained on in-distribution representations. The use of Mahalanobis distance in the reconstruction-residual space is a novel and well-motivated contribution, and the method is practically appealing as a lightweight post-hoc approach. While some reviewers raised concerns that the empirical gains are marginal, the authors’ rebuttal provides acceptable clarifications regarding the dataset choices and includes corresponding t-tests to support the statistical validity of the reported improvements. Overall, the rebuttal addresses most of the crucial concerns, and the remaining issues do not appear severe enough to outweigh the paper’s novelty and practical relevance. Therefore, the paper is recommended for acceptance.



Meta-review #2

  • After you have reviewed the rebuttal and updated reviews, please provide your recommendation based on all reviews and the authors’ rebuttal.

    Reject

  • Please justify your recommendation.

    After rebuttal, a single reviewer is in favor of the paper. Even that reviewer finds the rebuttal only partly convincing and sees the paper as being acceptable only by a small margin. It is my impression that the paper would benefit greatly from a larger scale and more careful revision that provides stronger evidence for the benefit over state of the art alternatives, possibly on a broader choice of datasets. Authors attribute the relatively modest advantages in their experiments to the fact that they do not use class information - maybe they could achieve even stronger results by modifying their approach so that it can account for that information as well, when available?



Meta-review #3

  • After you have reviewed the rebuttal and updated reviews, please provide your recommendation based on all reviews and the authors’ rebuttal.

    Accept

  • Please justify your recommendation.

    As stated by reviewer 1, the authors addressed some of the key concerns in the limited space available in the rebuttal. The paper presents a valuable modification to a popular OOD detection method which could be interesting to a big part of the community.



back to top