← Back to article

Visual assets from

Mitigating Shortcut Learning in Brain Tumour MRI Classification

4 Charts
4 Images
9 Tables
#1 Table
Study factVerified value
Raw images discovered7,023
Exact duplicates removed297
Unique images retained6,726
Held-out test images1,284
Best test accuracy99.22%
Best macro-F10.9920
Fewest test errors10
#2 Table
ModelCNN pathwayTransformer pathwayGuidance intervention
Hybrid AResNet50V2 descriptor49 CNN feature tokensPFD mask guides transformer-facing tokens
Ablation AMatched A-family backboneSame tokenisationPFD–GSTE removed
Hybrid BPFD-gated ResNet50V2 descriptor196 raw-image patch tokens before optional poolingPFD gates CNN evidence and guides patch tokens
Ablation BMatched B-family backboneSame tokenisationPFD–GSTE removed
#3 Stack

Hybrid A architecture showing ResNet50V2, PFD guidance, 49 CNN feature tokens, RViT processing, and late fusion.

Hybrid A architecture showing ResNet50V2, PFD guidance, 49 CNN feature tokens, RViT processing, and late fusion.
Hybrid B architecture showing PFD-gated CNN evidence, 196 raw-image patch tokens, GSTE guidance, optional dynamic weighted pooling, RViT processing, and late fusion.
#4 Table
PropertyHybrid AHybrid B
Initial transformer tokens49 CNN feature tokens196 raw-image patch tokens
CNN descriptorUngatedPFD-gated
Guidance reachTransformer-facing pathwayCNN and transformer pathways
Token countFixedOptional concentration-aware pooling
Trainable parameters26.68M26.58M
#5 Table
SplitGliomaMeningiomaPituitaryNo tumourTotal
Train1,0571,0641,1521,0804,353
Validation2642672882701,089
Test2993043003811,284
#6 Stack

Original Kaggle split composition.

Original Kaggle training and testing class counts before duplicate removal.
Original Kaggle split composition.
Class distribution after exact duplicate removal.
Class balance after deduplication.
#7 Image

Representative brain MRI images inspected during the rule-based raw-image audit.

Representative raw-image audit panel. The report recorded zero unreadable, too-dark, too-bright, or low-contrast files under its rule-based checks.

Representative brain MRI images inspected during the rule-based raw-image audit.
Representative raw-image audit panel. The report recorded zero unreadable, too-dark, too-bright, or low-contrast files under its rule-based checks.
#8 Table
ComponentSetting
OptimiserAdamW
CNN learning rate$10^{-4}$
Transformer and fusion learning rate$5\times10^{-4}$
Weight decay0.01
ObjectiveCross-entropy with label smoothing 0.05
ScheduleCosine annealing, $\eta_{\min}=10^{-6}$
Batch size32
Maximum epochs100
CNN warm-upFrozen for first 5 epochs
Early stoppingValidation macro-F1, patience 10
Gradient clipping1.0
Random seed42
#9 Stack

Guided-model learning curves. Hybrid B reached its best validation macro-F1 at epoch 14.

Training and validation loss, accuracy, and macro-F1 curves for Hybrid A and Hybrid B.
Guided-model learning curves. Hybrid B reached its best validation macro-F1 at epoch 14.
Training and validation loss, accuracy, and macro-F1 curves for Ablation A and Ablation B.
Ablation learning curves. Late fluctuations support validation-based early stopping rather than final-epoch selection.
#10 Chart

Held-out performance explorer

Switch metrics to compare all four variants. Percentage axes are intentionally zoomed and labelled; the error view uses the absolute count from 1,284 test images.

View in article →
#11 Table
ModelParamsAccuracyMacro-F1LossSpecificity$\kappa$MCCErrorsBest epoch
Hybrid A26.68M0.98750.98750.08030.99590.98330.98331643
Hybrid B26.58M0.98520.98490.07530.99520.98020.98031914
Ablation A26.68M0.98750.98730.08470.99590.98330.98341630
Ablation B26.58M0.99220.99200.06680.99750.98960.98961042
#12 Chart

Classification–localisation trade-off

Horizontal position is held-out test accuracy. Vertical position is the number of Grad-CAM++ judgements marked “Correct” in the three selected report cases. The vertical axis is qualitative and n=3—not a segmentation score.

View in article →
#13 Table
CaseHybrid AHybrid BAblation AAblation B
Correct meningiomaGC++ wrong; rollout partially correctGC++ correct; rollout wrongGC++ wrong; rollout partially correctGC++ correct; rollout wrong
Challenging gliomaGC++ wrong; rollout wrongGC++ correct; rollout partially wrongGC++ correct; rollout partially wrongGC++ partially wrong; rollout partially wrong
Pituitary → meningioma errorGC++ wrong; rollout wrongGC++ correct; rollout partially correctGC++ wrong; rollout partially correctGC++ wrong; rollout partially correct
#14 Chart

Confidence on the shared pituitary → meningioma error

Mean confidence over 20 MC Dropout passes. The axis is zoomed to 90–100% and must not be interpreted as a calibration curve.

View in article →
#15 Table
DimensionVerified nowCompletion gate
Research integrityExact reported values, negative ablation outcomes, authorship, and limitations are preservedKeep all claims traceable to report, code, or released artefacts
Open artefactsPublic code, checkpoints, model cards, PyPI package, report, and machine-readable article dataPublish this article repository with a versioned release and build check
Statistical robustnessOne seeded training run per variantRun at least five matched seeds per variant; report mean, standard deviation, 95% confidence intervals, and paired within-family deltas
Fair comparisonGuided variants have same-family ablationsUse the same loader policy, preprocessing manifest, checkpoint rule, and deterministic settings in the repeated-seed rerun
CalibrationTwenty-pass MC Dropout summaries for selected examplesArchive validation and test probabilities; report NLL, multiclass Brier score, ECE, reliability diagrams, and validation-fitted temperature scaling
External generalisationA five-image external meningioma sample exists only as a qualitative demoEvaluate a provenance-audited external cohort with compatible labels and no overlap with the development benchmark
XAI validationGrad-CAM++ and Attention Rollout are reviewed on three selected casesEvaluate a preregistered masked subset with Dice, IoU, pointing-game or localisation-error metrics plus saliency sanity checks
Clinical evidenceNone claimedIndependent clinical governance, representative cohorts, and prospective validation would be required before any clinical claim
#16 Table
ResourceAccess
Model and experiment codeGitHub repository
Browser demonstrationHugging Face Space
Reusable modulesPFD–GSTE on PyPI
Machine-readable website dataapp/src/content/assets/data/ in this article repository
Evidence-upgrade protocol<code>VALIDATION_PLAN.md</code> in the article repository