CLASP: Deciding Structure and Claims Before Decoding for Whole-Slide Pathology Report Generation
Organizations: Digital Anti-aging Healthcare, Inje University, South Korea · Computing, Curtin University of Technology, Australia
Abstract
Whole-slide pathology report generation has advanced through stronger slide encoders, retrieved knowledge, and, recently, slide-level multimodal LLMs. However, these generators leave every report-level choice to the decoder: how long the report is, how it is organised, and which findings it states and where. On the standard PathText-BRCA benchmark, we find that these choices dominate n-gram overlap, as reports from the query's hospital selected without learning approach the state of the art, while decoders under-generate and fall back to the most frequent findings. We present CLASP, a decide-then-decode generator that makes these choices explicitly, once per slide. Before decoding, an Exemplar Structure Prior (ESP) takes the sentence plan and length from reports of image-similar cases, a Calibrated Claim Decision (CCD) selects the findings from calibrated slide posteriors, and a Claim-to-Sentence Placement (CSP) assigns each finding to a planned sentence. A Plan-Conditioned Decoder (PCD), refined by structure-anchored sequence training, then writes the report under these decisions. With 35M parameters, CLASP outperforms retrained report generators and slide-level LLMs of up to 7B parameters, matches the strongest published results, and generalises to lung cancer from unseen hospitals. Its decisions change what the reports state, not only their length, transfer to an LLM decoder, and can withhold what H&E cannot show: withholding receptor status leaves 23% fewer contradictions with clinical records than the same network without decisions.
Figures & tables
| Benchmark metrics | TCGA records | |||||||||
| Method | B-1 | B-2 | B-3 | B-4 | MTR | R-L | CIDEr | F1 | Contr. | CRQS |
| Published (quoted) | ||||||||||
| CNN-RNN | 0.371 | 0.185 | 0.089 | 0.043 | 0.143 | 0.239 | n/a | n/a | n/a | n/a |
| att-LSTM | 0.371 | 0.191 | 0.094 | 0.048 | 0.142 | 0.238 | n/a | n/a | n/a | n/a |
| Transformer | 0.389 | 0.246 | 0.157 | 0.103 | 0.158 | 0.257 | n/a | n/a | n/a | n/a |
| R2Gen | 0.378 | 0.243 | 0.160 | 0.107 | 0.179 | 0.279 | n/a | n/a | n/a | n/a |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Selection rule | Val | Test |
| Top-1 image-similar report | 0.101 | 0.107 |
| Consensus of 30 image-similar | 0.117 | 0.120 |
| Consensus of 30 with most similar true findings | 0.096 | 0.113 |
| Consensus of 30 random, same hospital (draw 1) | 0.129 | 0.135 |
| Consensus of 30 random, same hospital (draw 2) | 0.120 | 0.140 |
| Same hospital, 5 best-matching true findings | 0.134 | 0.127 |
| Len. | 1 to 50 | 51 to 100 | 101 to 150 | 151+ | Frag. % | Novel % | |
|---|---|---|---|---|---|---|---|
| References | 149 | n/a | n/a | n/a | n/a | 1.1 | 51.1 |
| Clasp -Base | 107 | 0.069 | 0.046 | 0.031 | n/a | 0.5 | 15.1 |
| Clasp -Base + length control | 152 | 0.069 | 0.045 | 0.025 | 0.015 | 0.7 | 21.0 |
| Esp , full | 145 | 0.068 | 0.042 | 0.024 | 0.010 | 3.8 | 25.3 |
| Esp , budget only | 146 | 0.067 | 0.042 | 0.019 | 0.016 | 3.2 | 24.4 |
| Esp , plan only | 143 | 0.070 | 0.040 | 0.016 | 0.014 | 5.0 | 24.4 |
| Sentence types | Length | Val BLEU-4 |
| prior ( Esp ) | prior ( Esp ) | 0.142 0.002 |
| best of 10 retrieved ∘ | prior | 0.141 0.002 |
| best of 30 retrieved ∘ | prior | 0.143 0.003 |
| reference ∘ | prior | 0.144 0.004 |
| prior | reference ∘ | 0.146 0.003 |
| reference ∘ | reference ∘ | 0.151 0.002 |
| Metric | RANGER | Clasp | 95% interval | Seeds | |
|---|---|---|---|---|---|
| BLEU-1 | 0.4598 | 0.450 0.007 | [0.418, 0.469] | 0/3 | 0.14 |
| BLEU-2 | 0.3044 | 0.310 0.003 | [0.286, 0.325] | 3/3 | 0.08 |
| BLEU-3 | 0.2036 | 0.214 0.003 | [0.195, 0.228] | 3/3 | 0.02 |
| BLEU-4 | 0.1435 | 0.1425 0.0026 | [0.1280, 0.1535] | 1/3 | 0.57 |
| METEOR | 0.1883 | 0.174 0.002 | [0.165, 0.182] | 0/3 | 0.00 |
| ROUGE-L | 0.3038 | 0.301 0.004 | [0.290, 0.311] | 1/3 | 0.27 |
| Variable | Truth classes (TCGA record) | test | Reader options |
|---|---|---|---|
| Histology | IDC / ILC / other incl. mixed | 92 | IDC, ILC, other or mixed, not stated |
| ER | positive / negative | 88 | positive, negative, not stated |
| PR | positive / negative | 88 | positive, negative, not stated |
| HER2 | positive / negative / equivocal | 75 | positive, negative, equivocal, not stated |
| Lymph nodes | pN0 ∗ / pN1+ incl. N1mi | 92 | metastasis present, nodes negative, not stated |
| Margin | positive / close / negative | 90 | positive, close, negative, not stated |
| Histology | ER | PR | HER2 | Nodes | Margin | Size | |
|---|---|---|---|---|---|---|---|
| Stated | 0.73 / 0.74 | 0.40 / 0.39 | 0.37 / 0.35 | 0.34 / 0.36 | 0.80 / 0.80 | 0.56 / 0.50 | 0.57 / 0.58 |
| Agreement when stated | 0.95 / 0.90 | 0.94 / 0.94 | 0.93 / 0.94 | 0.80 / 0.85 | 0.94 / 0.96 | 0.76 / 0.87 | 0.83 / 0.84 |
| Reports | Histology | ER | PR | HER2 | Nodes | Margin | pT |
|---|---|---|---|---|---|---|---|
| Reference reports | 0.55 / 0.08 | 0.51 / 0.02 | 0.48 / 0.02 | 0.35 / 0.05 | 0.85 / 0.03 | 0.27 / 0.07 | 0.59 / 0.09 |
| MI-Gen [ 3 ] | 0.55 / 0.07 | 0.13 / 0.07 | 0.21 / 0.07 | 0.10 / 0.07 | 0.44 / 0.28 | 0.21 / 0.06 | 0.17 / 0.15 |
| HistGen [ 15 ] | 0.44 / 0.16 | 0.04 / 0.22 | 0.10 / 0.18 | 0.12 / 0.08 | 0.34 / 0.24 | 0.20 / 0.02 | 0.17 / 0.23 |
| Hospital consensus | 0.44 / 0.20 | 0.35 / 0.19 | 0.29 / 0.32 | 0.31 / 0.28 | 0.46 / 0.36 | 0.27 / 0.12 | 0.23 / 0.40 |
| Clasp -Base | 0.58 / 0.11 | 0.23 / 0.18 | 0.26 / 0.18 | 0.14 / 0.10 | 0.38 / 0.34 | 0.27 / 0.08 | 0.18 / 0.20 |
| + Esp + Ccd + Csp = Clasp CE | 0.52 / 0.11 | 0.27 / 0.28 | 0.32 / 0.26 | 0.14 / 0.10 | 0.56 / 0.35 | 0.23 / 0.07 | 0.17 / 0.12 |
| B-4 | MTR | R-L | Len | F1 | Contr. | ER | PR | Nodes | |
| Clasp -Base | 0.1106 | 0.150 | 0.287 | 109 | 0.293 | 0.169 | 0.38 / 0.18 | 0.38 / 0.18 | 0.68 / 0.34 |
| Clasp CE | 0.1383 | 0.172 | 0.289 | 143 | 0.313 | 0.185 | 0.48 / 0.28 | 0.50 / 0.26 | 0.88 / 0.35 |
| Clasp | 0.1425 | 0.174 | 0.301 | 143 | 0.328 | 0.232 | 0.67 / 0.34 | 0.67 / 0.36 | 0.95 / 0.46 |
| abstain: receptors | 0.1265 | 0.162 | 0.298 | 122 | 0.222 | 0.130 | 0.06 / 0.04 | 0.05 / 0.02 | 0.92 / 0.48 |
| abstain: receptors, nodes | 0.1022 | 0.143 | 0.294 | 95 | 0.187 | 0.116 | 0.07 / 0.06 | 0.03 / 0.03 | 0.69 / 0.39 |
| Method | REG | KEY | EMB | CRQS | CFC | KIR | HR | CDS | BERTSc. | CE-F1 |
|---|---|---|---|---|---|---|---|---|---|---|
| MI-Gen [ 3 ] | 0.355 | 0.158 ∗ | 0.788 † | 0.259 | 0.505 | 0.566 | 0.416 | 0.284 | 0.156 † | 0.446 |
| HistGen [ 15 ] | 0.334 ∗ | 0.134 ∗ | 0.757 ∗ | 0.236 | 0.482 ∗ | 0.555 | 0.414 | 0.297 | 0.152 † | 0.374 ∗ |
| HistoGPT-1B [ 50 ] | 0.329 0.012 ∗ | 0.121 0.011 ∗ | 0.775 0.022 | 0.157 0.064 ∗ | 0.468 0.047 ∗ | 0.506 0.062 ∗ | 0.486 0.009 ∗ | 0.340 0.016 ∗ | 0.190 0.012 † | 0.360 0.041 ∗ |
| SlideChat arch. [ 5 ] (7B) | 0.320 0.010 ∗ | 0.111 0.011 ∗ | 0.780 0.028 | 0.185 0.073 ∗ | 0.490 0.029 ∗ | 0.534 0.058 ∗ | 0.493 0.048 ∗ | 0.331 0.030 ∗ | 0.163 0.001 † | 0.321 0.011 ∗ |
| TITAN [ 12 ] + LLM (7B) | 0.324 0.006 ∗ | 0.110 0.010 ∗ | 0.792 0.003 † | 0.207 0.030 ∗ | 0.515 0.011 | 0.566 0.009 | 0.517 0.030 ∗ | 0.331 0.026 ∗ | 0.168 0.002 † | 0.342 0.018 ∗ |
| + Clasp decisions as text | 0.332 0.003 ∗ | 0.121 0.006 ∗ | 0.803 0.002 † | 0.248 0.034 | 0.549 0.027 † | 0.579 0.027 | 0.484 0.008 ∗ | 0.314 0.017 ∗ | 0.169 0.004 † | 0.457 0.013 |
| Metric | Retrieved, unedited | + edits by rule | Clasp | ||
|---|---|---|---|---|---|
| BLEU-4 | 0.1083 | 0.1110 | 0.329 | 0.1425 | 0.001 |
| ROUGE-L | 0.285 | 0.274 | 0.001 | 0.301 | 0.001 |
| CIDEr | 0.137 | 0.047 | 0.001 | 0.113 | 0.013 |
| Stated findings, micro-F1 | 0.393 | 0.500 | 0.001 | 0.439 | 0.001 |
| Stated findings, macro-F1 | 0.282 | 0.368 | 0.002 | 0.218 | 0.001 |
| Clinical record, macro-F1 | 0.306 | 0.335 | 0.016 | 0.328 | 0.434 |
| Seen on the H&E slide | Not determined by the H&E slide | |||||||||
| Histology | Tumour size | ER, PR, HER2, nodes, margin | ||||||||
| Reports | Stated | Acc. | F1 | Stated | Acc. | F1 | Stated | Acc. | F1 | Contr. |
| Reference reports | 0.74 | 0.90 | 0.55 | 0.58 | 0.84 | 0.59 | 0.48 | 0.91 | 0.49 | 0.052 |
| Clasp -Base | 0.91 | 0.88 | 0.58 | 0.43 | 0.53 | 0.18 | 0.48 | 0.62 | 0.26 | 0.169 |
| + length control | 0.89 | 0.89 | 0.57 | 0.44 | 0.53 | 0.18 | 0.56 | 0.63 | 0.31 | 0.189 |
| Clasp (ours) | 0.88 | 0.85 | 0.52 | 0.23 | 0.45 | 0.12 | 0.65 | 0.60 | 0.33 | 0.232 |
| Claimed | Unclaimed | Agreement | CE-F1 | CE-F1, oracle claims | |
|---|---|---|---|---|---|
| Clasp -Base + Esp | 0.491 | 0.097 | 0.566 | 0.422 | n/a |
| Clasp -Base + Esp + Ccd | 0.579 | 0.039 | 0.691 | 0.446 | 0.621 |
| Clasp CE (+ Csp ) | 0.530 | 0.031 | 0.659 | 0.477 | 0.590 |
| Symbol | Meaning |
|---|---|
| tile embeddings of a slide (UNI2-h, ) | |
| projected tiles; output of the finding-aware tile attention | |
| , , | topic bag (most frequent findings), ; its word embeddings |
| findings attended by every tile; tiles gathered by them | |
| finding-graph nodes; embeddings of the retrieved reports | |
| , | adjacency of the finding graph, its normalisation; node features after graph convolutions |
| Model | Params | Size | GFLOPs | s/slide | Peak GiB |
| MI-Gen [ 3 ] | 15.2M | 61 MB | n/a | n/a | n/a |
| HistGen [ 15 ] | 22.0M | 88 MB | n/a | n/a | n/a |
| RANGER [ 6 ] | n.r. | n.r. | n.r. | n.r. | n.r. |
| Clasp -Base | 29.5M | 118 MB | 570 | 1.28 | 0.50 |
| Clasp (ours) | 35.1M | 140 MB | 587 | 1.60 | 0.51 |
| Compartment | Findings | Pairs | Degree |
|---|---|---|---|
| Invasive tumour | invasive ductal carcinoma (59.0%), histologic grade 2 (26.3%), histologic grade 3 (26.0%), lymphovascular invasion (20.6%), estrogen receptor positive (15.4%), invasive lobular carcinoma (13.8%), tumour necrosis (11.9%), multifocal tumour (9.6%) | 28 | 8 |
| Ducts and lobules | ductal carcinoma in situ (31.9%), microcalcifications (15.9%), lobular carcinoma in situ (9.1%), usual ductal hyperplasia (8.8%), atypical ductal hyperplasia (6.2%) | 10 | 5 |
| Benign parenchyma | fibrocystic change (20.1%), microcalcifications (15.9%), biopsy site changes (12.9%), stromal fibrosis (6.2%), sclerosing adenosis (5.6%) | 10 | 5 |
| Axillary lymph nodes | lymph node metastasis (29.4%), extranodal extension (9.8%) | 1 | 2 |
| Surgical margins | positive surgical margin (5.8%) | 0 | 1 |
| Global node, connected to every finding | 20 | 20 | |
| Method | B-1 | B-4 | MTR | R-L | CIDEr | F1 f |
|---|---|---|---|---|---|---|
| Most similar training report | 0.430 | 0.095 ∗ | 0.196 † | 0.284 | 0.143 | 0.449 |
| Consensus of 30 similar | 0.412 ∗ | 0.091 ∗ | 0.170 † | 0.270 ∗ | 0.088 | 0.458 |
| Clasp -Base | 0.363 0.021 ∗ | 0.097 0.007 ∗ | 0.141 0.006 ∗ | 0.286 0.002 ∗ | 0.086 0.031 | 0.479 0.030 |
| Clasp CE | 0.418 0.002 ∗ | 0.115 0.002 ∗ | 0.149 0.002 | 0.286 0.007 ∗ | 0.123 0.010 | 0.417 0.046 ∗ |
| Clasp (ours) | 0.434 0.007 | 0.128 0.004 | 0.152 0.001 | 0.297 0.007 | 0.116 0.007 | 0.469 0.039 |
| Model | File | Patients | Train (792) | Val (85) | Test (92) |
|---|---|---|---|---|---|
| SlideChat | SlideInstruction, stage-1 captions | 3294 | 602 | 65 | 75 |
| SlideInstruction, stage-2 VQA | 3294 | 602 | 65 | 75 | |
| SlideBench-Caption (its test set) | 1547 | 147 | 14 | 11 | |
| WSI-LLaVA | WSI-Bench, train | 8383 | 790 | 85 | 92 |
| WSI-Bench, test | 727 | 161 | 15 | 16 |
| Method | Tokens per report | Distinct reports (seeds 9233 / 1 / 2) | Macro-F1 of stated findings |
|---|---|---|---|
| HistoGPT-1B | 98 | 83 / 88 / 87 | 0.183 |
| SlideChat arch. (7B) | 110 | 36 / 17 / 27 | 0.098 |
| TITAN + LLM (7B) | 110 | 28 / 74 / 49 | 0.133 |
| + Clasp decisions as text | 134 | 92 / 92 / 91 | 0.321 |
| LLM without visual input (7B) | 111 | 1 / 1 / 1 | 0.086 |
| Clasp (ours) | 143 | 92 / 92 / 92 | 0.218 |
| Metric | TITAN + LLM | + Clasp decisions | Difference | + retrieved reports | Decisions retrieved | ||
|---|---|---|---|---|---|---|---|
| BLEU-1 | 0.340 | 0.405 | 0.001 | 0.351 | 0.001 | ||
| BLEU-4 | 0.0780 | 0.0878 | 0.004 | 0.0926 | 0.148 | ||
| METEOR | 0.140 | 0.161 | 0.001 | 0.153 | 0.033 | ||
| ROUGE-L | 0.251 | 0.260 | 0.003 | 0.279 | 0.001 | ||
| CIDEr | 0.039 | 0.076 | 0.003 | 0.092 | 0.267 | ||
| Stated findings, micro-F1 | 0.342 | 0.457 | 0.001 | 0.418 | 0.019 |
| Baseline | Seed | Validation BLEU-4 per validated epoch | Selected | Test length | |||
|---|---|---|---|---|---|---|---|
| HistoGPT-1B | 9233 | 0.0649 (2) | 0.0674 (4) | 0.0804 (6) | 0.0721 (8) | 6 | 106 |
| 1 | 0.0693 (2) | 0.0787 (4) | 0.0740 (6) | 0.0699 (8) | 4 | 93 | |
| 2 | 0.0734 (2) | 0.0830 (4) | 0.0760 (6) | 0.0818 (8) | 4 | 96 | |
| SlideChat arch. | 9233 | 0.0973 (1) | 0.0490 (2) | 0.0519 (3) | 1 | 130 | |
| 1 | 0.0531 (1) | 0.0632 (2) | 0.0585 (3) | 2 | 86 | ||
| 2 | 0.0735 (1) | 0.0564 (2) | 0.0689 (3) | 1 | 115 | ||
| Val B-4 | Test B-4 | Test MTR | Test R-L | |||||
|---|---|---|---|---|---|---|---|---|
| Seed | Sast | EMA | Sast | EMA | Sast | EMA | Sast | EMA |
| 9233 | 0.1463 | 0.1516 | 0.1452 | 0.1471 | 0.1753 | 0.1744 | 0.3042 | 0.3043 |
| 1 | 0.1480 | 0.1539 | 0.1421 | 0.1455 | 0.1738 | 0.1772 | 0.3009 | 0.3036 |
| 2 | 0.1468 | 0.1466 | 0.1402 | 0.1408 | 0.1720 | 0.1727 | 0.2969 | 0.2997 |
| Mean | 0.1470 | 0.1507 | 0.1425 | 0.1445 | 0.1737 | 0.1748 | 0.3007 | 0.3025 |
| Variant | Stage | Variant | Reference model |
|---|---|---|---|
| (i) learned structure planner | sequence-level | 0.1430 (1) | 0.1430 ( Clasp CE , same seed) |
| (ii) finding-consistency reward | sequence-level | 0.1419 (3) | 0.1470 ( Clasp ) |
| (iii) sentence-level length budgets | cross-entropy | 0.1284 (3) | 0.1419 ( Clasp CE ) |
| (iv) aligned exemplar editing | cross-entropy | 0.1276 (3) | 0.1419 ( Clasp CE ) |
| (iv) aligned exemplar editing | sequence-level | 0.1362 (3) | 0.1470 ( Clasp ) |
| Train | Val | Test | |
| Patients (= slides) | 792 | 85 | 92 |
| Tokens per report, mean / median | 139.7 / 125 | 149.4 / 133 | 149.2 / 138 |
| Sentences per report, mean | 8.9 | 9.4 | 9.5 |
| Contributing sites (TSS) | 37 | n/a | n/a |
| Tiles per slide, mean / max | 12,016 / 38,962 | ||
| Group | Setting | Value |
|---|---|---|
| Input | tile encoder / tiles | UNI2-h, 1536-d, 256 px at 20 , all tissue tiles |
| bag cap | 10,000 tiles (random subset per training epoch; evenly spaced at evaluation) | |
| Ske , Pcd | model width / heads / FFN | / 8 / 2048 |
| decoder layers / dropout | 3 / 0.1 | |
| topics / retrieved reports | 20 / 100 (max-pooled BERT embeddings) | |
| finding graph | 20 topic nodes + global node, 69 edges, 5 tissue compartments, 2 residual graph convolutions |
Medical Report Generation
Medical report generation turns medical images, clinical records, or conversations into structured, clinically useful reports.
See all 92 papers