Efficient Whole Slide Pathology VQA via Token Compression
Weimin Lyu, Qingqiao Hu, Kehan Qi, Zhan Shi, Wentao Huang, Saumya Gupta, Chao Chen
TL;DR
This work tackles the challenge of visual question answering on gigapixel whole-slide images by introducing TCP-LLaVA, a multimodal LLM that compresses thousands of patch- and text-tokens into a small set of trainable compression tokens via a Modality Compression Module. Only these fixed-length compressed tokens are passed to the LLM, enabling end-to-end VQA with dramatically reduced input length and computational cost while retaining diagnostic reasoning. The approach achieves state-of-the-art accuracy on a TCGA-based multi-tumor QA benchmark (average $78.57\%$) and delivers substantial efficiency gains (input reduction >$99\%$; TFLOPS and throughput improvements). This token-compression paradigm makes scalable WSI VQA feasible on standard hardware and opens avenues for extending to generative pathology tasks.
Abstract
Whole-slide images (WSIs) in pathology can reach up to 10,000 x 10,000 pixels, posing significant challenges for multimodal large language model (MLLM) due to long context length and high computational demands. Previous methods typically focus on patch-level analysis or slide-level classification using CLIP-based models with multi-instance learning, but they lack the generative capabilities needed for visual question answering (VQA). More recent MLLM-based approaches address VQA by feeding thousands of patch tokens directly into the language model, which leads to excessive resource consumption. To address these limitations, we propose Token Compression Pathology LLaVA (TCP-LLaVA), the first MLLM architecture to perform WSI VQA via token compression. TCP-LLaVA introduces a set of trainable compression tokens that aggregate visual and textual information through a modality compression module, inspired by the [CLS] token mechanism in BERT. Only the compressed tokens are forwarded to the LLM for answer generation, significantly reducing input length and computational cost. Experiments on ten TCGA tumor subtypes show that TCP-LLaVA outperforms existing MLLM baselines in VQA accuracy while reducing training resource consumption by a substantial margin.
