Skip to main content
Back

Stony Brook's LoC-Path Cuts Gigapixel Slide AI Costs by 82%

Researchers propose LoC-Path, a resource-efficient slide-level pathology MLLM that compresses gigapixel visual tokens before routing only query-relevant latents to the LLM.

Pro

Paper, Full Access
  • Stony Brook and Harvard Medical School researchers introduce LoC-Path, a compression-first slide-level pathology MLLM.
  • Analysis of ~2k TCGA slides shows only 35.2% of tiles carry 90% of report-aligned similarity mass.
  • Pipeline stacks Sparse Token Merger, MAE-pretrained resampler, Token Importance Scorer, and Cross-Attention Routing Adapter modules.
  • Cuts inference TFLOPs by 81.91% and peak memory by 38.9% versus LLaVA-style slide MLLM baselines.
  • Achieves highest WSI-Precision (0.384) and WSI-Relevance (0.473) on WSI-Bench report generation task.
  • Struggles with treatment-planning specificity and occasionally hallucinates fine-grained report attributes like Nottingham scores.

Whole slide images (WSIs) are the digital equivalent of a pathologist's glass slide, and they routinely stretch past ten thousand pixels on each side. Feeding that much visual data into a multimodal LLM has been the central engineering headache of computational pathology, and a team from Stony Brook University, working with a co-author at the Athinoula A. Martinos Center for Biomedical Imaging (Massachusetts General Hospital / Harvard Medical School), just published a paper laying out a slimmer path forward.

Their system, LoC-Path (Learning to Compress for Pathology MLLMs), is built around a simple observation: WSI tile features are highly redundant at both global and local scales, while task-relevant evidence is sparse and query-dependent. If most of a slide is diagnostically uninteresting, why pay to attend to it?

Why gigapixel slides break the usual recipe

Most existing slide-level MLLMs follow a LLaVA-style late-fusion pattern: turn every tile into a visual token, concatenate the resulting sequence with the text prompt, and let the LLM self-attend across the whole thing. That works for a normal photograph. For a whole-slide image, the visual sequence explodes into thousands of tokens per case, and the LLM is asked to hunt for a needle in a haystack under very weak slide-level supervision (one report per slide, not one caption per tile).

The authors ran a preliminary analysis on roughly 2,000 TCGA slides to quantify how bad the redundancy is. Two findings stood out:

  • A small set of K≈250 prototype groups can fairly well reconstruct the entire tile feature set, meaning most tokens are near-duplicates of a much smaller set.
  • The top 35.2% of tile tokens account for 90% of the total cosine similarity with the report text, so the majority of tokens are simply irrelevant to what the model is asked about.

Compress first, then route

LoC-Path replaces the heavy slide-level encoder plus long visual prefix combo with four lightweight modules that squeeze the sequence in stages before it ever reaches the LLM.

LoC-Path architecture diagram showing STM, resampler, TIS, and CARA modules
  1. Sparse Token Merger (STM). Non-overlapping s by s windows on the 2D tile grid are averaged into one token, killing local redundancy before anything else runs.
  2. MAE-pretrained resampler. A small set of learnable latent queries pulls information from the merged sequence via sparse Top-K cross-attention. It is trained by masking 75% of tiles and asking it to reconstruct them, which forces different latents to specialize on complementary regions.
  3. Token Importance Scorer (TIS). Given the text query, TIS ranks the compressed latents and keeps only the Top-M most relevant ones. It is trained by distilling the cross-attention weights of the fusion layers, so no extra labels are needed.
  4. Cross-Attention Routing Adapter (CARA). Instead of concatenating vision and text, CARA injects the selected latents into a handful of decoder layers (the authors use layers 1, 3, 5, 7 of Qwen2.5-7B-Instruct) via gated cross-attention.

The complexity swap is the whole point. LLaVA-style fusion applies self-attention over the concatenated sequence, incurring O((T+L)^2) attention cost per layer. In contrast, our design keeps self-attention on text only and injects vision via cross-attention on a routed set of M≤L latents. When L is in the thousands, routing to a small M is dramatically cheaper.

What the numbers say

The team trained on WSI-Bench, introduced in WSI-LLaVA, which has over 9,000 WSIs and more than 170,000 VQA pairs, and evaluated zero-shot on Slide-Bench (from SlideChat, which uses out-of-distribution BCNB slides) and a Path-Bench subset. Tile features come from CONCH-V1 at 20x magnification.

On the WSI-Bench test set, LoC-Path lands close to strong slide-level MLLMs while cutting inference cost sharply. Compared to the mean of general baselines, the inference TFLOPs of our model (L=128/M=96) are 81.91% lower than the mean of all General baselines, and inference memory is also 38.9% lower. Time-to-first-token also stays nearly flat as the visual token count grows, whereas SlideChat's cost balloons.

Coverage map and latent attention distribution visualization for WSI

Where LoC-Path shines is report generation. It posts the highest WSI-Precision (0.384) and WSI-Relevance (0.473), two GPT-4o-judged metrics that the WSI-LLaVA authors argue are more clinically meaningful than BLEU or ROUGE. On out-of-distribution Slide-Bench it lands slightly behind DivPrune and average pooling, and on Cox survival it trails encoders like PRISM and GigaPath, which the authors attribute to their much smaller pretraining set (9k slides versus millions).

Where it falls short

The qualitative analysis is refreshingly honest. On treatment planning, the model gravitates toward generic guideline-style regimens and under-emphasizes case-specific constraints like biomarkers. On report generation, it correctly captures tumor type and grade but sometimes hallucinates fine-grained details such as Nottingham scores or microcalcifications. In other words, coarse diagnostic intent is reliable, granular decision-critical details are not.

The paper is on arXiv with full ablations, complexity analysis, and MAE reconstruction visualizations in the supplementary. No code or model release is announced in the paper itself. For teams building slide-level assistants on limited hardware, the design principle here (compress locally, compress globally, then route only what the query needs) is a useful template even if you swap out individual modules.