Skip to content

Medical AI encodes a "feeling of error": validating cancer segmentation with internal conceptsMedical AI Encodes a "Feeling of Error": Verifying Cancer Segmentation via Internal Concepts

arXiv: Interpretability· arXiv:2609.08879· Mengmeng Ma, Yunxiang Peng, Tang Li, Lu Lin, Binsheng Zhao, Oguz Akin, Xi Peng·Indexed by this site · 2026-10-01· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

The authors use SAE to detect cancer segmentation failures from MedSAM internal concepts: Prostate158 zero-shot AUROC 73.6%, higher than the output confidence baseline.

Questions
Cancer segmentation models can output plausible but incorrect masks, and output confidence both struggles to explain failure causes and involves a trade-off between detection sensitivity and segmentation quality.
Methods
Train SAEs on frozen MedSAM multi-layer patch representations, concatenate concept activations, use XGBoost for failure detection and concept explanation, and remove false positives by patch failure scores.
Experiments and results
Failure samples have fewer active concepts and weaker activations. On Prostate158, zero-shot AUROC is 73.6 and FPR95 is 64.4; the authors state the method improves both F1 and DSC. Amplifying tumor concept #469 gives ΔDSC of −0.173.
Limitations and future work
The authors note that the method currently characterizes concept co-occurrence rather than causal interactions, and SAEs are trained separately per cancer type. Experiments cover MedSAM with prostate, pancreas, and brain tumor segmentation; the paper does not report the failure threshold τ and a complete per-model metric table for the main test set.
Experimental setupMedSAM · PI-CAI、Prostate158 et al. · DSC、F1 et al.
Evaluated models
MedSAM
Benchmarks
PI-CAIProstate158PanTSMSD-Brain
Metrics
DSCF1AUROCFPR95AUPRCohen's d
AI summaryCancer segmentation models fail silently, generating plausible but incorrect masks. The study uses Sparse Autoencoders to decompose model internal activations into interpretable concepts, finding that failure cases are characterized by fewer active concepts and lower activation magnitude, and trains a classifier for failure detection and error explanation. In prostate, pancreatic, and brain cancer segmentation experiments, the method outperforms output-based methods in failure detection while maintaining segmentation quality.

Cancer segmentation models fail silently, generating plausible but incorrect masks. The study uses Sparse Autoencoders to decompose model internal activations into interpretable concepts, finding that failure cases are characterized by fewer active concepts and lower activation magnitude, and trains a classifier for failure detection and error explanation. In prostate, pancreatic, and brain cancer segmentation experiments, the method outperforms output-based methods in failure detection while maintaining segmentation quality.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors ask whether segmentation models have an internal "feeling of error" that can be used to predict their own failures.

    Cancer segmentation models fail silently, and the authors ask whether the model internally encodes a detectable, interpretable "Feeling of Error" (FOE).

    • Clinical scenario: The authors state that even well-performing models generate anatomically plausible but incorrect masks, potentially missing lesions or causing unnecessary biopsies; manual review of many masks is burdensome for clinicians.
    • Inadequacy of output cues: Output statistics such as confidence and uncertainty do not explain failure causes. The authors report that using these proxies to improve failure detection F1 by 20 points decreases segmentation DSC by 8–10 points, i.e., a sensitivity–quality trade-off.
    • Core observation: The authors use SAE to decompose internal activations of ViT segmentation models and state that failure samples activate fewer concepts with lower magnitude; some concepts align with clinical anatomical terms.
    • Proposed method: Extract concepts from early, middle, and deep layers and concatenate them into a failure representation, then use a lightweight classifier to learn concept interactions, performing failure detection, explanation, and patch-based correction simultaneously.
    • Contribution statement: The authors state that the method operates post-hoc on pretrained segmentation models, improving failure detection while maintaining segmentation quality on prostate and pancreatic cancer; the abstract also mentions brain cancer segmentation experiments.
  2. What related research exists?

    Related work is grouped into cancer segmentation, output-uncertainty failure detection, and SAE/concept interpretability.

    The paper's Related Work is organized into three categories, and the introduction also contrasts output-layer cues with concept bottleneck models.

    • Cancer image segmentation: U-Net [58] and its variants [32] are common architectures for multimodal tumor delineation; recent work uses ViT, attention, and multi-scale fusion to improve accuracy, and the authors name TransUNet [11], Swin-UNETR [24]. The authors state that these models still produce clinically significant false positives and false negatives.
    • Failure detection in medical AI: Existing methods rely on output uncertainty, including predictive confidence and entropy [26], energy scores [46]; the authors state that they can flag potential errors but do not explain the cause and generalize poorly across datasets [54]. Quality control based on image quality assessment [9] or ensemble disagreement [38] also lacks interpretability. The authors position this paper as filling this gap with internal concepts.
    • Interpretability and concept methods: Gradient attribution includes GradCAM [60], IG [63]; SAE [15, 65] is used for concept extraction. MedSAE applications include cell analysis [17], disease detection [57], pathology [39], and report generation [1]. TCAV [34], CBM [37, 71], and medical VLMs [20, 35] require human annotation; unsupervised concept discovery [4, 45] targets natural images. The authors state that this paper differs from post-hoc explanations by using unsupervised SAE concepts for actionable segmentation failure detection.
    • Baselines and data: Failure detection baselines are MaxProb, MeanProb, Entropy [26], Energy [46], and direct probability thresholding; the appendix adds test-time augmentation (TTA) [67]. Datasets are PI-CAI [59], Prostate158 [2], PanTS [42], and the appendix uses MSD-Brain. Segmentation backbones in the introduction include ViT segmentation models [14, 47, 72] and Medical SAM variants [10, 47, 48]; the experimental backbone is MedSAM [47].

    The authors distinguish this paper from CBM as: post-hoc on any pretrained segmentation model, no architecture changes, and uses SAE to discover concepts unsupervised, requiring no human concept annotation; unlike medical VLMs, internal concepts need not fully align with human language, and some of the most predictive failure concepts are non-semantic.

  3. How does the paper address this problem?

    Multi-layer SAE concepts are concatenated and XGBoost detects failures, with correction based on patch scores.

    The authors extract concepts inside a frozen segmentation model using a Sparse Autoencoder (SAE), then train a classifier to predict failures and support explanation and correction.

    Failure definition and SAE

    • Failure definition: The segmentation model f maps an image to a binary mask. A failure is recorded when the quality metric E (e.g., Dice) satisfies E(m̂, m∗) ≤ τ; the paper does not provide the τ used in experiments.
    • SAE: For layer activation h, the encoder produces sparse concepts z = ReLU(W_enc h + b_enc), and the decoder reconstructs ĥ. The training loss is reconstruction error plus λ‖z‖₁.
    • Two findings: Fig. 2 on PI-CAI shows that successful samples have higher active concept count and average activation than failures (p < 1e−5,Cohen’s d > 1.8). Concepts are automatically assigned clinical labels when IoU with lesion or anatomical masks is ≥ 0.5; two radiologists confirmed that all displayed labels are consistent.

    Cross-layer failure representation

    • Sampled layers: Uniformly sample L = {1, 3, 5, 7, 9, 11} on ViT, training an SAE independently per layer. The training set includes both correct predictions and failures.
    • Concatenation: c(x) is the concatenation of sparse vectors from six layers, with dimension |L|·D. The authors state that failures may arise from shallow visual issues or deep semantic confusion, so they do not select a single "best" layer.
    • Patch-level: SAE is trained directly on patch embeddings to preserve spatial granularity. The spatial activation map of concept k is used to localize its main response regions.

    Failure classification and correction

    • Classifier: The main classifier is XGBoost, minimizing binary cross-entropy with complexity regularization on binary classification data derived from training/validation set labels. Importance scores are mapped back to concepts and layers.
    • Correction: The classifier scores at the patch level. The corrected mask retains only patches with local failure scores below a threshold η, preserving high-confidence true positives. The paper does not provide the value of η.
    • Implementation parameters: The backbone is MedSAM without manual prompts, fine-tuned per task with Focal Loss (α = 0.97, γ = 2) and Adam (weight decay 1e−4). SAE uses BatchTopK, learning rate 1e−4, 5 epochs, dictionary size D = 1,536, sparsity S = 8.
  4. What experiments did the paper conduct?

    Internal concepts outperform output confidence in zero-shot and correction settings, with concept amplification interventions.

    Experimental Setup

    • Models: The segmentation backbone is a fine-tuned MedSAM; the main failure detector model is XGBoost, with ablations including logistic regression, decision tree, and random forest.
    • Data: PI-CAI is 1,500 mp-MRI cases, split 1,200/60/240 (train/validation/test). Prostate158 has 158 cases total, all used for zero-shot. A PanTS subset of 700 CT cases is randomly sampled, split 448/112/140. The appendix also includes false-positive correction visualizations on MSD-Brain.
    • Baselines: MaxProb, MeanProb, Entropy, Energy, and direct probability thresholds, with thresholds varying over [0.5, 0.8]. The appendix adds TTA with K=6 on PI-CAI.
    • Metrics: Segmentation uses DSC; failure detection main metric is F1, with AUROC and FPR95 also reported; Table 1 also reports AUPR, and Table 7 reports Acc.
    • Concept validation: After auto-labeling with IoU ≥ 0.5, two practicing radiologists independently judged, and the authors state they agreed with all displayed labels.
    • Overhead: Single RTX A6000, input 1024², 100 forward passes. The paper does not report the failure label threshold τ, classifier repetition count, or full per-baseline numeric tables for PI-CAI and PanTS.

    Main Results

    The main text does not give complete numeric tables for each baseline on PI-CAI and PanTS. Fig. 5 compares F1 and DSC with scatter plots, with the gray line as the baseline Pareto front; the figure annotation shows Ours relative to this front as prostate +8.7 DSC, +6.2 F1, pancreas +2.3 DSC, +9.2 F1. The retrievable detection numbers come from zero-shot Table 1 and ablation tables.

    Swipe horizontally to read the table

    SettingMetricOursComparisonSource
    Prostate158 zero-shotAUROC73.6Entropy 53.1; Energy 48.0Table 1
    Prostate158 zero-shotFPR9564.4MaxProb/MeanProb/Energy 100.0; Entropy 97.8Table 1
    Prostate158 zero-shotAUPR74.1Entropy 65.6; MaxProb 64.4Table 1
    D=1536, S=8F1 / DSC63.5 / 50.1Other S, D combinations in the same tableTable 2
    All-layer conceptsF1 / DSC63.5 / 50.1Deep F1 57.6; Early F1 44.5Table 3
    • Author interpretation: In Fig. 5, baselines show a Pareto trade-off between DSC and F1; the authors state internal concepts achieve both higher DSC and higher F1.
    • Zero-shot: The authors state MaxProb, Entropy, etc. have AUROC near random, and the concept detector is better on all three metrics; Fig. 6 still separates success and failure on Prostate158 (p < 1e−5,图中 Cohen’s d 为 1.20 与 1.22)。
    • 解释:Fig. 8 的 Top-5 重要性集中在肿瘤相关概念及腺体边界、腺体外区域。Fig. 7 展示幻觉病灶和边界错误两类失败,并给出校正前后 DCS。

    概念分离与层级预测力

    • PI-CAI:Fig. 2 报告成功样本活跃概念更多、激活更强,p < 1e−5,Cohen’s d > 1.8. In the right-side example, #469 ("tumor") activates strongly only in successful samples, while #968 and #204 activate in both classes.
    • Single-concept AUROC: Fig. 3 shows the top 5 concepts per layer with Δrandom = AUROC − 0.5. The authors state deeper layers have stronger overall predictive power, middle layers have more failure-predicting concepts, and shallow layers are weaker discriminators. The appendix states Layer 9's Δrandom is about 0.10–0.13, and Layer 5 leans more toward false-positive-predicting concepts.
    • Intervention: Table 6 amplifies tumor-related concept #469 in Layer 11 (α = 2), with ΔDSC of −0.173 relative to the raw mask; SAE reconstruction alone is +0.013, and amplifying a non-tumor random latent is +0.035. Fig. 12 shows two cases dropping from DSC 0.409 to 0.200 and from 0.710 to 0.339. The authors state this is intervention evidence that #469 affects output, not just correlation.

    TTA, Brain Tumor Visualization, and Overhead

    • TTA: Table 7 on PI-CAI, MedSAM base F1/Acc/DSC is 0.359/79.55%/0.513; TTA (K=6) is 0.592/94.34%/0.434, costing 6×; Ours is 0.635/95.85%/0.501, costing 1 forward pass plus 6 SAEs. K=4 F1 is 0.591.
    • MSD-Brain: Fig. 13 shows false-positive region localization and the mask after removal. The figure has no numbers; the authors do not report DSC in that caption.
    • Latency: Table 5: MedSAM is 126.3 ± 0.5 ms; adding 6 SAE encoders is 130.9 ± 2.7 ms (+3.7%); adding the decoder is 134.3 ± 0.3 ms (+6.3%); the full pipeline including XGBoost is 176.5 ± 13.3 ms (+39.7%), about 5.66 img/s. GPU memory +60 MB (+1.8%), six SAEs occupy 54 MB on disk.

    Other Ablations and Analyses

    • Table 2: At D=1536, S=4/8/16 F1 is 60.3/63.5/62.5, DSC is 49.7/50.1/49.9; at D=3072, S=8 F1 is 57.4, DSC is 49.7. The authors state the optimum is D=1536, S=8, lower than the common S≈16, D≈10,000 in natural images.
    • Table 3: Early/Mid/Deep/All F1 is 44.5/50.4/57.6/63.5, DSC is 47.5/48.8/49.6/50.1.
    • Table 4: XGB, Logistic, Decision Tree, Random Forest F1 is 63.5/59.2/58.7/57.0, DSC is 50.1/47.8/48.5/44.6.
    • Fig. 7 shows four corrected cases' DSC: PI-CAI from 74.1 to 86.5, from 78.5 to 85.0; PanTS from 29.3 to 40.7, from 54.5 to 68.9. Fig. 4 also shows an example from 38.6 to 66.2.
    • Fig. 8 importance scores include visible values 0.050, 0.045, 0.031, 0.025, 0.021, corresponding to tumor and boundary concepts in L11 and shallower layers.
    • The abstract mentions prostate, pancreas, and brain cancer; contribution (3) only mentions prostate and pancreas. The main results table does not list per-point DSC beyond Energy.
  5. What are some points that can be further explored?

    The authors note that current work only characterizes concept co-occurrence, and SAE needs retraining per cancer type.

    Limitations and future directions noted by the authors

    • Co-occurrence, not causation: In the Conclusion, Limitations, and Future Work section, the authors write that the method currently characterizes concept appearance, not causal relationships between concepts; they hope to use causal mediation analysis or causal abstraction for intervenable debugging.
    • SAE trained per cancer type: In the same section, they write that SAEs are currently trained separately for each cancer type, requiring retraining for different anatomical structures. They propose training a universal SAE across brain, liver, lung, and other cancers.
    • Failure types too coarse: In the same section, they hope to extend from binary failure classification to specific failure modes such as boundary errors, shape and size estimation failures.
    • Missing modalities: In the same section, they write that the framework could be extended to medical segmentation with missing modalities, learning modality-specific and shared concepts, and using them for adaptive fusion and modality imputation.

    Experimental coverage

    • The segmentation backbone is MedSAM; the main detection classifier is XGBoost, with Table 4 comparing three other classifiers.
    • Datasets are PI-CAI (1,500, split 1,200/60/240), Prostate158 (158, zero-shot), PanTS subset (700, split 448/112/140); appendix Fig. 13 shows correction visualization on MSD-Brain.
    • Failure detection baselines are MaxProb, MeanProb, Entropy, Energy, and probability thresholding; appendix Table 7 adds TTA with K=6 and K=4. The authors state they do not compare with methods that incorporate failure detection into the training objective, because the target scenario is frozen pretrained models.
    • SAE is fixed to six layers, BatchTopK, 5 epochs, D=1,536, S=8; Tables 2–3 vary dictionary size, sparsity, and layer depth. Latency is reported on RTX A6000, 1024², 100 forward passes.
    • Concept labeling protocol is IoU ≥ 0.5 plus confirmation by two radiologists for displayed labels. The paper does not report failure thresholds τ, η, a complete per-baseline F1/DSC table for the main test set, or numerical inter-rater agreement.
  6. Summarize the main content of the paper

    SAE concepts can detect and explain MedSAM's cancer segmentation failures and are used for false positive correction.

    The authors investigate whether cancer segmentation models encode failure signals similar to human FOE in their internal representations and use them for detection, explanation, and correction.

    • Problem: Output confidence does not explain failure causes. The authors report that such proxies improve failure detection F1 by 20 points while DSC drops by 8–10 points.
    • Method: Train SAEs (D=1,536, S=8) separately on patch activations from layers 1, 3, 5, 7, 9, 11 of frozen MedSAM, concatenate concepts, and use XGBoost to predict failures; patches below a threshold are retained. Concepts can be localized by spatial activation and correspond to anatomical labels with IoU ≥ 0.5.
    • Separation: On PI-CAI, active concept count and activation strength separate between successes and failures (p < 1e−5,Cohen’s d > 1.8). On Prostate158 zero-shot, separation persists (d values 1.20 and 1.22 in the figure).
    • Detection: In Table 1, a detector trained on PI-CAI achieves AUROC 73.6, AUPR 74.1, FPR95 64.4 on Prostate158; Entropy has AUROC 53.1, Energy 48.0. Fig. 5 annotates the Pareto frontier relative to baselines: prostate +8.7 DSC, +6.2 F1; pancreas +2.3 DSC, +9.2 F1. Full-layer concepts achieve F1/DSC of 63.5/50.1.
    • Intervention and conclusion: Amplifying tumor concept #469 gives ΔDSC of −0.173, while two controls give +0.013 and +0.035. The authors conclude that concept activations distinguish true from false positives and support interpretable correction, and remain usable in zero-shot settings where confidence methods are near random; they also acknowledge that only co-occurrence is currently observed and SAEs are trained separately per cancer type.
Read originalarxiv.org