Manuscript Offprint
arXiv:2610.25635Uncertainty-Gated SHAP-Dirichlet Refinement for MRI-Based Depression Classification
Phuc Truong Loc Nguyen
FAU Erlangen-Nürnberg
Erlangen, Germany
Nguyen Truong Toan To
FAU Erlangen-Nürnberg
Erlangen, Germany
Truong Thanh Hung Nguyen
University of New Brunswick
Fredericton, Canada
Hoang-Loc Cao
University of New Brunswick
Fredericton, Canada
Abstract
Structural MRI-based classification of major depressive disorder (MDD) remains challenging due to subtle, heterogeneous anatomical changes. We propose uncertainty-gated SHAP-Dirichlet refinement, a post-hoc reliability layer that improves predictions without retraining the classifier. The method retrieves similar labeled SHAP explanations, constructs Dirichlet class evidence, and selectively refines uncertain predictions through probabilistic fusion, while allowing unreliable cases to be deferred for expert review. We evaluate five classifiers on 504 SRPBS subjects (252 controls and 252 MDD patients) using 159 anatomical features and repeated nested cross-validation. Refinement improved accuracy across all 8 repetitions for TabM and ResNet, yielding mean gains of +1.04 and +0.45 percentage points (sign test p = 0.008), while modifying at most 8.3% of predictions. Gains were concentrated among low-confidence cases, with significant improvements in calibration. The method also benefited an RBF support vector machine but not logistic regression or random forests. Ablations confirmed the importance of uncertainty gating and soft fusion. Dirichlet evidence identified baseline errors (AUROC 0.62), while deferring 50% of cases increased retained-case accuracy to approximately 75%. These findings support selective explanation-guided refinement as a practical approach to improving prediction reliability and facilitating expert triage in MDD classification.
CCS Concepts
• Computing methodologies → Machine learning; • Applied computing → Health informatics.
1 Introduction
Major depressive disorder (MDD) is a heterogeneous psychiatric disorder whose diagnosis is based on clinical symptoms rather than a single biological marker [31]. Structural magnetic resonance imaging (MRI) provides non-invasive measurements of brain morphology, and large consortia have reported MDD-related differences
Hung Cao
University of New Brunswick
Fredericton, Canada
in cortical thickness, surface area, and subcortical volume [38]. These effects are small and heterogeneous, and they are sensitive to acquisition, preprocessing, site composition, and diagnostic labeling [15, 45]. As a result, machine learning studies of depression report a wide range of accuracies [26, 41], and small samples tend to overestimate accuracy [14]. With a few hundred subjects, cross-validated accuracy also has large error bars [43], so a single split can overstate or understate the effect of any modeling choice.
For clinical decision support, average accuracy is not sufficient. A classifier may assign a confident label to a subject whose local feature pattern is unstable, weakly supported by similar cases, or inconsistent with the evidence the model uses [3, 7, 18, 27]. Uncertainty quantification methods such as Monte Carlo dropout, deep ensembles, evidential learning, calibration, and selective prediction address part of this problem [16, 17, 22, 28, 34, 39], but they often require retraining, architectural changes, or repeated inference. For a classifier that is already trained, a post-hoc reliability layer is attractive. Model confidence alone, however, does not indicate whether a prediction is supported by subjects whose explanations look alike.
We propose Uncertainty-gated SHAP-Dirichlet Refinement, a post-hoc layer for a fixed probabilistic classifier. For each query subject, SHapley Additive exPlanations (SHAP) [30] give a local explanation vector, which is compared with a bank of labeled reference explanations. The most similar references are converted into class-level Dirichlet evidence [39]. An uncertainty gate, by default local explanation instability under small feature perturbations measured by relative input and output stability (RIS and ROS) [1], decides which predictions may change. Unstable predictions are refined by fusing the classifier probability with the explanation-derived evidence, and the least reliable subjects can be routed to expert review. The layer never changes the classifier, and every parameter is selected on validation data.
We evaluate the layer on 504 subjects of the SRPBS dataset [42] with five classifiers: the tabular deep learning models TabM [19] and ResNet [20], and logistic regression, an RBF support vector machine [9], and a random forest [5]. Because single-split results on this task are unstable, we use repeated nested cross-validation with pre-specified statistical tests. Our contributions are as follows:
Both authors contributed equally to this research.
Corresponding author.
-
We formulate a post-hoc, reliability-aware decision layer that retains, refines, or defers the predictions of a fixed classifier by combining explanation retrieval, Dirichlet evidence, and an uncertainty gate (Sect. 3).
-
We describe an exact batched implementation of KernelSHAP with common random numbers, which makes explanation-stability estimates comparable across perturbations, and a fix for a batch-dependent preprocessing step in a popular tabular deep learning library (Sect. 3.5).
-
In repeated nested cross-validation with five classifiers, the layer with a training-plus-validation reference bank improved accuracy in every TabM and ResNet repetition, concentrated its gains on low-confidence subjects, and improved calibration. Controlled ablations show that gating and soft fusion keep post-hoc changes safe, and that the size of the reference bank matters more than the choice of gate (Sects. 5.1–5.4).
-
SHAP-space retrieval yields more label-consistent references than raw-feature retrieval, SHAP-Dirichlet evidence identifies baseline errors above chance and adds to model confidence, and a deferral policy built on both raises the accuracy of automatically handled subjects to about 75% when half of the subjects are reviewed (Sects. 5.5–5.6).
2 Related Work
Machine learning for MDD from structural MRI. Morphometric features from FreeSurfer or FastSurfer [13, 25], typically summarized on the Desikan-Killiany atlas [11], are a common input for MDD classification. Group-level analyses of large consortia show consistent but small cortical and subcortical differences [38]. A meta-analysis of multivariate pattern recognition studies found heterogeneous accuracies across studies and modalities [26]. In community cohorts, a cross-validated accuracy of 75% in a small sample dropped to 53.7% in a larger independent sample [41], and a systematic study showed that small samples overestimate performance [14]. Cross-validation in small samples has large error bars [43], and methodological pitfalls such as test-set reuse remain common in medical imaging [44]. These findings motivate our use of repeated nested cross-validation and our focus on reliability rather than on a single accuracy number.
Uncertainty, calibration, and selective prediction. Monte Carlo dropout [16], deep ensembles [28], and evidential deep learning [39] estimate predictive uncertainty but change how the model is trained or queried. Calibration methods [22] and calibration metrics such as the expected calibration error (ECE) [35] and the Brier score [6] assess whether probabilities match observed frequencies. Selective prediction abstains on uncertain inputs [8, 17], with the maximum class probability as a strong baseline [24], and learning-to-defer methods train a classifier together with a deferral policy [32]. In medical imaging, referring uncertain cases to experts improves the accuracy of the remaining automatic decisions [18, 29], and communicating uncertainty is considered essential for clinical use [3, 27]. Our layer is post hoc, keeps the classifier fixed, and combines deferral with a correction step for unstable predictions.
Neighbors and explanations as reliability signals. Nearest-neighbor agreement is a known reliability signal. The trust score compares the distance to the predicted class with the distance to other classes, and deep k-nearest neighbors measure label agreement in learned representations [36]. We instead retrieve neighbors in the explanation space, where distances reflect how the model uses each feature, and convert them into Dirichlet evidence. SHAP values [30, 40] are commonly estimated with KernelSHAP [10, 30]. The stability of explanations under small input changes has been studied as a robustness property [1, 2], and toolkits such as Quantus implement RIS and ROS [23]. We use RIS and ROS not to evaluate explanation methods, but to gate which predictions a post-hoc layer may change.
Tabular classifiers. Deep tabular models such as ResNet-style networks [20] and the parameter-efficient ensemble TabM [19] are strong general-purpose baselines, while tree-based models remain competitive with deep models on typical tabular data [21]. We therefore evaluate the layer on both neural and classical classifiers [37].
3 Method
Fig. 1 summarizes the framework. It is applied after training and leaves the classifier unchanged. Its three components are the baseline classifier, SHAP-Dirichlet evidence, and uncertainty-gated refinement with an optional deferral step.
3.1 Baseline Classifier
Given a structural MRI scan , a morphometric feature extractor maps the image to a tabular representation . Here, is FreeSurfer/FastSurfer, which returns regional cortical and subcortical measurements [13, 25]. A classifier is trained on these features. For a query subject , it outputs the MDD probability , and the baseline label is . After training, is frozen. The refinement stage only uses the model output and its local explanation, so any classifier that outputs a probability can be used.
3.2 SHAP-Dirichlet Evidence
SHAP [30] gives a local attribution vector of the MDD probability, where each entry measures the contribution of one feature. Because the explained output is fixed, a positive entry pushes the prediction toward MDD and a negative entry toward HC for every subject. The query explanation is compared with a reference bank of explanations of labeled subjects, and a subject never retrieves itself. We consider two banks: the validation subjects only, and the training and validation subjects together, which are all labeled subjects available when the layer is deployed. The top-K most similar references are
where is a cosine, Pearson, or negative Euclidean similarity. The retrieved references are converted into class-level evidence
where is the distance associated with the similarity and is the median distance within . Adding one unit of prior
A. Data Processing and Baseline Classifier

Figure 1: Uncertainty-gated SHAP-Dirichlet refinement. (A) Structural MRI scans are processed into morphometric features, and a fixed classifier produces the baseline probability and label. (B) The query SHAP explanation is compared with a reference SHAP bank to retrieve explanation-similar subjects and estimate Dirichlet class evidence. (C) Local explanation stability decides whether the prediction is retained or refined, and unreliable subjects can be routed to expert review.
evidence to each class gives the Dirichlet-derived class probability
The Dirichlet probability is not a second classifier. It estimates how strongly the query explanation agrees with reference subjects of each class, and the prior keeps it close to 0.5 when the evidence is weak. The explanation-supported class is , and the support for the class opposite to the baseline label is .
3.3 Uncertainty-Gated Refinement
Local explanation instability. We estimate how much the explanation of a query changes under small feature perturbations, using relative input stability (RIS) and relative output stability (ROS) [1]. For each query, we draw perturbed samples , , and keep only those that preserve the predicted label. For each kept perturbation, we compute the explanation and the model logit , and define
Larger values indicate lower local reliability, and and prevent division by zero. If no perturbation preserves the predicted label, the query is treated as maximally unstable.
Gate. Let be the selected instability measure and . Other uncertainty scores, such as Monte Carlo dropout variance, can take the place of , and we compare them in Sect. 5.3. For a validation percentile , the threshold is the -th percentile of on the validation set, and the gate is
A stable subject keeps its baseline prediction. An unstable subject is passed to the correction rule.
Correction. Soft correction blends the baseline probability with the Dirichlet-derived MDD probability,
and the refined label is . As an alternative, hard correction flips the label of a gated subject when and .
Validation-based selection. The instability measure u, the similarity, , , and are selected on the validation set by accuracy. Ties are broken toward the rule that changes the fewest validation decisions, and if no rule improves validation accuracy, the baseline is kept for every subject. Algorithm 1 summarizes the procedure.
3.4 Expert Review
The framework also supports human-in-the-loop verification. A subject with low baseline confidence , or with high support for the opposite class , can be routed to expert inspection instead of being decided automatically. We map both scores to their percentiles in the validation distribution, average them, and defer the highest-ranked subjects. The deferral threshold is a validation percentile, so the expected review workload is fixed before deployment.
Algorithm 1 Uncertainty-gated SHAP-Dirichlet refinement
Require: fixed classifier , validation set , reference bank , test subject , grids ,
1: Compute and for all and
2: For each , compute from Eqs. 1–3
3: the rule with the highest validation accuracy, ties toward fewer changes
4: if no rule improves validation accuracy then return
5: end if
6: Compute , , , and with bank
7: if then
8: end if
9: return and a review score (Sect. 3.4)
3.5 Implementation
Exact batched KernelSHAP. We explain the MDD probability with KernelSHAP [30], using 20 k-means centroids of the training split as background and 800 coalition samples. We reseed the sampler before every explanation, so a query and its perturbations share the same coalitions (common random numbers). Differences between their explanations then reflect the model rather than Monte Carlo noise of KernelSHAP, which matters because RIS and ROS divide explanation differences by small input changes. With fixed coalitions, the KernelSHAP estimate is a fixed linear map of the coalition values. We therefore take the masks and kernel weights from the reference implementation and evaluate all perturbations of a query in one batched model call. On every outer fold, the batched estimate matched the reference implementation up to floating-point precision.
Batch-independent preprocessing. Both neural backbones use piecewise linear encoding (PLE) of the features. The PLE transform of the library we used clamps its last bin edge to the maximum of the current batch, so the prediction for a subject depends on the other subjects in the batch. This matters for post-hoc analysis, because perturbed copies of one subject are evaluated in batches of very different composition. We removed the clamp and compiled the per-feature encoding into one vectorized GPU computation. Training inputs are unaffected, because the training maximum always exceeds the last split, and the fixed transform reproduced the reported baseline of a previous single-split experiment exactly.
4 Experimental Setup
Data. We used T1-weighted MRI scans from the SRPBS dataset [42] and formed a balanced cohort of 504 subjects, with 252 healthy controls and 252 patients with MDD. Preprocessing followed the FastSurfer/FreeSurfer-based protocol [13, 25] of Beliveau et al. [4]. Scans were processed automatically, followed by a quality check that excluded large segmentation failures, without manual editing. Each subject was represented by 159 features: 70 cortical thickness and 70 surface-area features (34 Desikan-Killiany regions [11] per hemisphere plus one hemisphere average), 18 bilateral volumes of the accumbens, amygdala, caudate, cerebellar cortex, hippocampus, pallidum, putamen, thalamus, and lateral ventricles, and the estimated total intracranial volume.
Classifiers. TabM [19] is an MLP with parameter-efficient implicit ensembling (32 members), and ResNet [20] is a residual feedforward network. Both use PLE with 20 bins and are trained for up to 200 epochs with early stopping (patience 20) and batch size 32. Each has a grid of 72 configurations over width or depth, dropout, learning rate, and weight decay. The classical classifiers are L2-regularized logistic regression, an RBF support vector machine with Platt-scaled probabilities, and a random forest with 300 trees, each on standardized features with a small grid (Appendix A).
Protocol. We used stratified 5-fold outer cross-validation, so every subject is a test subject exactly once per repetition. Within each outer fold, a 3-fold inner GridSearch selected the hyperparameters by F1-score. The selected model was refit on two thirds of the outer-training data (about 270 subjects), and the remaining third (about 135 subjects) served as the validation set for early stopping and for all refinement choices. The whole protocol was repeated with four split seeds for TabM and ResNet (20 outer folds each) and with two split seeds for the classical classifiers, whose KernelSHAP runs were the most expensive per subject. No test subject was used for training, model selection, reference construction, or rule selection.
Refinement settings. We used , multiplicative perturbations with , the norm in RIS and ROS, and log-probabilities as the logit surrogate. The grids were , , and . Unless stated otherwise, the layer uses soft fusion with the gate measure and the similarity selected on validation. We report two reference banks. The pre-specified bank contains the validation subjects (about 135). The enlarged bank adds the training subjects (about 400 in total). We noted the enlarged bank as the most promising design choice after the first two repetitions, before the remaining two repetitions were analyzed, and we report those two as a confirmation.
Comparisons. Each ablation changes one component and keeps every other choice validation-selected: hard instead of soft correction, gates based on no gating, a random subset of the same size, low baseline confidence, or Monte Carlo dropout variance, retrieval in the standardized raw feature space, larger reference banks, and other values of K. We also report decision-threshold tuning on validation data as a simple post-hoc alternative.
Metrics and statistics. Within a repetition, metrics are computed on the 504 pooled out-of-fold predictions. We report accuracy, balanced accuracy, macro F1-score, ROC-AUC, the Brier score [6], the expected calibration error (ECE, 10 bins) [35], and the negative log-likelihood (NLL). The paired change in correctness is tested with an exact McNemar test per repetition [12]. Across repetitions, we use a sign test over repetition-level accuracy changes and the corrected resampled t-test [33] over all fold-level changes, which accounts for the overlap between training sets. Calibration changes are reported with 95% paired bootstrap intervals. Error detection is measured by the AUROC of separating incorrect from correct baseline decisions, after mapping each score to its validation percentile within the fold.
5 Results
5.1 Refinement Across Classifiers
Table 1 summarizes the main comparison. The fixed baselines reached between 63.74% (ResNet) and 66.27% (random forest) accuracy, which is in the range reported for structural MRI in comparable samples [14, 26]. Fold-level accuracy varied widely, from 56% to 73% for TabM (Appendix A), so single-split results on this task are not reliable.
With the pre-specified validation bank, the layer changed accuracy by +0.05 points for TabM and +0.50 points for ResNet, with gains in 2 and 3 of 4 repetitions. With about 135 references, the Dirichlet evidence is noisy, and the first two repetitions suggested that a larger bank helps (Table 2). With the enlarged training+validation bank, accuracy increased in all 8 neural backbone repetitions (sign test p = 0.008), from 64.24% to 65.28% for TabM and from 63.74% to 64.19% for ResNet (Fig. 2). The two confirmation repetitions gave +1.98, +0.99 points for TabM and +0.40, +0.20 points for ResNet. Balanced accuracy and macro F1 moved by the same amount, and ROC-AUC changed little because soft fusion only reorders the scores of gated subjects. The layer changed few decisions, at most 8.3% of the subjects in any repetition. Fold-level changes remain noisy, so the corrected resampled t-test was not significant for either backbone (p = 0.38 and p = 0.68), and the gains should be read as small but consistent.
For the classical classifiers, the effect depended on the model. With the enlarged bank, refinement changed the accuracy of the RBF-SVM by +1.39 points (improved in both repetitions), of logistic regression by -0.10 points, and of the random forest by -0.50 points. The two classifiers that did not benefit had the most compressed probabilities: 34% (logistic regression) and 23% (random forest) of the test subjects had , compared with 12% and 10% for TabM and ResNet. Near 0.5, a small shift toward the Dirichlet estimate flips decisions in both directions. Over all five classifiers, accuracy increased in 11 of 14 repetitions.
5.2 Layer Acts Localization
We now analyze the layer with the enlarged bank. The gate passed 35.3% (TabM) and 31.5% (ResNet) of the test subjects to the correction rule, and it selected harder subjects. Their baseline accuracy was 60.4% for TabM and 60.9% for ResNet, compared with 66.3% and 65.0% for the subjects that were not gated. Among gated subjects, refinement increased accuracy to 63.3% and 62.4%. Fig. 4 splits the test subjects by baseline confidence. The gains are concentrated in the least confident third, where accuracy increased from 51.5% to 54.0% for TabM and from 53.0% to 54.2% for ResNet, while only 0.1% (TabM) and 0.1% (ResNet) of the most confident decisions were changed. This is the intended behavior of a post-hoc layer: it leaves confident predictions alone and uses the explanation evidence where the classifier is close to the decision boundary.
5.3 Ablation Study
Table 2 changes one component of the pre-specified layer at a time. Hard flipping lowered accuracy for both backbones (-0.45 and -0.35 points), while soft fusion did not. Without a gate, soft fusion acted on every subject and changed accuracy by -0.74 and -0.20 points, because it also altered many correct decisions. Every gate was better than no gate. Monte Carlo dropout variance gave the largest gain for ResNet (+0.94 points) and a gain of +0.60 points for TabM, and the explanation-stability gates were competitive. The choice of the uncertainty measure therefore mattered less than having a gate. The reference bank was the most influential choice. Adding the training subjects gave +1.04 and +0.45 points and improved accuracy in every repetition, while retrieval in the raw feature space gave +0.64 and +0.20 points. The default K = 5 was the best value for ResNet, and no value of K changed TabM accuracy by more than 0.3 points. Decision-threshold tuning alone gave -0.30 and +0.45 points.
5.4 Calibration
Refinement also improved the probabilities themselves (Table 3). For both neural backbones, the Brier score and the NLL decreased, and the 95% intervals exclude zero (TabM -3.6 and -10.4, ResNet -5.1 and -16.2, both ). The ECE of ResNet dropped from 11.4% to 9.0%, and that of TabM from 7.6% to 6.2%. Logistic regression also gained in Brier score, while the SVM and the random forest were unchanged. Fig. 5 shows the reason. ResNet was overconfident for high predicted MDD probabilities, and fusing these probabilities with the Dirichlet estimate, which its prior shrinks toward 0.5, moved them closer to the diagonal. Calibration gains therefore come together with the accuracy gains, and they matter for downstream uses of the probability, such as risk communication and deferral thresholds.
5.5 Explanation Space
Table 4 compares retrieval in SHAP space with retrieval in the standardized raw feature space. SHAP space with the Euclidean distance gave the most label-consistent references for both backbones (58.9% vs. at most 57.6% in feature space), and the Dirichlet estimate reached 62.2% accuracy for TabM, compared with at most 61.3% for any feature-space metric. Explanations remove features that the model ignores and weight the remaining ones by their effect, so neighbors in SHAP space share the evidence the model actually used. A 5-nearest-neighbor classifier on the test subjects of the first TabM repetition reached 63.3% accuracy in SHAP space and 61.7% in feature space (Appendix B, Fig. 8).
The explanations were also consistent across architectures. The rank correlation of the mean absolute SHAP values of TabM and ResNet over the 159 features was 0.94. The most important features (Fig. 3) include the surface area of the left caudal anterior cingulate, the thickness of the rostral anterior cingulate, the caudal middle frontal and precentral cortex, the accumbens volume, and the lingual surface area. The cingulate features overlap with the regions in which large consortia report cortical differences in adult MDD [38], and the caudal anterior cingulate, lingual, and precentral features overlap with the variables most often selected by a decision tree for MDD classification in an independent cohort [41]. Importance at the level of single folds was less stable, which is expected for small effects estimated from about 270 training subjects.
5.6 Reliability and Expert Review
The same signals can decide which subjects need expert review. SHAP-Dirichlet evidence for the opposite class identified baseline
Table 1: Out-of-fold test performance of the fixed baselines and the refinement layer with the pre-specified validation reference bank and with the enlarged training+validation bank, averaged over cross-validation repetitions (each pooled over subjects). Accuracy, balanced accuracy (BAcc), macro F1 (MF1), and ROC-AUC are in %, with the change in percentage points in parentheses. ECE is in %. Green (red): better (worse) than the baseline of the same classifier. Reps: number of repetitions. I/R: repetitions with improved accuracy. : corrected resampled -test over all fold-level accuracy changes.
| Classifier | Reps | Model | Accuracy | BAcc | MF1 | AUC | Brier↓ | ECE↓ | I/R | |
|---|---|---|---|---|---|---|---|---|---|---|
| TabM | 4 | Baseline | 64.24 | 64.24 | 64.19 | 70.92 | 0.2217 | 7.56 | ||
| Layer, val. bank | 64.29 (+0.05) | 64.29 (+0.05) | 64.25 (+0.05) | 70.84 (-0.08) | 0.2196 | 7.52 | 2/4 | 0.95 | ||
| Layer, train+val. bank | 65.28 (+1.04) | 65.28 (+1.04) | 65.25 (+1.06) | 71.25 (+0.33) | 0.2181 | 6.24 | 4/4 | 0.38 | ||
| ResNet | 4 | Baseline | 63.74 | 63.74 | 63.71 | 70.00 | 0.2338 | 11.44 | ||
| Layer, val. bank | 64.24 (+0.50) | 64.24 (+0.50) | 64.22 (+0.51) | 69.24 (-0.75) | 0.2300 | 8.11 | 3/4 | 0.65 | ||
| Layer, train+val. bank | 64.19 (+0.45) | 64.19 (+0.45) | 64.18 (+0.47) | 69.91 (-0.09) | 0.2287 | 9.03 | 4/4 | 0.68 | ||
| Logistic Regression | 2 | Baseline | 64.29 | 64.29 | 64.28 | 69.87 | 0.2218 | 5.01 | ||
| Layer, val. bank | 63.89 (-0.40) | 63.89 (-0.40) | 63.89 (-0.40) | 70.12 (+0.25) | 0.2213 | 4.50 | 1/2 | 0.74 | ||
| Layer, train+val. bank | 64.19 (-0.10) | 64.19 (-0.10) | 64.18 (-0.10) | 70.72 (+0.85) | 0.2192 | 3.86 | 1/2 | 0.94 | ||
| RBF-SVM | 2 | Baseline | 65.87 | 65.87 | 65.87 | 72.00 | 0.2127 | 4.21 | ||
| Layer, val. bank | 66.96 (+1.09) | 66.96 (+1.09) | 66.95 (+1.08) | 72.29 (+0.29) | 0.2123 | 5.54 | 1/2 | 0.38 | ||
| Layer, train+val. bank | 67.26 (+1.39) | 67.26 (+1.39) | 67.23 (+1.36) | 72.02 (+0.02) | 0.2126 | 4.25 | 2/2 | 0.39 | ||
| Random Forest | 2 | Baseline | 66.27 | 66.27 | 66.22 | 72.46 | 0.2119 | 4.57 | ||
| Layer, val. bank | 65.28 (-0.99) | 65.28 (-0.99) | 65.22 (-1.01) | 71.18 (-1.27) | 0.2152 | 6.39 | 0/2 | 0.52 | ||
| Layer, train+val. bank | 65.77 (-0.50) | 65.77 (-0.50) | 65.74 (-0.49) | 72.03 (-0.42) | 0.2128 | 4.78 | 0/2 | 0.52 |

Figure 2: Accuracy change of the refined decisions relative to the fixed baseline in each cross-validation repetition (small markers) and on average (large markers), for the two reference banks.

Figure 3: 12 features with the largest mean absolute SHAP value on test subjects, averaged over folds and repetitions. LH/RH: left/right hemisphere. ACC: anterior cingulate cortex. MFG: middle frontal gyrus.

Figure 4: Accuracy by tercile of baseline confidence , before and after refinement with the enlarged bank, pooled over repetitions. Numbers give the change in percentage points.
errors above chance for both backbones (AUROC 0.61 and 0.62, Table 5), although less well than baseline confidence (0.65 and 0.64). The two signals are complementary. Their combination reached 0.66 and 0.66, a gain over confidence of +0.016 for ResNet (95% CI +0.000 to +0.033) and +0.011 for TabM (95% CI -0.007 to +0.028). RIS and ROS alone were close to chance (0.51–0.53 for TabM). They are therefore useful as a gate that limits which decisions may change, but not as error detectors.
Fig. 6 shows the accuracy of the automatically handled subjects when the remaining subjects are deferred. With the combined score, deferring 30% of the subjects increased this accuracy from 64.24% to 70.58% for TabM and from 63.74% to 70.33% for ResNet. Deferring half of the subjects gave 75.00% and 74.67%, compared with 75.34% and 73.24% for confidence alone. The SHAP-Dirichlet evidence thus adds an interpretable reason for each referral at no loss in deferral quality.
Fig. 7 shows a corrected case. The baseline predicted HC for a patient with MDD (). The explanation was unstable under small perturbations, and four of its five nearest reference explanations belonged to patients with MDD, so the Dirichlet estimate
Table 2: Ablations for the neural backbones. Each row changes one component of the pre-specified layer (soft fusion, validated RIS/ROS gate, validation bank, ), and all other choices are still selected on validation data. : mean accuracy change (percentage points) over repetitions, green for a gain and red for a loss. I/R: repetitions with improved accuracy. Shaded: the pre-specified layer.
| Component Variant | TabM | ResNet | |||
|---|---|---|---|---|---|
| I/R | I/R | ||||
| Correction | Hard flip | -0.45 | 1/4 | -0.35 | 0/4 |
| Hard or soft (validated) | +0.45 | 2/4 | +0.40 | 3/4 | |
| Soft fusion (ours) | +0.05 | 2/4 | +0.50 | 3/4 | |
| Gate | None | -0.74 | 1/4 | -0.20 | 1/4 |
| Random | -0.13 | 1/4 | +0.11 | 1/4 | |
| Low confidence | +0.25 | 2/4 | +0.40 | 1/4 | |
| MC-dropout variance | +0.60 | 2/4 | +0.94 | 4/4 | |
| RIS only | -0.15 | 1/4 | +0.69 | 4/4 | |
| ROS only | +0.69 | 3/4 | +0.20 | 2/4 | |
| RIS/ROS, validated (ours) | +0.05 | 2/4 | +0.50 | 3/4 | |
| Evidence | Raw-feature retrieval | +0.64 | 3/4 | +0.20 | 2/4 |
| SHAP, training bank | +0.35 | 3/4 | +0.35 | 4/4 | |
| SHAP, training+validation bank | +1.04 | 4/4 | +0.45 | 4/4 | |
| SHAP, validation bank (ours) | +0.05 | 2/4 | +0.50 | 3/4 | |
| Top-K | +0.20 | 3/4 | -0.64 | 0/4 | |
| (ours) | +0.05 | 2/4 | +0.50 | 3/4 | |
| -0.05 | 2/4 | -0.05 | 2/4 | ||
| +0.15 | 2/4 | -0.25 | 1/4 | ||
| +0.30 | 2/4 | -0.30 | 1/4 | ||
Table 3: Change in calibration after refinement with the enlarged bank (refined minus baseline, lower is better), averaged over repetitions, with 95% paired bootstrap intervals. Brier and NLL are , ECE is in percentage points. Green with *: improvement whose interval excludes zero.
| Classifier | Brier | ECE | NLL |
|---|---|---|---|
| TabM | [-6.2, -1.1] | [-2.5, 0.2] | [-18.2, -3.5] |
| ResNet | [-8.5, -1.9] | [-3.2, -0.7] | [-25.8, -7.4] |
| Logistic regression | [-5.0, -0.2] | [-3.1, 1.4] | [-19.0, 0.3] |
| RBF-SVM | [-2.6, 2.4] | [-2.2, 1.8] | [-5.7, 5.8] |
| Random forest | [-0.4, 2.3] | [-1.6, 1.9] | [-1.0, 4.9] |
favored MDD (). The validation-selected fusion moved the probability to 0.51, and the corrected decision comes with a set of similar, labeled subjects that a clinician can inspect.
6 Discussion
What the layer does well. With a reference bank of all labeled subjects, the layer is a safe post-hoc addition to a neural classifier. It changes a few decisions, it acts mostly where the classifier is uncertain, it improves the calibration of the probabilities, and its gains were positive in every neural repetition. The ablations identify

Figure 5: Reliability diagrams of the baseline and refined MDD probabilities (enlarged bank), pooled over repetitions. The dotted line marks perfect calibration.
Table 4: Quality of the retrieved evidence for test subjects with a validation reference bank and . Prec.: percentage of retrieved references with the same true label as the query. Acc. and AUC: accuracy and ROC-AUC of as a standalone classifier. Shaded: SHAP space. Bold: best value in each column.
| Space | Metric | TabM | ResNet | ||||
|---|---|---|---|---|---|---|---|
| Prec. | Acc. | AUC | Prec. | Acc. | AUC | ||
| Raw features | Cosine | 57.6 | 61.3 | 0.657 | 57.6 | 61.3 | 0.657 |
| Raw features | Pearson | 57.0 | 61.1 | 0.657 | 57.0 | 61.1 | 0.657 |
| Raw features | Euclidean | 56.2 | 60.2 | 0.650 | 56.2 | 60.2 | 0.650 |
| SHAP | Cosine | 58.1 | 62.3 | 0.668 | 58.7 | 62.5 | 0.674 |
| SHAP | Pearson | 57.4 | 61.2 | 0.657 | 57.9 | 62.2 | 0.662 |
| SHAP | Euclidean | 58.9 | 62.2 | 0.674 | 58.9 | 61.7 | 0.671 |
Table 5: AUROC for separating incorrect from correct baseline decisions on out-of-fold test predictions of all repetitions, with 95% bootstrap intervals. Shaded: scores that use SHAP-Dirichlet evidence. Bold: best value in each column.
| Score | TabM | ResNet |
|---|---|---|
| Low confidence | 0.648 (0.62–0.67) | 0.641 (0.62–0.67) |
| MC-dropout variance | 0.601 (0.58–0.63) | 0.628 (0.60–0.65) |
| RIS | 0.510 (0.48–0.54) | 0.522 (0.50–0.55) |
| ROS | 0.532 (0.51–0.56) | 0.496 (0.47–0.52) |
| SHAP-Dirichlet (Pearson) | 0.613 (0.59–0.64) | 0.618 (0.59–0.64) |
| SHAP-Dirichlet (Euclidean) | 0.612 (0.59–0.64) | 0.607 (0.58–0.63) |
| Confidence + SHAP-Dirichlet | 0.659 (0.64–0.68) | 0.658 (0.63–0.68) |
the components that make it safe. A gate limits the correction to about a third of the subjects, and soft fusion moves a probability only as far as the evidence supports. Variants without a gate or with hard flips reduced accuracy, because they also change many correct decisions.
Why the reference bank matters. The Dirichlet estimate is an average over retrieved subjects, so its quality depends on how
Confidence SHAP-Dirichlet Confidence + SHAP-Dirichlet

Figure 6: Accuracy of the automatically handled test subjects when the least reliable subjects are deferred to expert review, with validation-percentile thresholds. Dotted line: accuracy without review.

True: MDD. , , ,
Figure 7: A patient with MDD whose TabM baseline prediction was wrong and was corrected by the layer with the enlarged bank. Left: the seven largest SHAP values of the query (orange pushes toward MDD, blue toward HC). Right: weights of the five retrieved references and their true labels.
densely the bank covers explanation space. With about 135 validation subjects, retrieved neighbors are often far from the query, and the evidence is noisy. Adding the training subjects triples the bank. Their explanations come from the same fixed model, and their labels are known, so the enlarged bank uses no test information. The consistent gain in all 8 neural repetitions suggests that the layer will benefit from more labeled reference subjects in deployment, for example from other sites.
Why the accuracy gains are modest. The baselines are weak, in line with other structural MRI studies of depression [14, 41], and evidence retrieved from a few hundred subjects cannot be much more accurate than the classifier itself. The Dirichlet estimate alone reached about 62% accuracy. Each rule is also selected on a small validation set, so the selection is noisy. We therefore present accuracy as one benefit among several, together with calibration, low-confidence correction, and expert triage.
The role of RIS and ROS. RIS and ROS did not separate correct from incorrect decisions on their own, so the gate does not work as an error detector. It works as a selector of subjects whose explanation is sensitive to small, measurement-scale feature changes, which makes the correction conservative. The gated subjects were also less accurate than the rest, so the gate and the evidence act on the same subjects. Monte Carlo dropout variance was an even better gate in our experiments, and the framework accepts any uncertainty score.
Classical classifiers. The layer helped the RBF-SVM but not logistic regression or the random forest. Both of the latter produce probabilities close to 0.5 for many subjects, and for logistic regression the SHAP vectors are rescaled feature vectors, so explanation retrieval adds little beyond the features themselves. The effect of the layer on a given classifier should therefore be confirmed on independent folds before deployment, as in our protocol.
Lessons for evaluation. Single test folds are too small to rank post-hoc rules on this task. In the first two repetitions, the accuracy change of the twelve fixed rule variants on single folds ranged from -4.95 to +5.0 points, and the variant with the largest single-fold gain changed accuracy by -0.59 points on average over all folds. Selecting a rule by its test-fold gain would therefore have reported a misleading improvement. Repeated nested cross-validation with pre-specified tests and a separate confirmation step is necessary for post-hoc methods on small neuroimaging datasets [43, 44].
Limitations. We used one dataset with site effects that were not harmonized [15], and we did not test transfer to external sites. The enlarged reference bank was chosen after two repetitions and confirmed on two further repetitions of the same dataset, which is an internal rather than an external confirmation. The validation set serves for early stopping and for rule selection, which makes validation estimates optimistic, although the test folds remain untouched. KernelSHAP for perturbed copies is expensive, especially for large ensembles. Finally, the expert-review path was evaluated by simulation and not with clinicians.
7 Conclusion
We presented uncertainty-gated SHAP-Dirichlet refinement, a post-hoc layer that retains, refines, or defers the predictions of a fixed MRI-based MDD classifier. In repeated nested cross-validation on 504 SRPBS subjects, the layer with a training-plus-validation reference bank improved accuracy in every TabM and ResNet repetition, concentrated these gains on low-confidence subjects, and improved calibration. Gating and soft fusion were essential for these properties, and the effect carried over to an RBF-SVM but not to logistic regression or a random forest. SHAP-space retrieval produced more label-consistent references than raw-feature retrieval, and the resulting evidence supported a deferral policy that raised the accuracy of automatically handled subjects to about 75% at 50% coverage. A natural next step is to validate the review pathway with clinicians, to enlarge the reference bank across sites, and to test the layer under external site and cohort shifts.
References
[1] Chirag Agarwal, Nari Johnson, Martin Pawelczyk, Satyapriya Krishna, Eshika Saxena, Marinka Zitnik, and Himabindu Lakkaraju. 2022. Rethinking stability for attribution-based explanations. arXiv preprint arXiv:2203.06877 (2022).
[2] David Alvarez-Melis and Tommi S. Jaakkola. 2018. On the Robustness of Interpretability Methods. arXiv preprint arXiv:1806.08049 (2018).
[3] Edmon Begoli, Tanmoy Bhattacharya, and Dimitri Kusnezov. 2019. The need for uncertainty quantification in machine-assisted medical decision making. Nature Machine Intelligence 1, 1 (2019), 20–23. doi:10.1038/s42256-018-0004-1
[4] Vincent Beliveau, Ella Hedeboe, Patrick M. Fisher, Vibeke H. Dam, Martin B. Jørgensen, Vibe G. Frokjaer, Gitte M. Knudsen, and Melanie Ganz. 2022. Generalizability of treatment outcome prediction in major depressive disorder using structural MRI: A NeuroPharm study. NeuroImage: Clinical 36 (2022), 103224.
[5] Leo Breiman. 2001. Random Forests. Machine Learning 45, 1 (2001), 5–32. doi:10.1023/A:1010933404324
[6] Glenn W. Brier. 1950. Verification of forecasts expressed in terms of probability. Monthly Weather Review 78, 1 (1950), 1–3.
[7] Hoang-Loc Cao, Van Pham, Truong Thanh Hung Nguyen, Phuc Truong Loc Nguyen, Phuc Ho, Veronica Whitford, and Hung Cao. 2026. Self-Evolving Human-Centered Framework for Explainable Depression Symptom Annotation. In 2026 IEEE International Conference on Omni Layer Intelligent Systems (COINS). 1–6. doi:10.1109/COINS69995.2026.11715640
[8] C. K. Chow. 1970. On optimum recognition error and reject tradeoff. IEEE Transactions on Information Theory 16, 1 (1970), 41–46. doi:10.1109/TIT.1970.1054406
[9] Corinna Cortes and Vladimir Vapnik. 1995. Support-vector networks. Machine Learning 20, 3 (1995), 273–297. doi:10.1007/BF00994018
[10] Ian Covert and Su-In Lee. 2021. Improving KernelSHAP: Practical Shapley Value Estimation Using Linear Regression. In Proceedings of the 24th International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research, Vol. 130). PMLR, 3457–3465.
[11] Rahul S. Desikan, Florent Ségonne, Bruce Fischl, Brian T. Quinn, Bradford C. Dickerson, Deborah Blacker, et al. 2006. An automated labeling system for subdividing the human cerebral cortex on MRI scans into gyral based regions of interest. NeuroImage 31, 3 (2006), 968–980. doi:10.1016/j.neuroimage.2006.01.021
[12] Thomas G. Dietterich. 1998. Approximate Statistical Tests for Comparing Supervised Classification Learning Algorithms. Neural Computation 10, 7 (1998), 1895–1923. doi:10.1162/089976698300017197
[13] Bruce Fischl. 2012. FreeSurfer. NeuroImage 62, 2 (2012), 774–781. 20 YEARS OF fMRI.
[14] Claas Flint, Micah Cearns, Nils Opel, Ronny Redlich, David M. A. Mehler, Daniel Emden, Nils R. Winter, Ramona Leenings, et al. 2021. Systematic misestimation of machine learning performance in neuroimaging studies of depression. Neuropsychopharmacology 46, 8 (2021), 1510–1517. doi:10.1038/s41386-021-01020-7
[15] Jean-Philippe Fortin et al. 2018. Harmonization of cortical thickness measurements across scanners and sites. NeuroImage 167 (2018), 104–120.
[16] Yarin Gal and Zoubin Ghahramani. 2016. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In Proceedings of The 33rd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 48), Maria Florina Balcan and Kilian Q. Weinberger (Eds.). PMLR, New York, New York, USA, 1050–1059.
[17] Yonatan Geifman and Ran El-Yaniv. 2017. Selective Classification for Deep Neural Networks. In Advances in Neural Information Processing Systems, I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc.
[18] Florin C. Ghesu, Bogdan Georgescu, Awais Mansoor, Youngjin Yoo, Eli Gibson, R.S. Vishwanath, Abishek Balachandran, James M. Balter, Yue Cao, Ramandeep Singh, Subba R. Digumarthy, Mannudeep K. Kalra, Sasa Grbic, and Dorin Co-maniciu. 2021. Quantifying and leveraging predictive uncertainty for medical image assessment. Medical Image Analysis 68 (2021), 101855.
[19] Yury Gorishniy, Akim Kotelnikov, and Artem Babenko. 2025. TabM: Advancing tabular deep learning with parameter-efficient ensembling. In The Thirteenth International Conference on Learning Representations.
[20] Yury Gorishniy, Ivan Rubachev, Valentin Khrulkov, and Artem Babenko. 2021. Revisiting deep learning models for tabular data. In Proceedings of the 35th International Conference on Neural Information Processing Systems (NIPS '21). Curran Associates Inc., Red Hook, NY, USA, Article 1447, 12 pages.
[21] Léo Grinsztajn, Edouard Oyallon, and Gaël Varoquaux. 2022. Why do tree-based models still outperform deep learning on typical tabular data?. In Advances in Neural Information Processing Systems, Datasets and Benchmarks Track, Vol. 35.
[22] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. 2017. On calibration of modern neural networks. In International conference on machine learning. PMLR, 1321–1330.
[23] Anna Hedström, Leander Weber, Daniel Krakowczyk, Dilyara Bareeva, Franz Motzkus, Wojciech Samek, Sebastian Lapuschkin, and Marina M.-C. Höhne. 2023. Quantus: An Explainable AI Toolkit for Responsible Evaluation of Neural Network Explanations and Beyond. Journal of Machine Learning Research 24, 34 (2023), 1–11.
[24] Dan Hendrycks and Kevin Gimpel. 2017. A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks. In International Conference on Learning Representations.
[25] Leonie Henschel, Sailesh Conjeti, Santiago Estrada, Kersten Diers, Bruce Fischl, and Martin Reuter. 2020. FastSurfer - A fast and accurate deep learning based neuroimaging pipeline. NeuroImage 219 (2020), 117012.
[26] Joseph Kambeitz, Carlos Cabral, Matthew D. Sacchet, Ian H. Gotlib, Roland Zahn, Mauricio H. Serpa, et al. 2017. Detecting Neuroimaging Biomarkers for Depression: A Meta-analysis of Multivariate Pattern Recognition Studies. Biological Psychiatry 82, 5 (2017), 330–338. doi:10.1016/j.biopsych.2016.10.028
[27] Benjamin Kompa, Jasper Snoek, and Andrew L. Beam. 2021. Second opinion needed: communicating uncertainty in medical machine learning. npj Digital Medicine 4, 1 (2021), 4. doi:10.1038/s41746-020-00367-3
[28] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. In Advances in Neural Information Processing Systems, I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc.
[29] Christian Leibig, Vaneeda Allken, Murat Seçkin Ayhan, Philipp Berens, and Siegfried Wahl. 2017. Leveraging uncertainty information from deep neural networks for disease detection. Scientific Reports 7 (2017), 17816.
[30] Scott M. Lundberg and Su-In Lee. 2017. A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems (Long Beach, California, USA) (NIPS'17). Curran Associates Inc., Red Hook, NY, USA, 4768–4777.
[31] Gin S. Malhi and J. John Mann. 2018. Depression. The Lancet 392, 10161 (24 Nov 2018), 2299–2312.
[32] Hussein Mozannar and David Sontag. 2020. Consistent Estimators for Learning to Defer to an Expert. In Proceedings of the 37th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 119). PMLR.
[33] Claude Nadeau and Yoshua Bengio. 2003. Inference for the Generalization Error. Machine Learning 52, 3 (2003), 239–281. doi:10.1023/A:1024068626366
[34] Hung Nguyen, Alireza Rahimi, Veronica Whitford, Hélène Fournier, Irina Kondratova, René Richard, and Hung Cao. 2026. Heart2mind: Human-centered contestable psychiatric disorder prediction system using wearable ecg monitors. ACM Transactions on Computing for Healthcare (2026).
[35] Mahdi Pakdaman Naeini, Gregory Cooper, and Milos Hauskrecht. 2015. Obtaining Well Calibrated Probabilities Using Bayesian Binning. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 29. doi:10.1609/aaai.v29i1.9602
[36] Nicolas Papernot and Patrick McDaniel. 2018. Deep k-Nearest Neighbors: Towards Confident, Interpretable and Robust Deep Learning. arXiv preprint arXiv:1803.04765 (2018).
[37] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, et al. 2011. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12 (2011), 2825–2830.
[38] L. Schmaal et al. 2017. Cortical abnormalities in adults and adolescents with major depression based on brain scans from 20 cohorts worldwide in the ENIGMA Major Depressive Disorder Working Group. Molecular Psychiatry 22, 6 (01 Jun 2017), 900–909.
[39] Murat Sensoy, Lance Kaplan, and Melih Kandemir. 2018. Evidential Deep Learning to Quantify Classification Uncertainty. In Advances in Neural Information Processing Systems, S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (Eds.), Vol. 31. Curran Associates, Inc.
[40] Lloyd S. Shapley. 1953. A value for n-person games. In Contributions to the Theory of Games II, Harold W. Kuhn and Albert W. Tucker (Eds.). Princeton University Press, 307–317.
[41] Aleks Stolicyn, Mathew A. Harris, Xueyi Shen, Miruna C. Barbu, Mark J. Adams, Emma L. Hawkins, et al. 2020. Automated classification of depression from structural brain measures across two independent community-based cohorts. Human Brain Mapping 41, 14 (2020), 3922–3937. doi:10.1002/hbm.25095
[42] Saori C. Tanaka et al. 2021. A multi-site, multi-disorder resting-state magnetic resonance image database. Scientific Data 8, 1 (30 Aug 2021), 227.
[43] Gaël Varoquaux. 2018. Cross-validation failure: Small sample sizes lead to large error bars. NeuroImage 180 (2018), 68–77. doi:10.1016/j.neuroimage.2017.06.061
[44] Gaël Varoquaux and Veronika Cheplygina. 2022. Machine learning for medical imaging: methodological failures and recommendations for the future. npj Digital Medicine 5, 1 (2022), 48. doi:10.1038/s41746-022-00592-y
[45] Choong-Wan Woo, Luke J. Chang, Martin A. Lindquist, and Tor D. Wager. 2017. Building better biomarkers: brain models in translational neuroimaging. Nature Neuroscience 20, 3 (01 Mar 2017), 365–377.
A Hyperparameter Grids and Selected Models
Table 6 lists the hyperparameter grids, and Table 7 summarizes the models selected by the inner GridSearch. The selected configuration varied across folds for each classifier, and the baseline accuracy of individual outer folds differed by more than 10 percentage points, which is why we report pooled results across all folds and repetitions.
Table 6: Hyperparameter grids. All grids were searched with a 3-fold inner cross-validation inside every outer fold, optimizing the F1-score.
| Classifier | Fixed settings and searched values |
|---|---|
| TabM | PLE (20 bins), mini ensemble of 32 members, averaged ensemble outputs, no normalization. Layer sizes [128] or [256], dropout 0.1/0.2/0.3, learning rate , weight decay (72 configurations). |
| ResNet | PLE (20 bins), layer normalization, skip connections. Two blocks [128, 64, 32] or three blocks [256, 128, 64], dropout 0.1/0.2/0.3, learning rate as for TabM, weight decay (72 configurations). |
| Logistic regression | Standardized features, L2 penalty, . |
| RBF-SVM | Standardized features, Platt-scaled probabilities, . |
| Random forest |
Table 7: Selected models over all outer folds and repetitions. Distinct: number of distinct selected configurations. Accuracy: baseline test accuracy (%) of single outer folds.
| Classifier | Folds | Distinct | Mean ± SD | Range |
|---|---|---|---|---|
| TabM | 20 | 18 | 56.00–73.27 | |
| ResNet | 20 | 18 | 56.00–69.00 | |
| Logistic regression | 10 | 3 | 58.00–70.30 | |
| RBF-SVM | 10 | 6 | 61.39–69.31 | |
| Random forest | 10 | 6 | 61.39–70.00 |
B Additional Results
Table 8 reports every repetition for both reference banks, Table 9 repeats the ablations for the classical classifiers, and Fig. 8 compares feature space and SHAP space with t-SNE.

Figure 8: t-SNE of the 504 test subjects (first TabM repetition) in feature space and SHAP space, with the 5-fold cross-validated 5-NN accuracy of each space.
Table 8: Per-repetition results for the validation (Val.) and training+validation (Train+val.) banks. Base: pooled baseline accuracy (%). Δ: accuracy change (pp), green for a gain and red for a loss. C/B: corrected/broken decisions. p: exact McNemar test.
| Model | Seed | Base | Val. bank | Train+val. bank | ||||
|---|---|---|---|---|---|---|---|---|
| Δ | C/B | p | Δ | C/B | p | |||
| TabM | 42 | 65.87 | +0.20 | 7/6 | 1.00 | +0.60 | 4/1 | 0.38 |
| TabM | 43 | 63.69 | +1.59 | 11/3 | 0.06 | +0.60 | 11/8 | 0.65 |
| TabM | 44 | 62.70 | -0.40 | 10/12 | 0.83 | +1.98 | 26/16 | 0.16 |
| TabM | 45 | 64.68 | -1.19 | 5/11 | 0.21 | +0.99 | 13/8 | 0.38 |
| ResNet | 42 | 63.10 | +0.40 | 14/12 | 0.85 | +0.40 | 19/17 | 0.87 |
| ResNet | 43 | 64.68 | +0.60 | 14/11 | 0.69 | +0.79 | 14/10 | 0.54 |
| ResNet | 44 | 62.50 | +1.19 | 16/10 | 0.33 | +0.40 | 6/4 | 0.75 |
| ResNet | 45 | 64.68 | -0.20 | 9/10 | 1.00 | +0.20 | 6/5 | 1.00 |
| LogReg | 42 | 64.88 | -0.99 | 7/12 | 0.36 | +0.40 | 12/10 | 0.83 |
| LogReg | 43 | 63.69 | +0.20 | 13/12 | 1.00 | -0.60 | 10/13 | 0.68 |
| SVM | 42 | 65.48 | +0.00 | 14/14 | 1.00 | +1.39 | 22/15 | 0.32 |
| SVM | 43 | 66.27 | +2.18 | 19/8 | 0.05 | +1.39 | 14/7 | 0.19 |
| RF | 42 | 66.67 | -0.99 | 11/16 | 0.44 | -0.20 | 6/7 | 1.00 |
| RF | 43 | 65.87 | -0.99 | 7/12 | 0.36 | -0.79 | 4/8 | 0.39 |
Table 9: Ablations for the classical classifiers (two repetitions). Δ: mean accuracy change (pp), green for a gain and red for a loss. I/R: repetitions with improved accuracy. Shaded: the pre-specified layer.
| Comp. | Variant | LogReg | SVM | RF | |||
|---|---|---|---|---|---|---|---|
| Δ | I/R | Δ | I/R | Δ | I/R | ||
| Correction | Hard flip | -0.10 | 0/2 | +0.30 | 1/2 | -0.99 | 0/2 |
| Hard or soft (validated) | -0.10 | 1/2 | +0.99 | 1/2 | -1.29 | 0/2 | |
| Soft fusion (ours) | -0.40 | 1/2 | +1.09 | 1/2 | -0.99 | 0/2 | |
| Gate | None | -0.89 | 1/2 | +0.40 | 1/2 | -1.29 | 0/2 |
| Random | +0.02 | 1/2 | +0.05 | 1/2 | -0.90 | 0/2 | |
| Low confidence | -0.10 | 1/2 | +1.09 | 2/2 | +0.20 | 1/2 | |
| RIS only | -0.30 | 0/2 | +0.69 | 2/2 | -0.99 | 0/2 | |
| ROS only | -0.10 | 1/2 | +0.60 | 2/2 | -0.99 | 0/2 | |
| RIS/ROS, validated (ours) | -0.40 | 1/2 | +1.09 | 1/2 | -0.99 | 0/2 | |
| Evidence | Raw-feature retrieval | +0.79 | 2/2 | +0.20 | 1/2 | -0.20 | 1/2 |
| SHAP, validation bank (ours) | -0.40 | 1/2 | +1.09 | 1/2 | -0.99 | 0/2 | |