Skip to main content
QUICK REVIEW

[论文解读] Rethinking Transformer for Long Contextual Histopathology Whole Slide Image Analysis

Honglin Li, Yunlong Zhang|arXiv (Cornell University)|Oct 18, 2024
AI in cancer detectionComputer Science被引用 3
一句话总结

本文提出 LongMIL,一种用于组织病理学全切片图像(WSI)分析的局部-全局混合 Transformer 模型,解决了标准自注意力机制在长序列中面临的计算与表征限制。通过引入可学习的局部注意力掩码,提升注意力矩阵的秩,并借助分块计算实现线性复杂度,LongMIL 在 WSI 任务中实现了更优的性能、更高的内存效率与泛化能力,优于 TransMIL 和 HIPT 等方法。

ABSTRACT

Histopathology Whole Slide Image (WSI) analysis serves as the gold standard for clinical cancer diagnosis in the daily routines of doctors. To develop computer-aided diagnosis model for WSIs, previous methods typically employ Multi-Instance Learning to enable slide-level prediction given only slide-level labels. Among these models, vanilla attention mechanisms without pairwise interactions have traditionally been employed but are unable to model contextual information. More recently, self-attention models have been utilized to address this issue. To alleviate the computational complexity of long sequences in large WSIs, methods like HIPT use region-slicing, and TransMIL employs approximation of full self-attention. Both approaches suffer from suboptimal performance due to the loss of key information. Moreover, their use of absolute positional embedding struggles to effectively handle long contextual dependencies in shape-varying WSIs. In this paper, we first analyze how the low-rank nature of the long-sequence attention matrix constrains the representation ability of WSI modelling. Then, we demonstrate that the rank of attention matrix can be improved by focusing on local interactions via a local attention mask. Our analysis shows that the local mask aligns with the attention patterns in the lower layers of the Transformer. Furthermore, the local attention mask can be implemented during chunked attention calculation, reducing the quadratic computational complexity to linear with a small local bandwidth. Building on this, we propose a local-global hybrid Transformer for both computational acceleration and local-global information interactions modelling. Our method, Long-contextual MIL (LongMIL), is evaluated through extensive experiments on various WSI tasks to validate its superiority. Our code will be available at github.com/invoker-LL/Long-MIL.

研究动机与目标

  • 为解决在长序列全切片图像(WSIs)中自注意力机制存在的低秩瓶颈问题,该问题限制了上下文表征能力。
  • 在不牺牲性能的前提下,降低大尺寸 WSI 中完整自注意力机制的二次方计算复杂度。
  • 通过用局部归纳偏置替代绝对位置嵌入,提升模型对未见或欠拟合位置的泛化能力。
  • 通过混合注意力机制,有效建模 WSI 中的局部与全局交互关系。
  • 在多样化的 WSI 基准上验证方法,评估指标包括准确率、速度、内存占用及外推能力。

提出的方法

  • 引入可学习的局部注意力掩码,将自注意力限制在小范围局部带宽内,从而提升注意力矩阵的秩。
  • 在分块注意力计算中应用该局部掩码,将计算复杂度从 O(n²) 降低至 O(n),且带宽较小。
  • 设计一种局部-全局混合 Transformer 架构,结合局部注意力以捕捉细粒度上下文,同时利用全局注意力建模长距离依赖。
  • 采用相对位置编码替代绝对位置嵌入,以更好地处理形状多变的 WSI,并提升泛化能力。
  • 采用两阶段训练策略:首先冻结 patch 嵌入,随后使用 WSI 级标签进行微调,实现任务特定适应。
  • 通过消融实验验证方法在 patch 尺寸、注意力变体及与线性注意力机制(如 RetNet 和 Mamba)集成方面的有效性。

实验结果

研究问题

  • RQ1为何尽管标准自注意力机制具备建模长距离依赖的能力,但在 WSI 分析中仍表现不佳?
  • RQ2注意力矩阵的低秩特性如何限制长序列 WSI 建模中的表征学习?
  • RQ3局部注意力掩码能否提升注意力矩阵的秩,并增强 WSI 任务中的模型性能?
  • RQ4用局部归纳偏置替代绝对位置嵌入,是否能提升模型对未见或欠拟合位置的泛化能力?
  • RQ5混合局部-全局注意力机制能否在 WSI 分析中同时实现计算效率与高性能?

主要发现

  • LongMIL 在 BRACS 肿瘤亚型分类任务中取得 F1 分数 0.706 ± 0.025 和 AUC 0.888 ± 0.019,优于 TransMIL(F1: 0.648 ± 0.054,AUC: 0.835 ± 0.031)和 AB-MIL(F1: 0.668 ± 0.032,AUC: 0.866 ± 0.016)。
  • 通过分块局部注意力,将计算复杂度从 O(n²) 降低至 O(n),使模型可在包含超过 50,000 个 patch 的 WSI 上训练而不会发生内存溢出。
  • 消融实验证实,LongMIL 对未见或欠拟合位置的泛化能力优于使用绝对位置嵌入的模型。
  • 将线性注意力模块(如 RetNet、Mamba)集成至 LongMIL 后,仍保持高性能(F1: 0.690 ± 0.051,AUC: 0.848 ± 0.013),同时维持线性复杂度。
  • 局部注意力掩码通过实证分析验证了其对注意力矩阵秩的提升作用,尤其在低层 Transformer 层中注意力模式表现明显。
  • LongMIL 在准确率与推理速度方面均优于 SOTA 方法如 HIPT 和 TransMIL,尤其在高倍放大 WSI 上优势显著。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。