Source-linked AI summary
A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classification
Javier Diaz Esteban-Herreros, David Muñoz-Valero, Raquel Martínez-España, Jose M. Juarez, Juan Moreno-Garcia
TL;DR
Contradictory explanations complicate the auditing of zero-shot medical classifiers, where DeBERTa-v3 predictions may be difficult to inspect. This paper compares five explanation methods and measures their agreement alongside predictive performance. Agreement tracks performance across clinical categories, while broad, semantically overlapping classes show fragmented explanations and recurring failure patterns.
Problem
Different explainers can give inconsistent attributions for the same prediction, making validation and the choice of a single explanation method difficult in high-stakes settings.
Source: §1 · p. 2Method
The study audits zero-shot DeBERTa-v3 medical abstract classification by comparing five explanation methods with Top-20 token attribution and pairwise Jaccard agreement.
Source: §3.2 · p. 7, §3.3 · p. 7, §8 · p. 16Results
Explanatory agreement tracks predictive performance: specific clinical categories have more stable shared explanations, while broad overlapping classes show predictive collapse and attribution fragmentation.
Source: §6 · p. 15, §8 · p. 16Takeaways & Limitations
The authors recommend combining explanation methods and agreement metrics in audits, and prioritizing specific clinical ontologies over broad diagnostic labels.
Source: §8 · p. 16The comparative XAI phase uses one case per category, so its reported standard deviations reflect variation across method pairs rather than across inputs.
Source: §7 · p. 16
Abstract
from arXiv · showhide
A comparative explainability framework is presented to audit DeBERTa-v3 under zero-shot classification of medical abstracts. The work addresses the disagreement problem in Explainable Artificial Intelligence, where different attribution methods produce divergent explanations for the same input and prediction. A natural language inference engine is implemented over the Medical Abstracts corpus with five enriched hypotheses per diagnostic category and a balanced sample of one thousand texts per class. Five explanation methods are compared: SHAP and LIME as model-agnostic approaches, occlusion and Input x Gradient as deep-learning-specific approaches, and Attention x Gradient as a transformer-specific approach. Explanations are standardized through top-token attribution, and pairwise agreement is quantified using the Jaccard index. High predictive accuracy is achieved across well-defined clinical domains, whereas performance degrades under high semantic ambiguity. Explanatory stability directly mirrors predictive certainty, exhibiting strong convergence in univalent categories and a marked drop under diagnostic uncertainty. Furthermore, qualitative error auditing uncovers three systemic failure mechanisms: lexical hypersensitivity, semantic overlap, and loss of attribution coherence. The results support the combined use of several explanation methods and quantitative agreement metrics when auditing transformer-based models in medical text classification, and suggest prioritizing specific clinical ontologies over broad diagnostic labels.
1. Introduction
Clinical text classifiers can be difficult to inspect, while contradictory post-hoc explanations make high-stakes predictions harder to justify. This paper audits DeBERTa-v3 in zero-shot medical abstract classification by comparing explainers and examining errors.
1. Introduction
- Clinical opacity matters because a globally accurate model may still offer little reassurance for an individual prediction, and spurious lexical cues may be confused with legitimate clinical descriptors.The introduction situates this concern in clinical decision-making and regulatory attention to auditability.Source: §1 · p. 2
- Different explanation methods can produce inconsistent attributions for the same prediction, and the lack of ground-truth explanations complicates empirical validation.The introduction notes that applied studies often rely on a single attribution method and visual inspection.Source: §1 · pp. 2–3
- The framework compares five methods over the twenty most relevant tokens and quantifies pairwise agreement with the Jaccard index.A second protocol uses SHAP to inspect misclassified cases in the general pathological category.Source: §1 · p. 3
- The paper contributes a zero-shot DeBERTa-v3 medical classification engine, a comparative explanation framework, a Top-20/Jaccard evaluation protocol, and an error analysis of the general category.The error analysis identifies lexical hypersensitivity, semantic overlap, and loss of attribution coherence as recurring patterns.Source: §1 · p. 3
2. Related Work
The related work surveys XAI evaluation, transformer attribution, medical text applications, and toolkits before identifying gaps in DeBERTa-v3 auditing. It positions this study as a quantitative comparison of explainers linked to analysis of failure in ambiguous clinical categories.
2.1. XAI taxonomies and evaluation
- XAI distinguishes methods by timing, scope, and model dependence, while evaluation work includes sanity checks, robustness analyses, and standardized metrics.Faithfulness and plausibility are distinct concerns, and disagreement remains difficult to resolve without ground-truth explanations.Source: §2.1 · pp. 3–4
2.2. XAI for transformer-based models
- Transformer attribution methods include attention, gradient, and perturbation approaches, each with limitations such as sensitivity to baselines, perturbation policies, or run variance.Attention-plus-gradient methods were motivated by evidence that attention weights alone may not reliably explain predictions.Source: §2.2 · p. 4
2.3. Recent advances in attribution for transformers
- Recent transformer-specific methods decompose contributions across model blocks, trace layer-wise representations, or use language models to generate more coherent LIME neighborhoods.The passage describes ALTI-Logit and AttnLRP, CA-LIG, and LLiMe.Source: §2.3 · p. 4
2.4. XAI in medical text classification
- Medical text explanations are expected to indicate whether classifiers rely on legitimate clinical descriptors, and this study compares methods on shared predictions because ground-truth explanations are unavailable for its setting.Prior work reports that different methods may highlight different tokens for the same text classification prediction.Source: §2.4 · p. 4
2.5. Comparative XAI frameworks and toolkits
- No single reviewed toolkit natively covers the five explanation families compared for DeBERTa-v3; Table 1 frames toolkit comparison by method coverage, DeBERTa-v3 support, and evaluation metrics.The stated compatibility gap motivates native implementations for the study.Source: §2.5 · p. 5, Table 1 · p. 5
2.6. Background: DeBERTa-v3 and zero-shot NLI
- DeBERTa-v3 combines disentangled attention, an enhanced mask decoder, and a scale-invariant replaced-token objective; zero-shot NLI assigns labels through competing natural-language hypotheses.The selected model is described as fine-tuned on NLI and topic-classification datasets, while zero-shot use avoids task-specific labels but transfers pretraining bias.Source: §2.6 · p. 5
2.7. Research gap addressed
- The paper identifies gaps in native DeBERTa-v3 support, quantitative comparison across explainer families, and audits connecting attribution instability to failures in ambiguous categories.Its pipeline uses native methods, Top-20 token Jaccard agreement, and SHAP-based error analysis to address these gaps.Source: §2.7 · p. 5
3. Methodology
The methodology combines zero-shot NLI classification of medical abstracts with five explanation methods, a Top-20 Jaccard consistency analysis, and SHAP-based error auditing. It uses a balanced sample across four specific diagnostic categories and one broad pathological category.
3. Methodology
- The five-stage workflow balances the corpus, runs zero-shot NLI, applies XAI methods, measures Top-20 Jaccard consistency, and uses SHAP for error analysis.The pipeline evaluates post-hoc explanations on high-certainty predictions and examines predictive failures under the zero-shot paradigm.Source: §3 · p. 6, Figure 1 · p. 6
3.1. Corpus
- The Medical Abstracts taxonomy contains four specific diagnostic groups and a broad general pathological category with semantic overlap; the explanation study samples 1,000 texts per category.The balanced sample is drawn from the training split because inference is zero-shot.Source: §3.1 · p. 6
3.2. Inference Engine
- Classification treats each abstract as an NLI premise and category descriptions as hypotheses, averaging five enriched-hypothesis entailment probabilities before assigning the highest-confidence category.No supervised training is performed on the target corpus; task-specific intervention is hypothesis design.Source: §3.2 · pp. 6–7
3.3. Explanation Methods
- Five class-specific, polarity-preserving methods span SHAP, LIME, occlusion, Input x Gradient, and Attention x Gradient to compare attribution families.SHAP and LIME use 1,000 perturbations per sample; LLiMe is excluded because of its computational cost for 5,000 abstracts.Source: §3.3 · pp. 7–8
3.4. Consistency Analysis
- Attributions are standardized as the 20 tokens with greatest absolute attribution, then pairwise Jaccard agreement is computed for each method pair and clinical category.The Top-20 choice balances capturing clinical entities against noise from secondary tokens; Jaccard is the study’s sole quantitative comparative metric.Source: §3.4 · p. 8
3.5. Error Analysis
- For misclassified cases in the lowest-accuracy general pathological category, SHAP saliency maps and waterfall plots visualize token contributions to errors.Saliency maps distinguish positive and negative contributions by color, while waterfall plots decompose the prediction into additive token contributions.Source: §3.5 · p. 8
4. Experimental Setup
The experimental setup documents implementation, preprocessing, reproducibility, and evaluation procedures for the methodology. It samples 1,000 abstracts per category and reports predictive performance, explanation agreement, and qualitative error patterns.
4. Experimental Setup
- The setup covers the software and hardware, corpus preprocessing, reproducibility measures, and metrics used to evaluate prediction and explanation agreement.Source: §4 · p. 8
4.1. Implementation details
- The DeBERTa-v3 model has approximately 400 million parameters and runs on an Nvidia RTX 4050; computational demand bounds evaluation to 1,000 texts per category.SHAP and LIME use 1,000 perturbations per sample, and native implementations are used for occlusion, Input x Gradient, and Attention x Gradient because of limited library compatibility.Source: §4.1 · p. 9
4.2. Preprocessing
- The experiment randomly samples 1,000 abstracts per category from the training split and applies no stemming, lemmatization, stopword removal, or other linguistic normalization.The hypotheses are prepended to each abstract in the NLI template before tokenization.Source: §4.2 · p. 9
4.3. Reproducibility
- Separate inference, explanation, and validation stages persist their intermediate outputs so comparative analyses can be reproduced without rerunning GPU-intensive stages.A fixed 1,000-perturbation budget is used for SHAP and LIME across samples and categories, and retained for SHAP error analysis.Source: §4.3 · p. 9
4.4. Evaluation metrics
- Predictive evaluation reports confusion matrices, per-class recall, and macro F1; explanation agreement reports pairwise and averaged Jaccard values, while error analysis is qualitative.Per-category Jaccard standard deviations reflect variability across method pairs, not across texts.Source: §4.4 · p. 9
5. Experiments and Results
Across the balanced evaluation, DeBERTa-v3 performs well on specific clinical categories but struggles with the broad general category. Explanation agreement is highest for specific categories and falls with ambiguity; error analysis identifies lexical hypersensitivity, semantic overlap, and incoherent attributions.
5.1. Predictive performance
- Neoplasms reached 85.70% recall and cardiovascular diseases 84.20%, while the general pathological category had 6% accuracy across 5,000 abstracts.The general cases were distributed among specific categories, with 326 of 1,000 misclassified as neoplasms; aggregate F1 was 0.60.Source: §5.1 · p. 9, Figure 2 · p. 10
5.2. Explainability comparison
- The comparison pipeline extracts each method’s Top-20 tokens and measures pairwise agreement with Jaccard, using one correctly classified abstract per clinical category (N = 1).The five methods are SHAP, LIME, Occlusion, Input × Gradient, and Attention × Gradient.Source: §5.2 · p. 10, Figure 3 · p. 11
- For neoplasms, all five methods selected metastatic, with category-average Jaccard 0.335 ± 0.091; in general pathological cases, no token was shared and mean agreement was 0.171 ± 0.088.The general-category minimum pair agreement was 0.036 between LIME and Occlusion.Source: §5.2 · pp. 10–11, Table 9 · p. 12
5.4. Error analysis the general pathological category
- Case analyses illustrate these patterns: vascular descriptors misdirect a systemic renal case, while explicit cancer terms drive a neoplasm prediction despite an ignored HPV-18 process.Other inspected cases included renal failure misclassified as cardiovascular, incoherent grammatical-particle attributions, and a biopsy-driven neoplasm error without oncological context.Source: §5.4 · pp. 12, 14
5.3. Cross-class agreement analysis
- Across categories, agreement was highest within method families—SHAP–LIME at 0.31 ± 0.14 and Input × Gradient–Attention × Gradient at 0.30 ± 0.12—and lowest for SHAP–Attention × Gradient at 0.19 ± 0.08.Explanation stability also tracked predictive confidence: neoplasms had 85.70% recall and mean Jaccard 0.33 ± 0.09, versus 6.00% recall and 0.17 ± 0.09 for the general category.Source: §5.3 · pp. 11–12, Table 10 · p. 13
5.4. Error analysis the general pathological category
- The five-case audit identifies lexical hypersensitivity, semantic overlap, and loss of attribution coherence as recurring failure mechanisms in the general category.Explicit high-salience terms can trigger premature assignment; overlapping descriptors can outweigh negative evidence; and absent dominant features can disperse attribution onto grammatical particles.Source: §5.4 · pp. 14–15
6. Discussion
Explanation agreement varies by explainer family and clinical category, and tracks predictive performance. Error analysis identifies failure mechanisms in broad, semantically overlapping categories, motivating more specific clinical taxonomies.
6. Discussion
- Agreement averaged 0.31 for SHAP–LIME and 0.30 for Input x Gradient–Attention x Gradient, versus 0.19 for SHAP–Attention x Gradient.The results show that agreement depends on both the category and the explanation-method family.Source: §6 · p. 15
- General pathological conditions had 6% accuracy and the lowest Jaccard value, 0.17; specific-category averages ranged from 0.24 for nervous system to 0.33 for neoplasms.For neoplasms, all five methods selected metastatic; for digestive diseases, all selected liver.Source: §6 · p. 15
- The error audit identifies lexical hypersensitivity, semantic overlap, and loss of attribution coherence, including category-pulling cues and attribution mass on grammatical words.Examples include biopsy pulling a case toward neoplasms and shared vascular descriptors pulling systemic cases toward cardiovascular.Source: §6 · p. 15
- Broad diagnostic labels are harder to audit because their language overlaps with specific categories; the authors recommend specific ontologies and refining or manually reviewing the residual systemic class.The paper links this difficulty to the model's lack of task-specific supervision and reliance on pretraining lexical statistics.Source: §6 · p. 15
- The comparative analysis sampled one case per category, so larger inter-text studies are needed before extrapolating per-category averages to populations of inputs.The authors consider this sample sufficient to expose divergence across method families, but not to establish population-level variability.Source: §6 · p. 16
7. Scope of Validity and Limitations
The study's conclusions are bounded by its agreement metric, controlled sampling, model and corpus choice, and handling of stochastic explainers.
7. Scope of Validity and Limitations
- Top-20 Jaccard measures token-set overlap but discards ranking and absolute attribution magnitude; the choice of k=20 remains a design parameter.The authors identify ranking-aware measures and causal fidelity tests as extensions for assessing finer token hierarchies.Source: §7 · p. 16
- The comparative XAI phase uses one case per category, isolating method variance from text variance; broader sampling is needed to estimate failure-mode prevalence across patient cohorts.The error audit examines five structured cases.Source: §7 · p. 16
- Evaluation is limited to zero-shot DeBERTa-v3-large on the Medical Abstracts corpus; other backbones and supervised fine-tuning regimes remain untested.LLiMe and AttnLRP were excluded because of computational constraints and compatibility limits.Source: §7 · p. 16
- A fixed random seed and 1,000-perturbation budget stabilize SHAP and LIME, but empirical variance across multiple random seeds remains to be evaluated.The stated budget keeps estimator variance within a narrow band.Source: §7 · p. 16
8. Conclusions and Future Work
The paper audits five explainers for zero-shot DeBERTa-v3 classification of medical abstracts. It finds that prediction and explanation stability align across clinical domains, while broad overlapping categories exhibit failure mechanisms that motivate specific ontologies and further methodological work.
8. Conclusions and Future Work
- Explanatory agreement tracks predictive performance: specific, well-defined categories show higher accuracy and a shared clinical core, while broad overlapping classes show predictive collapse and fragmented attributions.The error analysis identifies lexical hypersensitivity, semantic overlap, and loss of attribution coherence as systemic failure mechanisms in zero-shot NLI architectures.Source: §8 · p. 16
- The audit recommends multiple explainers, agreement metrics over standardized Top-k tokens, and specific clinical ontologies when auditability is required.The authors identify broad diagnostic labels as a less suitable alternative to specific ontologies for this purpose.Source: §8 · p. 16
- Future work proposes adding explainers, fuzzy Jaccard, ontology-based concept mapping, and auditing across other domains and data modalities.The named methods include LLiMe, AttnLRP, and CA-LIG; proposed extensions include Computer Vision and tabular data.Source: §8 · p. 16
CRediT authorship contribution statement
The authors share conceptualization and methodology contributions, with additional roles spanning software, analysis, validation, resources, supervision, and writing.
CRediT authorship contribution statement
- Javier Díaz Esteban-Herreros is credited with software, formal analysis, investigation, data curation, visualization, and original-draft writing, alongside conceptualization and methodology.David Muñoz-Valero is credited with validation, supervision, and writing and editing, as well as conceptualization and methodology.Source: CRediT authorship contribution statement · p. 17
- Raquel Martínez-España is credited with validation, supervision, and writing and editing, alongside conceptualization and methodology.Source: CRediT authorship contribution statement · p. 17
- Jose M. Juarez and Juan Moreno-García are credited with resources and supervision, alongside conceptualization, methodology, and writing and editing.Source: CRediT authorship contribution statement · p. 17