| Study fact | Verified value |
|---|---|
| Raw images discovered | 7,023 |
| Exact duplicates removed | 297 |
| Unique images retained | 6,726 |
| Held-out test images | 1,284 |
| Best test accuracy | 99.22% |
| Best macro-F1 | 0.9920 |
| Fewest test errors | 10 |
Visual assets from
Mitigating Shortcut Learning in Brain Tumour MRI Classification
4 Charts
4 Images
9 Tables
| Model | CNN pathway | Transformer pathway | Guidance intervention |
|---|---|---|---|
| Hybrid A | ResNet50V2 descriptor | 49 CNN feature tokens | PFD mask guides transformer-facing tokens |
| Ablation A | Matched A-family backbone | Same tokenisation | PFD–GSTE removed |
| Hybrid B | PFD-gated ResNet50V2 descriptor | 196 raw-image patch tokens before optional pooling | PFD gates CNN evidence and guides patch tokens |
| Ablation B | Matched B-family backbone | Same tokenisation | PFD–GSTE removed |
Hybrid A architecture showing ResNet50V2, PFD guidance, 49 CNN feature tokens, RViT processing, and late fusion.
| Property | Hybrid A | Hybrid B |
|---|---|---|
| Initial transformer tokens | 49 CNN feature tokens | 196 raw-image patch tokens |
| CNN descriptor | Ungated | PFD-gated |
| Guidance reach | Transformer-facing pathway | CNN and transformer pathways |
| Token count | Fixed | Optional concentration-aware pooling |
| Trainable parameters | 26.68M | 26.58M |
| Split | Glioma | Meningioma | Pituitary | No tumour | Total |
|---|---|---|---|---|---|
| Train | 1,057 | 1,064 | 1,152 | 1,080 | 4,353 |
| Validation | 264 | 267 | 288 | 270 | 1,089 |
| Test | 299 | 304 | 300 | 381 | 1,284 |
Original Kaggle split composition.
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.
| Component | Setting |
|---|---|
| Optimiser | AdamW |
| CNN learning rate | $10^{-4}$ |
| Transformer and fusion learning rate | $5\times10^{-4}$ |
| Weight decay | 0.01 |
| Objective | Cross-entropy with label smoothing 0.05 |
| Schedule | Cosine annealing, $\eta_{\min}=10^{-6}$ |
| Batch size | 32 |
| Maximum epochs | 100 |
| CNN warm-up | Frozen for first 5 epochs |
| Early stopping | Validation macro-F1, patience 10 |
| Gradient clipping | 1.0 |
| Random seed | 42 |
Guided-model learning curves. Hybrid B reached its best validation macro-F1 at epoch 14.
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 →| Model | Params | Accuracy | Macro-F1 | Loss | Specificity | $\kappa$ | MCC | Errors | Best epoch |
|---|---|---|---|---|---|---|---|---|---|
| Hybrid A | 26.68M | 0.9875 | 0.9875 | 0.0803 | 0.9959 | 0.9833 | 0.9833 | 16 | 43 |
| Hybrid B | 26.58M | 0.9852 | 0.9849 | 0.0753 | 0.9952 | 0.9802 | 0.9803 | 19 | 14 |
| Ablation A | 26.68M | 0.9875 | 0.9873 | 0.0847 | 0.9959 | 0.9833 | 0.9834 | 16 | 30 |
| Ablation B | 26.58M | 0.9922 | 0.9920 | 0.0668 | 0.9975 | 0.9896 | 0.9896 | 10 | 42 |
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 →| Case | Hybrid A | Hybrid B | Ablation A | Ablation B |
|---|---|---|---|---|
| Correct meningioma | GC++ wrong; rollout partially correct | GC++ correct; rollout wrong | GC++ wrong; rollout partially correct | GC++ correct; rollout wrong |
| Challenging glioma | GC++ wrong; rollout wrong | GC++ correct; rollout partially wrong | GC++ correct; rollout partially wrong | GC++ partially wrong; rollout partially wrong |
| Pituitary → meningioma error | GC++ wrong; rollout wrong | GC++ correct; rollout partially correct | GC++ wrong; rollout partially correct | GC++ wrong; rollout partially correct |
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 →| Dimension | Verified now | Completion gate |
|---|---|---|
| Research integrity | Exact reported values, negative ablation outcomes, authorship, and limitations are preserved | Keep all claims traceable to report, code, or released artefacts |
| Open artefacts | Public code, checkpoints, model cards, PyPI package, report, and machine-readable article data | Publish this article repository with a versioned release and build check |
| Statistical robustness | One seeded training run per variant | Run at least five matched seeds per variant; report mean, standard deviation, 95% confidence intervals, and paired within-family deltas |
| Fair comparison | Guided variants have same-family ablations | Use the same loader policy, preprocessing manifest, checkpoint rule, and deterministic settings in the repeated-seed rerun |
| Calibration | Twenty-pass MC Dropout summaries for selected examples | Archive validation and test probabilities; report NLL, multiclass Brier score, ECE, reliability diagrams, and validation-fitted temperature scaling |
| External generalisation | A five-image external meningioma sample exists only as a qualitative demo | Evaluate a provenance-audited external cohort with compatible labels and no overlap with the development benchmark |
| XAI validation | Grad-CAM++ and Attention Rollout are reviewed on three selected cases | Evaluate a preregistered masked subset with Dice, IoU, pointing-game or localisation-error metrics plus saliency sanity checks |
| Clinical evidence | None claimed | Independent clinical governance, representative cohorts, and prospective validation would be required before any clinical claim |
| Resource | Access |
|---|---|
| Model and experiment code | GitHub repository |
| Browser demonstration | Hugging Face Space |
| Reusable modules | PFD–GSTE on PyPI |
| Machine-readable website data | app/src/content/assets/data/ in this article repository |
| Evidence-upgrade protocol | <code>VALIDATION_PLAN.md</code> in the article repository |