TriFusion-MRI: Multi-Architecture Brain Tumor MRI Classification & Calibration Suite
Official persistent experiment and model repository for the research paper:
"TriFusion-MRI: Multi-Center Calibrated Tri-Architecture Ensemble for Diagnostic Brain Tumor Classification"
- Target Classification: 4-Class (
glioma,meningioma,pituitary,no_tumor) - Benchmark Scale: 10 Deep Architectures × 5 Folds × 4 Seeds = 200 Independent Cross-Validation Runs
- Hardware Profiled: Dual Tesla T4 GPUs (Distributed Parallel Cloud Cluster)
- Proposed Architecture: TriFusion-MRI (Optimal OOF-Calibrated Dual-Branch Ensemble)
- Top Ensemble Performance: 99.00% Macro-F1 | 99.00% Accuracy | 0.9867 MCC | 0.9867 Cohen's $\kappa$ | 0.006 ECE
- Inference Throughput: 140.3 FPS (25.29 ms/slice single-slice latency on Tesla T4)
1. Master Benchmark Leaderboard (4-Seed Aggregated OOF, $N=6,102$)
All models evaluated strictly under zero-data-leakage Stratified Group K-Fold cross-validation:
| Model Architecture | Model Family | Parameters | Macro-F1 (%) | Accuracy (%) | MCC | Latency $B=1$ | Throughput (FPS) |
|---|---|---|---|---|---|---|---|
| TriFusion-MRI (Ensemble) | Dual-Branch Fusion | 45.94M | 99.00% | 99.00% | 0.9867 | 25.29 ms | 140.3 |
tf_efficientnetv2_s | Efficient CNN | 20.18M | 98.95% | 98.95% | 0.9860 | 17.35 ms | 319.7 |
densenet121 | Dense CNN | 6.96M | 98.80% | 98.80% | 0.9841 | 15.60 ms | 293.3 |
inception_next_tiny | Modern CNN | 25.76M | 98.74% | 98.74% | 0.9832 | 7.94 ms | 250.1 |
convnext_base | Modern CNN | 87.57M | 98.74% | 98.74% | 0.9832 | 13.80 ms | 87.3 |
maxvit_tiny_tf_224 | Hybrid Attention | 30.41M | 98.72% | 98.72% | 0.9830 | 26.09 ms | 130.2 |
resnet50 | CNN Baseline | 23.52M | 98.61% | 98.61% | 0.9814 | 5.99 ms | 363.5 |
convnext_tiny | Modern CNN | 27.82M | 98.51% | 98.51% | 0.9801 | 5.90 ms | 264.8 |
swin_tiny | Hierarchical ViT | 27.52M | 98.18% | 98.18% | 0.9758 | 12.00 ms | 200.4 |
swin_base | Hierarchical ViT | 86.75M | 96.86% | 96.87% | 0.9583 | 21.63 ms | 64.6 |
vit_base_patch16_224 | Vision Transformer | 85.80M | 87.97% | 88.12% | 0.8424 | 16.29 ms | 72.8 |
2. External Multi-Center Validation (BRISC-2025)
Generalization across distinct hospital acquisition settings:
| Model Architecture | Internal Macro-F1 | External Macro-F1 | Domain Retention (%) | Generalization Grade |
|---|---|---|---|---|
| TriFusion-MRI | 0.9900 | 0.9842 | 99.41% | A+ |
tf_efficientnetv2_s | 0.9895 | 0.9815 | 99.19% | A |
densenet121 | 0.9880 | 0.9782 | 99.01% | A |
inception_next_tiny | 0.9874 | 0.9790 | 99.15% | A |
3. Publication Figures & LaTeX Tables
All publication assets are stored under figures/ (300 DPI PNG & vector PDF) and tables/ (CSV & LaTeX):
tables/final_paper_table.tex: Table I (Comprehensive 10-Architecture Benchmark Results).tables/table2_computational_complexity.tex: Table II (Real-Time Tesla T4 GPU Latency & FLOPs).tables/table3_external_generalization.tex: Table III (BRISC-2025 Multi-Center Domain Generalization).tables/table4_ablation_study.tex: Table IV (Conventional Ablation Study: Branches, Weights & Seeds).tables/table5_statistical_significance.tex: Table V (Formal Inferential Significance: McNemar, Wilcoxon, DeLong, Bootstrap CIs).tables/table6_clinical_reader_study.tex: Table VI (Multi-Reader Clinical Study & AI-Assisted Radiologist Concordance).tables/table7_prospective_simulation_protocol.tex: Table VII (Prospective PACS Deployment Protocol & Streaming Latency).tables/table_auc_roc_master.tex: Table VIII (Multi-Class AUC-ROC Evaluation across all Classes).tables/table_per_class_diagnostic_metrics.tex: Table IX (Per-Class Sensitivity, Specificity, Precision, and F1).figures/fig1_model_benchmark_comparison.png&.pdf: Macro-F1 architecture performance comparison with 95% CIs.figures/fig2_trifusion_confusion_matrix.png&.pdf: Normalized 4×4 confusion matrix across 6,102 cross-validated MRI slices.figures/fig3_diversity_correlation_matrix.png&.pdf: Pairwise prediction diversity and error covariance heatmap.figures/fig4_calibration_reliability_diagram.png&.pdf: Pre- vs post-temperature scaling reliability diagram (ECE reduced to 0.006).figures/fig5_gradcam_xai_localization.png&.pdf: Explainable AI Grad-CAM saliency localization heatmaps.figures/fig6_uncertainty_quantification.png&.pdf: Predictive entropy separation and selective retention triage curve.figures/fig7_ablation_study_breakdown.png&.pdf: Component ablation and multi-seed scaling analysis.figures/fig8_bootstrap_confidence_distributions.png&.pdf: Non-parametric bootstrap distributions (B=1,000 resamples) with 95% CIs.figures/fig9_clinician_decision_framework.png&.pdf: Multi-reader inter-observer agreement and clinician-in-the-loop triage workflow.figures/fig10_prospective_pacs_workflow.png&.pdf: Prospective PACS silent shadow deployment and multi-center translation roadmap.
4. Quick Inference Example
import torch
import timm
from PIL import Image
from torchvision import transforms
from huggingface_hub import hf_hub_download
# 1. Download TriFusion checkpoint weights
repo_id = "MoshinAli/brain-tumor-mri-experiments"
eff_ckpt = hf_hub_download(repo_id=repo_id, filename="checkpoints/tf_efficientnetv2_s/seed_42/fold_1/best.pt")
inc_ckpt = hf_hub_download(repo_id=repo_id, filename="checkpoints/inception_next_tiny/seed_42/fold_1/best.pt")
# 2. Instantiate and load models
classes = ["glioma", "meningioma", "pituitary", "no_tumor"]
m1 = timm.create_model("tf_efficientnetv2_s", pretrained=False, num_classes=4)
m1.load_state_dict(torch.load(eff_ckpt, map_location="cpu"))
m1.eval()
m2 = timm.create_model("inception_next_tiny", pretrained=False, num_classes=4)
m2.load_state_dict(torch.load(inc_ckpt, map_location="cpu"))
m2.eval()
# 3. Transform input MRI slice
tfms = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
])
img = Image.open("sample_mri.jpg").convert("RGB")
x = tfms(img).unsqueeze(0)
# 4. TriFusion-MRI Weighted Ensemble Forward Pass
with torch.no_grad():
p1 = torch.softmax(m1(x), dim=1)
p2 = torch.softmax(m2(x), dim=1)
p_ens = 0.8329 * p1 + 0.1671 * p2
pred_class = classes[p_ens.argmax().item()]
confidence = p_ens.max().item()
print(f"Diagnosis: {pred_class} (Confidence: {confidence*100:.2f}%)")
Citation
@article{mri_trifusion2026,
title={TriFusion-MRI: Multi-Center Calibrated Tri-Architecture Ensemble for Diagnostic Brain Tumor Classification},
author={Ali, Moshin and Contributors},
journal={IEEE Transactions on Medical Imaging (Under Review)},
year={2026}
}