Imagine you’re a pathologist. You’re looking at a "whole-slide image"—a digital file so massive it contains roughly 10,000 high-resolution tiles of tissue. Your job is to condense that mountain of visual data into a few paragraphs of precise, structured prose.
Current AI attempts at this task usually follow a "decode and hope" strategy. They feed the image into a large language model (LLM) and let it generate text token-by-token. The problem? These models often "play it safe," producing short, generic reports that miss rare findings or, worse, hallucinate clinical details that aren't even visible on the slide.
The researchers behind CLASP (Claim- and Structure-Planned generation) realized that writing a report shouldn't be a word-by-word guessing game. It should be a planned operation.
TL;DR
CLASP shifts pathology report generation from "decoding and hoping" to "deciding then decoding." By explicitly planning a report’s structure and specific clinical findings before writing a single word, a compact 35M-parameter model can outperform 7B-parameter giants while significantly reducing clinical contradictions.
What Problem Does This Paper Address?
Generating pathology reports from Whole-Slide Images (WSIs) is a "needle in a haystack" problem. Diagnostic evidence is sparse, yet the resulting reports must follow strict hospital-specific formats and include a laundry list of findings (tumor grade, margins, lymph node status, etc.).
Standard models rely on beam search—a technique that picks the most likely next word. Unfortunately, beam search is biased toward brevity and common phrases. This leads to "under-generation," where the AI misses the nuanced details a human pathologist would include. Furthermore, standard slides (H&E stains) don't show everything; for instance, they can't definitively show hormone receptor status. Standard LLMs often guess these values anyway, leading to dangerous contradictions with actual clinical records.
Methods
CLASP introduces a "decide-then-decode" pipeline. Instead of letting the decoder make all the choices, CLASP makes three key decisions once per slide, before the prose is written:
- Exemplar Structure Prior (ESP): It looks at reports from visually similar cases to borrow a "skeleton"—the intended length and sentence-by-sentence plan.
- Calibrated Claim Decision (CCD): It uses a specialized classifier to decide which clinical "claims" (e.g., "invasive ductal carcinoma," "positive margin") are actually present in the slide.
- Claim-to-Sentence Placement (CSP): It maps those decided claims onto the sentences in the skeleton.
Only after this plan is set does the Plan-Conditioned Decoder (PCD)—a 35M parameter Transformer—actually write the report. To ensure the decoder sticks to the script, the authors use Structure-Anchored Sequence Training (SAST), which penalizes the model if it drifts from the pre-decided plan.
Datasets
The authors evaluated CLASP on:
- PathText-BRCA: The standard benchmark for breast cancer pathology reports.
- PathText-LUAD: A lung adenocarcinoma dataset used to test how well the model generalizes to different organs and unseen hospitals.
- TCGA Clinical Records: Used as an independent "ground truth" to check if the AI’s reports actually matched the patients' real-world medical data.
Key Insights and Ideas
- Structure is a Shortcut: The researchers found that simply picking a random report from the same hospital as the query slide gets you surprisingly close to state-of-the-art performance. This suggests that much of what we measure with standard metrics (like BLEU scores) is just the model's ability to mimic a hospital's formatting, not its diagnostic accuracy.
- The Power of "No": One of CLASP’s most elegant features is Explicit Abstention. If the model knows a certain finding (like receptor status) cannot be seen on an H&E slide, it can be programmed to withhold that claim entirely.
- Small is Mighty: By offloading the "thinking" to explicit decision modules, the actual text-writing part of the model can be tiny. CLASP’s 35M parameters are a drop in the bucket compared to a 7B-parameter Llama model, yet it produces more accurate clinical content.
Key Results
- Superior Performance: CLASP outperformed re-trained versions of previous state-of-the-art generators and even massive 7B-parameter multimodal LLMs on the PathText-BRCA benchmark.
- Clinical Fidelity: By using explicit abstention for receptor status, CLASP had 23% fewer contradictions with clinical records compared to the same network without the decision-making step.
- Generalization: Without any specific tuning for lung cancer, CLASP generalized to the LUAD dataset, outperforming baselines in transfer learning scenarios.
- Efficiency: The model generates a report in about 1.6 seconds on a standard workstation, making it highly practical for research use.
Limitations and Future Work
While CLASP is a major step forward, the authors note a few hurdles:
- Small Test Sets: The benchmarks used (92 and 44 patients) are relatively small for deep learning, which can lead to high variance in results.
- Closed-Source Baselines: Some high-performing models in the field (like RANGER) are not public, making direct, head-to-head re-training impossible.
- Future Directions: The authors suggest that scaling this to larger, multi-organ cohorts and integrating it with "decision-conditioned" LLMs (using the LLM only for the final prose realization) are the next logical steps.
In short, CLASP proves that in the high-stakes world of pathology, a good plan is worth a billion parameters.
Summary updated