QG-MIL:用于医学影像中领域无关多实例学习的门控Transformer聚合器
QG-MIL: A Gated Transformer Aggregator for Domain-Agnostic Multiple Instance Learning in Medical Imaging
June 18, 2026
作者: Luca Zedda, Davide Antonio Mura, Cecilia Di Ruberto, Maurizio Atzori, Muhammed Furkan Dasdelen, Carsten Marr, Andrea Loddo
cs.AI
摘要
在医学影像中,基于注意力的多实例学习聚合器容易出现注意力集中问题,导致预测过于自信且不稳定。我们提出 QG-MIL,一种门控变换器聚合器,通过四个协同架构组件解决这一问题:基于 RMSNorm 的预归一化、逐头 QK 归一化、细粒度注意力输出门控以及 SwiGLU 风格的前馈模块。这些设计选择共同稳定了训练过程,并在无需辅助损失、掩码或多阶段正则化的情况下,使注意力更均匀地分布于各实例。我们在涵盖全切片病理学与细胞级血液学的六个基准数据集上评估了 QG-MIL,这些数据集代表了两种根本不同的多实例学习尺度。性能最佳的 QG-MIL 变体在所有六个基准上均超越了领先基线方法,平均宏 F1 分数提升了 6.1 个点。注意力覆盖图与注意力质量分析证实了更分散的实例加权。消融研究表明,虽然单个组件在特定数据集上可与完整模型相媲美,但 QG-MIL 设计在所选基线方法中提供了最一致的跨领域性能和最紧凑的方差。我们发布了可配置的实现代码,以支持可复现性,详见:https://github.com/unica-visual-intelligence-lab/QG-MIL
English
Attention-based Multiple Instance Learning aggregators in medical imaging are prone to attention concentration, producing overconfident and unstable predictions. We introduce QG-MIL, a gated transformer aggregator that addresses this through four synergistic architectural components: RMSNorm-based pre-normalization, per-head QK normalization, fine-grained attention output gating, and SwiGLU-style feed-forward modules. Together, these design choices stabilize training and distribute attention more uniformly across instances without auxiliary losses, masking, or multi-stage regularization. We evaluate QG-MIL across six benchmarks spanning whole-slide pathology and cell-level hematology, covering two fundamentally different MIL scales. The best-performing QG-MIL variants outperform leading baselines on all six benchmarks, with an average improvement of +6.1 mean macro F1 points. Attention overlays and attention mass analysis confirm more distributed instance weighting. Ablation studies show that while individual components can match the full model on specific datasets, the QG-MIL design provides the most consistent cross-domain performance and tightest variance when compared to selected baselines. We release a configurable implementation to support reproducibility at: https://github.com/unica-visual-intelligence-lab/QG-MIL